Notice something wrong, missing, or unsatisfactory? Feel free to fix it yourself, or contact Support

Editing Battle Engine

From Medieval Europe
Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 13: Line 13:
 
|A turn includes n hits with n between 1 and 3
 
|A turn includes n hits with n between 1 and 3
 
|-
 
|-
|Armor Encumbrance
+
|War encumbrance
|Ratio between the Equipped Armor weight and the base transportable weight
+
|encumbrance in battle is the ratio between the equipped item weight and the base transportable weight
 
|-
 
|-
 
|Armor Penetration
 
|Armor Penetration
|Armor penetration represents a weapon's ability to overcome armor to deliver cutting damage.
+
|Armor penetration represents a weapon's ability to overcome armor to deliver cutting damage.  The values reflect what percentage of a weapon’s cutting damage is inflicted on the opponent wearing armor with rating of AC 1.  Thicker armor deflects more of the cutting damage.
 
|}
 
|}
  
Line 24: Line 24:
 
[[File:Battle Engine-1.png]]
 
[[File:Battle Engine-1.png]]
  
==Initiative Computation==
+
===Initiative Computation===
  
 
Initiative determine '''who will attack first''' and is computed at the start of every round. It will depend on the reach attribute of each character’s weapon. '''A character using a weapon with a longer reach than his/her opponent will have better odds of gaining the initiative'''. If the weapons have the same reach, each character has a equal chance of gaining the initiative.
 
Initiative determine '''who will attack first''' and is computed at the start of every round. It will depend on the reach attribute of each character’s weapon. '''A character using a weapon with a longer reach than his/her opponent will have better odds of gaining the initiative'''. If the weapons have the same reach, each character has a equal chance of gaining the initiative.
Line 30: Line 30:
 
   Initiative = f( Attacker_Weapon_Length, Defender_Weapon_Length )
 
   Initiative = f( Attacker_Weapon_Length, Defender_Weapon_Length )
  
==Consecutive Hits Computation==
+
===Consecutive Hits Computation===
  
 
Range: 1-3
 
Range: 1-3
  
After initiative has been computed, the engine computer how many consecutive hits the attacker will deal.
+
After initiative has been computed, the engine computer how many consecutive hits the attacker will deal. Consecutive hits are negatively affected by the attacking character’s weapon weight and weapon length, and positively affected by the attacking character’s strength and energy levels. 
  
'''Negative Variables'''
+
'''Stunned characters cannot attack.'''
  
* Weapon Reach
+
  Consecutive attacks number = f( Attacker_Weapon_Length, Strength, Energy )
* Weapon Weight
+
* Armor Encumbrance
+
 
+
'''Positive Variables'''
+
 
+
* Energy
+
* Constitution
+
* Strength
+
 
+
The variables values will be normalized and summed.
+
 
+
{|class='hor-minimalist-a'
+
|-
+
|
+
!colspan="10" style="text-align:center"|strength + energy + constitution (normalized) (normalized)
+
|-
+
!rowspan="9" style="text-align:center"|weapon reach + <br/> weapon weight + <br/>armor encumberance<br/>
+
(normalized)
+
|
+
|0
+
|0,5
+
|1
+
|1,5
+
|2
+
|2,5
+
|3
+
|-
+
|0
+
|1
+
|1
+
|2
+
|3
+
|3
+
|3
+
|3
+
|-
+
|0,5
+
|1
+
|1
+
|2
+
|3
+
|3
+
|3
+
|3
+
|-
+
|1
+
|1
+
|1
+
|1
+
|2
+
|3
+
|3
+
|3
+
|-
+
|1,5
+
|1
+
|1
+
|1
+
|1
+
|2
+
|3
+
|3
+
|-
+
|2
+
|1
+
|1
+
|1
+
|1
+
|2
+
|3
+
|3
+
|-
+
|2,5
+
|1
+
|1
+
|1
+
|1
+
|1
+
|2
+
|3
+
|-
+
|3
+
|1
+
|1
+
|1
+
|1
+
|1
+
|2
+
|3
+
|}
+
  
==Hit and Miss Chance Computation==
+
===Hit and Miss Chance Computation===
  
 
Logic to hit or miss depends on the ratio between Attacker and Defender Dexterities.
 
Logic to hit or miss depends on the ratio between Attacker and Defender Dexterities.
Line 145: Line 55:
 
