This file type follows the same structure as the PlayerModelSetup substruct of the .SSQ file type
ModelSetup
Sets a models position, rotations, scalar values, and main animations.
offset |
size |
data
|
+0x00 |
0x4 |
Magic stamp, always 'GMPX'
|
+0x04 |
0x4 |
uint32 modelsetup_header_version: seen 0x1400, 0x1200. Any other values?
|
+0x08 |
0x4 |
vaguely size-related? Likely ignored[1]
|
+0x0C |
0x8 |
all 0? Likely ignored[1]
|
+0x14 |
0x10 |
garbage? Likely ignored[1]
|
+0x24 |
0x4 |
uint32 numPositions
|
+0x28 |
0x4 |
uint32 numRotations
|
+0x2C |
0x20*numPositions |
ModelPosition[numPositions]
|
(varies) |
0x20*numRotations |
ModelRotation[numRotations]
|
(varies) |
0x4 |
uint32 numAnims
|
(varies) |
0x30*numAnims |
ModelAnim[numAnims], Only read if numAnims >= 2
|
Afterwards, the following values are read only if modelsetup_header_version >= 0x1100:
offset |
size |
data
|
(varies) |
0x4 |
uint32 numScalars
|
(varies) |
0x20*numScalars |
ModelScalar[numScalars], only read if numScalars >= 2
|
(varies) |
0x40 |
a single 0x40-byte entry
|
ModelPosition
Model position in 3D space
offset |
size |
data
|
0x00 |
0x4 |
float32, frame index on global timeline
|
0x04 |
0x4 |
float32, number of frames before the next position value, reciprocated
|
0x08 |
0x4 |
float32, X-coordinate
|
0x0C |
0x4 |
float32, Y-coordinate
|
0x00 |
0x4 |
float32, Z-coordinate
|
0x04 |
0x4 |
uint32, interpolation between positions - 1 if true
|
0x08 |
0x4 |
uint32, frame index * 160
|
0x0C |
0x4 |
uint32, unknown
|
ModelRotation
Model rotation along the XYZ axes [2]
offset |
size |
data
|
0x00 |
0x04 |
float32, frame index on global timeline
|
0x04 |
0x04 |
float32, number of frames before the next position value, reciprocated
|
0x08 |
0x10 |
float32, quaternion of rotation (XYZW)
|
0x18 |
0x04 |
uint32, interpolation between rotations - 1 if true
|
0x1C |
0x04 |
uint32, frame index * 160
|
ModelAnim
Handles applying model animations
offset |
size |
data
|
+0x00 |
0x4 |
float32, frame index on global timeline
|
+0x04 |
0x4 |
float32, number of frames before the next animation, reciprocated
|
+0x08 |
0x4 |
uint32, index of the appropriate animation (found in .XGM)
|
+0x0C |
0x4 |
uint32, 0 or 1, force starting the animation from this node's frame
|
+0x10 |
0x4 |
uint32, determines whether to render the model, 0 if true
|
+0x14 |
0x4 |
uint32, animate the model based on the game's current state (only useful with model types 1 - 3 & 5 - 8)
|
+0x18 |
0x4 |
uint32, loop animation
|
+0x1C |
0x4 |
uint32, untested
|
+0x20 |
0x4 |
uint32, untested
|
+0x24 |
0x4 |
uint32, produce a drop shadow
|
+0x28 |
0x4 |
uint32, unknown, possibly ignored - sometimes matches the next value
|
+0x2C |
0x4 |
uint32, frame index * 160
|
ModelScalar
Model scaling in 3D space, rarely used
offset |
size |
data
|
0x00 |
0x4 |
float32, frame index on global timeline
|
0x04 |
0x4 |
float32, number of frames before the next scalar, reciprocated
|
0x08 |
0x4 |
float32, X-scalar
|
0x0C |
0x4 |
float32, Y-scalar
|
0x00 |
0x4 |
float32, Z-scalar
|
0x04 |
0x4 |
uint32, unknown
|
0x08 |
0x4 |
uint32, interpolation between scalars - 1 if true
|
0x0C |
0x4 |
uint32, unknown
|
PlayerEventSetup
Ties the model to player controlled events
These are only read if modelsetup_header_version >= 0x1300:
offset |
size |
data
|
+0x00 |
0x4 |
uint32 num_controllables
|
+0x04 |
0x30*num_controllables |
Controllable[num_controllables]
|
(varies) |
(varies) |
Connections[num_controllables]
|
(varies) |
0x4*num_controllable |
int32[num_controllable], event sequence end points, Controllable indices
|
Controllable
Contains controller/event/button flags + analog stick angles
offset |
size |
data
|
0x00 |
0x4 |
float32, minimum angle in radians
|
0x04 |
0x4 |
float32, maximum angle in radians
|
0x08 |
0x4 |
uint32, a descriptor of sorts - aligns with strum animations (1 - 3) and guarding (1 - 4)
|
0x0C |
0x4 |
uint32, event flag
|
0x10 |
0x4 |
uint32, index of animation to use
|
0x14 |
0x4 |
uint32, length of time (in frames) to hold the last frame of animation for
|
0x18 |
0x4 |
uint32, 0 or 1, playback direction: 1 - normal; 0 - reverse
|
0x1C |
0x4 |
uint32, 0 or 1, controls whether the animation can be interrupted mid-playback
|
0x20 |
0x4 |
uint32, unknown
|
0x24 |
0x4 |
uint32, 0 or 1, controls whether to choose a connected event by random
|
0x28 |
0x8 |
[unused] junk for padding
|
Connections
Provides each respective controllable with a list of events to poll for.
offset |
size |
data
|
0x00 |
0x4 |
uint32 num_connections
|
0x04 |
0x4*num |
uint32[num_connections], indices to corresponding Controllables
|
- ↑ 1.0 1.1 1.2 Many of these values were tested by loading Stage 1 (US PS2 version) and seeing if the game uses these values after reading them from the file (it didn't, but who knows if other stages do).
- ↑ Orientation of the axes for rotation may vary from most graphics programs (i.e Blender).