Defense bonuses -- question

LoneWolf5050

Warlord
Joined
Oct 24, 2001
Messages
214
Location
Toronto, Ontario, Canada
Hi all,

I was wondering if anyone could give a definitive answer to this question:

Does fortifying a unit give it a 25% defense bonus? I believe it does, but not all sources of information actually state this, and some combat result calculators don't seem to take this bonus into account (if it does exist).

Related to that, does fortifying a unit inside a walled town, or a city, give you a 50% bonus *on top of the 25% bonus?* Or does fortifying only have an effect on open terrain and unwalled towns?

Thanks very much,

--LW
 
This is off the top of my head, but I believe that fortifying does give the 25% bonus. However, I did not get a large pool of results from fortified battles for my calculations. On a similar note, the bonus for combat over a river is only 15% (experimentally derived).

Edit:

Now that I have found where the river bonus is in the editor, I see that it is set by the game at 25%. I had spent quite a while looking for that value, but some how always missed it. Therefore my assertion is False and the river bonus is 25%. The cause for this is that a 10% change in the bonus value for a tank spearman matchup results in only a 1% change in winning probability. And for a tank infantry it is only a 2% change. Quite small.

Along the same lines the effect of a river on a tank infantry matchup on flat land is a decrease in the attacker's win percentage by only 5%
 
15%. Wow. I've been working on a series of charts that you can print out and use to easily calculate combat odds without having to ALT-TAB to a separate program or spreadsheet.

But the first part of the calculation is figuring out the modified defense strength. It's easy to do a chart where reach row is a 25% increase in defense strength, and you just jump up a row or two depending on whether you're fortified and/or over a river.

But if over a river is not 25%, then it's even harder to make it easy to do that calculation on a paper chart. *sigh*

--LW
 
Here are some terrains and defensive bonuses:
other side of the river 25%
battle in jungle 25%
defender fortified 25%
battle in hills 50%
defender in fortress 50%
defender in city wich has walls 50%
defender in city size 7-12 50%
defender in city bigger than 12 100%
battle in mountains 100%
most other terrains 10%
 
Originally posted by kurt
Here are some terrains and defensive bonuses:
other side of the river 25%
battle in jungle 25%
defender fortified 25%
battle in hills 50%
defender in fortress 50%
defender in city wich has walls 50%
defender in city size 7-12 50%
defender in city bigger than 12 100%
battle in mountains 100%
most other terrains 10%

The river bonus currently is only 15%. (see my above post and the combat thread for the actual results from the experiments).

Moderator Action: Oops, I didn't change anything :D
Please read the forum rules: http://forums.civfanatics.com/showthread.php?t=422889
PH76
 
Is there an ATTACK bonus also? For example, if I attack from a hill or mountain down to a defender or city on the plains, or if I attack from a mountain down to a hill, is it the same as attacking from the flats, or do I have an advantage?
 
Excuse me etj4Eagle but I visited several sites and all said what I wrote. Can you please tell me how did you get 15% so I can try it at home. I don't know, maybe they are all wrong and you are right. Who knows.
 
I've increased river attacks to 100% and yet weaker units still successfully attack across rivers all the time. I figure a fortified spearman behind a river should never lose to a warrior, but I lose alot of my sentry spearmen this way.
 
Originally posted by kurt
Excuse me etj4Eagle but I visited several sites and all said what I wrote. Can you please tell me how did you get 15% so I can try it at home. I don't know, maybe they are all wrong and you are right. Who knows.

I created a map with the new editor and added units for and units for the AI players. And set the map so I would be attacking across a river. Then after doing a series of 25 stack attacks I determined where all the hit points fell. From that I was able to get an experimental win percentage and compared that to the theoretical one. And noticed that I was winning too much at a 25% defense bonus, but it matched at 15%.