* Attacker has dex 1, defender has dex 18. Hit_Chance will be about 26%.  
 
* Attacker has dex 1, defender has dex 18. Hit_Chance will be about 26%.  
  
==Hit Logic==
+
===Damage Computation===
 
+
It will be possible to hit  on following body parts:
+
 
+
''head, armor, legs, feet, left arm, right arm''
+
 
+
Only with a weapon of reach at least 4, it will be possible to hit the part ''feet''.
+
 
+
The armors will do not (as before) covers only the part where they are equipped but they extend also on other parts.
+
 
+
For example, before the plate armor was equipped on slot ''armor'' and its defense was effective only when the attacker was hitting the part “armor”. Now, the plate armor defense is effective also against hits on ''left arm'' and ''right arm''.
+
 
+
{|class='hor-minimalist-a'
+
|-
+
!Armor
+
!Equipped on
+
!Covers
+
|-
+
|Chainmail
+
|Torso
+
|Armor, Left Arm, Right Arm
+
|-
+
|Leather Armor
+
|Armor
+
|Armor
+
|-
+
|Plate Armor
+
|Armor
+
|Armor, Left Arm, Right Arm
+
|-
+
|}
+
 
+
 
+
<u>Example</u>
+
 
+
If the defender is wearing a chainmail (defense 4) under a Leather Armor (defense 2), and a hit goes on part Armor:
+
 
+
# The engine will recompute damage by applying the Leather Armor + chainmail defense (6)
+
# The engine will consume only the Leather Armor but by his defense (2)
+
 
+
If the Leather Armor eventually breaks the engine will consider only the Chainmail Defense and then consume the Chainmail. If the hit is landed on the left arm and the defender holds a shield, the damage will be absorbed by all the Shield.
+
 
+
==Damage Computation==
+
  
 
Dealt damage depends from the following factors:  
 
Dealt damage depends from the following factors:  
Line 197: Line 65:
 
* Defender AC
 
* Defender AC
  
===Base Damage===
+
====Base Damage====
  
 
The Base Damage is randomly selected within the range of damage values for the equipped weapon. With a Strength value of 10, an energy value of 50%, and a weapon condition of 50%, the damage will be randomly selected using a Normal (Gaussian) distribution centered on the mean of the weapon’s damage range. Thus, if the range is 1-7, a 4 will have the best odds of being rolled and a 1 and a 7 would have the worst odds of being rolled.  
 
The Base Damage is randomly selected within the range of damage values for the equipped weapon. With a Strength value of 10, an energy value of 50%, and a weapon condition of 50%, the damage will be randomly selected using a Normal (Gaussian) distribution centered on the mean of the weapon’s damage range. Thus, if the range is 1-7, a 4 will have the best odds of being rolled and a 1 and a 7 would have the worst odds of being rolled.  
Line 205: Line 73:
  
 
[[File:DamageSkewFigure.png|thumb|alt=Figure showing how the Normal curve of damages is skewed depending on Strength, Energy, and Weapon condition.|]]
 
[[File:DamageSkewFigure.png|thumb|alt=Figure showing how the Normal curve of damages is skewed depending on Strength, Energy, and Weapon condition.|]]
 +
  
 
   Base Damage = max(1, Weapon Damage + (Weapon Damage * Character Strength / 23) )
 
   Base Damage = max(1, Weapon Damage + (Weapon Damage * Character Strength / 23) )
Line 212: Line 81:
 
Attacker hits with a longsword, Computed Weapon Damage is 6. Attacker has strength 18.
 
Attacker hits with a longsword, Computed Weapon Damage is 6. Attacker has strength 18.
  
   Base Damage = 6 + 6 * (18/23) = 10.7
+
   Base Damage = 6 + 6 * (18/23) = 10,7
  
 
The Base Damage is then partitioned in Blunt Damage and Cutting Damage accordingly to the weapon Cutting Damage/Blunt Damage.  
 
The Base Damage is then partitioned in Blunt Damage and Cutting Damage accordingly to the weapon Cutting Damage/Blunt Damage.  
Line 218: Line 87:
 
<u>Example</u>
 
<u>Example</u>
  
   Base Damage of longsword = 10.7. Longsword has Blunt 20% and Cut 80%. Blunt Damage = 2.14 and Cut Damage = 8.56
+
   Base Damage of longsword = 10,7. Longsword has Blunt 20% and Cut 80%. Blunt Damage = 2,14 and Cut Damage = 8,56
  
 
