NSMBU > Level Files

NSMBU levels are Yaz0 compressed SARC archives. They contain another SARC archive with the same name as the outer archive, and optionally some actor and tileset files. If an actor file isn't found in the level archive it is loaded from the 'actor' folder. Tileset files are loaded from the 'unit' folder if they aren't found in the level archive.

The internal SARC archive contains a 'course' folder with a course[X].bin file for each area and a course[X]_bgdatL[Y].bin file for each tile layer.

Table of Contents
Area File
Layer File

Area File

This file contains 15 block headers followed by the blocks themselves:

OffsetSizeDescription
0x04Offset (relative to start of file)
0x44Size

Block 1: Tileset names

OffsetSizeDescription
0x032Pa0 tileset
0x2032Pa1 tileset
0x4032Pa2 tileset
0x6032Pa3 tileset

Block 2: Area settings

OffsetSizeDescription
0x04Events activated when area is entered (0-31)
0x44Events activated when zone is entered (32-63)
0x82Flags
0x1: Wrap across edges
0xA2Time limit
0xC1Unknown
0xD1Unknown
0xE1Unknown
0xF1Unknown
0x101Start entrance
0x111Unknown
0x121Unknown
0x131Start entrance for coin battle and boost rush mode
0x142Checkpoint time 1
0x162Checkpoint time 2

Block 3: Zone boundaries

OffsetSizeDescription
0x04Y upper bound
0x44Y lower bound
0x84Y upper bound 2
0xC4Y lower bound 2
0x102Zone bound id
0x122Unknown
0x148Unknown

Block 4: Unknown

Block 5: Background settings

OffsetSizeDescription
0x02Background id
0x22X offset
0x42Y offset
0x62Unknown
0x816Background name
0x181Unknown
0x191Unknown
0x1A1Unknown
0x1B1Unknown

Block 6: Unknown

Block 7: Entrances

OffsetSizeDescription
0x02X position
0x22Y position
0x42Camera offset x
0x62Camera offset y
0x81Entrance id
0x91Destination area
0xA1Destination entrance
0xB1Type
0xC1Players that spawn at this entrance (one bit for each player)
0xD1Zone id
0xE1Padding
0xF1Distance between players (0, 1 or 2)
0x102Flags
0x1: Face left
0x8: Non-enterable
0x121Baby yoshi entrance
0x131Coin edit entrance order
0x141Path id
0x151Path node index
0x161Transition type
0x171Padding

Transition Type

The screen fades out with the transition mode of the source entrance, and fades in with the transition mode of the destination entrance.

Transition ModeDescription
0Default
1Fade
2Mario face
3Circle towards center
4Bowser face
5Circle towards entrance
6Waves (always down)
7Waves (down on fadeout, up on fadein)
8Waves (up on fadeout, down on fadein)
9Mushroom
11No transition

Block 8: Sprites

OffsetSizeDescription
0x02Sprite id
0x22X position
0x42Y position
0x62Event ids
0x84Actor settings
0xC4Actor settings
0x101Zone id
0x111Layer id
0x121Link id (sometimes used to link sprites with other sprites)
0x131Movement id
0x141Specifies the initial state of some sprites (swoopers and podoboos use this field for example)
0x153Padding

Block 9: Loaded sprites

This block contains one entry for each kind of sprite in the area. This allows the game to preload their actor files.

OffsetSizeDescription
0x02Sprite id
0x22Padding

Block 10: Zone settings

OffsetSizeDescription
0x02X position
0x22Y position
0x42Width
0x62Height
0x82Theme
0xA2Unknown
0xC1Zone id
0xD1Zone bound id
0xE1Unknown
0xF1Zoom
0x101Unknown
0x111Visibility
0x121Background id
0x131Unknown
0x141Unknown
0x151Unknown
0x161Music id
0x171Unknown
0x181Unknown
0x191Unknown
0x1A2Unknown

Block 11: Locations

OffsetSizeDescription
0x02X position
0x22Y position
0x42Width
0x62Height
0x81Location id
0x93Padding

Block 12: Unknown

Block 13: Unknown

Block 14: Paths

OffsetSizeDescription
0x01Path id
0x11Unknown
0x22Start node index
0x42Number of nodes
0x62Unknown
0x84Unknown

Block 15: Path nodes

OffsetSizeDescription
0x02X position
0x22Y position
0x44Speed (float)
0x84Acceleration (float)
0xC2Delay
0xE2Unknown
0x101Unknown
0x111Unknown
0x121Unknown
0x131Unknown

Layer File

This file contains an instance of the following struct for each block of tiles:

OffsetSizeDescription
0x02Type: 0xXYYY. X is the tileset id, Y is the tile object index. 0x7FFF is ignored, 0xFFFF marks the end of the file
0x22X position
0x42Y position
0x62Width
0x82Height
0xA1Type override
0xB1Padding
0xC4Padding

Type override

When this value is non-zero, the tile is transformed to one of the following tiles, regardless of its real type.

ValueTile type
00x430
10x830
20xC30
30x1030
40x1430
50x1830
60x1C30
70x2030
80x2430
90x2830
100x2C30
110x3430
120x31
130x431
140x831
150xC31
160x1031
170x1431
180x1831
190x1C31
200x2031
210x2431
220x2831
230x2C31