Stats page
Moderator: Forum Moderators
Stats page
Is there a description anywhere that describes exactly what is being calculated on the stats page? (I'm using 1.6.4 on Windows, and I'm talking about single player games.)
Most of the stats page is fairly obvious, but the "inflicted" and "taken" stats aren't completely clear to me. Is the denominator the expected amount of damage? The median amount of damage? Something else?
And is there a way to see the "this turn" stats at the end of the opponent's turn? Before they get reset at the beginning of the player's turn? I'm looking to see if the numbers agree with my intuitive feel for how well the AI did in it's turn.
Most of the stats page is fairly obvious, but the "inflicted" and "taken" stats aren't completely clear to me. Is the denominator the expected amount of damage? The median amount of damage? Something else?
And is there a way to see the "this turn" stats at the end of the opponent's turn? Before they get reset at the beginning of the player's turn? I'm looking to see if the numbers agree with my intuitive feel for how well the AI did in it's turn.
Re: Stats page
The denominator is the expected value of damage. Let's say that in a turn the only thing that happens is your unitA attacks the enemy's unitB. unitA has a 8-5 attack and a 50% chance to hit. unitB has 0% resistance to unitA's attacks. 8*5*0.5*1.0 = 20. The denominator for 'damage inflicted' that turn will be 20. Same sort of thing for 'damage taken'. At least that's what my little experiment I just did made me conclude.CaptC wrote:Most of the stats page is fairly obvious, but the "inflicted" and "taken" stats aren't completely clear to me. Is the denominator the expected amount of damage? The median amount of damage? Something else?
Re: Stats page
Thanks! I must be missing something. My experiments (not conclusively documented) don't come up with the numbers the stats page does. It's probably me not taking something into account. I just wanted to verify the formula, and I was hoping someone would know without me having to try to figure out the code.
Does the calculation include leadership, marksmanship, the effects of being slowed, and ToD adjustments, too? One would hope!
Does the calculation include leadership, marksmanship, the effects of being slowed, and ToD adjustments, too? One would hope!
Re: Stats page
yes, everything's taken into account, same goes for damage calculation (i'm not sure though if e.g customized abilities are handled).CaptC wrote:Does the calculation include leadership, marksmanship, the effects of being slowed, and ToD adjustments, too? One would hope!
Re: Stats page
Custom abilities are taken into account too, as long as their effect is visible before the fight and it doesn't change during the fight. In fact, from the point of view of the engine (that is, the AI, the battle prediction dialog, and the "expected" part of the statistics dialog), an ability like "marksmanship" is a purely customized one.Max2008 wrote:yes, everything's taken into account, same goes for damage calculation (i'm not sure though if e.g customized abilities are handled).CaptC wrote:Does the calculation include leadership, marksmanship, the effects of being slowed, and ToD adjustments, too? One would hope!
By the way, people often tend to forget the most important "ability": killing a unit. If you are attacking a unit that you have a chance to kill, then your expected damage will be lower than if you were attacking a unit with an infinite amount of hitpoints.
Re: Stats page
so in other words the only way to confuse damage calculations/stats would be to use attacker/defender hits/misses events?silene wrote:Custom abilities are taken into account too, as long as their effect is visible before the fight and it doesn't change during the fight.
Re: Stats page
Yes, that's the idea. For AI and battle prediction (but not for stats), confusion can also be introduced with the "attack" event.Max2008 wrote:so in other words the only way to confuse damage calculations/stats would be to use attacker/defender hits/misses events?
Re: Stats page
I took that one into account, too. I tried it both ways to make sure.silene wrote: By the way, people often tend to forget the most important "ability": killing a unit. If you are attacking a unit that you have a chance to kill, then your expected damage will be lower than if you were attacking a unit with an infinite amount of hitpoints.
I'm still off somewheres, but it's just a small amount, typically <1%. I'm gonna chalk it up to rounding errors.
I'd still like a way to see stats after the enemy's turns (other than the cumulative number for the campaign.) The easiest way I can see to do that is to retain and display the stats for the last turn as well as the current one. Very marginal usefulness, only for stats geeks like me, so not a serious request...
Re: Stats page
you can't avoid rounding errors unless you calculate and round everything in exact the same order/way as wesnoth does. there are also some exceptions, e.g. attacks always deal at least one damage point.CaptC wrote:silene wrote:I'm still off somewheres, but it's just a small amount, typically <1%. I'm gonna chalk it up to rounding errors.
here's an old thread about damage calculation:
How does damage calculation work?