SMBX Global Memory

From PGE Wiki
Jump to: navigation, search


General Player Memory
Name Memory address Memory type Description
Player Ptr 0x00B25A20 FIELD_DWORD The pointer to the Player Array. Not needed directly by lua/autocode
Player Count 0x00B2595E FIELD_WORD How many Players are in the level.
Player Editor Ptr 0x00CF74D8 FIELD_DWORD The pointer to the Player for testing in the level Editor. Not needed directly by lua/autocode


General NPC Memory
Name Memory address Memory type Description
NPC Ptr 0x00B259E8 FIELD_DWORD The pointer to the NPC Array. Not needed directly by lua/autocode
NPC Count 0x00B2595A FIELD_WORD The Number of NPCs in the level.


General Input Memory
Name Memory address Memory type Description
Mouse cursor X 0x00B2D6BC FIELD_DFLOAT The X position of the mouse cursor on the screen.
Mouse cursor Y 0x00B2D6C4 FIELD_DFLOAT The Y position of the mouse cursor on the screen.
Mouse moving 0x00B2D6D2 FIELD_WORD Whether or not the mouse is moving.
Mouse released 0x00B2D6D0 FIELD_WORD Whether or not a mouse button is being released.
Mouse pressing 0x00B2D6CC FIELD_WORD Whether or not a mouse button is being pressed.
Key released 0x00B2C884 FIELD_WORD Whether or not a keyboard key is being released.


General UI Memory
Name Memory address Memory type Description
HUD star count 0x00B251E0 FIELD_WORD How many stars. WARNING: Changing this value can break save files!
HUD coins count 0x00B2C5A8 FIELD_WORD How many coins.
HUD lives count 0x00B2C5AC FIELD_FLOAT How many lives.
HUD points count 0x00B2C8E4 FIELD_DWORD How many points.
Pause menu visible 0x00B250E2 FIELD_WORD Is the pause menu or a text box visible?
Current menu choice 0x00B2C880 FIELD_WORD Current menu choice.


World Settings Memory
Name Memory address Memory type Description
Episode name 0xB2C624 FIELD_STRING The name of the current episode.
Intro level path 0xB25724 FIELD_STRING The filename of the intro (hub) level.
Hub-styled world flag 0xB25728 FIELD_BOOL Controls whether the world map is loaded.
"Restart on death" flag 0xB2572A FIELD_BOOL Controls whether the player restarts the current level after dying.
Episode name 0xB2C906 FIELD_WORD The total number of stars in the episode according to the .wld file.


Misc. Memory
Name Memory address Memory type Description
Dragon Coin Count 0x05844B7C FIELD_WORD The amount of dragon coins collected.
Screen HDC 0x00B25028 FIELD_DWORD The screen HDC. Not needed by lua/autocode
Intro Menu Overlay 0x00B2C620 FIELD_WORD If set to -1, then the intro menu overlay is displayed.
Intro Mode 0x00B2C89C FIELD_DWORD If set to -1, then the intro is played.