All information in this document is true for version USA 1.1 of the game (LEGOSW2_AL7E64_01.nds
)
SHA1 checksum of ROM: 96aa30decea732eb03f7da01e489c6ce576536a5
Offsets in blue are only known to apply specifically to the player and might not apply to other objects.
Offset | Size | Description |
---|---|---|
0x0 | u32 |
The base.
Known base values:
|
0x8 | u32 |
The "visibility address". Editing its value makes objects invisible and/or intangible.
Known visibility values:
|
0x40 | u8 | Airborne/Grounded state. 0 = airborne, 1 = grounded. |
0x50 | u32 | Pointer to the floor triangle the player is currently standing on/interacting with. |
0x60 | s32 | X speed. |
0x64 | s32 | Y speed. |
0x68 | s32 | Z speed. |
0xB0 | s32 | X position. |
0xB4 | s32 | Y position. |
0xB8 | s32 | Z position. |
0xBC | Unknown | Model X scale. |
0xC0 | Unknown | Model Y scale. |
0xC4 | Unknown | Model Z scale. |
0xCA | u16 | Yaw. |
0xD8 | u32 | Pointer to the object's model data. More specifically, it points to the BMD0 header. |
0xDC | u32 | Pointer to the MDL0 header. |
0xE0 | u32 | Pointer to texture data? Going to the address being pointed to and editing its value affects the texture. |
0xE4 | u32 | Pointer to TEX0 header. |
0xEC | u32 | If value mod 2 = 1 , then player 1 will keep their body parts. If value mod 2 = 0 , then player 1's face, torso, and pants will match player 2's. Seemingly does nothing in the character customizer. |
0xF8 | u32 | Pointer to data that is 0x10 ahead of the model's name (i.e. 0x30 ahead of MDL0 header). Replacing this with a pointer to a piece of data that is 0x10 ahead of a different model's name will replace the model, do nothing, or CRASH the game. |
0x104 | u32 | Pointer to data that is 0x1A0 ahead of the BCA0 header (i.e 0x18C ahead of JNT0 header) |
0x148 | u32 | Same pointer as +0x104. |
0x17C | Unknown | Freezing this to certain values changes the way animations look. |
0x180 | Unknown | Animation thing. |
0x1A8 | u8 | For the character in the Cantina customizer tank:
(this pattern repeats all the way up to 0xFF) |
0x1A9 | u8 | For the character in the Cantina customizer tank:
(this pattern repeats all the way up to 0xFF) |
0x2DC | u32 | Pointer to hitbox data? |
0x684 | s32 | Only seems to apply to player 2 (P2), and probably player 3 (P3) and player 4 (P4) as well. Related to X position. Only updates when the player jumps or stops walking. |
0x688 | s32 | Only seems to apply to P2, and probably P3 and P4 as well. Related to Y position. Only updates when the player jumps or stops walking. |
0x68C | s32 | Only seems to apply to P2, and probably P3 and P4 as well. Related to Z position. Only updates when the player jumps or stops walking. |
0x6F8 | u32 | Pointer to the object that player 1 (P1) is the closest to. |
0x6FC | u32 | P1's distance from that object.
This pattern repeats for however many objects are currently in the level. For example, base + 0x700 is a pointer to the next closest object, base + 0x704 is P1's distance from that object, etc. The pointers and distance values are sorted from closest to farthest in memory. In other words, the first pointer that appears in this section of memory will indicate the object P1 is currently the closest to, and the last pointer will indicate the object P1 is currently the farthest from. |
Address | Size | Description |
---|---|---|
0x021019A8 | u8 | Current event? Determines which event is currently happening. Here are some values with notable effects:
|
0x021019AC | u8? | Unknown. Default value is 0x4, but freezing to 0xE and entering a loading zone causes you to spawn in the next intended area, but at whatever XYZ position you had when touching the loading zone, which makes it easy to spawn out of bounds.
Freezing to 0xF and entering a loading zone causes you and your party member(s) to spawn in the next intended area, but with an unintended yaw value. Freezing to 0x10 and entering a loading zone causes all four party members to spawn in as 4-LOM, but you can't move and the camera is frozen in place. |
0x021019B0 | u8 | Next map number. Determines which map you will spawn in the next time you enter a loading zone. |
0x021019B4 | u8 | Next exit number. Determines which exit you will spawn at the next time you enter a loading zone. |
0x021019C4 | u8 | Unknown. Freezing its value to 0 and entering a loading zone makes the top screen fade to black instead of temporarily freezing, then wiping. |
0x021019C8 | u8 | Current bottom screen menu. Determines which menu/screen the bottom screen is displaying. |
0x021019E4 | u8 | Unknown. Freezing its value to 0 and entering a loading zone makes the bottom screen fade to black instead of temporarily freezing, then wiping. You also seem to maintain some control over your character during the transition. |
0x021019F0 | u16 | Unknown. Its default value seems to be 0x303, but changes when going through a loading zone. Freezing it to 0x303 and going through a loading zone keeps both screens frozen. |
0x021083BC | s32 | Pointer to player 1's base. |
0x021083C0 | s32 | Pointer to player 2's base. |
0x021083C4 | s32 | Pointer to player 3's base. |
0x021083C8 | s32 | Pointer to player 4's base. |
0x021083D0 | s32? | Changing this value causes characters and objects to get shaded in different colors. Default value 0x7ED477BD? |
0x021083D4 | Unknown | Similar to previous |
0x02108C94 | u8 (bool) | Determines whether the main level object is visible or not. 1 (default) = visible, 0 = invisible. |
0x02108C9E | u8 | Determines what character P1 is. |
0x02108C9F | u8 | Determines what character P2 is. |
0x02108CA0 | u8 | Determines what character P3 is. |
0x02108CA1 | u8 | Determines what character P4 is. |
0x02108CD0 | u32? | 0x0 by default. Freezing to 0xFFFFFFFF makes both P1 and P2 completely black. Changing to 0xFF makes both P1 and P2 rapidly flash different colors. |
0x02108D14 | s32 | Camera X position. |
0x02108D18 | s32 | Camera Y position. |
0x02108D1C | s32 | Camera Z position. |
0x02108D2C | Unknown | Camera pitch. |
0x02108D2E | Unknown | Camera yaw. |
0x02108EBC | u32 | Pointer to the thing the camera is focusing on? Its value is the P1 base, and substituting the value for P2's base does change what the camera looks at in a way, but it doesn't look at P2 the same way it does for P1. |
0x02108EF0 | u32 | Pointer to a pointer to the player's X position. Changing the pointer to the player's X position to the player's Y or Z position has weird effects. |
0x02108EF4 | u8 | Camera mode. |
0x02108FF8 | u8 | Camera effect. |
30444D42
. This will search for the BMD0
file header in the game's memory.BMD0
header, then have a MDL0
header not far after it, then there will be the name of the model not far after the MDL0
header.0x02209BFC
, then you would search for a specific hexadecimal value equal to 02209BFC
in RAM Search.0xF8
from the hex value in step 4 to find the object's base.Mode # | Description |
---|---|
0x0 | Camera freezes in place. |
0x1 | Default behavior? Behaves like it does in the Cantina starting room. |
0x2 | Free mode. Camera freezes in place, but pressing Up/Down tilts it up/down, pressing Left/Right tilts it left/right, and pressing L/R moves it forward/backward |
0x3 | 360 mode. Pressing L/R rotates it left and right in a circle around your character. |
0x4 | Camera moves relative to P1 but is stuck at one angle. |
0x5 | This one is weird. Pressing different directions makes it rotate differently, except for Up-Right, which makes it behave similarly to Mode 0x4. |
0x6 | X and Z are frozen at coordinates nearing (0,0). Y is frozen at Y = 61440. Camera yaw changes as it follows P1's horizontal movement, but pitch is frozen. |
0x7 | Appears to be the same as 0x3, just 360 mode again. |
0x8 | Appears to be the same as 0x4. |
0x9 | Sandbox cam. Camera is positioned directly behind P1. D-pad Left/Right rotates it left/right and you can press Down to walk backwards. |
0xA | Similar to Mode 0x5. Holding any direction on the D-pad causes P1 to walk in circles and the camera to quickly spin in circles. |
0xB | Camera freezes in place. |
0xC | Camera gradually moves to the origin (0,0,0), where it remains frozen in place. Pitch and yaw are frozen. |
0xD-0xFF | Camera freezes in place. |
Effect # | Description |
---|---|
0x0 | Camera moves to the origin (0,0,0), where it remains frozen in place. |
0x1 | Camera roll slowly sways back and forth. In other words, the camera roll gradually alternates between -700 and 700 (s16). |
0x2 | Camera rapidly shakes. Used in Escape from Echo Base. |
0x3 | No effect. |
0x4-0xFF | Camera moves to the origin (0,0,0), where it remains frozen in place. |