Combat System Explained

Valant2

Chieftain
Joined
Nov 1, 2001
Messages
43
What I want to do is to be able to make this thread the be all information on how combat works in Civ3. Most of this info I have comes from the instruction manual snipits, civilopedia, various websites and forum feedback. Really wished the manual was more specific on hard numbers used in calculations. If you have anything to add to this thread (like erroneous data or missing data) please do so and I will edit my origional post to import the new data.

HP:
The only different in conscripts, standard, vetran and elite units is the number of hit points they have. During battle each time the unit loses on a battle roll they loose 1 hp.
Conscript 2hp
Standard 3hp
Vetran 4hp
Elite 5hp

Terrain Bonuses:
When combat occurs over a river, the defender receives a 25% bonus.

The defensive terrain bonuses are as follows
10 Floodplains, Grasslands, Plains, Desert, Tundra, Coast, Sea, Ocean
25 Forest, Jungle
50 Hills
100 Mountains

How these numbers are used in the battle calculations in all situations are UNKNOWN.

By the looks of it terrain does not give any offensive bonuses what so ever.

Manmade Bonuses:
Cities & Walls
Walls give a ground defensive bombardment of 8. The way this value of 8 is used is UNKNOWN.
Units in cities of population of 6 or below do not receive a defensive bonus.
Units in cities of population of 6 or below that have city walls give a defensive bonus of 50%
Units in cities of population of 7-12 receive a 50% defensive bonus, reguardless of city walls.
Units in cities of population over 12 receive a 100% defensive bonus, reguardless of city walls.

The mod does contain values based on the number of population the city has and the number of improvements it has...but when these numbers are plugged in is UNKNOWN.

It is also UNKNOWN if terrain bonuses are applied based on the terrain the city was build on.

Great wall
Supposed to double the effect of city walls to a 100% bonus to the defense of units, but once your city exceeds a population of 6, the option to build citys walls no longer appears in your production list. So right now its UNKNOWN what effect the great walls have on towns over population of 6.

Fortresses
Build outside of cities. When a unit is stationed in a fortress it receives a 50% bonus to their defense.

Units stationed in a fortress receive an offensive bonus of being able to get "free shots" on the enemy. The specific definition of "free shots" is UNKNOWN. I have not seen it myself, but based on feedback I think this is what happens. Every unit inside of the fortress will automatically attack any approaching enemy unit (no limit) and not lose their turn. The free shot only involves 1 turn battle where if the unit in the fortress wins the roll, 1hp will be removed from the enemy unit outside of the fortress. If the unit in the fortress loses, no damage will occur on wither unit. Each turn while the enemy unit is next to the fortress, each unit inside of the fortress with get a free shot on each enemy unit next to the fortress. Once again I THINK this is what happens.

Airport
Provides NO attack/defensive bonuses.

Coastal Fortress
Provides a naval defensive bombardment value of 8. The way this value of 8 is used is UNKNOWN.
This provides a 50% defensive bonus to all units stationed in the city against naval attacks. Plus a costal fortress will take pot shots at passing enemy sea vessels. The specific definition of "pot shots" is unknown, but I THINK its alot like fortresses. Each turn the fortress fires on nearby enemy ships using an attack factor of 8. If successful the offending sea vessels suffer 1hp of damage. The fortress will be able to fire on all enemy ships within range, which I believe is 1.

SAM Missle Battery
Civilopedia simply states that it attempts to attack air units that are attacking the city its in. Hard data on how this works specifically is UNKNOWN.

Strategic Missle Defense
Has a 75% chance to destroy incoming ICBMs.

Unit Abilities:
Retreat
Units that have a higher movement modifier than the opponent and have no used all of their movement points can retreat when their hp drops to 1.

Fortify
A fortified unit receives a defensive bonus of 25%, but no offensive bonuses.

