SMB 2 StageDef Format (Formerly .lz.raw)

Notes

Sections

Flags

File Header

Length: 0x89C/2204

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x880x00000000447A0000
0x880x44Number of collision headers
0xC120x44Offset to the collision header list
0x10160x44Offset to start position data
0x14200x44Offset to fallout position data
0x18240x44Number of goals
0x1C280x44Offset to the goal list
0x20320x44Number of bumpers
0x24360x44Offset to the bumper list
0x28400x44Number of jamabars
0x2C440x44Offset to the jamabar list
0x30480x44Number of bananas
0x34520x44Offset to the banana list
0x38560x44Number of cone collision objects
0x3C600x44Offset to the cone collision object list
0x40640x44Number of sphere collision objects
0x44680x44Offset to the sphere collision object list
0x48720x44Number of cylinder collision objects
0x4C760x44Offset to the cylinder collision object list
0x50800x44Number of fallout volumes
0x54840x44Offset to the fallout volume list
0x58880x44Number of background models
0x5C920x44Offset to the background model list
0x60960x44Number of foreground models
0x641000x44Offset to the foreground model list
0x681040x44Unknown/Null
0x6C1080x440x00000001
0x701120x44Number of reflective level models
0x741160x44Offset to the reflective level model list
0x781200xC12Unknown/Null
0x841320x44Number of level model instances (For use with duplicated level models)
0x881360x44Offset to the level model instance list
0x8C1400x44Number of level models
0x901440x44Offset to the level model pointer type A list
0x941480x44Number of level models
0x981520x44Offset to the level model pointer type B list
0x9C1560xC12Unknown/Null
0xA81680x44Number of switches
0xAC1720x44Offset to the switch list
0xB01760x44Offset to the fog animation header
0xB41800x44Number of wormholes
0xB81840x44Offset to the wormhole list
0xBC1880x44Offset to fog
0xC01920x1420Unknown/Null
0xD42120x44Offset to mystery 3
0xD82160x7C41988Unknown/Null

Start Position

Length: 0x14/20

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position
0x440x44Y position
0x880x44Z position
0xC120x22X rotation
0xE140x22Y rotation
0x10160x22Z rotation
0x12180x22Null

Fallout Position

Length: 0x4/4

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Y position

Goal

Length: 0x14/20

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position
0x440x44Y position
0x880x44Z position
0xC120x22X rotation
0xE140x22Y rotation
0x10160x22Z rotation
0x12180x22Type of goal (Blue: 0x0001, Green: 0x0101, Red: 0x0201)

Bumper

Length: 0x20/32

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position
0x440x44Y position
0x880x44Z position
0xC120x22X rotation
0xE140x22Y rotation
0x10160x22Z rotation
0x12180x22Null
0x14200x44X Scale
0x18240x44Y Scale
0x1C280x44Z Scale

Jamabar

Length: 0x20/32

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position
0x440x44Y position
0x880x44Z position
0xC120x22X rotation
0xE140x22Y rotation
0x10160x22Z rotation
0x12180x22Null
0x14200x44X Scale
0x18240x44Y Scale
0x1C280x44Z Scale

Banana

Length: 0x10/16

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position
0x440x44Y position
0x880x44Z position
0xC120x44Type of banana (Single: 0x00000000, Bunch: 0x00000001)

Fallout Volume

Length: 0x20/32

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Center X position
0x440x44Center Y position
0x880x44Center Z position
0xC120x44X size
0x10160x44Y size
0x14200x44Z size
0x18240x22X rotation
0x1A260x22Y rotation
0x1C280x22Z rotation
0x1E300x22Null

Switch

Length: 0x18/24

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position
0x440x44Y position
0x880x44Z position
0xC120x22X rotation
0xE140x22Y rotation
0x10160x22Z rotation
0x12180x22Switch type (Play: 0x0000, Pause: 0x0001, Play backwards: 0x0002, Fast forward: 0x0003, Rewind: 0x0004)
0x14200x22Animation group IDs affected
0x16220x22Null

Wormhole

Length: 0x1C/28

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x440x00000001
0x440x44X position
0x880x44Y position
0xC120x44Z position
0x10160x22X rotation
0x12180x22Y rotation
0x14200x22Z rotation
0x16220x22Null
0x18240x44Offset to destination wormhole

Collision Header

