Difference between revisions of "Combat System"

From Binary-Tools Wiki
Jump to navigation Jump to search
(Marked this version for translation)
 
(7 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
<!--T:2-->
 
<!--T:2-->
 
The combat system in Travian: Legends and Travian Kingdoms is quite complex and the outcome of a single attack depends on many different factors.
 
The combat system in Travian: Legends and Travian Kingdoms is quite complex and the outcome of a single attack depends on many different factors.
 +
 +
== Overview == <!--T:23-->
 +
 +
<!--T:24-->
 +
In combat, a lot of things happen. Some of those influence each other, so the order of execution is important to understand.
 +
 +
=== Attacks and Sieges === <!--T:25-->
 +
 +
<!--T:17-->
 +
In an attack or {{SwitchVersion|kingdoms=siege}} the following will happen in this specific order:
 +
 +
<!--T:18-->
 +
# Rams attack the wall and demolish it to some intermediate level, which will be used later. The intermediate level is never shown in the report or explicitly visible anywhere.
 +
# Troops fight each other until one side is completely dead.
 +
# Rams attack once again and demolish the wall to its final level, which will be visible in the report.
 +
# Catapults shoot.
 +
# Surviving chiefs lower loyalty.
 +
# {{SwitchVersion|kingdoms=The attacker steals treasures, if the hero survives.}}
 +
# Surviving attackers steal resources.
 +
# {{SwitchVersion|legends=The attacking hero steals the artefact, if he can store it and one exists.}}
 +
 +
=== Raids === <!--T:26-->
 +
 +
<!--T:27-->
 +
In a raid, rams, catapults and chiefs don't work and troops don't fight until one side is completely dead. Order of execution:
 +
 +
<!--T:28-->
 +
# Troops fight each other until either one side is completely dead or the sum of losses in percent equals {{SwitchVersion|legends=100%|kingdoms=103.2%}}. For details, see [[#raids|below]].
 +
# Surviving attackers steal resources.
 +
 +
=== Espionage === <!--T:29-->
 +
 +
<!--T:30-->
 +
Espionage is fundamentally different from other attacks in some ways:
 +
 +
<!--T:31-->
 +
* The defender doesn't see that attack coming.
 +
* The defender can't lose any troops.
 +
* Only the scouts of both partys fight, other troops are not involved.
 +
* The defender is only informed about the attack, if he kills at least one attacking scout.
 +
 +
<!--T:32-->
 +
Only one thing happens during espionages:
 +
 +
<!--T:33-->
 +
# Defending scouts kill attacking scouts they notice.
  
 
== Fighting strength calculation == <!--T:3-->
 
== Fighting strength calculation == <!--T:3-->
  
<!--T:4-->
+
=== Calculation for attackers === <!--T:34-->
The fighting strength of each unit in a combat depends on several factors and is calculated as follows.
 
 
 
<!--T:19-->
 
Calculation for attackers:
 
  
 
<!--T:20-->
 
<!--T:20-->
Line 21: Line 63:
 
| 1 || Take the unit's base attack strength. ||  || Clubswingers: 40 ||  
 
| 1 || Take the unit's base attack strength. ||  || Clubswingers: 40 ||  
 
|-
 
|-
| 2 || Apply the upgrades of the smithy for each unit. || <math>\text{leveled strength} = \text{base strength} + (\text{base strength} + \text{crop consumption} \cdot \frac{300}{7}) \cdot (1.007^\text{unit level in smithy} - 1)</math> ||  
+
| 2 || Apply the upgrades of the smithy for each unit. || <math>\text{leveled strength} = \text{base strength} + (\text{base strength} + \text{supply} \cdot \frac{300}{7}) \cdot (1.007^\text{unit level in smithy} - 1)</math> ||  
 
|  
 
|  
* Crop consumption refers to the base crop consumption before any modifiers like horse drinking trough, WW-village buff or {{SwitchVersion|legends=artefacts}}.
+
* Supply refers to the base crop consumption before any modifiers like horse drinking trough, WW-village buff or {{SwitchVersion|legends=artefacts}}.
 
* The smithy level of the home village of the unit is used.
 
* The smithy level of the home village of the unit is used.
 
|-
 
|-
Line 30: Line 72:
 
* The weapon must be equipped and the hero must attack with the units to apply the bonus.
 
* The weapon must be equipped and the hero must attack with the units to apply the bonus.
 
|-
 
|-
| 4 || Sum up the strength of all attacking troops in this attack. ||  ||  ||
+
| 4 || Apply the hero's attack bonus. || <math>\text{new value} = \text{old value} \cdot (1 + \frac{\text{points in off bonus}}{100} \cdot 20%)</math> ||
|-
+
|
| 5 || Apply the hero's attack bonus. || <math>\text{new value} = \text{old value} \cdot (1 + \frac{points in off bonus}\frac{100} \cdot 20%</math> || ||
+
* The hero must participate in the fight for the bonus to apply.
 
|-
 
|-
| 6 || Apply the brewery bonus, if applicable. || <math>\text{new value} = \text{old value} \cdot (1 + \text{Brewery level}%)</math> ||
+
| 5 || Apply the brewery bonus, if applicable. || <math>\text{new value} = \text{old value} \cdot (1 + \text{Brewery level}%)</math> ||
 
|  
 
|  
 
* This applies only for teutons
 
* This applies only for teutons
Line 40: Line 82:
 
* This explicitly applies, if the hammer is not built in the capital, aswell.
 
* This explicitly applies, if the hammer is not built in the capital, aswell.
 
|-  
 
|-  
| 7 || {{SwitchVersion|kingdoms=Apply the siege bonus.}} || <math>\text{new value} = \text{old value} \cdot 1.33</math> ||
+
| 6 || {{SwitchVersion|kingdoms=Apply the siege bonus.}} || <math>\text{new value} = \text{old value} \cdot 1.33</math> ||
 
|
 
|
 
* Only applies, if the attack is sent as siege.
 
* Only applies, if the attack is sent as siege.
 +
|-
 +
| 7 || Sum up the strength of all attacking troops in this attack. ||  ||
 +
|
 +
* To get the infantry attack strength, sum up all non-cavalry units (i.e. infantry, rams, catapults, chiefs and settlers).
 +
* To get the cavalry attack strength, sum up all cavalry units.
 
|}
 
