Difference between revisions of "Damage (EU2012)"

From UFOpaedia
Jump to navigation Jump to search
m
Line 1: Line 1:
==Damage Function==
+
Damage is a stat that determines the the amount of health points (HPs) that will be removed from a unit upon being hit by a shot from a weapon, an explosion or some specific abilities such as Mindfray or others. 
  
Damage is defined through the following function in XGItemCards class, XComGame.upk file:
+
==Damage Types==
 +
There are essentially two different ways of calculating damage in the game:
 +
#Random damage, dealt by firearms and melee weapons (pistols, rifles, blades, claws, etc.), with the damage value being determined randomly (and specially when using Second Wave's Damage Roulette option) and the possibility of inflicting Critical Damage, or additional damage.
 +
#Static damage, inflicted by explosives (grenades, rockets, exploding objects, etc.) or other means such as poison or Psionic abilities, which is fixed and cannot inflict critical hits.
  
{
+
Regarding weapons/items, each has a defined damage stat but the game uses two types of damage when performing calculations to determine the total damage inflicted upon a target:
kItemCard.m_iBaseDamage = kWeapon.iDamage;
+
#Base Damage, which has a fixed value but that can be either static or variable (random).
kItemCard.m_iBaseDamageMax = -1;
+
#Critical Damage, which is always random.  
kItemCard.m_iBaseCritChance = -1;
 
kItemCard.m_iCritDamage = -1;
 
kItemCard.m_iCritDamageMax = -1;
 
  }
 
  // End:0x471
 
else
 
{
 
minDamage = int(FMax(1.00, float(kWeapon.iDamage - 1)));
 
maxDamage = int(FMax(1.00, float(kWeapon.iDamage + 1)));
 
kItemCard.m_iBaseDamage = minDamage;
 
kItemCard.m_iBaseDamageMax = maxDamage;
 
kItemCard.m_iBaseCritChance = kWeapon.iCritical;
 
minCrit = int(FMax(1.00, float(int(float(maxDamage) * 1.50) - 1)));
 
maxCrit = int(FMax(1.00, float(int(float(maxDamage) * 1.50) + 1)));
 
kItemCard.m_iCritDamage = minCrit;
 
kItemCard.m_iCritDamageMax = maxCrit;
 
}
 
  
 +
==Random Damage==
 +
[[File:Damage_Plasma_Rifle_(EU2012).png|right|Enemy Within DLC display|150px]]
 +
Random Damage only applies to firearms (conventional, laser and plasma) and can vary between -1 and +1 of the weapon's fixed Base Damage value for non-critical hits.
  
==Damage System==
+
As an example, the Plasma Rifle on the right has a fixed value of 7 for its Base Damage, but this value randomly can vary between 6 and 8 damage upon hitting a target.  
* Regarding the different numbers seen in the Armory info and the actual game values, it seems that the Base '''Damage''' range can vary, i.e. a weapon listed with a 9 damage can vary between 8 and 10 and you see the Maximum Damage listed onscreen during the game before firing.
 
* If the shot is a hit the game will then check to see its Critical Chance.
 
* If the Critical Chance roll is successful, the game will then calculate the Critical Damage.
 
* In addition, there are also specific Class perks that can increase Damage (both Base and Crit), such as:
 
** '''Headshot''' (Sniper) +2/4/6 Damage to Sniper Rifle, depending on weapon tech value
 
** '''Gunslinger''' (Sniper) +2 Damage to pistols
 
** '''Shredder''' (Heavy) +33% Damage from all sources to the target
 
** '''HEAT Ammo''' (Heavy) +100% Damage against robotic enemies(has been lowered to 50% damage in Enemy Within)
 
** '''Mayhem''' (Heavy) +1 to +3 Damage, depending on the weapon tech level
 
** '''Bring 'Em On''' +1 to +5 bonus Critical Damage, depending on the number of enemies
 
** '''Killer Instinct''' +50% Critical Damage
 
* Damage is rounded down.
 
** For example rocket to shredded target will do 6*1.33=7.98 -> 7 damage, and Mindfray to stimmed target will do 5*0.5 = 2.5 -> 2 damage.
 
