Difference between revisions of "FF8/Main wm2"

From Final Fantasy Inside
< FF8
Jump to navigation Jump to search
my_wiki>MaKiPL
(Structure)
m (9 revisions imported)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
By MaKiPL
 
By MaKiPL
  
 +
<br />
 +
 +
== Info ==
  
==Info==
 
 
'''wm2field.tbl''' is file that handles the world map to field warping.
 
'''wm2field.tbl''' is file that handles the world map to field warping.
  
==Structure==
+
== Structure ==
  
 
File is 1728 bytes. Where every entry is 24 bytes. Though 1728/24 = 72 entries
 
File is 1728 bytes. Where every entry is 24 bytes. Though 1728/24 = 72 entries
  
 
One entry:
 
One entry:
{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"
+
 
! style="background:rgb(204,204,204)" | Offset
+
{| class="wikitable"
! style="background:rgb(204,204,204)" | SizeOf
+
! Offset
! style="background:rgb(204,204,204)" | Name
+
! SizeOf
! style="background:rgb(204,204,204)" | Description
+
! Name
 +
! Description
 
|-
 
|-
| 0,1
+
| 0
| int_12
+
| short
 
| FieldX
 
| FieldX
| Operates FieldX*
+
| Operates FieldX
 
|-
 
|-
| 1,2
+
| 2
| int_12
+
| short
 
| FieldY
 
| FieldY
| Operates FieldY*
+
| Operates FieldY
 
|-
 
|-
| 3,4
+
| 4
| int_12
+
| ushort (yes)
 
| Field_Z
 
| Field_Z
| Operates FieldZ*?
+
| Operates FieldZ
|-
 
| 4
 
| int_4
 
| UNK_1
 
| Unknown
 
 
|-
 
|-
| 5
+
| 6
| uint_16
+
| ushort
 
| FieldID
 
| FieldID
 
| ID of field
 
| ID of field
 
|-
 
|-
| 7
+
| 8
| 17 bytes
+
| 16 bytes
 
| UNKNOWN
 
| UNKNOWN
 
| Unknown
 
| Unknown
 
|}
 
|}
  
 +
<br />
  
==Field location==
+
== Field location ==
The field location is obtained from three bytes.
 
 
 
'''Example''':
 
9A 00 E7 10
 
To get X axis: 9A 00 (9A 00)
 
 
 
Cheat engine X axis: A0 09
 
 
 
To get Y axis: E7 00 (E7 10) [0 is leftover, and 0 from 10]
 
 
 
Cheat engine Y axis: 70 0E
 
 
 
'''Another example''':
 
12 04 23 F7
 
To get X axis: 12 04 (12 04)
 
 
 
Cheat engine X axis: 20 41
 
  
To get Y axis: 23 07 (23 F7) [0 is leftover, and 7 from F7]
+
Old wiki page about wm2field stated, that X Y Z coordinates are based on 12 bits. No, they aren't, I made a mistake. They are normal WORDs with sign-extension for X and Y and Z is normal WORD copying and no cmp(0x7FFF), so it's unsigned. The axis are indeed X Y Z, not X-ZY as everywhere else in FF8. Byte after fieldID is some sort of pointer, currently unknown what is it purpouse.
  
Cheat engine Y axis: 3F 27
+
== Useful notes ==
  
==Useful notes==
 
 
First entry is Balamb Garden
 
First entry is Balamb Garden
  
 
Second entry is Balamb City
 
Second entry is Balamb City

Latest revision as of 05:25, 23 May 2019

By MaKiPL


Info

wm2field.tbl is file that handles the world map to field warping.

Structure

File is 1728 bytes. Where every entry is 24 bytes. Though 1728/24 = 72 entries

One entry:

Offset SizeOf Name Description
0 short FieldX Operates FieldX
2 short FieldY Operates FieldY
4 ushort (yes) Field_Z Operates FieldZ
6 ushort FieldID ID of field
8 16 bytes UNKNOWN Unknown


Field location

Old wiki page about wm2field stated, that X Y Z coordinates are based on 12 bits. No, they aren't, I made a mistake. They are normal WORDs with sign-extension for X and Y and Z is normal WORD copying and no cmp(0x7FFF), so it's unsigned. The axis are indeed X Y Z, not X-ZY as everywhere else in FF8. Byte after fieldID is some sort of pointer, currently unknown what is it purpouse.

Useful notes

First entry is Balamb Garden

Second entry is Balamb City