|}
  
<!--T:5-->
+
=== Calculation for defenders === <!--T:35-->
# Take the unit's base strength.
 
#* For the attacking troops, this is the raw attack strength, e.g. a clubswinger has a base strength of 40.
 
#* For the defending troops, this is two values, the defense versus infantry and the defense versus cavalry. A phalanx has the values 40 versus infantry and 50 versus cavalry.
 
# Apply the formula for smithy upgrades of the unit:<br /><math>\text{leveled strength} = \text{base strength} + (\text{base strength} + \text{crop consumption} \cdot \frac{300}{7}) \cdot (1.007^\text{unit level in smithy} - 1)</math><br />Crop consumption refers to the base crop consumption '''before''' any buffs (e.g. horse drinking trough, WW-village buff, {{SwitchVersion|legends=artefacts}})
 
# For the defending troops, the two values for the leveled strength are used to calculate the strength as follows: <math>\text{strength} = \text{defense vs infantry} \cdot \frac{\text{attacking power versus infantry}}{\text{total attacking power}} + \text{defense vs cavalry} \cdot \frac{\text{attacking power versus cavalry}}{\text{total attacking power}}</math><br />Attacking power refers to the total attack power of the attacker, including all boni. Rams, catapults, chiefs and settlers count as infantry. The attacker's hero counts as cavalry, if he equipped a horse, or as infantry otherwise.
 
# Then, the hero's weapon bonus is applied.
 
#* The attacker profits normally from his weapon in both versions.
 
#* For the defender, {{SwitchVersion|legends=the hero weapon buffs all units of the same home village as the hero, if he participates in the fight|kingdoms=The strongest hero weapon per troop type in the defending village buffs all units of that troop type, no matter where they come from}}.
 
