How city strength is calculated in detail

Ninakoru

A deity on Emperor
Joined
Nov 14, 2002
Messages
658
Location
Madrid, Spain, Europe
Hi there, I'm planning on making a mod to lower city strength and I got into the code to see how exactly the city strength value is calculated. Here are all the variables outside of policies/beliefs/wonder multipliers:

- A city has a base strength of 8
- The capital has an extra of 2.5 defense (the palace acts as a minor-wall)
- Each 5 population gives 2 extra defense
- Stading on a hill gives a plain 5 extra defense
- The Tech Progress gives a 0 to 5.5 (percentage based on techs/total tech * 5.5) exponented to 2.8. As the value is hard to guess here are some checkpoint values:

All ancient techs: 0.5 extra defense
All classical techs: 2.7 extra defense
All medieval techs: 8 extra defense
All renaissance techs: 17.5 extra defense
All industrial techs: 32.4 extra defense
All modern techs: 51 extra defense
All atomic techs: 72.5 extra defense
All techs: 118.3 extra defense


- All city walls add the defense shown at the building, up to 33 extra defense (and 125% extra HP)
- Garrisoned unit gives up to 20% of its attack strength as city defense, droping with unit remaining hp as percentage (50 hp = 10% of the attack value, 25 hp = 5% of the attack value). As example a mechanized infantry unit with full HP adds 18 defense to the city it garrisons.

Is just curiosity, but is always interesting to pleople like me to know the game mechanics details, hope some of you have similar concerns. :crazyeye:
 
I just got back into playing civ 5 and was wondering this, I'm so glad to see that somebody had posted it all those years ago! :)
 
Thank you for putting out this information! I don't agree with making the cities weaker, but that's up to you of course.
 
Top Bottom