Author Topic: FF7: ATB Formula  (Read 17441 times)

Vanit

  • *
  • Posts: 73
    • View Profile
    • http://vanitstudios.burn.at
Re: FF7: ATB Formula
« Reply #25 on: 2009-05-15 03:53:28 »
Update: I've basically been able to come up with a 99% accurate algorithm for time units.

First, I don't think I really described what a time unit is. According to TFergusson's documentation; spells that incur effects over time have a duration equal to an amount of "time units". ie Regen is 32, Barrier/Mbarrier 30 and shield is 17.5. But the real time equivelent of a time unit varies depending on the game settings and whether a character is under the influence of any time spells. At the default battle speed with no time spells, a time unit seems to be about 3 seconds. So regen lasts about 96 seconds, Barrier/Mbarrier 90, and shield 53. I've checked and these numbers seem to check out, with all combinations of battle speed and time spells.

The exact relation is as follows:

1 time unit = static_var/([1-Slow, 2-Normal, 3-Haste] * (0x10000 / (((config_speed * 0x1e0 / 0x100) + 0x78) * 2)))

So far as I can tell, static_var = 554, or 0x22A. Why this number? NFI - but it checks out and by the looks of the numbers so far in this read, the programmers liked to use nice round hex numbers, and 0x22A fits this trend as well.

Just posting this documentation here for people who are interested in these equations as afaik they've never been documented before - and are necessary for recreating the battle system. ;)
« Last Edit: 2009-05-15 03:55:39 by Vanit »