Anonymous

Changes

From Final Fantasy Inside

FF7/Field

254 bytes added, 02:49, 13 July 2019
no edit summary
* The running of the Field Script to display events and to get user input
* The on-demand loading of other modules when needed
 
A list of fields can be found [[FF7/Field/Field_ID|here]].
The Field module loads modular "Field Files". In the PC version, the Field File is a single file with nine sections. In the PSX version, there are three files with the same name but with different extensions that do the same thing. The three files are MIM (Mutiple Image Maps, or the backgrounds), DAT (Field Script Data), and BSX (3D data).
Another last thing to note is in the middle of the bottom texture cache there are a sea of eyes. These blink at random times and reflect the random blinking of the characters in the game.
 
 
== Field Format (PC) ==
=== General PC Field File Format ===
Field files are always found in FLEVEL.LGP. They are always [[FF7/LZS format|LZS]] compressed.
The first two bytes of each (decompressed) field file are blank (zero).
|style="background:rgb(255,255,255)" | 4 bytes
|style="background:rgb(255,255,255)" | Pointer to Section 3
|style="background:rgb(255,255,255)" | [[FF7/Field/Model Loader|Model Loader]]
|-
|style="background:rgb(255,255,255)" | 0x12
|style="background:rgb(255,255,255)" | [[FF7/Field/Walkmesh|Walkmesh]]
|-
|style="background:rgb(255,255,204255)" | 0x1A|style="background:rgb(255,255,204255)" | 4 bytes|style="background:rgb(255,255,204255)" | Pointer to Section 6|style="background:rgb(255,255,204255)" | Unknown[[FF7/Field_Module/DAT/Tile_Map|TileMap]] (Unused)
|-
|style="background:rgb(255,255,255)" | 0x1E
|style="background:rgb(255,255,255)" | 4 bytes
|style="background:rgb(255,255,255)" | Pointer to Section 8
|style="background:rgb(255,255,255)" | 3D & Walkmesh-related[[FF7/Field/Triggers|Triggers]]
|-
|style="background:rgb(255,255,255)" | 0x26
Each section generally starts with a four byte integer indicating the length of the section. You could just work this out by comparing offsets (how much space until the next section/end of file, etc) but FF7 stores the length at the start of the section anyway. After that the actual data follows. So the first bit of data for a section is actually 4 bytes after the point given in the section header (since the first four bytes are actually the length marker).
To examine each section, please navigate using the links in the table above. For sections 3 and 8, there is some information on [http://forums.qhimm.com/index.php?topic=4358.msg58674#msg58674 the forum].
== Field Format (PS1) ==
=== PSX MIM Format ===
Part of the PSX background data is contained in the [[FF7/Field/MIMfile|MIM file]], it is compressed with [[FF7/LZS format|LZS compression]]. It consists of palettes (256 color ones) and screen blocks. No data for locating the blocks on the screen is in this file. The MIM file is a truncated TIM file and contains the normal clut location height and width information. This information is directly loaded into the PSX video ram to be decoded by the field module. The structure begins with the
=== PSX BSX Format ===
=== PSX BCX Format ===
The individual characters ' field models are stored in [[FF7/Field/BCX|BCX files, there ]]. Their textures are also in [[FF7/Field/FIELD.TDB|FIELD.TDB]], ; they are compressed with [[FF7/LZS format|LZS compression]].
== Event Scripting ==