Miscellaneous Forums > Scripting and Reverse Engineering

More FF7 Tech Info for everyone.

(1/3) > >>

The SaiNt:
This is what I've found out so far with some free time of course  :)FF7 Loading process for the battle.
-----------------------------------1. FF7 reads AWE.LGP(or whichever depending on your music config)
-This is to load the MIDI file to be played.
(FF7 doesn't seem to read this file when you encounter you 2nd battle upon starting)****************************************************************************************************************2. FF7 reads MENU_US.LGP
-This is to load the battle menu displays and text
(FF7 doesn't seem to read this file when you encounter you 2nd battle upon starting)****************************************************************************************************************3. FF7 reads SCENE.BIN
-I suspect this is the background information for the battle****************************************************************************************************************4. FF7 reads KAGE.DAT
-Since KAGE is shadow in Japanese, Qhimm also believes that this represents the shadow in the battle.****************************************************************************************************************5. FF7 reads MARK.DAT
-After discussing with Qhimm, he believes this is the yellow triangle marker that appears above the characters head.****************************************************************************************************************6. FF7 creates the file TF2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 12
-Offset 176 : Length 4
-Offset 180 : Length 24
-Offset 204 : Length 56
-Offset 260 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!7. FF7 creates the file TF3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 12
-Offset 176 : Length 4
-Offset 180 : Length 24
-Offset 204 : Length 56
-Offset 260 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!8. FF7 creates the file TG2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 12
-Offset 176 : Length 4
-Offset 180 : Length 24
-Offset 204 : Length 56
-Offset 260 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!9. FF7 creates the file TG3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 12
-Offset 176 : Length 4
-Offset 180 : Length 24
-Offset 204 : Length 56
-Offset 260 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!
****************************************************************************************************************10. FF7 creates the file T2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 24
-Offset 188 : Length 12
-Offset 200 : Length 4
-Offset 204 : Length 24
-Offset 228 : Length 56
-Offset 284 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!11. FF7 creates the file T3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 24
-Offset 188 : Length 12
-Offset 200 : Length 4
-Offset 204 : Length 24
-Offset 228 : Length 56
-Offset 284 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!12. FF7 creates the file TGT2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 24
-Offset 188 : Length 12
-Offset 200 : Length 4
-Offset 204 : Length 24
-Offset 228 : Length 56
-Offset 284 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!13. FF7 creates the file TGT3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 36
-Offset 164 : Length 24
-Offset 188 : Length 12
-Offset 200 : Length 4
-Offset 204 : Length 24
-Offset 228 : Length 56
-Offset 284 : Length 12
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!****************************************************************************************************************14. FF7 creates the file SF2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 16
-Offset 192 : Length 8
-Offset 200 : Length 48
-Offset 248 : Length 56
-Offset 304 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!15. FF7 creates the file SF3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 16
-Offset 192 : Length 8
-Offset 200 : Length 48
-Offset 248 : Length 56
-Offset 304 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!16. FF7 creates the file SG2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 16
-Offset 192 : Length 8
-Offset 200 : Length 48
-Offset 248 : Length 56
-Offset 304 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!17. FF7 creates the file SG3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 16
-Offset 192 : Length 8
-Offset 200 : Length 48
-Offset 248 : Length 56
-Offset 304 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!****************************************************************************************************************18. FF7 creates the file S2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 32
-Offset 208 : Length 16
-Offset 224 : Length 8
-Offset 232 : Length 48
-Offset 280 : Length 56
-Offset 336 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!19. FF7 creates the file S3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 32
-Offset 208 : Length 16
-Offset 224 : Length 8
-Offset 232 : Length 48
-Offset 280 : Length 56
-Offset 336 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!20. FF7 creates the file SGT2D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 32
-Offset 208 : Length 16
-Offset 224 : Length 8
-Offset 232 : Length 48
-Offset 280 : Length 56
-Offset 336 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!21. FF7 creates the file SGT3D.P or overwrites it if it already exists.
-Offset 0   : Length 128
-Offset 128 : Length 48
-Offset 176 : Length 32
-Offset 208 : Length 16
-Offset 224 : Length 8
-Offset 232 : Length 48
-Offset 280 : Length 56
-Offset 336 : Length 16
-After writing to the above offsets in the file, FF7 closes the file
-Now FF7 reopens this file and reads the offsets above. Don't ask me why!****************************************************************************************************************21. FF7 reads SEFFECT1.TEX
-Offset 0   : Length 236
-Offset 236 : Length 1728
-Offset 1964: Length 6553622. FF7 reads SEFFECT2.TEX
-Offset 0   : Length 236
-Offset 236 : Length 1728
-Offset 1964: Length 6553623. FF7 reads SEFFECT3.TEX
-Offset 0   : Length 236
-Offset 236 : Length 1728
-Offset 1964: Length 65536I am led to believe that this texture files are the ones that appear when your weapons make contact with the target.****************************************************************************************************************24. FF7 reads CAMDAT0.BIN (the whole file)
-I would think this would have something to do with the camera positioning or such.****************************************************************************************************************25. Now FF7 reads BATTLE.LGP
- I'm too lazy to note down every offset it reads but my guess is that it reads all the battle model information from here.Up to here, we've only arrived at the end of FF7 Loading process for the battle.Exiting Battle
--------------
1. FF7 reads AWE.LGP(or whichever depending on your music config)During Battle
-------------Hitting a target
----------------1. FF7 reads AUDIO.DAT
(Strangely, FF7 seems to load the whole file into memory because no more hard disk access is required after AUDIO.DAT is loaded the first time. This would mean that during the start of battle, should Cloud move first and slice the enemy AUDIO.DAT is loaded to memory. Any subsequent access to any sounds even if it's the sound of Barret's gunshot, will not require an disc access. What a memory waster FF7 is  :) )Casting a spell / summon / limit break / enemy special attack
-------------------------------------------------------------1. FF7 reads MAGIC.LGP
(Same thing happens as to AUDIO.DAT. The file is not reread from the hard disk ever again upon the first loading of the file. Even during the next battle! Now we know why FF7 uses so much memory!)

ficedula:
The reason files are never re-loaded *could* be because FF7 has some form of internal caching system.I'd be surprised - you can rely on Windows for that normally - but it's one explanation.As for why it writes to, then reads from, the temp files:That's possibly the sign that the field and battle engines were developed *totally* separately. That's how Mechwarrior 2: Mercenaries works, except there, the planning shell and battle engines are two separate EXE's. In that, when you enter a battle, the main game writes data for the battle to temp files. Then it exits and runs the battle EXE, which reads in the temp files to find out which battle to run!FF7 possibly does the same; except it's not *quite* so hacky; the two engines are both in the same EXE file. It's a very crude way of exchanging data between two game engines that were coded separately; easy to program, of course.Only a possibility, but that's my opinion anyway  :)