Bombarbment/bombing
(Have only tried bombardment a little so its hazy here)
The attack value of the boming unit affects its successful rate, but how exactly is UNKNOWN. Also what factors determine the probability that determines if its a city improvement, unit, city wall, population hit is UNKNOWN. Also I assume all successful bombarbments on a military units only results in 1hp lost. I recently found that bombardment units have a value called rate of fire. From feedback, rate of fire is the number of "projectiles" the unit can fire per attack turn. For example a unit with a RoF of 2 does 1 attack on a city, the city is affected by 2 hits (if both did hit).

Army
Units in an army can only move as fast as the slowest unit in the army. When an army attacks or defends the first unit continues to fight/defend until the unit is down to 1hp. After which the unit gets replace with the next unit. This continues until the army gets to its last unit where that one is destroyed when its hp reaches zero, but the other 1hp units remain undestroyed (albeit heavily damaged).

Nuclear Attacks
Has a 50% chance to destroy each unit caught in its blast area (reguardless if its a friend or foe unit) and reduces a city's population by 50%. Size of the blast area is UNKNOWN.

Other:
The affect of difficulty level has NO effect on attack/defense calculations reguardless if the unit is computer or player controlled.

The penalty (if it exists) for naval units caught in port is UNKNOWN.

The penalty (if it exists) for air units caught on the ground is UNKNOWN.

Final Calculations:
Bonus percentages add, so 2 50% bonuses result in a 100% total bonus. How the game deals with rounding is UNKNOWN.

The final caculation to determine the % chance for an attacking unit to win per turn is quite easy. However, what muddles this is that the vaules of the attackers offense and defenders defense vaules are UNKNOWN because the lack of information of how EXACTLY does ALL of the bonuses are totalled up is UNKNOWN. So we can only (at this time) calculate a crude approximation of turn win percentage. For example where the hell exactly is the 50 point defense bonus of hills used....is it +50 points somewhere in the grand equation or is it +50% bonus. Plus how does the game handle rounding is also UNKNOWN.

Crude Turn Win % = (attackers offensive rating)/ ((attackers offensive rating)+(defenders defensive rating))

If the unit wins the turn, it causes 1hp of damage to the opponent. If it loses the turn, its loses 1hp of damage.

Dusted off my only high school probability and statistics book and I think I found the correct formula to predict the crude final battle win %. After a quick scan I found the binomial equation, abeit if memory serves me right there is a better one when your looking for a specific number turns won and the number of "coin tosses" is a ranged variable.

* I am pretty sure there is better equation out there...help me find it guys *

X = (HP of both units added together - 1)
Y = HP of defender
Z = X - Y
A = Crude turn win % (in a .xx format so 50% would be .50)
B = 1 - A
C = (X-Y)!

Crude final battle win % = (X!/(Y! * C!)) * (A^Y) * (B^Z)

So for example an attacker of hp of 5 (elite) is attacking a defender of hp of 3 (regular). The attacker has a crude turn win % of 66% or .66

So the crude final battle win % would be (7!/(3! * 4!)) * (.66^3) * (.33^4) which equals 11.9% of the outcome being killing the defender in 7 turn battle. The 11.9% seems small but you need you need to add the percentage chance of winning in a 6, 5, 4 and 3 turn battle to get the real overall chance of winning the battle. So for each battle the number of times you have to run through the above equation as many times as the HP of the attacker. So for a 5hp on 5hp unit battle you will have to go through a 5,6,7,8 and 9 turn battles and add up their probability. Hence you would have the do this equation multiple times to add up the total chance to win overall....and also hence I state that there must be a better equation to get the total chance of winning the battle with only using 1 equation.

Well its late and I am tired so going to end it here without proofing.....please add what you can.
 
Glad to see someone is tackling this issue. It seems to have gone unnoticed at Apolyton.
 
A couple of upgrades:

Rate of fire (bombardment) = 2 means you get two rounds of attack. You get 0, 1, or 2 hits on your target. I assume each shot is played out like one round of combat - i.e Artillery bombards infantry, 12 vs 10 - you get two 12/(12+10) chances for hits.
If the defender is in a city, your're apt to hit city improvements or civilians instead. Sometimes you get a message that your bombardment failed, and sometimes you get no message at all - I don't know if that means that you reduced the enemies defence or something? :confused:

