City Strength

Status
Not open for further replies.

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
There seems to be some lack of understanding out there on city strength so here is a very short guide to it

NORMAL CITY
The Base city strength is the strength of the strongest melee unit minus 10. The additional 10 to make it full strength only occurs when the unit garrisons it. So The Germans have built horsemen (strength 36) but they are not in the capital
The city gets +2 per district which can be reduced by pillaging the district (buildings do not count but must be done)
You can see in the picture the shields say the city has a strength of 33 but in fact it has a strength of 40. This is because terrain and difficulty bonuses are not included so be careful and rememeber.
Only the current capital has +3 for a palace guard
Wall at +2 is only ancient... Medieval +4, Renaissence +6
upload_2017-6-30_18-17-41.png


CITY STATES
From the same game we can see Vilnius does not get a difficulty bonus against me
Vilnius has a district so gets +2 from it
Vilnius is a capital so has a palace guard +3
Vilnius is on a hill +3
Vilnius gets +3 external influence because there are 3 envoys there (despite being mine)
If they had Bastions that would also show as +6 (enhanced Defences) but they do not have this
upload_2017-6-30_17-58-19.png


MODERN WALLS
Finally here is a city I hacked a modern wall into just to make it clear what effects it does
Note that while the city has 200 HP, it has no walls and so gets no + modifier. This is why building Renaissence walls still costs +3 maintenance... because it gives your city +6 strength that modern 'walls' do not... they are not really modern walls, just city HP.
upload_2017-6-30_18-32-48.png
 
Last edited:

Photi

Governor
Joined
Oct 10, 2002
Messages
700
Location
Washington
this was useful, i too often don't read all the details. had no idea districts add to defense, and yet it's right there. also didn't know about the envoys adding defense to city states. do the AIs use bastions much? i will have to pay attention next game.
 

myclan

Prince
Joined
Feb 26, 2008
Messages
590
So assign more envoys to a CS actually help his defence. Does it count the most envoy of players or total envoys?
And civil engineering gives all cities the ability to shoot and full HP, but wall is still more or less useful because it provides extra defence, not so useful for human players though
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
this was useful, i too often don't read all the details. had no idea districts add to defense, and yet it's right there. also didn't know about the envoys adding defense to city states. do the AIs use bastions much? i will have to pay attention next game.
I was looking at some AI civics the other day and that civ had bastions for a while and Limes also moved in and out twice - slightly off topic I noticed last night city states do not have card slots but rather just a set of cards... about 8

So assign more envoys to a CS actually help his defence. Does it count the most envoy of players or total envoys?
It is only the envoys of the largest. I think it maxes out at 6
 
Last edited by a moderator:

Lily_Lancer

Deity
Joined
May 25, 2017
Messages
2,387
Location
Berkeley,CA
City Defense is somehow easy to understand. Max(Garrison Strength, Max.Melee Strength-10) +2*wall level+2*other district num+3(if capital)+3(if hill)-0~10(injured)+1*envoy num(the civ with most envoys)

In fact I'm a little confused about Bastion policy. It seems doesn't work as it's described. For +6 city strength, this bonus seems only apply to cities with outer defenses, say it walls. In fact I don't see my city strength change when I adopt this policy. Does it really works for cities with no outer defenses? For +5 range strength, it seems that this policy add 5 base ranged strength as well as applying a +5 modifier when actually perform an attack, so in fact the bonus is +10.
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
In fact I'm a little confused about Bastion policy. It seems doesn't work as it's described. For +6 city strength, this bonus seems only apply to cities with outer defenses, say it walls. In fact I don't see my city strength change when I adopt this policy. Does it really works for cities with no outer defenses? For +5 range strength, it seems that this policy add 5 base ranged strength as well as applying a +5 modifier when actually perform an attack, so in fact the bonus is +10
I will test and post here later... I never noticed +10 but sounds intriguing
 

PYITE

Prince
Joined
Dec 14, 2016
Messages
395
I think it's a fairly overlooked and misunderstood mechanism. A lot of comments that say it will take unit x, y number of attacks to take a city without any mention of city strength.
Combine this info with the ram/siege tower info from the catapults thread and it's a good start to a city damage guide.
 

JustifierNA

Warlord
Joined
May 20, 2017
Messages
121
Well there are a few, the bombard, tower cat one
The naval bits.... maybe I do a damage guide?
Include a simplified version of the damage formula

I'd love to see a damage aspect as well since I'm currently working on a section regarding this in my guide and this information has already been crazily helpful!
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
@JustifierNA - been doing some damage testing tonight - Melee vs Walled city

1. The city seems to get -1 strength for each 10% of the garrison destroyed, this is a simple rounding to 1 SF
2. The walls take 15% of a melee units normal damage if no seige equipment is around - this is definately paramneter COMBAT_DEFENSE_DAMAGE_PERCENT_MELEE =15 as I changed it to 99 and saw the change
3. There is also collateral damage to the garrison. This seems to be a separate RNG call from the wall combat but all figures point to the garrison damage = Garrison attack value * % of wall destroyed (minimum 1 damage)
4. Fighting a garrison without walls appears to be normal combat with a 200 HP unit of course.

One issue is rerunning a saved combat from the same turn provides the same RNG so for each of many tests you have to create a new game.. sounds worse than it is with firetuner but still takes time.