Qhimm:
Very interesting theory, ficedula.

Srethron Askvelhtnod:
The SaiNt: Thanks! I think this helps us out a lot.   :)Scene.bin. If this *does* have the battle backgrounds, then our theories are correct. Does anyone have any idea whether or not any other battle location data would be in there as well? I doubt it, it's probably in the camdats, but you never know.Kage.dat. I guess we were right on the money here as well.Camdat0.bin. Hmmm. I suppose this makes more sense. At least it does as long as the camera data isn't in the same place as the backgrounds. This goes against our original theories that the camdat.bins seemed to hold limit break data and such. I assume Magic.lgp also has all the info for animations involving spells/limits/enemy skills/summons/special commands? Ficedula: Makes sense. This goes back to how Square probably developed separate aspects of the game with separate teams. I'd guess that there probably was one team that concentrated solely on the battle engine.[This message has been edited by Srethron Askvelhtnod (edited June 02, 2001).]

The SaiNt:
There wasn't much point starting a whole new thread so I've decided to post it here instead.  :)Since I might not find any time soon to update this docs and since fice is gonna be free real soon, I might as well post this link up.
(Use save target as..) http://www.zhenjock.f2s.com/dumps.jpg
Remember to rename this file to the .zip file extension.Tell me what you think!
This should help finding the files that keep the weapon, accessories and armour information. I do have one more file that I've not uploaded yet. It's a dump of the item list originally done my Qhimm.  :)

Navigation

[0] Message Index

[#] Next page

Go to full version