Anonymous

Changes

From Final Fantasy Inside

FF8/FileFormat DAT

2,524 bytes added, 05:24, 23 May 2019
m
18 revisions imported
By Mirex, JWP , random_npc and myst6re.Edit: We now know the animation and skeleton- see https://github.com/MaKiPL/OpenVIII/blob/4ac151daad7cd1475eb0694dd0715bc35d7a4b39/FF8/debug_battleDat.cs
== Header ==
|-
|style="background:rgb(255,255,204)" | 2
|style="background:rgb(255,255,204)" | 6 bytes|style="background:rgb(255,255,204)" | Unknown|-| 8| s16f (divide by 4096f)| scaleX |-| 10| s16f (divide by 4096f)| scale -Z|-| 12| s16f (divide by 4096f)| scale Y|-|style="background:rgb(255,255,204)" | 14 |style="background:rgb(255,255,204)" | 2 bytes
|style="background:rgb(255,255,204)" | Unknown
|-
|-
| 2
| 2 bytess16f (divide by 4096f)| Bone size(?)|-| 4| s16f (divide by 4096f)| unknown, multiplied by 360f|-| 6| s16f (divide by 4096f)| unknown, multiplied by 360f|-| 8| s16f (divide by 4096f)| unknown, multiplied by 360f|-| 10| s16f (divide by 4096f)| unknown|-| 12| s16f (divide by 4096f)| unknown|-| 14| s16f (divide by 4096f)| unknown
|-
|style="background:rgb(255,255,204)" | 416|style="background:rgb(255,255,204)" | 44 28 bytes
|style="background:rgb(255,255,204)" | Unknown (often empty)
|}
| nbObjects * 4 bytes
| Object Positions
|-
| 4 + nbObjects * 4
| Varies
| Object Data (see below)
|-
| Varies
| 4 bytes
| Total count of vertices
|}
| 2
| Varies * NbVerticesData
| Vertices Data(see below)
|-
| Varies
| 4 - (absolutePosition % 4)
| Padding (0x00)
|-
| Varies
| 8 bytes
| Padding (0x00)Always empty
|-
| Varies
| numQuads * 20 bytes
| Quads
|-
| Varies
| 4 bytes
| Total number of vertices (may be not visible)
|}
==== Useful structures ====
typedef struct vertice {
sint16 x, y, z;
} vertice;
(sizeof = 6)
typedef struct triangle { uint16 vertex_indexes[3];// vertex_indexes[0] &= 0xFFF, other bits are unknown
uint8 texCoords1[2];
uint8 texCoords2[2];
uint8 texCoords3[2];
uint16 u; // textureID_related2
} triangle;
(sizeof = 16)
typedef struct quad { uint16 vertex_indexes[4];// vertex_indexes[0] &= 0xFFF, other bits are unknown
uint8 texCoords1[2];
uint16 textureID_related;
uint8 texCoords3[2];
uint8 texCoords4[2];
} quad;
(sizeof = 20)
| nbAnimations * 4 bytes
| Animations Positions
|}
 
=== Animation ===
 
{| 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
| 1 byte
| Number of frames
|-
|style="background:rgb(255,255,204)" | 1
|style="background:rgb(255,255,204)" | Varies
|style="background:rgb(255,255,204)" | Unknown
|}
== Section 4: Unknown ==
Optionnal Optional section, often empty.
== Section 5: Unknown ==
| 32
| 4 bytes
| Mag Vit values
|-
| 36
| 4 bytes
| Vit Mag values
|-
| 40
== Section 8: Battle scripts/AI ==
{| 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 bytes
| Number of sub-sections
|-
| 4
| 4 bytes
| Offset to AI sub-section
|-
| 8
| 4 bytes
| Offset to text offsets
|-
| 12
| 4 bytes
| Offset to text sub-section
|}
 
=== AI ===
 
{| 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 bytes
| Offset to init code
|-
| 4
| 4 bytes
| Offset to code executed at ennemy's turn
|-
| 8
| 4 bytes
| Offset to counterattack code
|-
| 12
| 4 bytes
| Offset to death code
|-
|style="background:rgb(255,255,204)" | 16
|style="background:rgb(255,255,204)" | 4 bytes
|style="background:rgb(255,255,204)" | Unknown offset
|}
 
=== Texts ===
Text offsets is a list of text positions (2 bytes each) in the text sub-section.
== Section 9: Sounds ==