Jump to content

데미지 계산 (롱 워 리밸런스): Difference between revisions

From UFOpaedia
Kien123 (talk | contribs)
Kien123 (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[엑스컴: 롱 워 리밸런스|메인 페이지로]]
[[엑스컴: 롱 워 리밸런스|메인 페이지로]]
== 용어 ==
== Terms ==


'''무기 데미지''': 순수한 무기 자체의 데미지
'''Weapon Damage''': This is each weapon damage stat configurable in DefaultGameCore.ini file.


'''총열 변수''': These are effects that modifies damage as it leaves the barrel of the weapon.


'''Crit Dmg (or Critical Damage)''': This is how much the <u>''Weapon Damage''</u>, after being affected by <u>''Barrel Modifiers''</u>, is increased during a critical hit. The base value is 1.5, and a non-crit is 1.0.
'''Barrel Modifiers''': These are effects that modifies damage as it leaves the barrel of the weapon.


'''총열 데미지''': This is the <u>''Weapon Damage''</u> modified by <u>''Barrel Modifiers''</u>.
'''Target Modifiers''': These are effects that modify the damage when it hits the target.


'''Travel Damage''': This is the <u>''Barrel Damage''</u> modified by <u>''Crit Dmg''</u> and then randomized.
'''Crit Dmg (or Critical Damage)''': This is how much the damage is increased during a critical hit. The base value is 1.5, and a non-crit is 1.0.


'''목표물 변수''': These are effects that modify the damage when it hits the target.
'''DR (or Damage Resistance)''': This is how much of the damage received is resisted. It involves <u>''Flat Damage Resistance''</u>, <u>''Percent Damage Resistance''</u>, and <u>''Penetration''</u>.
 
 
'''Barrel Damage''': This is the <u>''Weapon Damage''</u> modified by <u>''Barrel Modifiers''</u>.
 
'''Travel Damage''': This is the <u>''Barrel Damage''</u> modified by <u>''Crit Dmg''</u> and then <u>''Randomized''</u>.


'''Damage Dealt''': This is the damage that a target receives from a damage dealer. It is <u>''Barrel Damage''</u> modified by <u>''Target Modifiers''</u>.
'''Damage Dealt''': This is the damage that a target receives from a damage dealer. It is <u>''Barrel Damage''</u> modified by <u>''Target Modifiers''</u>.
'''DR (or Damage Resistance)''': This is how much of the damage received is resisted. It involves <u>''Flat Damage Resistance''</u>, <u>''Percent Damage Resistance''</u>, and <u>''Penetration''</u>.


'''Damage Taken''': This is how much damage the unit actually takes. It is the <u>''Damage Dealt''</u> minus the <u>''Damage Resistance''</u>.
'''Damage Taken''': This is how much damage the unit actually takes. It is the <u>''Damage Dealt''</u> minus the <u>''Damage Resistance''</u>.
Line 36: Line 38:
=== Travel Damage ===
=== Travel Damage ===