* There seems to be a Damage cap (at least for explosives) - Rocket Launchers will deal 16 max damage using HEAT and Mayhem, regardless of using Shredder rockets or not.
 
  
==Critical Damage==
+
Regarding critical hits, Critical Damage can vary according to the following formula [http://forums.nexusmods.com/index.php?/topic/1017741-r-d-damage-mods/]:
The game code that calculates Critical Damage is:
+
#Base Damage (fixed value) is increased by +1
if(bCritical)
+
#Result is multiplied by 1.5, any fractions are rounded down
{
+
#Result is added by a random number between 0 and 2, then subtracted by -1
iDamage += 1;
 
  iDamage = int(float(iDamage) * 1.50);
 
iDamage += class'XComEngine'.static.SyncRand(3, string(Name) @ string(GetStateName()) @ string(GetFuncName())) - 1;
 
return iDamage;
 
}
 
  
* Critical Damage is simply calculated by increasing the iDamage (Base Damage) roll by a factor of 1.5 before applying the bonuses/penalties from abilities/perks.
+
===Damage Roulette===
* The range for the actual iDamage seems to be a random roll with a range of -1 to apparently the integer that precedes the Critical Damage value. Thus, Base Damage from an Assault Rifle can vary between 3 and 4 while with a Plasma Sniper Rifle it can vary between 8 and 12.  
+
Damage Roulette is a Second Wave option that further increases the randomness of each weapon.
  
 +
#Base Damage can vary between between 1 and the weapons' Base Damage fixed value + 50% (rounded down)
 +
#Critical Damage adds the base damage fixed value to the previously calculated random damage.
  
===Damage Values===
+
As an example, a Plasma Rifle's Base Damage can vary between 1 and 10 (7 + 3.5, round down). Its Critical Damage can vary between 8 and 17 (1 to 10, plus 7).
 +
 
 +
==Damage Values Display==
 +
 
 +
On vanilla EU, the weapon info box will only display the Base Damage's fixed value and the lower value for Critical Damage. However, on the Enemy Within DLC, the box will display the range of possible values for both Base and Critical Damage.
 +
 
 +
During tactical combat, the game will also give information about the weapon's Base Damage when pressing fire. The number displayed will be the maximum Base Damage possible.
 +
 
 +
<gallery widths=250px heights=125px perrow=3  caption="Damage Values Display">
 +
File:Damage_Sniper_Rifle_(EU2012).png|Info Box (EU)
 +
File:Damage_Sniper_Rifle_EW (EU2012).png|Info Box (EW DLC)
 +
File:Damage Display Tactical (EU2012).png|Assault Rifle about to fire
 +
</gallery>
 +
 
 +
===Discrepancies===
 +
On the Enemy Within DLC, the information about the weapons that can be seem at the Barracks is clearly incorrect for some weapons regarding their actual Critical Damage values. Some examples are listed below:
 +
* Assault Rifle & Plasma Pistol: Critical Damage listed as between 5-7, actual values are 4-6.
 +
 
 +
Other differences are also being currently under investigation.
 +
 
 +
==Damage Modifiers==
 +
Some class abilities or Foundry upgrades will increase/reduce the damage output of a unit or its weapon:
 +
* '''Headshot''': +2/4/6 Damage to Sniper Rifle, depending on weapon tech value
 +
* '''Gunslinger''': +2 Damage to pistols
 +
* '''Shredder''': +33% Damage from all sources to the target
 +
* '''HEAT Ammo''': +100% Damage against robotic enemies (has been lowered to 50% damage in Enemy Within)
 +
* '''Mayhem''': +1 to +3 Damage, depending on the weapon tech level
 +
* '''Bring 'Em On''': +1 to +5 bonus Critical Damage, depending on the number of enemies
 +
* '''Killer Instinct''': +50% Critical Damage
 +
* There seems to be a Damage cap (at least for explosives) - Rocket Launchers will deal 16 max damage using HEAT Ammo and Mayhem (on vanilla EU), regardless of using Shredder rockets or not.
 +
* '''Reinforced Armor''' will reduce all incoming damage to a Sectopod by 50% (on Enemy Within DLC)
 +
 
 +
==Damage Table==
 
{| class="wikitable" width="30%"  
 
{| class="wikitable" width="30%"  
 
|-  
 
|-  
Line 85: Line 89:
 
* The results for the other perks can be deduced from this table by calculating the corresponding additions, i.e. Gunslinger will add +2 to Pistol iDamage, Bring 'Em On will also add a variable number, while Shredder will add 33% to the end Damage value.
 
* The results for the other perks can be deduced from this table by calculating the corresponding additions, i.e. Gunslinger will add +2 to Pistol iDamage, Bring 'Em On will also add a variable number, while Shredder will add 33% to the end Damage value.
 
* Headshot adds +2/4/6 damage to Sniper Rifle shots, depending on its tech level.
 
* Headshot adds +2/4/6 damage to Sniper Rifle shots, depending on its tech level.
 
==Weapons Kill Table==
 
* Based on the above model, the tables below indicate how many shots (Base or Critical) are usually required to take down the aliens.
 
* BASE = alien can be killed with 1 shot dealing average (non-critical) damage
 
* CRIT = alien requires either 2 base shots or 1 critical hit with close to maximum critical damage.
 
 
===Classic===
 
{| class="wikitable" width="100%"
 
|-
 
! width=""50px" align="center" | Weapon !! Base Damage !! Crit Damage !! Max Damage !! Critical Chance !! Tier 1 (3-7 HP)!! Tier 2 (8-13 HP) !! Tier 3 (14+ HP)
 
|-
 
|- style="vertical-align:top;"
 
|-
 
| align="center" |[[Pistol (EU2012)|Pistol]] || align="center" | 0-2 || align="center" | 0-1 || align="center" | 3 || align="center" | 0 || align="center" |  || align="center" |  || align="center" |
 
|-
 
| align="center" |[[Pistol (EU2012)|Pistol (III)]]<br>[[Laser Pistol (EU2012)|Laser Pistol]]|| align="center" | 1-3 || align="center" |0-1 || align="center" | 4 || align="center" | 10 || align="center" | CRIT || align="center" | CRIT|| align="center" | CRIT
 
|-
 
| align="center" |[[Laser Pistol (EU2012)|Laser Pistol (III)]]<br>[[Plasma Pistol (EU2012)|Plasma Pistol]]<br>[[Assault Rifle (EU2012)|Assault Rifle]] || align="center" | 2-4 || align="center" | 1-2 || align="center" | 6 || align="center" | 10<br>0<br>10 || align="center" | BASE || align="center" | CRIT || align="center" | CRIT
 
|-
 
| align="center" |[[Plasma Pistol (EU2012)|Plasma Pistol (III)]]<br>[[LMG (EU2012)|LMG]]<br>[[Sniper Rifle (EU2012)|Sniper Rifle]]<br>[[Shotgun (EU2012)|Shotgun]]|| align="center" | 3-5 || align="center" | 1-2 || align="center" | 7 || align="center" | 20<br>0<br>25<br>20|| align="center" | BASE || align="center" | BASE || align="center" |
 
|-
 
| align="center" |[[Laser Rifle (EU2012)|Laser Rifle]]<br>[[Light Plasma Rifle (EU2012)|Light Plasma Rifle]]|| align="center" | 4-6  || align="center" | 2-3  || align="center" | 9 || align="center" | 10 || align="center" | BASE || align="center" | BASE || align="center" |  CRIT
 
|-
 
| align="center" |[[Heavy Laser (EU2012)|Heavy Laser]]<br>[[Laser Sniper Rifle (EU2012)|Laser Sniper Rifle]]<br>[[Scatter Laser (EU2012)|Scatter Laser]]|| align="center" | 5-7 || align="center" | 2-3  || align="center" | 10 || align="center" | 10<br>30<br>20 || align="center" | BASE || align="center" | BASE || align="center" | BASE
 
|-
 
| align="center" |[[Plasma Rifle (EU2012)|Plasma Rifle]]|| align="center" | 6-8  || align="center" | 3-4 || align="center" | 12 || align="center" | 12 || align="center" | BASE || align="center" | BASE || align="center" | BASE
 
|-
 
| align="center" |[[Heavy Plasma (EU2012)|Heavy Plasma]]<br>[[Plasma Sniper Rifle (EU2012)|Plasma Sniper Rifle]]<br>[[Alloy Cannon (EU2012)|Alloy Cannon]]|| align="center" | 8-10 || align="center" | 4-5  || align="center" | 15 || align="center" | 10<br>35<br>20  || align="center" | BASE || align="center" | BASE || align="center" | BASE 
 
|-
 
|}
 
  
 
== Back To ==
 
== Back To ==

Revision as of 19:27, 23 January 2014

Damage is a stat that determines the the amount of health points (HPs) that will be removed from a unit upon being hit by a shot from a weapon, an explosion or some specific abilities such as Mindfray or others.

Damage Types

There are essentially two different ways of calculating damage in the game:

  1. Random damage, dealt by firearms and melee weapons (pistols, rifles, blades, claws, etc.), with the damage value being determined randomly (and specially when using Second Wave's Damage Roulette option) and the possibility of inflicting Critical Damage, or additional damage.
  2. Static damage, inflicted by explosives (grenades, rockets, exploding objects, etc.) or other means such as poison or Psionic abilities, which is fixed and cannot inflict critical hits.

Regarding weapons/items, each has a defined damage stat but the game uses two types of damage when performing calculations to determine the total damage inflicted upon a target:

  1. Base Damage, which has a fixed value but that can be either static or variable (random).
  2. Critical Damage, which is always random.

Random Damage

Enemy Within DLC display

Random Damage only applies to firearms (conventional, laser and plasma) and can vary between -1 and +1 of the weapon's fixed Base Damage value for non-critical hits.

As an example, the Plasma Rifle on the right has a fixed value of 7 for its Base Damage, but this value randomly can vary between 6 and 8 damage upon hitting a target.

Regarding critical hits, Critical Damage can vary according to the following formula [1]:

  1. Base Damage (fixed value) is increased by +1
  2. Result is multiplied by 1.5, any fractions are rounded down
  3. Result is added by a random number between 0 and 2, then subtracted by -1

Damage Roulette

Damage Roulette is a Second Wave option that further increases the randomness of each weapon.

  1. Base Damage can vary between between 1 and the weapons' Base Damage fixed value + 50% (rounded down)
  2. Critical Damage adds the base damage fixed value to the previously calculated random damage.

As an example, a Plasma Rifle's Base Damage can vary between 1 and 10 (7 + 3.5, round down). Its Critical Damage can vary between 8 and 17 (1 to 10, plus 7).

Damage Values Display

On vanilla EU, the weapon info box will only display the Base Damage's fixed value and the lower value for Critical Damage. However, on the Enemy Within DLC, the box will display the range of possible values for both Base and Critical Damage.

During tactical combat, the game will also give information about the weapon's Base Damage when pressing fire. The number displayed will be the maximum Base Damage possible.

Discrepancies

On the Enemy Within DLC, the information about the weapons that can be seem at the Barracks is clearly incorrect for some weapons regarding their actual Critical Damage values. Some examples are listed below:

  • Assault Rifle & Plasma Pistol: Critical Damage listed as between 5-7, actual values are 4-6.

Other differences are also being currently under investigation.

Damage Modifiers

Some class abilities or Foundry upgrades will increase/reduce the damage output of a unit or its weapon:

  • Headshot: +2/4/6 Damage to Sniper Rifle, depending on weapon tech value
  • Gunslinger: +2 Damage to pistols
  • Shredder: +33% Damage from all sources to the target
  • HEAT Ammo: +100% Damage against robotic enemies (has been lowered to 50% damage in Enemy Within)
  • Mayhem: +1 to +3 Damage, depending on the weapon tech level
  • Bring 'Em On: +1 to +5 bonus Critical Damage, depending on the number of enemies
  • Killer Instinct: +50% Critical Damage
  • There seems to be a Damage cap (at least for explosives) - Rocket Launchers will deal 16 max damage using HEAT Ammo and Mayhem (on vanilla EU), regardless of using Shredder rockets or not.
  • Reinforced Armor will reduce all incoming damage to a Sectopod by 50% (on Enemy Within DLC)

Damage Table

Weapon Base Damage Crit Damage
Pistol
Pistol (III)
Laser Pistol
1 2
Pistol
Pistol (III)
Assault Rifle
Laser Pistol
Laser Pistol (III)

Plasma Pistol
2 3
Pistol (III)
Assault Rifle
LMG
Sniper Rifle
Shotgun
Laser Pistol
Laser Pistol (III)

Plasma Pistol
Plasma Pistol (III)

3 4
Assault Rifle
LMG
Sniper Rifle
Shotgun
Laser Pistol (III)
Laser Rifle

Plasma Pistol
Plasma Pistol (III)
Plasma Light Rifle
4 6
LMG
Sniper Rifle
Shotgun
Laser Rifle
Heavy Laser
Laser Sniper Rifle
Laser Scatter

Plasma Pistol (III)
Plasma Light Rifle
5 7
Laser Rifle
Heavy Laser
Laser Sniper Rifle
Laser Scatter

Plasma Light Rifle
Plasma Rifle
6 9
Heavy Laser
Laser Sniper Rifle
Laser Scatter

Plasma Rifle
7 10
Plasma Rifle
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
8 12
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
9 13
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
10 15
  • Damage can vary between -1 and +1 of the value listed on the Armory. Maximum damage is listed during missions.
  • The results for the other perks can be deduced from this table by calculating the corresponding additions, i.e. Gunslinger will add +2 to Pistol iDamage, Bring 'Em On will also add a variable number, while Shredder will add 33% to the end Damage value.
  • Headshot adds +2/4/6 damage to Sniper Rifle shots, depending on its tech level.

Back To