[[File:Battle Engine-2.png||alt=Base Damage is split in Blunt and Cutting Damage.]]
 
[[File:Battle Engine-2.png||alt=Base Damage is split in Blunt and Cutting Damage.]]
  
===Damage and Armor Consumption===
+
====Blunt Damage====
  
When the opponent is hit, damage is computed as follows:
+
Blunt damage is the damage inflicted by the inertia of a weapon impacting an opponent and it depends from the choosen weapon. Weapons with high blunt damage are meant to destroy and consume opponent armor.
  
First, weapon damage is split into bluntdamage and cutdamage accordingly to weapon bluntperc and cutperc values.
+
In addition, blunt damage brings a chance to stun an opponent, which causes the character to:be unable to attack or defend. The chance of stunning an opponent is proportional to the amount of blunt damage inflicted.
  
<u>Example</u>
+
===Damage===
Longsword damage = 15 -> Bluntdamage = 2, Cut Damage = 2
+
  
Second, equipped armor defense is evaluated.
+
Armor is consumed accordingly to the following formula:
  
===What is Blunt Damage?===
+
If bluntdamage is >= than equipment defense:
  
Blunt damage is the damage inflicted by the inertia of a weapon impacting an opponent and it depends from the choosen weapon. Weapons with high blunt damage are meant to destroy and consume opponent armor. In addition, blunt damage brings a chance to stun an opponent, which causes the character to:be unable to attack or defend. The chance of stunning an opponent is proportional to the amount of blunt damage inflicted.
+
  bluntdamage = bluntdamage - equipment_defense
 +
  consumption = max(1, equipment_defense)/wearfactor
  
===What is Cut Damage?===
+
If bluntdamage is < than equipment defense:
Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the battle is terminated.
+
  
===Damage and Armor Consumption===
+
  bluntdamage = 0
 +
  consumption = bluntdamage
  
Damage inflicted is computed as per the following algorithm:
+
Wearfactor is always 1 except Punisher equipment.
  
   if (hit part is shield)
+
   Note: Shield absorb all the damage
      bluntdamageafterarmor = bluntdamagebeforearmor - equipment_defense * 0.4
+
      cutdamageafterarmor = 0 // shield absorb all cut damage
+
  else
+
      bluntdamageafteraror = bluntdamagebeforearmor - equipment_defense
+
      cutdamageafterarmor = cutdamagebeforearmor / ( 1 - (equipmentdefense * 3.5)/Armor penetration)
+
 
+
  bleed Damage = cuttingdamageafterarmor * 0.05
+
   
+
  if (bluntdamage > 0)
+
      Armor consumption = max( $bluntdamage - $hitpart_info['hitobjdefense'], $equipment_defense/4) * 1 / wearfactor;
+
  
 
<u>Example 1</u>
 
<u>Example 1</u>
  
Attacker hits with a longsword for a damage 10 and hits the shield with defense 2
+
''Attacker hits with a longsword for a damage 10 and hits the shield with defense 2''
  
BEFORE DEFENSE
+
'''BEFORE DEFENSE'''
  
Bluntdamage = 8.56, Cut Damage = 2.14, Total Damage = 10.7
+
Bluntdamage = 8, Cut Damage = 2, Total Damage = 10
  
AFTER DEFENSE
+
'''AFTER DEFENSE'''
  
Bluntdamage = 8.48, Cut Damage = 2.14, Total Damage = 8.48
+
Damage = 0, Shield wears off by 6% (bluntdamage - shield defense)
Shield Consumption = 8.56-2 = 6.56%
+
  
 
<u>Example 2</u>
 
<u>Example 2</u>
  
Attacker hits with a longsword for a damage 10.7 and hits the shield with defense 10
+
''Attacker hits with a longsword for a damage 10 and hits the shield with defense 10''
  
BEFORE DEFENSE
+
'''BEFORE DEFENSE'''
  
Bluntdamage = 8.57, Cut Damage = 2.16, Total Damage = 10.7
+
Bluntdamage = 8, Cut Damage = 2, Total Damage = 10
  
AFTER DEFENSE
+
'''AFTER DEFENSE'''
  
Bluntdamage = 0, Cut Damage = 0, Total Damage = 0
+
Damage = 0, Shield wears off by 8%
Damage = 0,
+
Shield Consumption = 10%
+
  
