Anonymous

Changes

From Final Fantasy Inside

FF8/WorldMap wmsetxx

8,317 bytes added, 00:24, 14 January 2021
Section 35: World Map draw points
=== Section 1: World map battle related encounter data supplier ===
{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"
| 0
| 4 bytes
| Section sizeFileSize (this+4)
|-
| 4+ (entryID * 4)
| 4 bytes
| Unknown2EncounterIdSupplierDataProvider_Entry|} '''EncounterIdSupplierDataProvider_Entry''':{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204, stored in code204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description|-| 0| Byte| regionID|-| 1| Byte| groundID|-| 2| Byte| ESI*|-| 3| Byte| unused
|}
The only function * ESI is the name of the register that works with it takes input holds the third byte parameter of section1. It is used later to determine the encounter. When the character makes a step on worldmap, section2the game loops through whole section1 data and tests: if the character is walking on groundID and regionID, if yes, saves the EOF then ESI is our multiplier to global variable section4 containing encounters. Example entry: 00 06 00 00: If Squall is in region = 0 and calculates LEA for Unknown2 walks on ground with ID 6 (aboveas far as I remember it's Balamb Plains or forest) and stores section size. After then get encounters from section4 that it all gets POP...start at 0*8; Other example: 04 1B 24 00:
If Squall is in region =4 and walks on ground with ID 0x1B, then get encounters from section4 that starts at 0x24*8 == Section 2: Regions ===288
That way the engine can play encounter based on place you are, because if you're walking on Balamb beach, then engine should play encounter with beach, not snow plains. That's why if you change the for one map portion you can totally erase encounters in this region, because in example region 4 that may be Centra regions does not contain any BalambPlains, so there is no entry in section1 and therefore the engine finds the region encounters, but doesn't find the encounter entries for BalambPlainsGround in Centra ruins (this is totally an example).
 
=== Section 2: World map Regions ===
 
Nothing much to write here.
32x24 world map. Just open it via hexEditor.
It's just bitmap (you can even convert bytes to image and mini worldmap will show)
Every single byte is regionID used for example in section1 for encounters.
 
=== Section 3: World Map Encounters Flags ===
 
One byte per encounter group in section 4. Always 0 on railways/roads, always 12 on forests, 128 on Island closest to Hell/Heaven, 3 in Galbadia Desert (day and night) and 2 for everything else.
 
=== Section 4: World Map Encounters ===
 
{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" | Offset
! style="background:rgb(204,204,204)" | Length
! style="background:rgb(204,204,204)" | Description
|-
| section1.ESI * 16
| 16 bytes
| 2 * 8 bytes of encounters from scene.out
|}
 
It's as simple as that:
Squall makes step on worldmap, game gets Squall position and tests it with section2 containing region, then loops through section1 and tests groundID and regionID to find ESI multiplier, if random number generates battle, then game gets to section4 using ESI determined earlier with Squall step on world map and plays randomly one of the eight encounters (because one ESI/encounterEntry is 16 bytes, where first four words are the most common, other 2 medium and last 2 rarest)
 
=== Section 5: UNUSED Encounter Flags (after Lunar Cry) ===
Unused in-game
 
One byte (always 8 here) per encounter group in section 6. Analog to section 3, but for Lunar Cry encounters.
 
=== Section 6: World Map Encounters (after Lunar Cry) ===
 
Same format as Section 4, but only with Lunar Cry encounters.
You can use the section 1 to obtain ground, this way: search in section 1 for region == 10 (Esthar), and substract 80 from the esi value, you will obtain the correct esi for the section 6.
 
=== Section 7-8: roads, train track, bridge ===
 
Related with Section 39. Maybe scripts in section 8. (like sections 10, 12 and 32)
=== Section 2-13Script format (ScriptsCount must be guessed): UNKNOWN ===
{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description|-| 0| 4 * ScriptsCount + 4| List of script positions, not always sorted (ended with 0x00000000)|-| 4 * ScriptsCount + 4| Varies + 4| Scripts data (ended with 0x00000000)|} In script data you have 4-bytes opcodes, the first byte is the identifier, and the last two bytes are the parameter (the second byte is always 0xFF).Scripts always start with 0x01 opcode, and finish with 0x16 opcode. There is always one 0x04 opcode inside.For now most is unknown, I only understood that 0x2B opcode refer to scene ID in its parameter (you can find UFO, Koyo-K and Lac Obel battles in Section 32). === Section 9: UNKNOWN=== === Section 10-11: UNKNOWN (Related to Squall model) === Maybe scripts in section 10. (like sections 8, 12 and 32) === Section 12-13: UNKNOWN === Maybe scripts in section 12. (like sections 8, 10 and 32)
=== Section 14: Side quests texts/tialogs ===
PointLunatic Pandora Laboratory1:Airstation1 Sorceress Memorial
=== Section 33-3734: Light related ===UNKNOWN  === Section 35: World Map draw points === {| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description|-| 0x00| 0x2C| UNUSED|-| 0x2C + (thisEntryID * 4)| DWORD| DrawPointVariable|}
'''DrawPointVariable''': {| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description|-| 0x00| BYTE| World block X|-| 0x01| BYTE| World block Y|-| 0x02| WORD| Magic ID|} Magic contained in world map draw point: (ID is: section35 magic entry+0x80 [add 1 to be correct with list below]) 129 0 1 Cure 130 0 1 Esuna 131 0 1 Thunder 132 0 1 Fira 133 0 1 Thundara 134 0 1 Blizzara 135 0 1 Blizzard 136 0 1 Fire 137 0 1 Cure 138 0 1 Water 139 0 1 Cura 140 0 1 Esuna 141 0 1 Scan 142 0 1 Shell 143 0 1 Haste 144 0 1 Aero 145 0 1 Bio 146 0 1 Life 147 0 1 Demi 148 0 1 Protect 149 0 1 Holy 150 0 1 Thundaga 151 0 1 Stop 152 0 1 Firaga 153 0 1 Regen 154 0 1 Blizzaga 155 0 1 Confuse 156 0 1 Flare 157 0 1 Dispel 158 0 1 Slow 159 0 1 Quake 160 0 1 Curaga 161 0 1 Tornado 162 0 0 Full-Life 163 0 1 Reflect 164 0 0 Aura 165 0 0 Quake 166 0 1 Double 167 0 1 Break 168 0 0 Meteor 169 0 0 Ultima 170 0 0 Triple 171 0 1 Confuse 172 0 1 Blind 173 1 1 Quake 174 0 1 Sleep 175 0 1 Silence 176 1 1 Flare 177 0 1 Death 178 0 1 Drain 179 1 1 Pain 180 0 1 Berserk 181 0 1 Float 182 0 1 Zombie 183 0 1 Meltdown 184 1 0 Ultima 185 1 1 Tornado 186 1 1 Quake 187 1 1 Meteor 188 1 1 Holy 189 1 1 Flare 190 1 1 Aura 191 1 1 Ultima 192 1 1 Triple 193 1 1 Full-Life 194 1 1 Tornado 195 1 1 Quake 196 1 1 Meteor 197 1 1 Holy 198 1 1 Flare 199 1 1 Aura 200 1 1 Ultima 201 1 1 Triple 202 1 1 Full-Life 203 1 1 Tornado 204 1 1 Quake 205 1 1 Meteor 206 1 1 Holy 207 1 1 Flare 208 1 1 Aura 209 1 1 Ultima 210 1 1 Triple 211 1 1 Full-Life 212 1 1 Ultima 213 1 1 Meteor 214 1 1 Holy 215 1 1 Flare 216 1 1 Aura 217 1 1 Ultima 218 1 1 Triple 219 1 1 Full-Life 220 1 1 Meteor 221 1 1 Holy 222 1 1 Triple 223 1 1 Aura 224 1 1 Ultima 225 1 1 Triple 226 1 1 Full-Life 227 1 1 Meteor 228 1 1 Holy 229 1 1 Flare 230 1 1 Aura 231 1 1 Ultima 232 1 1 Triple 233 1 1 Full-Life 234 1 1 Meteor 235 1 1 Triple 236 1 1 Flare 237 1 1 Aura 238 1 1 Ultima 239 1 1 Triple 240 1 1 Full-Life 241 1 1 Meteor 242 1 1 Holy 243 1 1 Flare 244 1 1 Aura 245 1 1 Ultima 246 0 1 Blizzard 247 0 1 Cure 248 1 1 Dispel 249 1 1 Confuse 250 0 0 Meteor 251 0 0 Double 252 0 0 Aura 253 0 0 Holy 254 0 0 Flare 255 0 0 Ultima 256 1 1 Scan  Halfer:X = rowBlockAmount, which is 4 times segment amount so 4 * 32 = 128 or 0x80. The last bit tells which row of the two we are on, first or second. The range of top row is from 0x00 - 0x7F and second row's 0x80 - 0xFF. Y is incremented whenever X goes over 0xFF. === Section 36-37: UNKNOWN=== Maybe scripts in section 37. (like sections 8, 10 and 12)
=== Section 38: World map textures archive ===
|}
=== Section 43-47: UNKNOWN Sound/music related === Starts with AKAO === Section 44: Music related ===
UNKNOWNStarts with AKAO
=== Section 45-48: AKAO frame Sound/music related ===
Starts with AKAO
17
edits