Qhimm.com Forums
Miscellaneous Forums => General Discussion => Topic started by: Jenova's Witness on 2011-04-04 20:31:27
-
.
-
I find bits and pieces of formulas here and there. I found the 3841-4096 random variance function and the random number "generators", but none of the actual damage scripts.
-
http://www.ffhacktics.com/wiki/Formula_Hacking
How much is known about how FF7 loads each party member's stats in battle, and how this is used in formulas? I ask this because a motivated FFT save state hacker can find some formula offsets in RAM, with no knowledge of assembly, and I'm wondering if the same can be done with FF7.
The following is for memory not save :)
The data is there in 3 sections, 1 for each member. If you look at this with an assembly debugger you can see that all attributes (HP of characters etc) are in their own sections. character 1 data begins at 00DBA490 in memory. Character 2 data begins 440 bytes after character 1. Character 3 data begins 440 bytes after character 2.
For example limit var is at 00DBA4B3 and HP is at 00DBA4A8 but is written there from 00435718. If you go to 00435714 and change the code from mov ax,[ebp-10] to mov ax,10 - all 3 party members will be invincible and stuck at 16 HP.
A better place to look is 009ab108 for HP because that is the main holding area for it. if you change those values they get reflected (not immediately) as the new HP. MP is at 009ab104. These areas are what the game uses once it has been loaded from the save file.
Simples.
-
character 1 data begins at 00DBA490 in memory. Character 2 data begins 440 bytes after character 1. Character 3 data begins 440 bytes after character 2.
IIRC, that 440 is in hex. So each character would span 1088 bytes.
-
IIRC, that 440 is in hex. So each character would span 1088 bytes.
this is oddly much larger then the space used to save a char in your save file (132 Bytes), wonder what all that extra data ? there has to be some padding for the purpose of alignment or some data not being saved, thats a lot of "extra" bytes for each char.
as a Referance (http://sourceforge.net/apps/mediawiki/blackchocobo/index.php?title=Savemap#Character_Record) this is how chars are saved in the save game file
-
IIRC, that 440 is in hex. So each character would span 1088 bytes.
Sorry ;) of course it is.
-
this is oddly much larger then the space used to save a char in your save file (132 Bytes), wonder what all that extra data ? there has to be some padding for the purpose of alignment or some data not being saved, thats a lot of "extra" bytes for each char.
Allowed commands, magics, and summons mostly. Each is a fixed length for each character. 16 commands that are at least 6 bytes each (96 bytes), 56 possible magic attacks that are about 3-4 bytes, and 16 summons that are 3-4 bytes. Also things like Attack = Strength + strength bonuses (from sources) + weapon attack are stored per character and not saved. Status effects for in-battle. LOTS of graphics modifiers like gamma values, size, hue, etc.