Author Topic: Math problems....  (Read 2660 times)

Sithicus

  • Guest
Math problems....
« on: 2001-12-17 20:14:00 »
Hey, everyone

I'm new here, which you probably no doubt have guessed already, considering this is my first post to these forums...:D

But I was wondering if someone here has found the formula used to calculate the damage dealt in FF7?  I've been working on one based on the stats used in FF1, and I think I've pretty much figured that one out without even looking at the srouce code, but I'd be interested to see what they did for a more complex game, such as FF7...

If anyone could help me out on that, it would be much appreciated.  Thanks.  :D

Clone5

  • *
  • Posts: 19
    • View Profile
Math problems....
« Reply #1 on: 2001-12-17 23:31:00 »
This keeps on popping up every few months or so
Battle Mechanics 101

Darkness

  • *
  • Posts: 2181
    • View Profile
    • http://www.x0r.net
Math problems....
« Reply #2 on: 2001-12-17 23:57:00 »
i was going to post something about terence, but i figured it would be pointless seeing as how hes never here. Ill have to remember that thread.

Sithicus

  • Guest
Math problems....
« Reply #3 on: 2001-12-19 18:27:00 »
Thanks, big time, Clone5...:D
It seems I was -way- off with my formula, but then again, I was basing mine on FF1.
It's a lot simpler, but it works. :D  I don't know if it's the exact formula used in the game, though.
Here's how my formula worked, and how I figured it out-

First, I noticed that the character's damage score, as shown on the status screen, was exactly equal to the character's weapon damage score, plus half his strength score.

Base Damage = Int (Str / 2) + Weapon Damage

After some testing, I realized that an unarmed character (except for the black belt) always hit for the same amount of damage every time.  This led me to believe that the random variant was generated by the weapon's damage score, and had nothing to do with the character's strength.  

I also noticed that the damage dealt was always higher than the base damage shown in the status screen.  Thus, I assumed that the total damage was equal to the base damage plus the random variant.  My best guess on the random variant was to generate a number from 1 ... Weapon Damage value
This was the only part I had to guess on.  I decided on this way, because if you'll notice every single monster in the game, their range of damage is always doubled.  For example, Chaos, the final boss, has a damage range of 100 - 200, and Warmech is 128 - 256.

Notice how the second number is always double the first?  
Thus, a monster's damage is calculated by taking a base damage score, and adding a random value to it, from 1 to the value itself.  I assumed that this would be true for weapons.

So the formula looks like this:

Damage = Int (Str / 2) + Weapon Damage + RV

After that, the enemy's defense value was subtracted from that number to give you the final damage.  

And this was repeated for however many attacks that character possesses.  Once those were added together, the final result was the total damage dealt.

Heh...maybe I should do a FF1 remake....:D