DeletedUser2754
Guest
In the last weeks I was able to crackdown the battle engine and build a replica of it for the use of the community (it is available in the "Player Projects" section of the forum). Anyway, many things have been said in the past, some were wrong, some were right, I will use this space to try and clear up the myths and the doubts regarding the way the battle engine works.
How it works:
Each battle is divided into 5 rounds.
1. Pre-round:
This round is used to calculate the kills inflicted by the trebs on the rams & cats of the offensive army. Each defensive trebuchet kills 1 rams or 1 cat and it kills them proportionally to the amount sent. The attack and defense modifiers do not apply here.
This round is also used to calculate the damage inflicted by the rams on the wall that will define the bonus wall for the whole battle. The number of "active" rams for this calculation comes from a correlation between the provisions of offensive army minus the provisions of the rams, and the overall provisions of the defensive army plus the basedefense given by the initial wall level of the village. The defense modifier is not considered in any of this calculus, you'll get the same results for the bonus wall if the defending village has no faith or a level 3 church in it.
2. Round 1:
The offensive troops fight in groups according to their type: general (spears, swords, axeman, bezerkers); cavalry (light cavalry, heayvy cavalry); archer (archer, mounted archer). You then have a few special units that will fight with the largest group, and largest is not the one that takes the most provisions, but the one with highest numbers (1500LC is larger than 1400MA even if the MA group takes more provisions). The special units are rams, cats, trebs and the paladin. And no, I'm not forgetting the noble. The noble does not fight. So in round 1 the offensive army is divided according to the above groups.
For defense there are no unit types, all units fight in all groups in the right proportion. It's the offensive army that rules the way troops are distributed in the fighting groups according to the provisions each group takes. For instance if the offensive army had 50% provisions in cavalry units, 30% in the archer group and the remaining 20% in general group, then the defensive army will be decomposed in the same percentages. So the offensive cavalry will fight 50% of the defensive army and so on. And the defensive units will use their defensive skills (power) according to the group they were assigned to face. So a spear will have 25 strength when in the general group, 45 when against cavalry and 10 in the archer group.
The relation of powers between offense and defense will dictate the winner and the number of killings on both sides. The formula to determine the killings has a parabola shaped graph which means the more the difference the less kills on the winning side. That's why you'll always get better results if you send, 4000lc in one attack than two attacks of 2000lc each.
If all the mini-battles have the same winner, the battle goes directly to the final round. If you have different winners in the 3 minibattles, the surviving units move on to the next round.
3. Round 2:
Same mechanics as round 1. But the basedefense provided by the wall, which in Round 1 was added to each group in the defense strength, here is not considered.
4. Round 3:
Same mechanics as round 2.
5. Final round:
On the final round, the surviving cats and rams take a hit at their target building/wall.
The formulas:
TREBS effect: RamsKilled=Trebs*(Rams/(Rams+Cats)) > rounded
RAMS active ratio: RamRatio=(OffenseProvisions-RamsProvisions)/(DefenseProvisions+WallBaseDefense)
PRE-BASEDEFENSE: (1.2515^(WallLevel-1))*20
BONUS WALL calculation: WallDamage=(Rams*RamRatio*OffModifier*PaladinModifier)/(WallLevelHitpoints*2) > rounded
BaseDefense: (1.2515^(WallLevelAfterPreRound-1))*20
Offense strength: (∑UnitType*OffStrength)*OffModifier
Defense strength for round 1: (∑UnitType*OffStrength)*DefModifier+BaseDefense
Defense strength for round 2&3: (∑UnitType*OffStrength)*DefModifier
KILL ratio: (MiniBattleLooserStrength/MiniBattleWinnerStrength)^(1/2)/(MiniBattleWinnerStrength/MiniBattleLooserStrength)
KILLS: NumberOfKills=NumberOfUnits*KillRatio
Ram final damage: WallDamage=(SurvivingRams*OffModifier*PaladinModifier)/(WallLevelHitpoints*2) > rounded
Cat final damage: BuildingDamage=(SurvivingCats*OffModifier*PaladinModifier)/(BuildingLevelHitpoints*DefModifier) > rounded
The noble conundrum:
In the wiki it says the noble has 30 of offensive power. Yet the noble gets killed if sent alone to villages with no wall which have 0 of base defense. A ram has 2 of offense strength and survives the same battle. So what happens there? What happens is that the noble doesn't fight. Its offensive strength is irrelevant. It could have 0 or 1000 or even 1mil., it would not influence in any way the outcome of the battle.
We all have seen reports with surviving units on both sides. What happens is that the noble doesn't fight but his provisions are considered in the battle rounds. For instance, let's say we sent 200lc+1noble against 150hc. To make it easier let's consider no wall, no bonus, everything at 100%. What happens is that the offensive army has a total of 200*4+100=900 provisions. But since the noble doesn't fight, on the 1st round the 200lc will only fight (800/900)*150=~133hc. The remaining 17hc go directly to the next round. 148lc get killed in the process, killing all the 133hc they fought. So, for the 2nd round we have 52lc+1noble vs. 17hc. The process of leaving the noble out is repeated. (52*4)/(52*4+100)*17=~11hc. For the 3rd round we have 45lc+1noble vs. 6hc. (45*4)/(45*4+100)*6=~2hc. In the end 43lc survive but on the other side there are 2 hc that never fight. So you have troops surviving on both sides.
How it works:
Each battle is divided into 5 rounds.
1. Pre-round:
This round is used to calculate the kills inflicted by the trebs on the rams & cats of the offensive army. Each defensive trebuchet kills 1 rams or 1 cat and it kills them proportionally to the amount sent. The attack and defense modifiers do not apply here.
This round is also used to calculate the damage inflicted by the rams on the wall that will define the bonus wall for the whole battle. The number of "active" rams for this calculation comes from a correlation between the provisions of offensive army minus the provisions of the rams, and the overall provisions of the defensive army plus the basedefense given by the initial wall level of the village. The defense modifier is not considered in any of this calculus, you'll get the same results for the bonus wall if the defending village has no faith or a level 3 church in it.
2. Round 1:
The offensive troops fight in groups according to their type: general (spears, swords, axeman, bezerkers); cavalry (light cavalry, heayvy cavalry); archer (archer, mounted archer). You then have a few special units that will fight with the largest group, and largest is not the one that takes the most provisions, but the one with highest numbers (1500LC is larger than 1400MA even if the MA group takes more provisions). The special units are rams, cats, trebs and the paladin. And no, I'm not forgetting the noble. The noble does not fight. So in round 1 the offensive army is divided according to the above groups.
For defense there are no unit types, all units fight in all groups in the right proportion. It's the offensive army that rules the way troops are distributed in the fighting groups according to the provisions each group takes. For instance if the offensive army had 50% provisions in cavalry units, 30% in the archer group and the remaining 20% in general group, then the defensive army will be decomposed in the same percentages. So the offensive cavalry will fight 50% of the defensive army and so on. And the defensive units will use their defensive skills (power) according to the group they were assigned to face. So a spear will have 25 strength when in the general group, 45 when against cavalry and 10 in the archer group.
The relation of powers between offense and defense will dictate the winner and the number of killings on both sides. The formula to determine the killings has a parabola shaped graph which means the more the difference the less kills on the winning side. That's why you'll always get better results if you send, 4000lc in one attack than two attacks of 2000lc each.
If all the mini-battles have the same winner, the battle goes directly to the final round. If you have different winners in the 3 minibattles, the surviving units move on to the next round.
3. Round 2:
Same mechanics as round 1. But the basedefense provided by the wall, which in Round 1 was added to each group in the defense strength, here is not considered.
4. Round 3:
Same mechanics as round 2.
5. Final round:
On the final round, the surviving cats and rams take a hit at their target building/wall.
The formulas:
TREBS effect: RamsKilled=Trebs*(Rams/(Rams+Cats)) > rounded
RAMS active ratio: RamRatio=(OffenseProvisions-RamsProvisions)/(DefenseProvisions+WallBaseDefense)
PRE-BASEDEFENSE: (1.2515^(WallLevel-1))*20
BONUS WALL calculation: WallDamage=(Rams*RamRatio*OffModifier*PaladinModifier)/(WallLevelHitpoints*2) > rounded
BaseDefense: (1.2515^(WallLevelAfterPreRound-1))*20
Offense strength: (∑UnitType*OffStrength)*OffModifier
Defense strength for round 1: (∑UnitType*OffStrength)*DefModifier+BaseDefense
Defense strength for round 2&3: (∑UnitType*OffStrength)*DefModifier
KILL ratio: (MiniBattleLooserStrength/MiniBattleWinnerStrength)^(1/2)/(MiniBattleWinnerStrength/MiniBattleLooserStrength)
KILLS: NumberOfKills=NumberOfUnits*KillRatio
Ram final damage: WallDamage=(SurvivingRams*OffModifier*PaladinModifier)/(WallLevelHitpoints*2) > rounded
Cat final damage: BuildingDamage=(SurvivingCats*OffModifier*PaladinModifier)/(BuildingLevelHitpoints*DefModifier) > rounded
The noble conundrum:
In the wiki it says the noble has 30 of offensive power. Yet the noble gets killed if sent alone to villages with no wall which have 0 of base defense. A ram has 2 of offense strength and survives the same battle. So what happens there? What happens is that the noble doesn't fight. Its offensive strength is irrelevant. It could have 0 or 1000 or even 1mil., it would not influence in any way the outcome of the battle.
We all have seen reports with surviving units on both sides. What happens is that the noble doesn't fight but his provisions are considered in the battle rounds. For instance, let's say we sent 200lc+1noble against 150hc. To make it easier let's consider no wall, no bonus, everything at 100%. What happens is that the offensive army has a total of 200*4+100=900 provisions. But since the noble doesn't fight, on the 1st round the 200lc will only fight (800/900)*150=~133hc. The remaining 17hc go directly to the next round. 148lc get killed in the process, killing all the 133hc they fought. So, for the 2nd round we have 52lc+1noble vs. 17hc. The process of leaving the noble out is repeated. (52*4)/(52*4+100)*17=~11hc. For the 3rd round we have 45lc+1noble vs. 6hc. (45*4)/(45*4+100)*6=~2hc. In the end 43lc survive but on the other side there are 2 hc that never fight. So you have troops surviving on both sides.