Go Back   Evony Community > Browser Game - Evony > Guide Forum

  Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2009, 09:49 AM
Reverb Reverb is offline
Worker
 
Join Date: Apr 2009
Posts: 3
Reverb is an unknown quantity at this point
Default Combat Formula

I was looking for mathematical data on combat mechanics but couldn't find any on these forums. So I've been playing around the Rally Point Exercise trying to figure it out. I want to share my findings here. Before you read on, make sure you know all about range and combat rounds. There are several different posts by Darwin and others on the topic.

Definitions
These definitions apply to this post only.
Combat Pair - In a single combat round, one type of your units can target only one type of the enemy's units. I will call these 2 unit types a 'Combat Pair'
Attacker - The unit type that will be attacking. When acting as an attacker, units only deal damage and never take damage.
Defender - The unit type that will be attacked. When acting as a defender, units only take damage and never deal damage.

How to apply the equation
This equation applies to a single round of combat between a combat pair. Both sides execute the equation at the same time so it's fair.
  1. If the enemy is within range, calculate the deaths incurred by your side(You are defender, they are attacker)
  2. If your units are within range, calculate the deaths on the enemy's side (You are attacker, they are defender)
  3. Subtract the deaths from their respective sides
  4. End of the round. If there are survivors on both sides, the combat continues.
Note that in real combat with different types of units, combat pairs change as units move closer to each other.

The Equation

Nd = (Na * Ab * R * A * (1 - D/1000)) / Ld)

Where:
Nd - Maximum number of defenders killed
Na - The number of attackers
A - Attack value of attackers
Ab - Attack bonus (see below)
D - Defenders defence value
R - Ranged damage modifier
Ld - Amount of Life of the defender unit type

The attack, defence and life values can be looked up in the game. The Range damage modifier and attack bonus is explained below.

The maximum number of defenders killed is the number of defender that could possibly die in this combat round. Obviously if there are less defenders than the maximum number killed, then all defenders of that unit type are dead at the end of the round.

Decimal values are round up to the nearest integer. If a unit loses even 1 hit point, that unit is counted as dead and removed from combat in future rounds.

Ranged Damage Modifier
Ranged units do half the damage that melee units do. Here are the modifiers:
R= 0.5 for ranged units (Archer, Ballista, Catapult)
R= 1.0 for melee units (All other units)

Attack Bonus
Depending on the unit type being attacked, there may get be bonus to the attacker's attack value. This table obviously applies to the attackers because defenders don't attack, ie don't look up the defender's attack bonus. Lookup the attacking unit type across the top and match it to the defending unit type along the left. (This table is in HTML so enable HTML if you don't see it).

<table border=1><tr><th rowspan=2>
Defender Type
</th><th colspan=12>
Attacker Type
</th></tr><tr><td>Worker</td><td>Warrior</td><td>Scout</td><td>Pikeman</td><td>Swordsman</td><td>Archer</td><td>Cavalry</td><td>Cataphract</td><td>Transporter</td><td>Ballista</td><td>Battering Ram</td><td>Catapult</td></</tr><tr><td>Worker*</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td><td>0.96</td></tr><tr><td>Warrior, Swordsman, Transporter, Ballista, Battering Ram, Catapult</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td></tr><tr><td>Scout*</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td><td>0.97</td></tr><tr><td>Pikeman</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.10</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td></tr><tr><td>Archer</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.20</td><td>1.20</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td></tr><tr><td>Cavalry</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.80</td><td>1.00</td><td>2.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>2.00</td><td>1.00</td><td>2.00</td></tr><tr><td>Cataphract</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.80</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td></tr></table>

I've highlighted the positive bonuses in red. For example, all ranged units do double damage to cavalry, pikemen do 80% more damage to mounted units.

*Special Note: Scouts and workers have strange attack bonuses. It seems like the game doesn't like defence values less than 50. If you round up worker and scout defences to 50, then their modifiers can be set to 1.00

Derivation
This equation was derived from the rally point exercise. I'm fairly sure that tech levels don't apply to the exercise (or it didn't seem to affect the numbers anyway). It was basically formed from trial and error, alot of graphs and extrapolation. I started with this equation,

Total damage taken = Total damage inflicted - Total damage negated

Hopefully someone will be able to produce the same set of numbers as I have and verify the equation is correct (especially the attack bonus table).

Closing
This is all open to discussion, so if you have any questions, verifications or conflicting evidence, please post. I don't check the forums often so my answers won't be timely, but I'm sure the veterans will jump in to answer any questions well before I do.

Last edited by Reverb; 05-03-2009 at 03:55 AM. Reason: Updated the equation to make more sense
Reply With Quote
  #2  
Old 05-02-2009, 10:07 AM
rain9441 rain9441 is offline
Warrior
 
Join Date: Apr 2009
Posts: 48
rain9441 is an unknown quantity at this point
Default

Quote:
Originally Posted by Reverb View Post
Nd = (Na * A * Ab * (1000 ? D)) / (R * Ld)

...
Ranged Damage Modifier
Ranged units do half the damage that melee units do. Here are the modifiers:
R= 2000 for ranged units (Archer, Ballista, Catapult)
R= 1000 for melee units (All other units)

Your equation isn't in simplist form without Ranged modifiers (which are constants which are really part of Ab).

(Na * A * Ab * (1 - (D/1000))) / Ld)

Is what I came up with. IIRC

Every 1 point in defense reduces damage taken by 0.1%. So the formula must have:

ActualDamage = Damage - Mitigation
Mitigation = Damage * D/1000
ActualDamage = Damage - Damage * Defense/1000
ActualDamage = Damage * (1 - Defense/1000)

Not sure how your 1000 ? Defense fits in there, or what the ? really is. Hope that helps!

Good guide. Interesting read on the ranged modifiers though. I'll be double check your #'s to make sure everything is sound.
Reply With Quote
  #3  
Old 05-02-2009, 10:21 AM
Reverb Reverb is offline
Worker
 
Join Date: Apr 2009
Posts: 3
Reverb is an unknown quantity at this point
Default

Quote:
Originally Posted by rain9441 View Post
Your equation isn't in simplist form without Ranged modifiers (which are constants which are really part of Ab).

(Na * A * Ab * (1 - (D/1000))) / Ld)