===Stun Effects===
+
'''Effects of stun'''
  
 
If a character is stunned, he can be stunned for n turns, where the number of turns for which the opponent is stunned depends on opponent constitution:
 
If a character is stunned, he can be stunned for n turns, where the number of turns for which the opponent is stunned depends on opponent constitution:
Line 295: Line 151:
 
# Basic damage incurred from the opponent is increased by 150%
 
# Basic damage incurred from the opponent is increased by 150%
  
===Cutting Damage===
+
====Cutting Damage====
  
Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the battle is terminated.
+
Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the fight is concluded.
  
  Cuttingdamage After Defense = cuttingdamage / ( 1 - (equipmentdefense * 3.5)/Armor penetration)
+
'''Effects of bleed damage:'''
  
  Bleed Damage = cuttingdamage * 0.05
+
Bleed damage is the damage caused by blood loss coming from a cutting wound. It is a percentage of the cumulative cutting damaged incurred.
 +
Every successful hit will accumulate a certain amount bleed damage that depends from the weapon penetration.  
  
 
<u>Example:</u>
 
<u>Example:</u>
  
''Attacker uses a longsword. Base Damage = 10,7. Cutting Damage = 8.57''
+
Attacker uses Fauchard. Base Damage = 10. Cutting Damage = 5.
  
Mario hits Paolo for 8.57 cutting damage. This will result in about 1.714 HP Bleed Damage.  
+
Mario hits Paolo for 5 cutting damage. This will result in about 0.125 HP Bleed Damage. Paolo receives another hits and his Bleed Damage accumulates to 0.3 HP. At each turn Paolo will receive an additional damage of 0.3 HP.
...
+
Mario hits Paolo for 8.57 cutting damage. This will result in about 1.714+1.714 = 3.42 HP Bleed Damage.  
+
  
===Weapon Consumption===
+
==The Critical Hit==
  
Weapon is consumed accordingly to the following formula:
+
Once established that a character hits the opponent, a check is done for a critical hit. The chance to deal a critical hit depends on:
  
If the hit part had an equipment with defense:
+
* Used weapon
 +
* Attacker intelligence vs Defender intelligence
  
   Weapon Consumption = max(1, equipment_defense * 0,5)/wearfactor * 0.25
+
   Critical chance = f (IntelligenceAttacker, Intelligencedefender)
  
else
+
A critical hit multiplies the damage for a factor related to the used weapon.
  
  Weapon Consumption = 1/wearfactor * 0.25
+
<u>Example</u>
  
<u>Example 1</u>
+
Guglielmo uses a Fauchard and deal a basic damage 8. Fauchard has a Critical Factor 20-4. This means that a 20-faces dices must score 20 in order to deal a Critical Hits. If 20 is scored the basic damage is multiplied by 4, and becomes 32. The Basic Damage is then splitted to 16 blunt damage and 16 cut damage.
 
+
''Attacker hits with a longsword for a damage 10 and hits the shield with defense 10''
+
 
+
'''BEFORE DEFENSE'''
+
 
+
Bluntdamage = 8, Cut Damage = 2, Total Damage = 10
+
 
+
'''AFTER DEFENSE'''
+
Damage = 0, Longsword wears off by 1.25%
+
 
+
<u>Example 2</u>
+
 
+
''Attacker hits with a longsword for a damage 10 and hits the head (no armor)''
+
 
+
'''BEFORE DEFENSE'''
+
 
+
Bluntdamage = 8, Cut Damage = 2, Total Damage = 10
+
 
+
'''AFTER DEFENSE'''
+
 
+
Damage = 10, Longsword wears off by 0.25%
+
==Wear Factor==
+
Weapons and Armor is consumed while fighting. Every Weapon and Armor has a Wear Factor that is used to correct the weapon consumption.
+
 
+
  Weapon/Armor Consumption = Consumption * Wear Factor
+
 
+
For example, if a weapon after a succesfull hit it should ne consumed by 0.01  and has a wear factor of 0.5, it will consumed by 0.005.
+
 
+
==The Critical Hit==
+
 
+
A Critical Hit can deal severe damage. Only some Weapons can deliver a Critical Hit. Please check [Weapons] page to find out. The chance of delivering a critical hit will depend from the weapon that the player is using and from the difference between attacker and defender intelligence and dexterity.
+
 