# Lastly, the hero's percentage attack/defense bonus is applied. In both versions, all units of the hero's account benefit from the skillpoints, if the hero participates in the fight.
 
  
<!--T:6-->
+
<!--T:22-->
After that, the strength of all attacking and defending units are added together for the total attack strength and total defense strength respectively.
+
{| class="wikitable"
 
+
! Step || Description || Formula || Example || Notes
<!--T:7-->
+
|-
Now, the hero's fighting strength, and the fighting strength of the residence, palace or {{SwitchVersion|legends=command central}} is added:
+
| 1 || Take the unit's base attack strengths. ||
 
+
| Phalanx:
<!--T:8-->
+
40 vs infantry,  
* A residence, palace or {{SwitchVersion|legends=command central}} grants <math>2 \cdot \text{level}^2</math> fighting strength to the defender.
+
50 vs cavalry
 
+
|
<!--T:9-->
+
|-
Then, the "global" modifiers are applied.  
+
| 2 || Apply the upgrades of the smithy for each unit. || <math>\text{leveled strength} = \text{base strength} + (\text{base strength} + \text{supply} \cdot \frac{300}{7}) \cdot (1.007^\text{unit level in smithy} - 1)</math> ||
 
+
|
<!--T:10-->
+
* This is calculated once for defense versus infantry, one for defense versus cavalry.
Attack strength modifiers:
+
* Supply refers to the base crop consumption before any modifiers like horse drinking trough, WW-village buff or {{SwitchVersion|legends=artefacts}}.
 
+
* The smithy level of the home village of the unit is used.
<!--T:11-->
+
|-
# Brewery bonus, if a brewery party is being held at the time of the impact of the attack: +1% per brewery level.
+
| 3 || Calculate the defense strength. || <math>\text{strength} = \text{defense vs infantry} \cdot \frac{\text{attack infantry strength}}{\text{total attacking power}} + \text{defense vs cavalry} \cdot \frac{\text{attack cavalry strength}}{\text{total attacking power}}</math> ||
# {{SwitchVersion|kingdoms=Siege bonus, if it is a siege: +33%}}
+
|
# Morale malus, if the attacker is larger than the defender (based on population): <math>(\frac{\text{defender population}}{\text{attacker population}})^{0.2} - 1</math>, capped at 0% and -33.34%. (Yes, this reduces the attack strength by up to 33.34% when attacking a sufficiently small account).
+
* The attack infantry/calvalry strength refers to the total attack strength of the attack, that was calculated before.
 
+
|-
<!--T:12-->
+
| 4 || Apply the hero's weapon bonus. || <math>\text{new value} = \text{leveled strength} + \text{weapon bonus}</math> ||
Defense strength modifiers:
+
|
 
+
* The hero must participate in the fight for the bonus to apply.
<!--T:13-->
+
* For Travian: Legends, the bonus applies only to the units that have the same home village as the hero.
{{SwitchVersion|legends=Defense bonus from wall|kingdoms=Sum of defense bonus from wall and water ditch (for instance, the roman city wall level 20 plus a water ditch level 20 grant a total bonus of 111%)}}.
+
* For Travian Kingdoms, the highest bonus per unit type is applied to all units. This explicitly can buff foreign troops and a hero can explicity equip the weapon of another tribe and still make use of the bonus. Only one bonus is applied per unit, so multiple weapons have no additional effect.
 
+
|-
<!--T:14-->
+
| 5 || Apply the hero's defense bonus. || <math>\text{new value} = \text{old value} \cdot (1 + \frac{\text{points in def bonus}}{100} \cdot 20%)</math> ||
Lastly, the defender gets a flat defense bonus and some flat fighting strength from the wall:
+
|
 
+
* The hero must participate in the fight for the bonus to apply.
<!--T:15-->
+
* The bonus applies for all troops of the same account as the hero. This is true for Travian: Legends and Travian Kingdoms.
* The defender gets an additional 10 fighting strength conditionlessly.
+
|-
* The wall's base fighting strength is added.
+
| 6 || Sum up the strength of all defending units. || || ||
 
+
|-
== Overview: Order of execution == <!--T:16-->
+
| 7 || Add the hero's fighting strength. || || ||
 
+
|-
<!--T:17-->
+
| 8 || Add the base strength of residence / palace / {{SwitchVersion|legends=command centre}}. || || ||
During a single attack or {{SwitchVersion|kingdoms=siege}}, but not during scout attacks and raids, a lot of things happen. Some of those influence each other, so the order of execution is important to understand. In every attack and {{SwitchVersion|kingdoms=siege}}, the following will happen:
+
|-
 
+
| 9 || Apply the wall and {{SwitchVersion|kingdoms=water ditch}} bonus. || <math>\text{new value} = \text{old value} \cdot (\text{wall bonus} + \text{water ditch bonus})</math> || ||
<!--T:18-->
+
|-
# Rams attack the wall and demolish it to some intermediate level, which will be used later. The intermediate level is never shown in the report or explicitly visible anywhere.
+
| 10 || Add the wall's base strength. || <math>\text{new value} = \text{old value} + \text{wall base strength}</math> || ||
# Troops fight each other until one side is completely dead.
+
|-
# Rams attack once again and demolish the wall to its final level, which will be visible in the report.
+
| 11 || Add the base defense. || <math>\text{new value} = \text{old value} + 10</math> || ||
# Catapults shoot.
+
|}
# Chiefs lower loyalty.
 
