Changes

Jump to navigation Jump to search

FF7/WorldMap Module

503 bytes added, 21:57, 12 September 2021
Triangle
optimized versions of the corresponding MAP files.
''MAP file follows the structure described below and is used to load single blocks on demand. BOT file also contains the same blocks but arranged to speed up initial load time by storing each block and 3 of its neighboring blocks together. For instance, the data stored for the first 2 blocks is (numbers refer to the MAP layout below): 0,1,9,10 1,2,10,11. This pattern repeats up to block #62. Replacement blocks 63-68 are divided in groups for each replacement, i.e. block 64 and 65 are part of the same group since they both belong to the Ultima Weapon crater. These groups are then stored using the same algorithm as above, each 4-block group containing a replaced block is written out again. 1-block replacements thus add 4*4 blocks to the .BOT file while 2-block replacements add 6*4 blocks. Replacements are to be made '''in order''', when writing the data for the Ultima Weapon crater the Temple of the Ancients should be gone and so on. All of this adds up to 63*4 + 4*4 + 6*4 + 4*4 + 6*4 = 332 blocks.''
=== Content ===
| Index of vertex 2 of triangle t
|-
| ''5 bits(lowest)''
| ''Walkmap status of triangle t (see below)''
|-
| ''3 bits''
| ''Unknown, probably Mesh function ID to trigger when this triangle is stepped on.<br>Values 0-2 mean no script relatedis attached to this triangle.<br>For values 3+ subtract 3 from this value and this will give you the mesh function ID to trigger.''
|-
| 1 byte
| Coordinate v in texture for vertex 2
|-
| ''9 bits(lowest)''
| ''Texture (see below)''
|-
| ''7 bits''
| ''Location (message ID that will be displayed in the menu menus and savegames)''
|}
uint8 Vertex2Index;
''uint8 WalkabilityInfo:5;''
''uint8 UnknownMeshFuncId:3;''
uint8 uVertex0, vVertex0;
uint8 uVertex1, vVertex1;
The lower 9 bits contain a texture number (0-511, but only 0-281
appear to be used). The text files ''Unfortunately, knowing which texture to use is not enough, the UV coordinates found in the Reeve download show how eachnumber maps to one mesh data are (or morepresumably) the original PSX VRAM coordinates, so to get the real coordinates you must subtract a texture-specific offset from each of the UV pairs.TEX files within WORLD_US.LGP (see also A complete table with every texture, its original size and offsets can be found [[FF7/LGP format WorldMap Module/TextureTable| LGP Archiveshere]]).The upper bits have something to do Sometimes you will end up with negative values after subtracting the offsets, this is normal, the texture coordinate mappingshould be assumed to repeat itself indefinitely in all directions== BOT format == (FIXME)''
49
edits

Navigation menu