Post by Soren » Sat Nov 10, 2012 8:57 pm
So here is how the Battle Simulator works if you want to build it in Excel or simply want to understand better:
For the Attacker, you will have an Infantry Unit Percent, and a Mounted Unit Percent. These are calculated simply by the sums of type of attack over total attack power. So in excel it would look something like this:
ATTACKER
INFANTRY
((L*LA) + (Sn*SnA) + (Bk*BkA) + (R*RA) + (Bl*BlA)) / (SUM((L*LA) + ((Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)))
MOUNTED
((Sc*ScA) + (K*KA) + (G*GA)) / (SUM((L*LA) + ((Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)))
TOTAL ATTACK POWER
The total attack is the sum of all of your attackers, multiplied by the moral (as a percent). Then add to that, the sum of all of the attackers times the moral times the luck. (So assuming that your moral is at 100, and your luck is 10, then your attack gains an extra 10% power. Likewise, if luck is -10, then you lose 10% of your power.) So in excel it would look something like this:
(((L*LA) + (Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)) * moral) + (((L*LA) + (Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)) * moral)*luck
DEFENDER
You again have a percentage of Infantry Defense and Mounted Unit Defense. To find take the total defense, take the infantry defense of all units times the infantry attack percentage found above, and add it to the mounted defense of all units times the mounted unit attack found above, and you factor in the power of the wall. You can find a table of the bonus's provided by the wall on wiki. But for my example below, the wall level gives a troop defense bonus of 125%, and a basic bonus of 1270. In excel, it would take this form:
TOTAL ATTACK
(((INF DEF * INF ATK %) + (MNT DEF * INF DEF %)) + Wall Bonus) + ((((INF DEF * INF ATK %) + (MNT DEF * INF DEF %)) + Wall Bonus) * Troop Bonus %)
LOSS PERCENTAGES
You will obtain 2 percentages, one for offensive losses and one for defensive losses.
Attacker Loss = (Total Defense / Total Attack) << Carry this out to 4 decimal places for best results
Defender Loss = (Total Attack / Total Defense) << Carry this out to 4 decimal places for best results
EXAMPLES
ATTACKER SENT:
L = 0, S = 0, B = 2000, Sc = 0, K = 0, G = 2000, R = 0, Bl = 0, Sch = 2
Moral = 100
Luck = 10
From our Berserkers, we have an attack of 100,000 (2000B * 20ATK)
and from our Guardians, we have an attack power of 230,000 (2000G * 115ATK)
So our total base attack is 330,000
Therefore
Infantry % = 30.30% >> (100,000 / 330,000)
Mounted % = 69.70% >> (230,000 / 330,000)
Total Attack:
(330,000*100%)+((330,000*100%)*10%)
330,000+33000
363,000
DEFENDER SENT
L = 1000, S = 1000, B = 0, Sc = 0, K = 0, G = 500, R = 0, Bl = 0, Sch = 0
Wall = 25
Infantry Defense = 160,000 >> (1000L * 25DEF)+(1000S * 65DEF)+(500G * 140DEF)
Mounted Defense = 130,000 >> (1000L * 50DEF)+(1000S * 25DEF)+(500G * 110DEF)
Wall = 25, Therefore, Bonus = 1270, and Troop Bonus = 125%
Total Defense:
(((INF DEF * INF %) + (MNT DEF * MNT %)) + Bonus) + ((((INF DEF * INF %) + (MNT DEF * MNT %)) + Bonus) * Troop Bonus)
(((160,000 * 30.30%) + (130,000 * 69.70%)) + 1270) + ((((160,000 * 30.30%) + (130,000 * 69.70%)) +1270) * 125%)
(((48480) + (90610)) + 1270) + ((((48480) + (90610)) + 1270) * 125%)
140361 + (140361 * 125%)
140361 + 175451
315812
Percent Losses
Offensive: (Total Defense / Total Offense)
Offensive: 315812 / 363,000 = 87%
Defensive: (Total Offense / Total Defense)
Defensive: 363,000 / 315812 = 114.97%
Attacker
Lancer = 0 * 87% = 0
Sentry = 0 * 87% = 0
Berserker = 2000 * 87% = 1740
Scouts = 0 (Found Via different formula)
Knights = 0 * 87% = 0
Guards = 2000 * 87% = 1740
Rams = 0 * 87% = 0
Ballistas = 0 * 87% = 0
Scholars = 2 * 87% = 1
Defender
Lancer = 1000 * 114.97% = 1000 (You can't kill more than you have)
Sentry = 1000 * 114.97% = 1000 (You can't kill more than you have)
Berserker = 0 * 114.97% = 0
Scouts = 0 (Found Via different formula)
Knights = 0 * 114.97% = 0
Guards = 500 * 114.97% = 500 (You can't kill more than you have)
Rams = 0 * 114.97% = 0
Ballistas = 0 * 114.97% = 0
Scholars = 0 * 114.97% = 0
I have this worked out in an excel file along with a few other tools. What I haven't worked out perfectly yet are the formula's for the rams, ballistas, and scouts.
Rams do hit before your troops, but they do not inflict full damage on the wall. If you send enough rams to take the wall down from level 25, to level 20, your troops will hit a wall at level 23, before the rams finish taking it down to 20 for the next wave. I haven't figured out the exact percent or formula that determines the stopping point of this decrease in the wall level as of yet but when I do, I'll post it.
PS: Playmesh, can I have a job?
So here is how the Battle Simulator works if you want to build it in Excel or simply want to understand better:
For the Attacker, you will have an Infantry Unit Percent, and a Mounted Unit Percent. These are calculated simply by the sums of type of attack over total attack power. So in excel it would look something like this:
[b][i][u]ATTACKER[/u][/i][/b]
[b]INFANTRY[/b]
((L*LA) + (Sn*SnA) + (Bk*BkA) + (R*RA) + (Bl*BlA)) / (SUM((L*LA) + ((Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)))
[b]MOUNTED[/b]
((Sc*ScA) + (K*KA) + (G*GA)) / (SUM((L*LA) + ((Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)))
[b]TOTAL ATTACK POWER[/b]
The total attack is the sum of all of your attackers, multiplied by the moral (as a percent). Then add to that, the sum of all of the attackers times the moral times the luck. (So assuming that your moral is at 100, and your luck is 10, then your attack gains an extra 10% power. Likewise, if luck is -10, then you lose 10% of your power.) So in excel it would look something like this:
(((L*LA) + (Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)) * moral) + (((L*LA) + (Sn*SnA) + (Bk*BkA) + (Sc*ScA) + (K*KA) + (G*GA) + (R*RA) + (Bl*BlA)) * moral)*luck
[b][i][u]DEFENDER[/u][/i][/b]
You again have a percentage of Infantry Defense and Mounted Unit Defense. To find take the total defense, take the infantry defense of all units times the infantry attack percentage found above, and add it to the mounted defense of all units times the mounted unit attack found above, and you factor in the power of the wall. You can find a table of the bonus's provided by the wall on wiki. But for my example below, the wall level gives a troop defense bonus of 125%, and a basic bonus of 1270. In excel, it would take this form:
[b]TOTAL ATTACK[/b]
(((INF DEF * INF ATK %) + (MNT DEF * INF DEF %)) + Wall Bonus) + ((((INF DEF * INF ATK %) + (MNT DEF * INF DEF %)) + Wall Bonus) * Troop Bonus %)
[b]LOSS PERCENTAGES[/b]
You will obtain 2 percentages, one for offensive losses and one for defensive losses.
Attacker Loss = (Total Defense / Total Attack) << Carry this out to 4 decimal places for best results
Defender Loss = (Total Attack / Total Defense) << Carry this out to 4 decimal places for best results
[b][i][u]EXAMPLES[/u][/i][/b]
ATTACKER SENT:
L = 0, S = 0, B = 2000, Sc = 0, K = 0, G = 2000, R = 0, Bl = 0, Sch = 2
Moral = 100
Luck = 10
From our Berserkers, we have an attack of 100,000 (2000B * 20ATK)
and from our Guardians, we have an attack power of 230,000 (2000G * 115ATK)
So our total base attack is 330,000
Therefore
Infantry % = 30.30% >> (100,000 / 330,000)
Mounted % = 69.70% >> (230,000 / 330,000)
Total Attack:
(330,000*100%)+((330,000*100%)*10%)
330,000+33000
363,000
DEFENDER SENT
L = 1000, S = 1000, B = 0, Sc = 0, K = 0, G = 500, R = 0, Bl = 0, Sch = 0
Wall = 25
Infantry Defense = 160,000 >> (1000L * 25DEF)+(1000S * 65DEF)+(500G * 140DEF)
Mounted Defense = 130,000 >> (1000L * 50DEF)+(1000S * 25DEF)+(500G * 110DEF)
Wall = 25, Therefore, Bonus = 1270, and Troop Bonus = 125%
Total Defense:
(((INF DEF * INF %) + (MNT DEF * MNT %)) + Bonus) + ((((INF DEF * INF %) + (MNT DEF * MNT %)) + Bonus) * Troop Bonus)
(((160,000 * 30.30%) + (130,000 * 69.70%)) + 1270) + ((((160,000 * 30.30%) + (130,000 * 69.70%)) +1270) * 125%)
(((48480) + (90610)) + 1270) + ((((48480) + (90610)) + 1270) * 125%)
140361 + (140361 * 125%)
140361 + 175451
315812
Percent Losses
Offensive: (Total Defense / Total Offense)
Offensive: 315812 / 363,000 = 87%
Defensive: (Total Offense / Total Defense)
Defensive: 363,000 / 315812 = 114.97%
[u]Attacker[/u]
Lancer = 0 * 87% = 0
Sentry = 0 * 87% = 0
Berserker = 2000 * 87% = 1740
Scouts = 0 (Found Via different formula)
Knights = 0 * 87% = 0
Guards = 2000 * 87% = 1740
Rams = 0 * 87% = 0
Ballistas = 0 * 87% = 0
Scholars = 2 * 87% = 1
[u]Defender[/u]
Lancer = 1000 * 114.97% = 1000 (You can't kill more than you have)
Sentry = 1000 * 114.97% = 1000 (You can't kill more than you have)
Berserker = 0 * 114.97% = 0
Scouts = 0 (Found Via different formula)
Knights = 0 * 114.97% = 0
Guards = 500 * 114.97% = 500 (You can't kill more than you have)
Rams = 0 * 114.97% = 0
Ballistas = 0 * 114.97% = 0
Scholars = 0 * 114.97% = 0
I have this worked out in an excel file along with a few other tools. What I haven't worked out perfectly yet are the formula's for the rams, ballistas, and scouts.
Rams do hit before your troops, but they do not inflict full damage on the wall. If you send enough rams to take the wall down from level 25, to level 20, your troops will hit a wall at level 23, before the rams finish taking it down to 20 for the next wave. I haven't figured out the exact percent or formula that determines the stopping point of this decrease in the wall level as of yet but when I do, I'll post it.
PS: Playmesh, can I have a job?