This is for physical attacks only, by the way.
First, know that the most important aspect of damage is the Base Damage. It is derived from two stats: Attack and Level. (And note that Attack = Strength + Weapon Attack modifier)
The formula used is:
Base = Att + [(Att + Lvl) / 32] * [(Att * Lvl) / 32]
(note that
Once you have the Base damage, most modifiers are placed on top of this. Back Row damage halves it, for instance, while a Critical Hit (or Deathblow) would double it. Also, modifiers due to the actual attack will be used here (example: the Braver Limit Break is 3x Base).
(Note: Mini affects Attack only; it reduces it to 0)
Once that's done, Enemy Defense is handled. First, the Damage Modifier is worked out, then it is applied to the base damage:
(Note: Piercing Attacks ignore Defense)
Next, if the attack warrants it, random variation kicks in. The variant gives a number between: [Damage * 15/16] ... (Damage - 1)
At this point, damage is sanity-checked: if Damage < 1, then Damage = 1.
Finally, multi-hit bonuses from stuff like the Yoshiyuki, Master Fist and Goblin Punch are added if they're needed. The damage is again sanity-checked: this time, if Damage > 9999, then Damage = 9999.
(Note: Not sure of the order some of these things are done in, especially that last... need to test a few more special cases)
Whatever number you end up with is your final damage.
HTH. HAND.
BTW, the offset for the
Buster Sword Attack Power is 00DAFD1C
Buster Sword Attack % is 00DAFD20
Add hex 2C to each address to get the following weapon. (It follows the FF7 weapon list)
Terence: Thanks for the info. Just one question. Are spells that affect attack or defense also considered modifiers? (For example: Barrier/Wall/Big Guard.)
The SaiNt: Like I said, this should be fun. :)
[This message has been edited by Srethron Askvelhtnod (edited May 16, 2001).]
[This message has been edited by Srethron Askvelhtnod (edited May 16, 2001).]
Spell modifiers (for damage) are done first to the base damage, or use their own independent formula.
Later on, we look at modifiers from statuses, back row, defense, and so on. If a spell causes a lasting effect, it's generally a status. Spell damage modifiers are different and factored in first (they're always factored in when you use the spell). Statuses may not always have an effect, though (Barrier won't protect against Magical Damage, for instance).
New question: Critical hits. Do you have any idea what the modifier that determines whether or not a critical hit takes place instead of a normal hit is? Is it just something simple like a 1 in 15 chance?
(I'm also in the unique position of questioning my entire theory on Critical Strike, since I *once* saw a strike that *seemed* to do 4x damage rather than 2x. I've not seen it again, and it was during the use of a certain Enemy Skill (which one exactly I can't remember). Since I can't confirm it or remember the exact details, I'm ignoring it until I see it again....)