#
 
  
 
</translate>
 
</translate>

Latest revision as of 13:38, 27 March 2020



Kingdoms Logo.png Legends Logo.png This article is about a feature, which exists in Travian: Legends as well as Travian Kingdoms. Version specific features are marked with a kingdoms or legends icon.


The combat system in Travian: Legends and Travian Kingdoms is quite complex and the outcome of a single attack depends on many different factors.

Overview

In combat, a lot of things happen. Some of those influence each other, so the order of execution is important to understand.

Attacks and Sieges

In an attack or Travian Kingdoms siege the following will happen in this specific order:

  1. Rams attack the wall and demolish it to some intermediate level, which will be used later. The intermediate level is never shown in the report or explicitly visible anywhere.
  2. Troops fight each other until one side is completely dead.
  3. Rams attack once again and demolish the wall to its final level, which will be visible in the report.
  4. Catapults shoot.
  5. Surviving chiefs lower loyalty.
  6. Travian Kingdoms The attacker steals treasures, if the hero survives.
  7. Surviving attackers steal resources.
  8. Travian: Legends The attacking hero steals the artefact, if he can store it and one exists.

Raids

In a raid, rams, catapults and chiefs don't work and troops don't fight until one side is completely dead. Order of execution:

  1. Troops fight each other until either one side is completely dead or the sum of losses in percent equals Travian: Legends 100% / Travian Kingdoms 103.2%. For details, see below.
  2. Surviving attackers steal resources.

Espionage

Espionage is fundamentally different from other attacks in some ways:

  • The defender doesn't see that attack coming.
  • The defender can't lose any troops.
  • Only the scouts of both partys fight, other troops are not involved.
  • The defender is only informed about the attack, if he kills at least one attacking scout.

Only one thing happens during espionages:

  1. Defending scouts kill attacking scouts they notice.

Fighting strength calculation

Calculation for attackers

Step Description Formula Example Notes
1 Take the unit's base attack strength. Clubswingers: 40
2 Apply the upgrades of the smithy for each unit.
  • Supply refers to the base crop consumption before any modifiers like horse drinking trough, WW-village buff or Travian: Legends artefacts.
  • The smithy level of the home village of the unit is used.
3 Apply the hero's weapon bonus.
  • The weapon must be equipped and the hero must attack with the units to apply the bonus.
4 Apply the hero's attack bonus.
  • The hero must participate in the fight for the bonus to apply.
5 Apply the brewery bonus, if applicable.
  • This applies only for teutons
  • This applies only, if the capital of the attacker celebrates a party in the brewery at the time of the attack.
  • This explicitly applies, if the hammer is not built in the capital, aswell.
6 Travian Kingdoms Apply the siege bonus.
  • Only applies, if the attack is sent as siege.
7 Sum up the strength of all attacking troops in this attack.
  • To get the infantry attack strength, sum up all non-cavalry units (i.e. infantry, rams, catapults, chiefs and settlers).
  • To get the cavalry attack strength, sum up all cavalry units.

Calculation for defenders

Step Description Formula Example Notes
1 Take the unit's base attack strengths. Phalanx:

40 vs infantry, 50 vs cavalry

2 Apply the upgrades of the smithy for each unit.
  • This is calculated once for defense versus infantry, one for defense versus cavalry.
  • Supply refers to the base crop consumption before any modifiers like horse drinking trough, WW-village buff or Travian: Legends artefacts.
  • The smithy level of the home village of the unit is used.
3 Calculate the defense strength.
  • The attack infantry/calvalry strength refers to the total attack strength of the attack, that was calculated before.
4 Apply the hero's weapon bonus.
  • The hero must participate in the fight for the bonus to apply.
  • For Travian: Legends, the bonus applies only to the units that have the same home village as the hero.
  • For Travian Kingdoms, the highest bonus per unit type is applied to all units. This explicitly can buff foreign troops and a hero can explicity equip the weapon of another tribe and still make use of the bonus. Only one bonus is applied per unit, so multiple weapons have no additional effect.
5 Apply the hero's defense bonus.
  • The hero must participate in the fight for the bonus to apply.
  • The bonus applies for all troops of the same account as the hero. This is true for Travian: Legends and Travian Kingdoms.
6 Sum up the strength of all defending units.
7 Add the hero's fighting strength.
8 Add the base strength of residence / palace / Travian: Legends command centre.
9 Apply the wall and Travian Kingdoms water ditch bonus.
10 Add the wall's base strength.
11 Add the base defense.