Then to check the math backwards, I took the win percentage P and calculated the accumulated bonuses as B=(A/D)-A-1. From this I got a .4 for for a defense bonus in a jungle acrooss a river and a .25 for desert across a river. After removing the terrain bonus you get a .15 defense bonus for the river.


Now I am not surprised on the other sites all saying 25%, as I think I am the only one who has actually checked the value. And also they all probably are based off one and another. There are various myths that have been generated in these forums as well.
 
AAARRRRRRRRRRRRRRRRRR ..... to much math!! ..... the concideration isnt enough to ever stop me attacking .... i move to the same side of a river if i can ... and if no ... then i dont care that much

u people are far to dedicated for me!! ... u must have NO life ... compared to my ... errm ... no life

so etj4Eagle ... u published your scientific results? .... or just did them for yourself?
 
Originally posted by etj4Eagle
I created a map with the new editor and added units for and units for the AI players. And set the map so I would be attacking across a river. Then after doing a series of 25 stack attacks I determined where all the hit points fell. From that I was able to get an experimental win percentage and compared that to the theoretical one. And noticed that I was winning too much at a 25% defense bonus, but it matched at 15%.
A samplying of Twenty-five!??! Try it again with 100 and it would still be way low for a statistical sampling. Either trust the documentation or start flogging yourself till you do a sampling of a FEW HUNDRED!

JB
 
Originally posted by kurt
Here are some terrains and defensive bonuses:
other side of the river 25%
battle in jungle 25%
defender fortified 25%
battle in hills 50%
defender in fortress 50%
defender in city wich has walls 50%
defender in city size 7-12 50%
defender in city bigger than 12 100%
battle in mountains 100%
most other terrains 10%

:hammer: Gee whiz... What if there's a fortress on a mountain? How's defense then? (You can have MARINES anihillated by riflemen in mountains with forts. Even ARMOR can get slaughtered assaulting riflemen on the mountains! ESPECIALLY if they've got a fortress up there!

:king:
 
Originally posted by Jaybe

A samplying of Twenty-five!??! Try it again with 100 and it would still be way low for a statistical sampling. Either trust the documentation or start flogging yourself till you do a sampling of a FEW HUNDRED!

JB

Note that I said a series of stacks of 25. Since each game I started I could have at max 25 of each unit. Note also that I am not looking at combat wins, but at the actual rounds. Not only does this give me more samples, it makes much easier math.

Since Selous asked, I will repost the current results.:)
A D B Rounds Actual Predicted description of bonus
24 10 10% 207 69.6% 68.6% desert
8 2 10% 94 72.3% 78.4% desert
16 2 10% 103 86.4% 87.9% desert
8 6 10% 135 54.8% 54.8% desert
16 2 40% 181 85.1% 85.1% jungle across river
16 2 25% 172 83.1% 82.8% desert across river

Interesting how here I have someone saying my results showing combat working as expected is no good because I have too few results and yet on another thread I have at least one person dismissing the results because they are over too many rounds. (The reason for that is because there is some logic to the argument that having to fight a hundred battles to get the predicted results is no good).

On on Selous's other question, I just did these tests when I wanted to play a little civ but not devote the hour or two for a good play at my game. a
 
A couple points about your analysis, Eagle.

First, the default defense bonus listed in the editor for "river" is 25, which would make it pretty hard to dispute that the defense factor is, indeed, 25, unless you aren't on v 1.21f. I can't vouch for the value under previous versions as I haven't looked, but I would be willing to bet that Civ-related websites have listed this value as 25 because this has been the value listed in the editor for all versions.

Second, even a few hundred trials is not nearly enough to be statistically relevant, especially given the randomness coded into the battle system. Now, if you had carried out a few hundred thousand trials, your results would carry more weight.

Thirdly, your defensive units in the river trials (in fact in all trials except the first set) will be given non-integer bonuses. Now, I don't know how the game calculates round results when an attacker or defender has a non-integer attack or defense, but it could be skewing your results.