After it leaves the barrel and is travelling towards the target, '''Crit Dmg''' is applied (anywhere from 1.0x to 2.0x damage) and the damage is randomized roughly between 0.75 to 1.25 (see chart below). It is truncated after each calculation.
After it leaves the barrel and is travelling towards the target, '''Crit Dmg''' of anywhere from 1.0x to 2.0x damage is applied (there is a [[Damage_(LWR)#Low_Damage_Crits|minimum]] boost that affects low damage crits) and then the damage is '''Randomized'''.
 
For all damage 1-9, the damage is randomized from -1 to +1, with an even chance of being -1, 0, or +1.
 
For all damage 10-19, the damage is randomized from -2 to +2, with an even chance of being -2, -1, 0, +1, or +2.
 
The same occurs for damage of 20-29, 30-39, etc.
 
The minimum damage is always at least 1.
 
The actual formula is:
<code>Randomized Damage = Max(1, Damage + Rand[1 + (2 * (1 + Damage / 10))] - (1 + Damage / 10))</code>
 
The randomization works in integer values so all values are constantly truncated (e.g. If x is 6 then x/10 = 0).


<code>'''Travel Damage''' = ('''Barrel Damage''' * '''Crit Dmg''') <-- Randomization</code>
<code>'''Travel Damage''' = ('''Barrel Damage''' * '''Crit Dmg''') <-- Randomization</code>
Line 56: Line 71:
<code>'''Damage Taken''' = ('''Damage Dealt''' - '''Flat DR''') * (1 - '''Percent DR''') + '''Penetration'''</code>
<code>'''Damage Taken''' = ('''Damage Dealt''' - '''Flat DR''') * (1 - '''Percent DR''') + '''Penetration'''</code>
<br/><br/>
<br/><br/>
== Exceptions ==
=== Low Damage Crits ===
A special exception for critical hits, is that a crit with low '''Barrel Damage''' (1, 2, or 3 damage) will crit for at least 3, 4, or 5 damage, respectively. This is an artificial boost to ensure that even if a player rolls on the randomization, the crit is always at least as much as the max roll on a non-crit.


=== Mins and Maxes ===
=== Mins and Maxes ===
Line 61: Line 82:
The '''Damage Taken''' cannot be reduced below 1 by '''Damage Resistance (DR)'''.
The '''Damage Taken''' cannot be reduced below 1 by '''Damage Resistance (DR)'''.


The '''Damage Taken''' can never go higher than. the '''Damage Dealt'''.
 
For example, someone with a high amount of penetration could calculate final '''Damage Taken''' numbers higher than '''Damage Dealt''', but this would be capped at the initial '''Damage Dealt'''.
The '''Damage Taken''' can never go higher than the '''Damage Dealt'''.
<br><br>
<div style="max-width: 1450px;">
For example, someone with a high amount of penetration could calculate final '''Damage Taken''' numbers higher than '''Damage Dealt''', but this would be capped at the initial '''Damage Dealt'''.
</div>
 
'''Randomization''' will always set the damage to a minimum of 1.


=== Truncation ===
=== Truncation ===
Line 76: Line 101:


Example: a 10 damage shot against a unit with 0.1 '''Flat DR''' will have a '''Damage Taken''' of 9. Having both '''Flat DR''' and '''Percent DR''' calculated as total DR before truncation means that minor amounts of both DR will not end up reducing DR by 2.  Example: a 10 damage shot against a unit with 0.1 '''Flat DR''' and 1 '''Percent DR''' will have a '''Damage Taken''' of 9 (it would be 8 if the damage was truncated individually between '''Flat DR''' and '''Percent DR''').
Example: a 10 damage shot against a unit with 0.1 '''Flat DR''' will have a '''Damage Taken''' of 9. Having both '''Flat DR''' and '''Percent DR''' calculated as total DR before truncation means that minor amounts of both DR will not end up reducing DR by 2.  Example: a 10 damage shot against a unit with 0.1 '''Flat DR''' and 1 '''Percent DR''' will have a '''Damage Taken''' of 9 (it would be 8 if the damage was truncated individually between '''Flat DR''' and '''Percent DR''').
<br/><br/>


=== Damage Randomization===
=== Explosive Damage ===


The purpose of the randomization is to pick a integer value between roughly 0.75 and 1.25 of the '''Travel Damage'''.
Each unit damaged by explosive damage has the '''Travel Damage''' reduced based on distance from the center. Damage falls as half the square of the radius plus 0.5, down to 50% plus 0.5 at the periphery.  


The randomization works in integer values only. A die of size 2 * '''Travel Damage''' + 2 is rolled, where each integer point of '''Travel Damage''' is assigned up to four possible results on that die (except for the highest and lowest values, which may be assigned less).  The weighted average of all possible results equals the '''Travel Damage'''. See the chart below for more detail. Note that unlike LW 1.0, both critical and non-critical hits use the same table.
Note: The 0.5 damage is added on explosive fall-off to accommodate for truncation.
<br/><br/>


=== Explosive Damage ===
<div style="max-width: 900px;">
Explosive Travel Damage = 0.50 + Travel Damage * (1.0 - FMin[0.50, 0.50 * Square(Distance/Radius)])
</div>


Each unit damaged by explosive damage has the '''Travel Damage''' reduced based on distance from the center. Damage falls as the square of the radius, down to 50% at the edge.
== Example Calculations ==
<br/><br/>


== Damage Randomization in Detail ==
=== Mental In-Game Calculation ===


===Travel Damage Randomization Table===
A soldier with a 3 damage assault carbine and ranger (+1 damage) fires at a drone who has 1 flat DR and 30% DR.
[[File:LR_MWD_randomisation_noncrit.jpg|center|800x357px]]


You'd expect it to do 4 damage (range 3-5), minus 1 flat DR down to 3 damage, minus 30% DR down to 2 damage.


== An Example ==
=== Detailed Calculation ===


A soldier with an '''Assault Carbine''' and the '''Ranger''' perk fires at a '''Drone'''
A soldier with an '''Assault Carbine''' and the '''Ranger''' perk fires at a '''Drone'''

Latest revision as of 14:17, 7 August 2020

메인 페이지로

Terms

Weapon Damage: This is each weapon damage stat configurable in DefaultGameCore.ini file.


Barrel Modifiers: These are effects that modifies damage as it leaves the barrel of the weapon.

Target Modifiers: These are effects that modify the damage when it hits the target.

Crit Dmg (or Critical Damage): This is how much the damage is increased during a critical hit. The base value is 1.5, and a non-crit is 1.0.

DR (or Damage Resistance): This is how much of the damage received is resisted. It involves Flat Damage Resistance, Percent Damage Resistance, and Penetration.


Barrel Damage: This is the Weapon Damage modified by Barrel Modifiers.

Travel Damage: This is the Barrel Damage modified by Crit Dmg and then Randomized.

Damage Dealt: This is the damage that a target receives from a damage dealer. It is Barrel Damage modified by Target Modifiers.

Damage Taken: This is how much damage the unit actually takes. It is the Damage Dealt minus the Damage Resistance.

Damage Calculation


The complete damage formula is:

Damage Taken = (([(((Weapon Damage + Barrel Modifiers) * Crit Dmg) * Randomization ) + Target Modifiers] - Flat DR) * (1 - Percent DR) + Penetration)

Barrel Damage

Damage from the barrel is: Weapon Damage + Barrel Modifiers (e.g. ranger, alloy-jacketed rounds, holo, etc.). It is truncated after calculation.

Barrel Damage = ((Weapon Damage + Barrel Modifiers)

Travel Damage

After it leaves the barrel and is travelling towards the target, Crit Dmg of anywhere from 1.0x to 2.0x damage is applied (there is a minimum boost that affects low damage crits) and then the damage is Randomized.

For all damage 1-9, the damage is randomized from -1 to +1, with an even chance of being -1, 0, or +1.

For all damage 10-19, the damage is randomized from -2 to +2, with an even chance of being -2, -1, 0, +1, or +2.

The same occurs for damage of 20-29, 30-39, etc.

The minimum damage is always at least 1.

The actual formula is: Randomized Damage = Max(1, Damage + Rand[1 + (2 * (1 + Damage / 10))] - (1 + Damage / 10))

The randomization works in integer values so all values are constantly truncated (e.g. If x is 6 then x/10 = 0).

Travel Damage = (Barrel Damage * Crit Dmg) <-- Randomization

Damage Dealt

Once it reaches the targets, Target Modifiers are applied (In this order: Shredder-> VPT -> CST -> Fragmentation -> Distortion). It is truncated after each calculation.

Damage Dealt = Travel Damage + Target Modifiers

Damage Taken

Then Damage Resistance (DR) is calculated.

Flat DR is applied first, then Percent DR, then Penetration. It is truncated only after all DR has been removed from the Damage Dealt.

Damage Taken = (Damage Dealt - Flat DR) * (1 - Percent DR) + Penetration

Exceptions

Low Damage Crits

A special exception for critical hits, is that a crit with low Barrel Damage (1, 2, or 3 damage) will crit for at least 3, 4, or 5 damage, respectively. This is an artificial boost to ensure that even if a player rolls on the randomization, the crit is always at least as much as the max roll on a non-crit.

Mins and Maxes

The Damage Taken cannot be reduced below 1 by Damage Resistance (DR).


The Damage Taken can never go higher than the Damage Dealt.

For example, someone with a high amount of penetration could calculate final Damage Taken numbers higher than Damage Dealt, but this would be capped at the initial Damage Dealt.

Randomization will always set the damage to a minimum of 1.

Truncation

All damage is stored in an integer form, thus it is always being truncated during each step. This means 5.6 becomes 5, 9.1 becomes 9, and 9.9 becomes 9.

The exception to this is that Damage Resistance is not truncated and is removed from damage after both Flat DR and Percent DR is calculated.

So Damage Dealt is truncated only after all DR is removed.

Having DR not truncated means that you can have non-integer forms of DR be effective.

Example: a 10 damage shot against a unit with 0.1 Flat DR will have a Damage Taken of 9. Having both Flat DR and Percent DR calculated as total DR before truncation means that minor amounts of both DR will not end up reducing DR by 2. Example: a 10 damage shot against a unit with 0.1 Flat DR and 1 Percent DR will have a Damage Taken of 9 (it would be 8 if the damage was truncated individually between Flat DR and Percent DR).

Explosive Damage

Each unit damaged by explosive damage has the Travel Damage reduced based on distance from the center. Damage falls as half the square of the radius plus 0.5, down to 50% plus 0.5 at the periphery.

Note: The 0.5 damage is added on explosive fall-off to accommodate for truncation.

Explosive Travel Damage = 0.50 + Travel Damage * (1.0 - FMin[0.50, 0.50 * Square(Distance/Radius)])

Example Calculations

Mental In-Game Calculation

A soldier with a 3 damage assault carbine and ranger (+1 damage) fires at a drone who has 1 flat DR and 30% DR.

You'd expect it to do 4 damage (range 3-5), minus 1 flat DR down to 3 damage, minus 30% DR down to 2 damage.

Detailed Calculation

A soldier with an Assault Carbine and the Ranger perk fires at a Drone

The Assault Carbine has 4 Weapon Damage, receives +1 damage as a Barrel Modifier from Ranger, and has no innate Penetration.

The Drone has 1 Flat DR and is Hardened (30 Percent DR).

The Drone is not Shredded and does not have Distortion. The soldier does not have VPT or CST, and Fragmentation does not apply to rifles, so there are no Target Modifiers to the damage.

The shot does not 'Crit' so Crit Dmg is 1.0 and the Randomization does not change the value.

Damage Dealt = (([(((Weapon Damage + Barrel Modifiers) * Crit Dmg) <-- Randomization ) + Target Modifiers] - Flat DR) * (1 - Percent DR) + Penetration)

Damage Dealt = ((((((4 + 1) * 1.0) <-- No Randomization Change) + 0 - 1) * (1 - 0.3) + 0) = 2.8 = 2 Damage Taken