Is what I came up with. IIRC

Every 1 point in defense reduces damage taken by 0.1%. So the formula must have:

ActualDamage = Damage - Mitigation
Mitigation = Damage * D/1000
ActualDamage = Damage - Damage * Defense/1000
ActualDamage = Damage * (1 - Defense/1000)

Not sure how your 1000 ? Defense fits in there, or what the ? really is. Hope that helps!

Good guide. Interesting read on the ranged modifiers though. I'll be double check your #'s to make sure everything is sound.
Opps.. It looks like it didn't like the copy and paste job I did. I've changed all the "?" to what they actually are. In the equation the "?" is a minus.

In essence, you're right. The ranged modifier can be merged into the attack bonus. I got to this equation by extracting the variables from the numeric data. I didn't think to simplify, so I guess that's why R and Ab are seperate.

Thanks for the feedback. I'll push that R value into the Ab and update the table (later as its really late now).
Reply With Quote
  #4  
Old 05-03-2009, 04:03 AM
Reverb Reverb is offline
Worker
 
Join Date: Apr 2009
Posts: 3
Reverb is an unknown quantity at this point
Default

I've updated the equation to make more sense.

R has been moved to the numerator side of the equation so it now becomes a fraction, which makes more sense because R=0.5 for ranged which shows they do half damage, as opposed to the R=2000 which is what I had before and means nothing.

Also I didn't know 1 defence = 0.1% damage reduction, so (1000 - D) has become (1- D/1000), which makes more sense.

I've decided to leave the R value in because without it the attack bonuses table looks stange.

I believe this is a more realistic equation. Thanks for the info rain9441.
Reply With Quote
  #5  
Old 05-04-2009, 06:57 AM
tyrome tyrome is offline
Worker
 
Join Date: Apr 2009
Posts: 14
tyrome is an unknown quantity at this point
Default

hey thanks for the nice little guide reverb.
Quote:
Originally Posted by rain9441 View Post

Good guide. Interesting read on the ranged modifiers though. I'll be double check your #'s to make sure everything is sound.
did you look into those modifiers? im just wondering how you came up with the half damage from ranged units
Reply With Quote
  #6  
Old 05-04-2009, 09:05 AM
rain9441 rain9441 is offline
Warrior
 
Join Date: Apr 2009
Posts: 48
rain9441 is an unknown quantity at this point
Default

The numbers look good to me so far, i haven't run any computerized tests though.

Go into the exercise, put in 10000 archers on one side, and 10000 swords on the other. Calculate it. If the number of rounds exceeds 1, reduce the swords by some amount. If the number of rounds is 1, increase the swords by some amount. Once you find the critical point in which 1 more sword = 1 more round of combat (2 rounds instead of 1) you have data to test.

Archers do seem to do only half damage, but if you compensate for the fact that they get 4 rounds of shots its still pretty balanced... i guess... I dont really like archers :P
Reply With Quote
  #7  
Old 05-04-2009, 12:23 PM
DANKFIRE's Avatar
DANKFIRE DANKFIRE is offline
Archer
 
Join Date: Apr 2009
Posts: 520
DANKFIRE is an unknown quantity at this point
Send a message via AIM to DANKFIRE
Default

Good guide... If it hasnt been already, Gazza will add this too his library!
__________________



[url=http://bbs.evony.com/search.php]Forum Search. Use it.[/url]


Reply With Quote
  #8  
Old 05-04-2009, 12:32 PM
Gazza's Avatar
Gazza Gazza is offline
Lord
 
Join Date: Apr 2009
Location: Nottingham, UK
Posts: 1,769
Gazza is an unknown quantity at this point
Default

Quote:
Originally Posted by DANKFIRE View Post
Good guide... If it hasnt been already, Gazza will add this too his library!
Just added it mate, Cheers.
Reply With Quote
  #9  
Old 05-05-2009, 11:53 AM
Bees Bees is offline
Warrior
 
Join Date: May 2009
Location: somewhere
Posts: 30
Bees is an unknown quantity at this point
Default

There is just 1 problem. The rally spot dosen't work i use your guide and scout a lv9 forest send all my archer and this is what i get

battle3.civony.com/default.html?logfile/c5/a1/6f/a3/c5a16fa35788861064612cb95b0516a3.xml

more info in here

[url]http://bbs.civony.com/showthread.php?t=6750[/url]
Reply With Quote
  #10  
Old 05-05-2009, 01:35 PM
Andante Andante is offline
Swordsman
 
Join Date: May 2009
Location: The Local Group.
Posts: 320
Andante is an unknown quantity at this point
Default

Your formula works.

Bees just didn't factor tech level differences. Thats all.
Reply With Quote
  Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.