Length: 0x49C/1180

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Center of rotation X position (Center of rotation may not work as you may expect - see notes for more info)
0x440x44Center of rotation Y position (Center of rotation may not work as you may expect - see notes for more info)
0x880x44Center of rotation Z position (Center of rotation may not work as you may expect - see notes for more info)
0xC120x22Initial X rotation
0xE140x22Initial Y rotation
0x10160x22Initial Z rotation
0x12180x22Animation loop type/seesaw (Looping animation: 0x0000, Play once animation: 0x0001, Seesaw: 0x0002 - Seesaws rotate around the Z axis if not rotated)
0x14200x44Offset to animation header (Animation does not work with the first collision header - see notes for details)
0x18240x44Conveyor X speed
0x1C280x44Conveyor Y speed
0x20320x44Conveyor Z speed
0x24360x44Offset to the collision triangle list
0x28400x44Offset to the collision grid triangle list pointer
0x2C440x44Collision grid start X
0x30480x44Collision grid start Z
0x34520x44Collision grid step X
0x38560x44Collision grid step Z
0x3C600x44Collision grid step X count
0x40640x44Collision grid step Z count
0x44680x44Number of goals
0x48720x44Offset to the goal list (Null is not ok if this is the first collision header - if the first collision header contains no goals, it still must point to a goal list, else the points glitch will occur and finishing will crash a console)
0x4C760x44Number of bumpers
0x50800x44Offset to the bumper list
0x54840x44Number of jamabars
0x58880x44Offset to the jamabar list
0x5C920x44Number of bananas
0x60960x44Offset to the banana list
0x641000x44Number of cone collision objects
0x681040x44Offset to the cone collision object list
0x6C1080x44Number of sphere collision objects
0x701120x44Offset to the sphere collision object list
0x741160x44Number of cylinder collision objects
0x781200x44Offset to the cylinder collision object list
0x7C1240x44Number of fallout volumes
0x801280x44Offset to the fallout volume list
0x841320x44Number of reflective level models
0x881360x44Offset to the reflective level model list
0x8C1400x44Number of level model instances (For use with duplicated level models)
0x901440x44Offset to the level model instance list
0x941480x44Number of level models
0x981520x44Offset to the level model pointer type B list
0x9C1560x88Unknown/Null
0xA41640x22Animation group ID (For use with switches - Must be non-zero if you want to assign a group ID)
0xA61660x22Null
0xA81680x44Number of switches
0xAC1720x44Offset to the switch list
0xB01760x44Unknown/Null
0xB41800x44Offset to mystery 5
0xB81840x44Seesaw sensitivity (Higher is more sensitive, negative makes the seesaw reversed)
0xBC1880x44Seesaw friction (Lower is looser)
0xC01920x44Seesaw spring (0 prevents the seesaw from resetting)
0xC41960x44Number of wormholes
0xC82000x44Offset to the wormhole list
0xCC2040x44Initial animation state (Playing: 0x00000000, Paused: 0x00000001, Playing backwards: 0x00000002, Fast forward: 0x00000003, Rewind: 0x00000004 - Same as switch types - A play once animation should not be initially playing)
0xD02080x44Unknown/Null
0xD42120x44Animation loop point (Seconds - Set to a large value to "disable" looping)
0xD82160x44Offset to texture scroll data
0xDC2200x3C0960Unknown/Null

Level Model Pointer Type A

Length: 0xC/12

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x880x0000000000000001
0x880x44Offset to level model Type A

Level Model

Length: 0x10/16

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Null
0x440x44Offset to the model name to use
0x880x88Null

Level Model Pointer Type B

Length: 0x4/4

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Offset to level model pointer Type A

Level Model Instance

Length: 0x24/36

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Offset to the level model pointer type A
0x440x44X position
0x880x44Y position
0xC120x44Z position
0x10160x22X rotation
0x12180x22Y rotation
0x14200x22Z rotation
0x16220x22Null
0x18240x44X Scale
0x1C280x44Y Scale
0x20320x44Z Scale

Reflective Level Model

Length: 0xC/12

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Offset to the model name to use
0x440x88Null

Background Model

Length: 0x38/56

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x440x0000001F
0x440x44Offset to the model name to use
0x880x44Null
0xC120x44X position
0x10160x44Y position
0x14200x44Z position
0x18240x22X rotation
0x1A260x22Y rotation
0x1C280x22Z rotation
0x1E300x22Null
0x20320x44X Scale
0x24360x44Y Scale
0x28400x44Z Scale
0x2C440x44Offset to the background animation header
0x30480x44Offset to the background/foreground animation header 2
0x34520x44Offset to the effect header

