Pikmin 2 cutscene file
Cutscenes in Pikmin 2 are controlled by a file called demo.stb
. This file can be found in each of the cutscene archives in /user/Mukki/<name of cutscene>/demo.szs
. Cutscenes have predetermined number of frames.
This page describes the format of the file. The page is work in progress.
Offset | Type | Description |
---|---|---|
0x0 | char[4] | String that spells "STB", terminated by a null byte |
0x4 | uint16 | Byte order mark? Always 0xFEFF |
0x8 | uint32 | Total file size |
0xC | uint32 | Amount of objects |
0x10 | char[8] | String that spells "jstudio" |
0x18 | uint8[6] | Likely 6 bytes of padding |
0x1E | int16 | Unknown. Always 0x4? |
After the STB header follows object data. The following info explains that object data:
JFVB
JFVB is one of the possible objects that can appear in the stb file. The size of the JFVB data is usually big because it's like its own section inside the file. For the purpose of the object count, JFVB counts as one object
Offset | Type | Description |
---|---|---|
0x0 | uint32 | JFVB total data size (starting with 0x0 to end) |
0x4 | char[4] | String that spells "JFVB" |
0x8 | FVB data | See table below for more info |
Offset | Type | Description |
---|---|---|
0x0 | char[4] | String that spells "FVB", terminated by a null byte |
0x4 | uint16 | Byte order mark? Always 0xFEFF |
0x6 | uint16 | Unknown, always 0x100? |
0x8 | uint32 | FVB data size (starting with "FVB" string to end) |
0xC | uint32 | Amount of entries in FVB data |
0x10 | FVB data entry | See table below for more info |
Offset | Type | Description |
---|---|---|
0x0 | uint32 | entry size starting from 0x0 to end |
0x4 | uint16 | entry type? |
0x6 | uint16 | padding |
0x8 | unknown | entry data depending on entry type? |
FVB entry types: 1 (composite?), 2 (constant?), 3 (transition?), 4 (list?), 5 (list parameter?), 6 (hermite?)
JMSG
This object handles the querying of messages from the BMG database and responsible for the calling message boxes onscreen. There are two segments to the JMSG objects, first is an array of message box objects, and then a control section with additional parameters.
Offset | Type | Description |
---|---|---|
0x0 | uint32 | Size of section in nibbles/half-bytes |
0x4 | char[4] | String that spells "JMSG" |
0x8 | uint32 | If this is the first message box this is set to 0x0000000B, else 0x0000000C |
0xC | 5 bytes | A string in Shift-JIS Romaji, "メッセージ", or "Message" in English |
0x16 | uint16 | Unknown identifer?[unsure] |
0x18 | uint16 | An identifer? Value is always 0x0200 |
0x1A | uint16 | Value represents what frame to pause the cutscene and display the message box onscreen |
0x1C | 8 Bytes | Value doesn't appear to change, always 0x8000000800040859 |
0x24 | uint32 | ID of message |
0x28 | uint16 | Same as value from 0x14. Always 0x0200 |
0x2A | uint16 | Always 0x0001 |
0x2C | uint16 | Padding of 0's, end of section |
Offset | Type | Description |
---|---|---|
0x0 | uint32 | Size of section in bytes |
0x4 | uint32 | Padding of FF's |
0x8 | uint32 | Unknown, set to 0x0000000D |
0xC | 12 bytes | A string in Shift-JIS Romaji, "コントロール", or "Control" in English |
0x18 | uint32 | Padding of 0's |
0x1C | 12 Bytes | Start of control values for the JMSG object |
0x28* | uint32 | Padding of 0's, end of section |
∗ Ending offset differs depending on the amount of JMSG objects there are since each object gets its own 12 bytes of control values.