Fortress "ZOC" opportunity fire ("free shots") - I've never seen this work! I have however seen fast units in the open (usually cavalry, which have 3 moves) take potshots at passing enemy units. It seems to be one shot, just like a bombardment.

Armies - I don't think an army ever loses a component unit. I have had my army reduced to one hp, and after resting in a barracks it was right back to full strength! The units which make an army don't have their own hp after they are pooled, apparently. When the last hp goes, the whole army dies.

Costal fortress bombardment - I assume this means that it takes a potshot (again like an artilery bombardment) with an attack value of 8 vs ships which bump into it. Again I haven't seen this work though.
 
Note on nuclear attack: There is a 50% chance for each unit to die individually. So if you have 10 units in a city you could have 5 die and 5 live, or 7/3, 4/6, etc.
 
Ima post this over here as well in case someone needs an algorithm for their program.
 

Attachments

  • combat.pl.zip
    706 bytes · Views: 645
:( You didn't mention my civ-ulator.

http://www.columbia.edu/~sdc2002/civulator.html

Also, air and sea units caught in a city are automatically destroyed. They have no combat value. Terrain under a city does affect its defense value. The great wall has NO effect on cities and metropolises. I don't know why anybody would think that there's rounding involved at any stage of the calculation. And I think analytic solutions are less useful than numerical ones. There's really not a good solution to the problem when you care about some specific aspect of the ordering (such as whether you succeed 3 times before you fail 4 times).

That's all folks...

Xerxes
 
Xerses:
I wrote this thread before our little tussle in the Come On thread...which I am still waiting on a responce from you. I did not have much responce on this thread so I let it scroll off the 1st page after a did a few updates to be buried with the other old posts...but someone dredgged it up with a fresh post.

One of the questions I asked on Come On thread where I will ask here as well is....How do you know that the terrain under the city is used in the calculation? .... not going to reword the whole thing just check near the end of the Come On thread.
 
*old thread bumping*

i found several combat calculators for civ, but i cant find a formula which is seen as the whole truth but only approxmt

any link for me? thanks in advance.
 
Valant2 said:
Xerses:
One of the questions I asked on Come On thread where I will ask here as well is....How do you know that the terrain under the city is used in the calculation?

How about "because the developers said it does".
 
Xerxes314 said:
And I think analytic solutions are less useful than numerical ones. There's really not a good solution to the problem when you care about some specific aspect of the ordering (such as whether you succeed 3 times before you fail 4 times).

Xerxes

hm yes there is
actually, it does not make it much more complicated
 
ZOC works like this.

Suppose L is a Legion in a fortress. A is an archer.

AXX
XLX
XXX

When A move one space to the right on top of L like so:

XAX
XLX
XXX

The Legion will "stab" at the archer, and if lucky, then the archer will lose 1 hp bar. It happens all the time to me.

Now here's my question. I'm playing the Fall of Rome conquest as the Sassanids. I have a Veteran Heavy Cavalry (5/3/2) stack of doom attacking a Byzantine city of Regular Legions (3/3/1). I know because of defense factors that the Legions have a higher defense value, but my regulars and elites should rip them apart. Except my Elites get torn to pieces by the enemy Regulars and just end up upgrading. Does distance from my territory to the enemy city effect how well my troops fight?
 
Does distance from my territory to the enemy city effect how well my troops fight?
In a word, no.
 
Oh well, I got them anyways.

Hope my ZOC explanations helps, I encounter ZOC all the time, those damn free shots.
 
@AznWarlord You do realize you are necro-posting? this thread is 6 (!!!) years old!
 
Does it matter that he's necroposting if he had a relevant question? It's either that or opening up a new thread, and really, I don't see what all the fuss is about.
 
Top Bottom