Questions about running a deficit and unit gold support

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I posted this in the modding forum (want to know for modding purposes) but realized I might get a better answer here. I hope no one is offended by the double post.:rolleyes:

I need a better understanding of what happens when a civ runs a gold deficit, both game-enforced stuff (for human player) and AI behavior. I assume that DEFICIT_UNIT_DISBANDING_THRESHOLD (=5) determines the deficit level where units start getting disbanded by the game engine. But,
  • will "free" military or civilian units ever be deleted (either by game engine or AI "choice")?
  • does the AI start doing stuff (disbanding, selling buildings) before this?
  • does the game engine ever do more, like forced building-sales?

Also, does anyone know (or have a link to) the equation that determines military and non-military unit costs? I can see that there are 5 (possibly) relevant tags in GlobalDefines:

INITIAL_GOLD_PER_UNIT_TIMES_100 = 50
INITIAL_FREE_OUTSIDE_UNITS = 3
INITIAL_OUTSIDE_UNIT_GOLD_PERCENT = 0 --what's this?
UNIT_MAINTENANCE_GAME_MULTIPLIER = 8
UNIT_MAINTENANCE_GAME_EXPONENT_DIVISOR = 7

...and more in Policies:

BaseFreeUnits, BaseFreeMilitaryUnits, FreeUnitsPopulationPercent, FreeMilitaryUnitsPopulationPercent,GarrisonFreeMaintenance, GoldPerUnit, GoldPerMilitaryUnit, UnitGoldMaintenanceMod, UnitSupplyMod

...but the actual equation would be really helpful. I also don't really understand how BaseFreeUnits is applied versus BaseFreeMilitaryUnits (maybe I'm remembering from Civ4, but for some reason I don't think it works in a very intuitive way).

Thanks in advance for any answers! (even just partial answers)
 
Back
Top Bottom