Foreground model

Length: 0x38/56

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown - typically 0x0000001F, sometimes 0x00000007 or 0x0000000F
0x440x44Offset to the model name to use
0x880x44Unknown/Null
0xC120x44X position
0x10160x44Y position
0x14200x44Z position
0x18240x22X rotation
0x1A260x22Y rotation
0x1C280x22Z rotation
0x1E300x22Null
0x20320x44X Scale
0x24360x44Y Scale
0x28400x44Z Scale
0x2C440x44Unknown
0x30480x44Offset to the background/foreground animation header 2
0x34520x44Unknown

Collision Triangle

Length: 0x40/64

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X1 position
0x440x44Y1 position
0x880x44Z1 position
0xC120x44X normal
0x10160x44Y normal
0x14200x44Z normal
0x18240x22X rotation from XY plane
0x1A260x22Y rotation from XY plane
0x1C280x22Z rotation from XY plane
0x1E300x22Null
0x20320x44DX2X1 (Delta X position for the 2nd triangle point from the 1st point, before rotation is applied)
0x24360x44DY2Y1
0x28400x44DX3X1
0x2C440x44DY3Y1
0x30480x44X tangent
0x34520x44Y tangent
0x38560x44X bitangent
0x3C600x44Y bitangent

Collision Grid Triangle List

Length: 0x4/4

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x22Triangle index
0x220x00... (Triangle index is repeated)
0x220x220xFFFF to terminate a list

Collision Grid Triangle List Pointer

Length: 0x18/24

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Offset to the collision grid triangle list (Grid tile 0, 0)
0x440x44Offset to the collision grid triangle list (Grid tile 1, 0)
0x880x44Offset to the collision grid triangle list (Grid tile 2, 0)
0xC120x00...
0xC120x44Offset to the collision grid triangle list (Grid tile 15, 0)
0x10160x44Offset to the collision grid triangle list (Grid tile 0, 1)
0x14200x44Offset to the collision grid triangle list (Grid tile 1, 1)
0x18240x00... Repeat this for however many collision grid tiles there are (The above is an example of grid with 16 tiles along the X axis)

Cone Collision Object

Length: 0x20/32

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position (Center of cone base)
0x440x44Y position (Center of cone base)
0x880x44Z position (Center of cone base)
0xC120x22X rotation
0xE140x22Y rotation
0x10160x22Z rotation
0x12180x22Null
0x14200x44Cone radius
0x18240x44Cone height
0x1C280x44Cone radius

Sphere Collision Object

Length: 0x14/20

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position (Center of sphere)
0x440x44Y position (Center of sphere)
0x880x44Z position (Center of sphere)
0xC120x44Sphere radius
0x10160x44Unknown/Null

Cylinder Collision Object

Length: 0x1C/28

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44X position (Center of cylinder)
0x440x44Y position (Center of cylinder)
0x880x44Z position (Center of cylinder)
0xC120x44Cylinder radius
0x10160x44Cylinder height
0x14200x22X rotation
0x16220x22Y rotation
0x18240x22Z rotation
0x1A260x22Null

Animation Header

Length: 0x40/64

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Number of X rotation keyframes
0x440x44Offset to the X rotation keyframe list
0x880x44Number of Y rotation keyframes
0xC120x44Offset to the Y rotation keyframe list
0x10160x44Number of Z rotation keyframes
0x14200x44Offset to the Z rotation keyframe list
0x18240x44Number of X translation keyframes
0x1C280x44Offset to the X translation keyframe list
0x20320x44Number of Y translation keyframes
0x24360x44Offset to the Y translation keyframe list
0x28400x44Number of Z translation keyframes
0x2C440x44Offset to the Z translation keyframe list
0x30480x1016Unknown/Null

Background Animation Header

Length: 0x50/80

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown/Null
0x440x44Animation loop point (Seconds - Set to a large value to "disable" looping)
0x880x88Unknown/Null
0x10160x44Number of X rotation keyframes
0x14200x44Offset to the X rotation keyframe list
0x18240x44Number of Y rotation keyframes
0x1C280x44Offset to the Y rotation keyframe list
0x20320x44Number of Z rotation keyframes
0x24360x44Offset to the Z rotation keyframe list
0x28400x44Number of X translation keyframes
0x2C440x44Offset to the X translation keyframe list
0x30480x44Number of Y translation keyframes
0x34520x44Offset to the Y translation keyframe list
0x38560x44Number of Z translation keyframes
0x3C600x44Offset to the Z translation keyframe list
0x40640x1016Unknown/Null

