Before you all go into sideways let me note that the auto calculated battles only use the GetPower formula. The other one is for tournaments only.
C#:
public override float GetPower()
{
int num = this.IsHero ? (this.HeroObject.Level / 4 + 1) : this.Tier;
return (float)((2 + num) * (10 + num)) * 0.02f * (this.IsHero ? 1.5f : (this.IsMounted ? 1.2f : 1f));
}
I have played a bit with it, and made (
through a personal mod) that in sieges the IsMounted part is not used - still Khuzait steamrolled the Northern Empire in a few years.
Ps.: What is not here, is that there is a another number called defender and attacker advantage that will be multiplied by this power number, which is used for perks, siege defense stats, walls etc.