Fourthly, the idiot who claimed that a higher number of trials is fixing your results in a statistical analysis should NOT be quoted in a serious argument about statstical analysis.

Cheers
 
Ah yes you are right it does say 25% in the editor. I had looked all over for that value and only used a different value as I couldn't find the value set in the editor. And yes this is with version 1.21 (I can't do the unit placements otherwise). I will have to run some more tests and look at this some more. It is possible that terrain bonuses add up differently when a river is in place (possibly for flat lands dropping the 10%, but will have to run more trials).

And yes I do realize that these are non integer values, I had even posted in a previous thread a few months ago asking why people though the game was rounding to integer values. I have excel to the calculations and it keeps the numbers of course as doubles.

I know that more trials is important and that the other guy did not really grasp statistics. Of course he did have a point on how rapidly the randomness converges to the expected. Since we are dealing with a finite number of units in a game, we expect convergance of the probabilities for that average number of combat rounds in a game.

I am also working under the assumption that the random number generator is working correctly. Another poster a while back hacked the game and ran calls on the random number generator and than used the DIEHARD suite of tests on the results. His conclusions were that the generator was performing fine.

Consequently, when my data remained consistant from one set of experimental runs to the next I took that as indication that I was seeing convergance. Now ideally someone could hack into the game and find a way to generate calls to the combat function saying tank attacking spearman across river in a jungle and repeate that a few thousand times. Unfortunately this is the best that I can do. However, this data is more hard than the ancedotal evidence used that the combat system/RNG is buggy or that there are AI cheats. In fact given the above result there would appear to be an anti-ai cheat :)

The river bonus only made a minor differance in a spearman match up. So that could very well be the cause of my error, had not thought about that. However, if it hadn't been for the two different matchups showing the same error, I would not have changed the value of the river bonus in my spreadsheet. Well will run more of those tests, and it should converge more correctly.
 
Eagleman,

I admire all your testing work in this area, but how do we know whether the defensive bonuses are cummulative of simple additive??

For example, a spearman fortified (F order) on a hill across a river could be:

1) 2 * 1.25 * 1.50 * 1.25

or

2) 2 * (1.00 + 0.25 + 0.50 + 0.25)

In the scenario 1) case then we would expect that a Mech Infantry Fortified on a Mountain with a Fortress across a river would be something on the order of a defensive value of:

18 * 1.25 * 2.00 * 1.50 == 84.375

That is not totally bullet proof by any means but against a bomber with a strength of 8 that looks pretty much like total futility as less than a 1 in 10 chance of a hit.
 
I don't know. However, the general feeling in the forums is that bonuses are additive (at least with production and wealth bonuses). However, as you noted it is only a small change in the final percentages if it is mutiplictive. And since my data is only sufficient to say that combat is generally working as advertised (ie my mistake with teh river bonus), that differance falls within the allowed noise.
 
Hi all,

Thanks Eagle for suggesting looking at the rules! The help in the editor clearly states that fortification and river bonues are cumulative with other terrain and city size/walls/fortress bonuses.

So starting building forts in mountains!! I'll be posting that chart I mentioned once it's done.

--LW
 
I have not tested in Civ3, but know all about CivII. All defense modifiers were multiplied EXCEPT THE RIVER BONUS, which was additive. (Neither Civ1 nor CivII had any attack bonuses.) etj4eagle, if your tests show x15%, even after thousands of trials, you might really be looking at +25%. Change the math, see if that matches. In any case, the manual was wrong about many things, don't always trust it if you want accurate math. Its purpose is to provide a general guide, not to explain in full, accurate detail every aspect of the game, after all.

Someone asked about fortified in a city. In the previous incarnations, the higher value superceded the lesser value. For example, your defender behind city walls could be asleep and still get the same bonus as one fortified there.

Metalhead is right, more tests mean more accurate predictions.

(Who knows if what applied in CivII applies in Civ3, but it might help...)
 
Back
Top Bottom