Changes

Jump to navigation Jump to search

FF7/Battle/Battle scenes

4,836 bytes added, 02:12, 20 July 2005
no edit summary
==Introduction==

FF7 keeps each enemy battle configuration is a file called "scene.bin" This file is located in the
following directories.

{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
! style="background:rgb(0,255,0)" align="center" | PSX Version
! style="background:rgb(0,255,0)" align="center" | PC Version
|-
|style="background:rgb(0,255,0)" | /DATA/BATTLE/SCENE.BIN
|style="background:rgb(0,255,0)" | /BATTLE/SCENE.BIN
|-
|}

This file is exactly the same in both versions. This holds all the battle configurations for all enemies encountered in the game.

==Scene.Bin file format by Fremen and others==

===Overview===

The scene.bin file contains 256 gziped files which give us information for all the FF7 monsters. In
order to find these files in scene.bin, you have to know that the file is structured with blocks exactly 0x2000 bytes in length. In the first table (scene.bin block), you will see what contains a block. Blocks are concatenated with each other to form the scene.bin file. So if you want to extract data from scene.bin, you'll need to find the correct blocks and to extract the gziped files from it. After that you simply ungzip those files and you'll find 256 files, with a length is 7808 bytes. Known information about those files can be found in the second table (The Data File specification). Because extracting file manually would be a pain, several tools was developed in order to help you. You can use [http://elentor.com/Projetos/FF7-Tools/Extracting/SceneReader.zip SceneExplorer] for example, it's a win32 tool to extract and repack scene.bin archive.

We have 1024 possible battle numbers: 0 - 1023. Each group of *4* Battle Numbers refers to a
particular Scene file: for instance, Battles 0-3 refer to File 0 in Scene.bin, Battles 4-7 refer to File 1 in Scene.bin, and so forth.

===General file format===

{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" align="center" | Offset
! style="background:rgb(204,204,204)" align="center" | Length
! style="background:rgb(204,204,204)" align="center" | Description
|-
| 0x0000
| 4 bytes
| Pointer to first data file. You must multiply it by 4 to get actual data file offset. If the pointer is equal to FFFFFFFFh then it means that the end of block has been reached.
|-
| 0x0004
| 4 bytes
| Pointer to second data file. You must multiply it by 4 to get actual data file offset. If the pointer is equal to FFFFFFFFh then it means that the end of block has been reached.
|-
|colspan="3" align="center" | ...
|-
| 0x003C
| 4 bytes
| Last pointer, usually it equal FFFFFFFFh.
|-
| 0x0040
| 4 * (pointer2 - pointer1) bytes
| First data file in block. It's a gziped file.<br>''Note: Sometimes it may finish by 0xFF bytes, because its size must be multiple of 4.''
|-
| pointer2&nbsp;*&nbsp;4
| 4 * (pointer3 - pointer2) bytes
| Second data file in block. It's a gziped file.<br>''Note: Sometimes it may finish by 0xFF bytes, because its size must be multiple of 4.''
|-
|colspan="3" align="center" | ...
|-
| lastpointer&nbsp;*&nbsp;4
| 4&nbsp;*&nbsp;(2000h&nbsp;-&nbsp;lastpointer)&nbsp;bytes
| Last data file in block.<br>''Note: There are about 6 to 12 files in each block. Each block finishes by 0xFF bytes, because its length must be 2000h (8192d) bytes.
|}

===Data file format===

{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" align="center" | Offset
! style="background:rgb(204,204,204)" align="center" | Length
! style="background:rgb(204,204,204)" align="center" | Description
|-
| 0x0000
| 2 bytes
| Enemy ID 1
|-
| 0x0002
| 2 bytes
| Enemy ID 2
|-
| 0x0004
| 2 bytes
| Enemy ID 3
|-
| 0x0006
| 2 bytes
| Padding (always FFFFh)
|-
| 0x0008
| 4 * 20 bytes
| Battle Setup 1 (4 records)
|-
| 0x0058
| 4 * 48 bytes
| Battle Setup 2 (4 records)
|-
| 0x0118
| 6 * 16 bytes
| Battle Formation 1 (6 records)
|-
| 0x0178
| 6 * 16 bytes
| Battle Formation 2 (6 records)
|-
| 0x01E8
| 6 * 16 bytes
| Battle Formation 3 (6 records)
|-
| 0x0238
| 6 * 16 bytes
| Battle Formation 4 (6 records)
|-
| 0x0298
| 184 bytes
| Enemy Data 1 ([[#Enemy_data_format|format explaination]])
|-
| 0x0350
| 184 bytes
| Enemy Data 2
|-
| 0x0408
| 184 bytes
| Enemy Data 3
|-
| 0x04C0
| 32 * 28 bytes
| Attack Data (32 records)
|-
| 0x0840
| 32 * 2 bytes
| Attack IDs (32 records)
|-
| 0x0880
| 32 * 32 bytes
| Attack Names (32 records, [[FF Text|in FF Text format]]
|-
| 0x0C80
| 512 bytes
| FFh Padding
|-
| 0x0E80
| 2 bytes
| Enemy 1 AI Offset
|-
| 0x0E82
| 2 bytes
| Enemy 2 AI Offset
|-
| 0x0E84
| 2 bytes
| Enemy 3 AI Offset
|-
| 0x0E86
| varies
| Beginning of AI Data ([[#AI_data|format explaination]])
|}
Anonymous user

Navigation menu