Background/Foreground Animation Header 2

Length: 0x60/96

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown/Null
0x440x44Animation loop point (Seconds - Set to a large value to "disable" looping)
0x880x44Number of X scale keyframes
0xC120x44Offset to the X scale keyframe list
0x10160x44Number of Y scale keyframes
0x14200x44Offset to the Y scale keyframe list
0x18240x44Number of Z scale keyframes
0x1C280x44Offset to the Z scale keyframe list
0x20320x44Number of X rotation keyframes
0x24360x44Offset to the X rotation keyframe list
0x28400x44Number of Y rotation keyframes
0x2C440x44Offset to the Y rotation keyframe list
0x30480x44Number of Z rotation keyframes
0x34520x44Offset to the Z rotation keyframe list
0x38560x44Number of X translation keyframes
0x3C600x44Offset to the X translation keyframe list
0x40640x44Number of Y translation keyframes
0x44680x44Offset to the Y translation keyframe list
0x48720x44Number of Z translation keyframes
0x4C760x44Offset to the Z translation keyframe list
0x50800x44Number of unknown [Set 10] keyframes
0x54840x44Offset to the unknown [Set 10] keyframe list
0x58880x44Number of unknown [Set 11] keyframes
0x5C920x44Offset to the unknown [Set 11] keyframe list

Fog Animation Header

Length: 0x30/48

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Number of start distance keyframes
0x440x44Offset to the start distance keyframe list
0x880x44Number of end distance keyframes
0xC120x44Offset to the end distance keyframe list
0x10160x44Number of red color value keyframes
0x14200x44Offset to the red color value keyframe list
0x18240x44Number of green color value keyframes
0x1C280x44Offset to the green color value keyframe list
0x20320x44Number of blue color value keyframes
0x24360x44Offset to the blue color value keyframe list
0x28400x44Number of unknown keyframes
0x2C440x44Offset to the unknown keyframe list

Animation Keyframe

Length: 0x14/20

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Easing (Constant: 0x00000000, Linear: 0x00000001, Ease: 0x00000002)
0x440x44Time (Seconds)
0x880x44Value (Translation, rotation, or R/G/B amount, depending on where the keyframe is referenced from)
0xC120x44Tangent in (left tangent handle for eased interpolation) - leave at 0 for a flat tangent
0x10160x44Tangent out (right tangent handle for eased interpolation) - leave at 0 for a flat tangent

Fog

Length: 0x24/36

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x11Fog type (Usually 0x04, although this can be any from _GXFogType - NONE: 0x00, LIN: 0x02, EXP: 0x04, EXP2: 0x05, REVEXP: 0x06, REVEXP2: 0x07)
0x110x33Null
0x440x44Fog start distance
0x880x44Fog end distance
0xC120x44Amount of red (From 0 - 1)
0x10160x44Amount of green (From 0 - 1)
0x14200x44Amount of blue (From 0 - 1)
0x18240xC12Unknown/Null

Effect Header

Length: 0x30/48

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Number of effect 1 keyframes
0x440x44Offset to the effect 1 list
0x880x44Number of effect 2 keyframes
0xC120x44Offset to the effect 2 list
0x10160x44Offset to the texture scroll
0x14200x1C28Unknown/Null

Effect 1 (Likely used for animated textures, such as the silhouettes in Night)

Length: 0x14/20

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown
0x440x44Unknown
0x880x44Unknown
0xC120x22Unknown
0xE140x22Unknown
0x10160x22Unknown
0x12180x22Unknown

Effect 2 (May be used for the flames in Storm?)

Length: 0x10/16

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown
0x440x44Unknown
0x880x44Unknown
0xC120x11Unknown
0xD130x33Null

Texture Scroll

Length: 0x8/8

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44U (Texture X) scroll speed
0x440x44V (Texture Y) scroll speed

Mystery 3

Length: 0x24/36

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown float (Probably)
0x440x44Unknown float (Probably)
0x880x44Unknown float (Probably)
0xC120x22Null
0xE140x22Some marker
0x10160x1420Null

Mystery 5

Length: 0x14/20

Relative Offset (Hex)Relative Offset (Dec)Length (Hex)Length (Dec)FlagsInfoLink
0x000x44Unknown/Null
0x440x44Unknown float
0x880x44Unknown float
0xC120x44Unknown float
0x10160x44Unknown float