This number 3 was the hardest to calculate and I need some more tests to solidify. due to RNG I'm having to proove via large tests and the wall damages are not gept in the combat csv file so all painstaking hand work.I imagine this same design bleeds over to seige units which avoid the % modifiers.

I also imagine as these modifiers all have the same name they related to wall damage in the same way but need testing

COMBAT_DEFENSE_DAMAGE_PERCENT_BOMBARD 100
COMBAT_DEFENSE_DAMAGE_PERCENT_MELEE 15 <<< I believe mounted count as Melee here
COMBAT_DEFENSE_DAMAGE_PERCENT_RANGED 50

any queries of specific tests I will do them, I could publish come results but numbers get boring. Heres one set just to show I'm being honest (each test is 6 musketmen attacking a city with a barb in it and modern walls)
upload_2017-7-7_0-35-18.png


I could not have done this without creating a decent combat chart to start which I posted here
Hans Lemurson figures out the Combat Formula
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
I am creating a damage guide... will this thread not keep the test data?
Did you want me to post all the test data.. its quite a lot
The Damage Guide will cover all damage and modifiers to all combats in the game... hopefully it will be useful. If there is any area of damage you are unsure about or want to make sure is included, just mention here
Also these tests take 1/2 an hour roughly now I am used to them so if you want a spread sheet shows with a particular strength city with a particular unit feel free to request

Here is a machine gun test just done... it has been verified with bow and xbow and field artillery as well
Ranged are -17 combat strength versus cities whether walled or not. This parameter (COMBAT_RANGED_VS_DISTRICT_STRENGTH_MODIFIER) is applied before combat so you see it on the screen when attacking
If the city has walls then the damage applied to the walls at 50% as per parameter COMBAT_DEFENSE_DAMAGE_PERCENT_RANGED The overflow damage onto the garrison also gets 50 % reduction because the light green columns are indicating a rough 50% difference below. The right two green columns show its a 50% reduction... remember its not 100% accurate because there is a randomn element is each attack as I can just forecast on expected damage using an average RNG of 30.
The DGM formula is just a validation each test that the city strength reduction formula I have is working fine 100% (validated against the diff column- combat strength difference)
The grey lines are just validation lines to ensure I recorded the damage correctly because it has to be done by hand :(.. and you can see how bad my typing is!
Each set below is 6 machine guns taking a shot at a city one after the other. The cities have modern walls with infantry garrisons... but its an irrelevance. The only thing that counts is it is ranged and the differential in strangth
I also post below the artillery findings

Machine Gun test
upload_2017-7-7_9-47-13.png


Artillery Test
Green shows the damage was withing the expected range to validate garrison overflow
upload_2017-7-7_9-57-33.png
 
Last edited:

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
Galley Test
Wall damage = max(1,damage * 15%) 15 % of ship damage
Garrison damage = max(1,damage * wall_%_damaged) ship damage times percentage of wall damaged
Garrison Strength reduction = 10-ROUND(Current_garrison_HP/20,0) -1 strength per 20% of garrison damaged
100% against no walls
Galley takes normal combat damage from city combat strength

upload_2017-7-7_20-56-36.png
 
Last edited:

Forster

Prince
Joined
Dec 24, 2005
Messages
521
Location
Columbus, GA
So, how would you summarize the results? To be honest I am really sick right now and my head hurts much too much to try and absorb your hard work.
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
As far as I am aware no-one had worked out how damage was spread between the walls and the garrison.
I am doing lots of tests to ensure quantity of data stands the test.

Summary
When you attack a city with walls the damage to the garrison is based on the % that the walls are damaged. So at 0% walls left your attacks don100% normal damage on the garrison (the city)

The rest is just trying to tidy up what units benefit from what modifiers so I can bang it all in one guide as simply as possible
 

Arent11

King
Joined
Nov 18, 2016
Messages
996
I am creating a damage guide... will this thread not keep the test data?
Did you want me to post all the test data.. its quite a lot

Nope, I just want to keep the major results of the catapult & this thread somewhere. If you are doing some kind of damage guide where the central screenshots & mathematical formulas are shown, then everything is well.

I just think this already goes towards an experimental, scientific analysis & you should earn the wage of a typical postdoc.
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
I just think this already goes towards an experimental, scientific analysis & you should earn the wage of a typical postdoc.
I am not sure I would like the wage decrease but would probably snap it up in a year as my job is shaky.
High end performance analysis is a dying art with AWS etc. It why I have the time.

Yeah, I'll bang it in a guide with summary at the front and detail at the back.
 

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,883
Quadrireme Test (Naval Ranged test)
Wall damage = max(1,damage * 50%) 50 % of ship damage
Garrison damage = max(1,damage * wall_%_damaged) ship damage times percentage of wall damaged
Garrison Strength reduction = 10-ROUND(Current_garrison_HP/20,0) -1 strength per 20% of garrison damaged
100% damage against no walls
Quadriremes do not have a -17 ranged reduction against cities like land ranged units
Inadequate proof currently that the -50% ranged is applied to garrison overflow but expect it will

upload_2017-7-8_22-1-33.png


Naval Raider Test
Same rules as Naval Ranged
upload_2017-7-8_22-41-16.png
 
Last edited:
Status
Not open for further replies.
Top Bottom