FF7: ATB Formula

  • Thread starter Thread starter Vanit
  • Start date Start date
Status
Not open for further replies.
Sweet, this seems to check out. Thanks so much for working with me to get to the bottom of this. :D

Also for enemies, is the ATB equation the same - but without the +50 bonus to the character's dexterity and the overall party dexterity? And if this equation does apply to enemies - what constitutes a party for them? Is it the entire field or is it every row?
 
Sweet, this seems to check out. Thanks so much for working with me to get to the bottom of this. :D

Also for enemies, is the ATB equation the same - but without the +50 bonus to the character's dexterity and the overall party dexterity? And if this equation does apply to enemies - what constitutes a party for them? Is it the entire field or is it every row?
Party members are only player. No matter you calculate enemies or not. Speed of battle always depends on player. That's why visually speed of battle always the same.
In case of enemies you just don't add 0x32 to final dexterity.
 
So are you saying the equation for enemies looks like this:

UPS/120 = Battle Speed * [1-slow, 2-normal, 4-haste] * enemy_dex / player_party_dex
 
So are you saying the equation for enemies looks like this:

UPS/120 = Battle Speed * [1-slow, 2-normal, 4-haste] * enemy_dex / player_party_dex
Yup.
 
Sweet. Would you be interested in looking into another algorithm for me?

I'm interested in the algorithm that defines a "time unit" - the "flow of time" when in battle. This affects the duration of the spells and their intensity per second. For example under a quick flow of time, Regen restores health quickly, but has a short duration.

I'm guessing the equation to determine how many seconds a time unit is, looks something like this:

1 time unit = unknown_variable/[1-slow, 2-normal, 4-haste] * battlespeed.
 
Last edited:
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 edited:
Status
Not open for further replies.
Back
Top