Difference between revisions of "FF7/Battle/Damage Calculation"

From Final Fantasy Inside
< FF7‎ | Battle
Jump to navigation Jump to search
my_wiki>Akari
(Don't write unnesesary things. There a lot of functions that will cause strange result if you don't know how use them. They are not in game for good reasons.)
m (33 revisions imported)
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
In Attacks, Items, and Weapons there exists a single byte that tells the Battle Engine how to calculate damage. This is a list of known values with their effects on Base Damage. They are classified into Physical, Magical, and Exact. Physical and Magical will rely on the caster's Strength and Magic stat respectively to calculate base damage. After modification it is multiplied by a random variance ([224..255]/256 or something similar). These will also trigger Physical and Magical Counter Attacks respectively. Exact is just what it sounds like. They do not have a base damage calculation. The entire damage comes from exactly the formula shown and is applied to the target without defense calculation (though element is still taken into account). These will not trigger Physical or Magical Counter Attacks, but will trigger General Counter Attacks such as Adamantoise's Light Shell.
+
 
+
In Attacks, Items, and Weapons there exists a single byte that tells the Battle Engine how to calculate damage based on an attack's set Power and the characters stats. Physical and Magical will rely on the caster's "Attack" and "Magic Attack" stat respectively to calculate base damage. This byte is divided into two nybbles (four bits). Upper Nybble determines what considerations are made in calculating damage such as physical/magical, allowing criticals, how to calculate accuracy, etc. There are also three sets of known formulae that are paired with the Upper nybble values. These are selected in the Lower Nybble and determine how to calculate pre-defense damage. Actual calculation includes a random variance (&#91;3841..4096&#93; / 4096), a reduction based on a target's "Defense" or "Magic Defense" stats, and other status-related modifications depending on the type of damage. These will also trigger Physical and Magical Counter Attacks respectively.
For more details, these can be considered Base Damage Modifiers as described in Terence Fergusson's [http://www.gamefaqs.com/console/psx/file/197341/22395 Battle Mechanics FAQ].<br/>
+
For more details, these can be considered Base Damage Modifiers as described in Terence Fergusson's [http://www.gamefaqs.com/console/psx/file/197341/22395 Battle Mechanics FAQ].
''Akari has begun a more detailed [[FF7/DamageFormula|damage formula page]].''
+
''This [https://wiki.ffrtt.ru/index.php/DamageFormula more accurate damage formula page] contains more detailed information.''
 
+
{| class="wikitable"
{| border="0" cellpadding="5" cellspacing="1" style="background: rgb(0,0,0)" align="center"
 
! style="background:rgb(204,204,204); width=50px;" align="center" | Value
 
! style="background:rgb(204,204,204)" | Type
 
! style="background:rgb(204,204,204)" | Formula [Damage = ]
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x00
+
! Upper Value
|style="background:rgb(255,255,255)" | None
+
! Considerations
|style="background:rgb(255,255,255)" | No Damage Calculation
+
! Lower Value
 +
! Formula &#91;Damage = &#93;
 +
! Sadness Check
 +
! Split Damage
 +
! Barrier Check
 +
! Variance
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x08
+
| 0X
|style="background:rgb(255,255,255)" | Exact
+
| Physical, 100% hit rate
|style="background:rgb(255,255,255)" | Target's HP & MP * (Strength / 32)%
+
| X0
 +
| No Damage calculation
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x11
+
| 1X
|style="background:rgb(255,255,255)" | Physical
+
| Physical, Use PAccuracy, Allow Critical
|style="background:rgb(255,255,255)" | Base * (Strength / 16)
+
| X1
 +
| (Power / 16) * (Stat + &#91;(Level + Stat) / 32&#93; * &#91;(Level * Stat) / 32&#93;)
 +
| Yes
 +
| Yes
 +
| Yes
 +
| Yes
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x22
+
| 2X
|style="background:rgb(255,255,255)" | Magical
+
| Magical, Use MAccuracy
|style="background:rgb(255,255,255)" | Base * (Strength / 16)
+
| X2
 +
| (Power / 16) * ((Lvl + Stat) * 6)
 +
| Yes
 +
| Yes
 +
| Yes
 +
| Yes
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x23
+
| 3X
|style="background:rgb(255,255,255)" | Exact
+
| Physical, 100% hit rate
|style="background:rgb(255,255,255)" | Target's HP * (Strength / 32)
+
| X3
 +
| HP * (Power / 32)
 +
|
 +
<br/>
 +
|
 +
<br/>
 +
|
 +
<br/>
 +
|
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x24
+
| 4X
|style="background:rgb(255,255,255)" | Exact
+
| Magical, 100% hit rate
|style="background:rgb(255,255,255)" | Target's MHP * (Strength / 32)
+
| X4
 +
| MHP * (Power / 32)
 +
|
 +
<br/>
 +
|
 +
<br/>
 +
|
 +
<br/>
 +
|
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x25
+
| 5X
|style="background:rgb(255,255,255)" | Magical
+
| Magical, 100% hit rate
|style="background:rgb(255,255,255)" | Base + (Strength * 22)
+
| X5
 +
| (Power * 22) + ((Level + Stat) * 6)
 +
|
 +
<br/>
 +
| Yes
 +
| Yes
 +
| Yes
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x26
+
| 8X
|style="background:rgb(255,255,255)" | Exact
+
| Magical, Hit chance MOD target level = hit
|style="background:rgb(255,255,255)" | Strength * 20
+
| X6
 +
| Power * 20
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x37
+
| 9X
|style="background:rgb(255,255,255)" | Physical
+
| Magical, "Manipulate" accuracy
|style="background:rgb(255,255,255)" | Strength * 16; Ignores Barrier; No Base
+
| X7
 +
| Power / 32
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
| Yes
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x47
+
| BX
|style="background:rgb(255,255,255)" | Magical
+
| Physical, use PAccuracy
|style="background:rgb(255,255,255)" | Strength * 16; Ignores MBarrier; No Base
+
| X8
 +
| Recovery
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x50
+
| style="background: rgb(204,204,255)" rowspan="2" colspan="2" align="center" |  
|style="background:rgb(255,255,255)" | None
+
| X9
|style="background:rgb(255,255,255)" | No Damage Calculation
+
| Throw
 +
|
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x60
+
| XA
|style="background:rgb(255,255,255)" | Exact
+
| Coin
|style="background:rgb(255,255,255)" | User's HP
+
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 +
|  
 +
<br/>
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x61
+
|
|style="background:rgb(255,255,255)" | Exact
+
|
|style="background:rgb(255,255,255)" | User's MHP - HP
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x68
+
| 6X
|style="background:rgb(255,255,255)" | Exact
+
| Physical, Use PAccuracy, Allow Critical, Special Formulae
|style="background:rgb(255,255,255)" | Random x 100 (Dice)
+
| X0
 +
| 100% User's HP
 +
| style="background: rgb(204,204,255)" rowspan="18" colspan="4" align="center" |
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x69
+
| 7X
|style="background:rgb(255,255,255)" | Exact
+
| Magical, Use MAccuracy, Special Formulae
|style="background:rgb(255,255,255)" | Number of Escapes
+
| X1
 +
| User's MHP - HP
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x6A
+
| style="background: rgb(204,204,255)" rowspan="6" colspan="2" align="center" |  
|style="background:rgb(255,255,255)" | Exact
+
| X8
|style="background:rgb(255,255,255)" | Reduces Target's HP to 1
+
| Dice Roll<sup>&#91;NOTE&#93;</sup> x 100
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x6B
+
| X9
|style="background:rgb(255,255,255)" | Exact
+
| Number of Escapes * 256
|style="background:rgb(255,255,255)" | Number of hours on game clock * 100 + number of minutes in game clock
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x6C
+
| XA
|style="background:rgb(255,255,255)" | Exact
+
| Target's HP - 1
|style="background:rgb(255,255,255)" | 10 x Target's Kills
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x6D
+
| XB
|style="background:rgb(255,255,255)" | Exact
+
| Number of hours on game clock * 100 + number of minutes in game clock
|style="background:rgb(255,255,255)" | 1111 x Target's Materia
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x83
+
| XC
|style="background:rgb(255,255,255)" | Exact
+
| 10 x Target's Kills
|style="background:rgb(255,255,255)" | Target's HP * (Strength / 32) if level MOD Attack% = 0
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x96
+
| XD
|style="background:rgb(255,255,255)" | Exact
+
| 1111 x Target's Materia
|style="background:rgb(255,255,255)" | User's HP/2
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA0
+
|
|style="background:rgb(255,255,255)" | Physical
 
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * [User's Status Effects <sup>See NOTE</sup>]
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA1
+
| AX
|style="background:rgb(255,255,255)" | Physical
+
| Same as 11h, but allow alterations to the final damage or power of attack
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (3 if user is Near-Death, 1 otherwise)
+
| X0
 +
| Damage * (1 + &#91;User's Status Effects <sup>See NOTE</sup>&#93;)
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA2
+
| style="background: rgb(204,204,255)" rowspan="8" colspan="2" align="center" |  
|style="background:rgb(255,255,255)" | Physical
+
| X1
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (1 + Dead Allies)
+
| Damage * (2 if Near-Death, 4 if in D.Sentence &#91;can stack to 8&#93;, 1 if neither)
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA3
+
| X2
|style="background:rgb(255,255,255)" | Physical
+
| Damage * (1 + Dead Allies)
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (Target's Level / 16)
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA4
+
| X3
|style="background:rgb(255,255,255)" | Physical
+
| Power becomes average of all Targets' Levels
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (1 + [48 * HP/MHP]) / 16
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA5
+
| X4
|style="background:rgb(255,255,255)" | Physical
+
| Power becomes 1 + ( ( Power * 3 * HP ) / MHP )
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (1 + [48 * MP/MMP]) / 16
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA6
+
| X5
|style="background:rgb(255,255,255)" | Physical
+
| Power becomes 1 + ( ( Power * 3 * MP ) / MMP )
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (1 + [AP on Weapon / 10000]) / 16
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA7
+
| X6
|style="background:rgb(255,255,255)" | Physical
+
| Power becomes 1 + ( Power * &#91;AP on Weapon <sup>See NOTE</sup> / 10000&#93; / 16 )
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (10 + [Character's Kills / 128]) / 16
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xA8
+
| X7
|style="background:rgb(255,255,255)" | Physical
+
| Power becomes 10 + ( &#91;Character's Kills / 128&#93; * Power) / 16 )
|style="background:rgb(255,255,255)" | Base * (Strength / 16) * (1 + [Limit Level * Limit Units / 16]) / 16
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0xB1
+
| X8
|style="background:rgb(255,255,255)" | Physical
+
| Power becomes 1 + ( &#91;Limit Level * Limit Units / 16&#93; * Power ) / 16
|style="background:rgb(255,255,255)" | Base * Strength / 16; No random criticals
 
 
|}
 
|}
<br/>
+
NOTES: For the X8 special formula, the game will "grant" between two and six dice based on level (one additional for every ten levels above 20, max 6). The values of each of these dice will be added and then multiplied by the greatest number of repeating values (not the number of occurrences of the highest value).
NOTE: For A0h base strength, the multiplier is increased by one for the following effects on the user:
+
Ex: The values 2, 3, 5, 5, 2, 2 come up. The values are added (19) then, since there are three twos, it is multiplied by three.
*Near-death
+
For A0 damage multiplier, the multiplier is increased by one for the following effects on the user:
*Poison
+
* Near-death
*Sadness
+
* Poison
*Silence
+
* Sadness
*Slow
+
* Silence
*Darkness
+
* Slow
 +
* Darkness
 
and increased by two for the following:
 
and increased by two for the following:
*D.Sentence
+
* D.Sentence
*Slow-numb
+
* Slow-numb
<br/>As an exception to the above rules, 37h and 47h are used as damage calculations for items. Damage to target is calculated normally while ignoring M/Barrier.
+
 
 +
For A6 multiplier, Mastered Materia will use the highest level of AP they can hold.
 +
ex. When Knights of Round is mastered, its AP is set to 16,777,215 in the materia menu. Since KoR's level 5 AP requirement is 500,000 only 500,000 will be considered in the total.
 +
 
 +
Any damage formula on an attack can still set status, but standard damage formula 0X will not apply any visual changes due to effects.
 +
 
 +
Ex. Midgar Zolom's "Change" attack is damage type 00h, but gets set to poison him when he uses it. He will not glow green until he is targeted by another command that is not damage type 00h.

Latest revision as of 05:11, 23 May 2019

In Attacks, Items, and Weapons there exists a single byte that tells the Battle Engine how to calculate damage based on an attack's set Power and the characters stats. Physical and Magical will rely on the caster's "Attack" and "Magic Attack" stat respectively to calculate base damage. This byte is divided into two nybbles (four bits). Upper Nybble determines what considerations are made in calculating damage such as physical/magical, allowing criticals, how to calculate accuracy, etc. There are also three sets of known formulae that are paired with the Upper nybble values. These are selected in the Lower Nybble and determine how to calculate pre-defense damage. Actual calculation includes a random variance ([3841..4096] / 4096), a reduction based on a target's "Defense" or "Magic Defense" stats, and other status-related modifications depending on the type of damage. These will also trigger Physical and Magical Counter Attacks respectively. For more details, these can be considered Base Damage Modifiers as described in Terence Fergusson's Battle Mechanics FAQ. This more accurate damage formula page contains more detailed information.

Upper Value Considerations Lower Value Formula [Damage = ] Sadness Check Split Damage Barrier Check Variance
0X Physical, 100% hit rate X0 No Damage calculation





1X Physical, Use PAccuracy, Allow Critical X1 (Power / 16) * (Stat + [(Level + Stat) / 32] * [(Level * Stat) / 32]) Yes Yes Yes Yes
2X Magical, Use MAccuracy X2 (Power / 16) * ((Lvl + Stat) * 6) Yes Yes Yes Yes
3X Physical, 100% hit rate X3 HP * (Power / 32)





4X Magical, 100% hit rate X4 MHP * (Power / 32)





5X Magical, 100% hit rate X5 (Power * 22) + ((Level + Stat) * 6)


Yes Yes Yes
8X Magical, Hit chance MOD target level = hit X6 Power * 20





9X Magical, "Manipulate" accuracy X7 Power / 32




Yes
BX Physical, use PAccuracy X8 Recovery





X9 Throw





XA Coin





6X Physical, Use PAccuracy, Allow Critical, Special Formulae X0 100% User's HP
7X Magical, Use MAccuracy, Special Formulae X1 User's MHP - HP
X8 Dice Roll[NOTE] x 100
X9 Number of Escapes * 256
XA Target's HP - 1
XB Number of hours on game clock * 100 + number of minutes in game clock
XC 10 x Target's Kills
XD 1111 x Target's Materia
AX Same as 11h, but allow alterations to the final damage or power of attack X0 Damage * (1 + [User's Status Effects See NOTE])
X1 Damage * (2 if Near-Death, 4 if in D.Sentence [can stack to 8], 1 if neither)
X2 Damage * (1 + Dead Allies)
X3 Power becomes average of all Targets' Levels
X4 Power becomes 1 + ( ( Power * 3 * HP ) / MHP )
X5 Power becomes 1 + ( ( Power * 3 * MP ) / MMP )
X6 Power becomes 1 + ( Power * [AP on Weapon See NOTE / 10000] / 16 )
X7 Power becomes 10 + ( [Character's Kills / 128] * Power) / 16 )
X8 Power becomes 1 + ( [Limit Level * Limit Units / 16] * Power ) / 16

NOTES: For the X8 special formula, the game will "grant" between two and six dice based on level (one additional for every ten levels above 20, max 6). The values of each of these dice will be added and then multiplied by the greatest number of repeating values (not the number of occurrences of the highest value). Ex: The values 2, 3, 5, 5, 2, 2 come up. The values are added (19) then, since there are three twos, it is multiplied by three. For A0 damage multiplier, the multiplier is increased by one for the following effects on the user:

  • Near-death
  • Poison
  • Sadness
  • Silence
  • Slow
  • Darkness

and increased by two for the following:

  • D.Sentence
  • Slow-numb

For A6 multiplier, Mastered Materia will use the highest level of AP they can hold. ex. When Knights of Round is mastered, its AP is set to 16,777,215 in the materia menu. Since KoR's level 5 AP requirement is 500,000 only 500,000 will be considered in the total.

Any damage formula on an attack can still set status, but standard damage formula 0X will not apply any visual changes due to effects.

Ex. Midgar Zolom's "Change" attack is damage type 00h, but gets set to poison him when he uses it. He will not glow green until he is targeted by another command that is not damage type 00h.