How to find out upgrade cost of a unit

CppMaster

Emperor
Joined
Feb 13, 2018
Messages
1,475
Location
Poland
Hello,
where can I find information how much gold would upgrade of a unit cost without any reduction when I haven't unlocked it? I wanna know how much gold should I save to when I unlock it. I couldn't find it in ingame civilopedia.
 

amateurgamer88

Emperor
Joined
Aug 24, 2018
Messages
1,463
Hello,
where can I find information how much gold would upgrade of a unit cost without any reduction when I haven't unlocked it? I wanna know how much gold should I save to when I unlock it. I couldn't find it in ingame civilopedia.

I speculate that you can get it from Defines. Maybe someone will correct me on it.

I think the variables we care about are:
BASE_UNIT_UPGRADE_COST = 10
UNIT_UPGRADE_COST_EXPONENT = 1
UNIT_UPGRADE_COST_PER_PRODUCTION = 1
UNIT_UPGRADE_COST_VISIBLE_DIVISOR = 5

The way I understand is that:

(Upgraded production - Old production) * 1 + 10 [With everything rounded to the nearest multiple of 5 so a 0 or 5]

where Upgraded production is the production cost of the better unit and Old Production is the production cost of the previous unit. This is why Longswordsman cost less to upgrade to Tercio than Pikeman.
 
Top Bottom