BTS 3.13 City Attack Odds incorrect (Swordsman/CR Bonus missing)

Refar

Deity
Joined
Apr 10, 2005
Messages
4,608
The combat odds display is incorrect when using a unit with a City attack bonus.

The bonus is listed, but does not affect the units strenght. this results in very low combat odds. I think - but there is no way to be sure - this is only a display issue - the attacking unit will often win despite the very low odds being displayed.

I play Civ4 BTS 3.13, freshly installed and patched. No Mods at all.

The screenshot below shows a CR1 Axeman. Same thing happens to all CR line promotions on any unit as well as to the innate 10% bonus of Swordsmen.

wrongchancesvg7.jpg


I can provide savegames when needed, but the situation is very easy to recreate, so i skiped this for now. It happens in every game to any unit with a bonus at city attack...

Has someone else noticed this ? Or is it just me ?
 
Almost all bonuses (except the Combat line) are applied to the defender, not the attacker. In this instance, you'll note that the total defender percentage is 135%, meaning the Archer should have a str of 7.05. Instead it has a 6.45. That's because the 20% actually comes off of its strength. So instead of 135%, it has 135 - 20 = 115%, which gives the 6.45 value.

Bh
 
Uh. My fault. Thanks for the explanation.

Just out of curiosity... was this allways this way ? Just wondering how i did not seen it before...

[Edit] Uhm again... As i am thinking of it... is not a bug as it seems, but is this approach valid ? I mean... The units have different strength... so it does matter to which unit the percents are applied...
 
It doesn't matter, no. Consider the case where two units are fighting (let's give them both strength 5), and they each have +50% vs the other. If you do both as addition, you get:
5 * 1.5 = 7.5 vs 5 * 1.5 = 7.5
7.5 vs 7.5 means 50% odds.

On the other hand, if you have the attacker take away from the defender, you've got:
5 vs 5 * (1.5 - 0.5) = 5
5 vs 5 means 50% odds.

In both cases your odds of winning are the same.

And yes, this has always been done in this fashion.

Bh
 
Yea... If you give both the same strength and the same bonus, it does just cancel each other out... But assume different units...

Let say the attaker has strenght of 5 and 20% bonus, the defender just has stenght 3 but 50% bonus.

5 * 1.2 = 6 vs 3 * 1.5 = 4.5 a ratio of 6/4.5 = 1.33 --> 57.1 %
5 vs 3 * 1.3 = 3.9 its a ratio of 5/3.9 = 1.28 --> 56.2 %

(Edit: It seems i calculated the % chances wrong from the strenght ratio. Not sure how it is done.)

Hmmm... Ok ~1% difference... Now i kind of disappointed of with my own argument :crazyeye: ... The difference will grow bigger, if you take units with a higher difference in they strength, but even then it might not matter much.

Still, its not the same :mischief:
 
When you compare Landsnecht(sp?) with a Maceman, doing the intuitive way would yield a 50-50 chance. However, doing it the way the game engine calculates it by taking it off the defender, then the Landsnecht has a ~65% chance of winning instead.
 


Praetorian with +20% City Attack
8 + (0.2 * 8) = 8 + 1.6 = 9.6

Archer with +10% Melee and +125% City Defense
3 + (0.1 * 3) + (1.25 * 3) = 3 + 0.3 + 3.75 = 7.05

Ratio: 1.36

VS

Praetorian with no bonus
8

Archer with +10% Melee and +105% City Defense
3 + (0.1 * 3) + (1.05 * 3) = 3 + 0.3 + 3.15 = 6.45

Ratio: 1.24

The Praetorian loses 1.6 strength to the archer's 0.6. This seems broken to me. Are the Combat promotions canceled out in the same fashion? I don't remember seeing that they are.
 
Praetorian with +20% City Attack
8 + (0.2 * 8) = 8 + 1.6 = 9.6

Archer with +10% Melee and +125% City Defense
3 + (0.1 * 3) + (1.25 * 3) = 3 + 0.3 + 3.75 = 7.05

Ratio: 1.36

VS

Praetorian with no bonus
8

Archer with +10% Melee and +105% City Defense
3 + (0.1 * 3) + (1.05 * 3) = 3 + 0.3 + 3.15 = 6.45

Ratio: 1.24

The Praetorian loses 1.6 strength to the archer's 0.6. This seems broken to me. Are the Combat promotions canceled out in the same fashion? I don't remember seeing that they are.
Its not so much broken as a different way of handling this ;) IF the base strength of the defender is higher than the one of the attacker the CR and other promotions are better when applied to the defender and the same is true in reverse.
Combat promotions are the only ones that stay with the unit that has them all other bonuses are only applied to the defender. One of the reasons that it is handled like this I suspect is ease of handling - all the other promotions that give bonuses rely on either the defending unit or the defending terrain and it is easier to just check one unit on one plot (is the defender in a city, is the defended plot hill, is the defender archer etc.) than check a unit on a different plot than the bonus applies to (the swordsman is not in a city - so you need to check if it actually attacks a city plot or a different plot, if you look at the archer you just need to ask is it in a city and is it defending, all the applicable promotions can be called earlier without this check).
 
Different, yeah. I still can't help but thinking it was a wrong decision to do it this way. It muddies the water when you can't rely on a +20% bonus really being a +20% bonus. If the unit strengths were comparable, then it wouldn't be an issue, as Bhruic says. Here, though, it seems off.
 
Different, yeah. I still can't help but thinking it was a wrong decision to do it this way. It muddies the water when you can't rely on a +20% bonus really being a +20% bonus. If the unit strengths were comparable, then it wouldn't be an issue, as Bhruic says. Here, though, it seems off.
First off: I forgot this in the last post:

:dance: [party] :band: Welcome to Civfanatics :band: [party] :dance:
:D

Thing is that while it does change the outcome there is no reason why it has to be the way you expect it to be ;)
If you change this to an axeman vs. a longbowman or a warrior vs. an archer it is skewed in favor of the attacker just the same as it is skewed in favor of the defender in your example.
But seriously I really suspect that the reason it is implemented like it is is that it is easier to code error free than to juggle all units involved in the fight - if it is easily possible to apply all attacker's promotions to the attacker and all defender's promotions to the defender I would not have a problem with it being changed. The way it is implemented now is not intuitive but it is also not broken since in most cases while it skews the results it does not suddenly make an unequal fight equal...
 
Back
Top Bottom