+
If a weapon has a Critical factor of 19x2 it means that to deliver a Critical Hit with that weapon one must score at least 19 on a d20. Once established that a weapon scores a Critical, opponentes Intelligence and Dexterity are evaluated.
+
 
+
{|class='hor-minimalist-a'
+
|-
+
!Intel + Dex Diff
+
!Percentage to score a Critical
+
!War Hammer<br/> Critical Chance: 5%
+
!Long Sword<br/> Critical Chance: 10%
+
!Scimitar<br/> Critical Chance: 15%
+
!The Punisher<br/> Critical Chance;20%
+
|-
+
|
+
|
+
|colspan="4" style="text-align:center"|Combined Percentage
+
|-
+
|0
+
|
+
|1%
+
|1%
+
|2%
+
|2%
+
|-
+
|1
+
|1,00%
+
|1%
+
|1%
+
|2%
+
|2%
+
|-
+
|2
+
|1,28%
+
|1%
+
|1%
+
|2%
+
|2%
+
|-
+
|3
+
|1,41%
+
|1%
+
|1%
+
|2%
+
|3%
+
|-
+
|4
+
|1,51%
+
|1%
+
|2%
+
|2%
+
|3%
+
|-
+
|5
+
|1,58%
+
|1%
+
|2%
+
|3%
+
|3%
+
|-
+
|6
+
|1,64%
+
|1%
+
|2%
+
|3%
+
|4%
+
|-
+
|7
+
|1,70%
+
|1%
+
|2%
+
|3%
+
|4%
+
|-
+
|8
+
|1,74%
+
|1%
+
|2%
+
|3%
+
|4%
+
|-
+
|9
+
|1,79%
+
|1%
+
|2%
+
|4%
+
|5%
+
|-
+
|10
+
|1,83%
+
|1%
+
|3%
+
|4%
+
|5%
+
|-
+
|11
+
|1,86%
+
|1%
+
|3%
+
|4%
+
|5%
+
|-
+
|12
+
|1,89%
+
|1%
+
|3%
+
|4%
+
|6%
+
|-
+
|13
+
|1,92%
+
|2%
+
|3%
+
|5%
+
|6%
+
|-
+
|14
+
|1,95%
+
|2%
+
|3%
+
|5%
+
|7%
+
|-
+
|15
+
|1,98%
+
|2%
+
|4%
+
|5%
+
|7%
+
|-
+
|16
+
|2,00%
+
|2%
+
|4%
+
|6%
+
|7%
+
|-
+
|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+
|9%
+
|14%
+
|19%
+
|-
+
|42
+
|2,42%
+
|5%
+
|10%
+
|14%
+
|19%
+
|-
+
|43
+
|2,43%
+
|5%
+
|10%
+
|15%
+
|20%
+
|-
+
|44
+
|2,44%
+
|5%
+
|10%
+
|15%
+
|20%
+
|}
+
  
 
==Energy consumption==
 
==Energy consumption==
Line 702: Line 196:
 
The above variables values will  been normalized as per the following theory: [http://stats.stackexchange.com/questions/70801/how-to-normalize-data-to-0-1-range How to Normalize Data] so thwy will be converted to values between 0 to 1.
 
The above variables values will  been normalized as per the following theory: [http://stats.stackexchange.com/questions/70801/how-to-normalize-data-to-0-1-range How to Normalize Data] so thwy will be converted to values between 0 to 1.
  
{|class='hor-minimalist-a'
+
{|class='wikitable'
 
!
 
!
!colspan="8" style="text-align:center"|weapon reach + weapon weight + armor encumbrance (normalized)
+
!colspan="8"|weapon reach + weapon weight + armor encumbrance (normalized)
 
|-  
 
|-  
!rowspan="9" style="text-align:center"|constitution (Normalized)
+
!rowspan="9"|constitution (Normalized)
 
|
 
|
 
|0
 
|0
Line 780: Line 274:
 
|}
 
|}
  
==Armor Encumbrance==
+
==War Encumbrance==
  
Armor Encumbrance is computed as follows:
+
War encumbrance is computed as follows:
  
   Armor Encumbrance = (Equipped items weight (weapon excluded)/Base_Transportable_Weight
+
   War encumbrance = (Equipped items weight (weapon excluded)/Base_Transportable_Weight
  
 
where  
 
where  

Please note that all contributions to Medieval Europe may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Medieval Europe:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools