SMBX Player Offsets

From PGE Wiki
Jump to: navigation, search


This is the memory map for the player struct. This struct is not fully analysed. Any help is appreciated! Please note that the data may not be fully 100% accurate.


PC Memory (0x184 bytes)
Name Memory address Memory type Description
SMBX PC+0x00 PC+0x00 FIELD_WORD Toad doublejump ready (FFFF true)
SMBX PC+0x02 PC+0x02 FIELD_WORD Star sparkling effect on player
SMBX PC+0x04 PC+0x04 FIELD_WORD Horizontal and ducking disabled (?)
SMBX PC+0x06 PC+0x06 FIELD_WORD Ducking enabled?
SMBX PC+0x08 PC+0x08 FIELD_WORD # of bomb Link has in his inventory
SMBX PC+0x0A PC+0x0A FIELD_WORD Is on slippery ground
Link Content Below N/A N/A N/A
SMBX PC+0x0C PC+0x0C FIELD_WORD Is a fairy
SMBX PC+0x0E PC+0x0E FIELD_WORD Fairy already used this jump (1 true)
SMBX PC+0x10 PC+0x10 FIELD_WORD Frames until fairy runs out
SMBX PC+0x12 PC+0x12 FIELD_WORD Link has a key
SMBX PC+0x14 PC+0x14 FIELD_WORD Link slash cooldown timer
SMBX PC+0x16 PC+0x16 FIELD_WORD # of hearts (all characters)
Peach Content Below N/A N/A N/A
SMBX PC+0x18 PC+0x18 FIELD_WORD Princess hover is available
SMBX PC+0x1A PC+0x1A FIELD_WORD Holding jump button
SMBX PC+0x1C PC+0x1C FIELD_WORD Princess hover timer
SMBX PC+0x1E PC+0x1E FIELD_WORD Unused (not cleared on level load)
SMBX PC+0x20 PC+0x20 FIELD_FLOAT Princess hover Y tremble speed
SMBX PC+0x24 PC+0x24 FIELD_WORD Princess hover Y tremble direction
Misc Content Below N/A N/A N/A
SMBX PC+0x26 PC+0x26 FIELD_WORD Ground item pull-up timer
SMBX PC+0x28 PC+0x28 FIELD_FLOAT Ground item pull-up momentum save
SMBX PC+0x2A PC+0x2A FIELD_WORD Unused (not cleared on level load)
Climbing Content Below N/A N/A N/A
SMBX PC+0x2C PC+0x2C FIELD_WORD Climbing related
SMBX PC+0x30 PC+0x30 FIELD_WORD Climbing related
SMBX PC+0x32 PC+0x32 FIELD_WORD Climbing related
Water Content Below N/A N/A N/A
SMBX PC+0x34 PC+0x34 FIELD_WORD 2 when in water or quicksand; can be used to force the player into an underwater state
SMBX PC+0x35 PC+0x35 FIELD_WORD -256 when in water or quicksand (flag only)
SMBX PC+0x36 PC+0x36 FIELD_WORD 0 if not underwater, -1 or 0xFFFF if underwater
SMBX PC+0x38 PC+0x38 FIELD_WORD Water stroke timer (can't stroke again until 0)
Misc Content Below N/A N/A N/A
SMBX PC+0x3A PC+0x3A FIELD_WORD Unknown hover timer
SMBX PC+0x3C PC+0x3C FIELD_WORD Is sliding
SMBX PC+0x3E PC+0x3E FIELD_WORD Is generating sliding smoke puffs
SMBX PC+0x40 PC+0x40 FIELD_WORD Climbing state (3 climbing, 2 pushed up against edge of climbable area)
SMBX PC+0x42 PC+0x42 FIELD_WORD Unknown timer42
SMBX PC+0x44 PC+0x44 FIELD_WORD Flag for riding a rainbow shell
SMBX PC+0x46 PC+0x46 FIELD_WORD Unknown46 (powerup pickup related)
SMBX PC+0x48 PC+0x48 FIELD_WORD Slope modifier
Tanooki Suit Content Below N/A N/A N/A
SMBX PC+0x4A PC+0x4A FIELD_WORD Tanooki suit statue flag
SMBX PC+0x4C PC+0x4C FIELD_WORD Statue transform cooldown frame timer
SMBX PC+0x4E PC+0x4E FIELD_WORD Frames spent as statue
Spin jump Content Below N/A N/A N/A
SMBX PC+0x50 PC+0x50 FIELD_WORD Spinjump flag (-1 true)
SMBX PC+0x52 PC+0x52 FIELD_WORD Spinjump state counter
SMBX PC+0x54 PC+0x54 FIELD_WORD Spinjump land direction (will face this direction when landing)
State Content Below N/A N/A N/A
SMBX PC+0x56 PC+0x56 FIELD_WORD Current enemy kill combo count
SMBX PC+0x57 PC+0x57 FIELD_WORD Counts up as long as the player is generating smoke puffs
SMBX PC+0x58 PC+0x58 FIELD_WORD Ground sliding smoke puffs state
SMBX PC+0x5A PC+0x5A FIELD_WORD Index/id of intersecting warp entrance
SMBX PC+0x60 PC+0x60 FIELD_WORD Has jumped
Unknown Content Below N/A N/A N/A
SMBX PC+0x62 PC+0x62 FIELD_WORD Unknown62
Mount Content Below N/A N/A N/A
SMBX PC+0x64 PC+0x64 FIELD_WORD Yoshi has earthquake(yellow shell)(-1 if true)
SMBX PC+0x66 PC+0x66 FIELD_WORD Yoshi has flight (blue shell)(-1 if true)
SMBX PC+0x68 PC+0x68 FIELD_WORD Yoshi has fire breath (red shell)(-1 if true)
SMBX PC+0x7A PC+0x7A FIELD_WORD Yoshi's animation frame (0-6 is left, 7-13 is right)
SMBX PC+0x7C PC+0x7C FIELD_WORD Yoshi animation frame timer (rapidly increments from 0 to 31, freezes in the air, resets to 0 when pressing down; probably used to to move body and head with the animation)
SMBX PC+0x7E PC+0x7E FIELD_WORD Mount upper X offset
SMBX PC+0x80 PC+0x80 FIELD_WORD Mount upper Y offset
SMBX PC+0x82 PC+0x82 FIELD_WORD Mount upper GFX index
SMBX PC+0x84 PC+0x84 FIELD_WORD Mount item in mouth swallow timer
SMBX PC+0x86 PC+0x86 FIELD_WORD Mount lower X offset
SMBX PC+0x88 PC+0x88 FIELD_WORD Mount upper Y offset (related to yoshi tongue)
SMBX PC+0x8A PC+0x8A FIELD_WORD Mount lower GFX index
SMBX PC+0x8C PC+0x8C FIELD_WORD Unknown82
SMBX PC+0x8E PC+0x8E FIELD_WORD Unknown82
SMBX PC+0x90 PC+0x90 FIELD_WORD Tongue X position
SMBX PC+0x98 PC+0x98 FIELD_WORD Tongue Y position
SMBX PC+0xA0 PC+0xA0 FIELD_WORD Tongue height or hitbox related
SMBX PC+0xA8 PC+0xA8 FIELD_WORD Tongue height or hitbox related
Position Content Below N/A N/A N/A
SMBX PC+0xC0 PC+0xC0 FIELD_DFLOAT Player X position (absolute coordinates within level)
SMBX PC+0xC8 PC+0xC8 FIELD_DFLOAT Player Y position (absolute coordinates within level)
SMBX PC+0xD0 PC+0xD0 FIELD_DFLOAT Player height or hitbox related
SMBX PC+0xD8 PC+0xD8 FIELD_DFLOAT Player width or hitbox related
SMBX PC+0xE0 PC+0xE0 FIELD_WORD Player X speed
SMBX PC+0xE8 PC+0xE8 FIELD_WORD Player Y speed
SMBX PC+0xF0 PC+0xF0 FIELD_WORD Player identity index (0 nothing! don't use, 1 demo, 2 iris, 3 princess, 5 sheath)
Input Content Below N/A N/A N/A
SMBX PC+0xF2 PC+0xF2 FIELD_WORD U key pressing
SMBX PC+0xF4 PC+0xF4 FIELD_WORD D key pressing
SMBX PC+0xF6 PC+0xF6 FIELD_WORD L key pressing
SMBX PC+0xF8 PC+0xF8 FIELD_WORD R key pressing
SMBX PC+0xFA PC+0xFA FIELD_WORD J key pressing
SMBX PC+0xFC PC+0xFC FIELD_WORD SJ key pressing
SMBX PC+0xFE PC+0xFE FIELD_WORD X key pressing
SMBX PC+0x100 PC+0x100 FIELD_WORD RN key pressing
SMBX PC+0x102 PC+0x102 FIELD_WORD SEL key pressing
SMBX PC+0x104 PC+0x104 FIELD_WORD STR key pressing
SMBX PC+0x106 PC+0x106 FIELD_WORD Direction faced (-1 left)
Mount Content Below N/A N/A N/A
SMBX PC+0x108 PC+0x108 FIELD_WORD Mount identity (0 no mount,1 boot, 2 clowncar, 3 yoshi)
SMBX PC+0x10A PC+0x10A FIELD_WORD Mount color
SMBX PC+0x10C PC+0x10C FIELD_WORD Mount state
SMBX PC+0x10E PC+0x10E FIELD_WORD Mount sprite Y offset
SMBX PC+0x110 PC+0x110 FIELD_WORD Mount gfx index
State Content Below N/A N/A N/A
SMBX PC+0x112 PC+0x112 FIELD_WORD Current powerup
SMBX PC+0x114 PC+0x114 FIELD_WORD Current player sprite index being displayed. Chart for values
SMBX PC+0x116 PC+0x116 FIELD_WORD Unused
SMBX PC+0x118 PC+0x118 FIELD_FLOAT X momentum assumption (used when determining how to draw the sprite)
SMBX PC+0x11C PC+0x11C FIELD_WORD Current upward jumping force (2 byte integer representation)
SMBX PC+0x11E PC+0x11E FIELD_WORD Holding jump button (-1 is Can Jump. 1 is Can't Jump)
SMBX PC+0x120 PC+0x120 FIELD_WORD Holding spinjump button
SMBX PC+0x122 PC+0x122 FIELD_WORD Forced animation state. (1 is powerup, 2 is powerdown, 3 is entering pipe, 4 is getting fire flower, 5 is getting leaf, 6 is Respawning (After death occurs in 2-player. Careful with this one), 7 is entering door, 8 is invisible/immobile/intangible state (during fairy or character change poof), 11 is getting tanooki suit, 12 is getting hammer suit, 41 is getting ice flower, 500 is tanooki statue poof state). BE CAREFUL WHEN SETTING THESE VALUES. SMBX will sometimes crash depending on which values are set or if certain values are set at the same time as others.
SMBX PC+0x124 PC+0x124 FIELD_DFLOAT Forced animation timer
SMBX PC+0x12C PC+0x12C FIELD_WORD Down button mirror (redundant?)
SMBX PC+0x12E PC+0x12E FIELD_WORD In ducking state
SMBX PC+0x130 PC+0x130 FIELD_WORD Select button mirror (redundant?)
SMBX PC+0x132 PC+0x132 FIELD_WORD Triggered to -1 when the collected-powerup invincibility animation ends.
SMBX PC+0x134 PC+0x134 FIELD_WORD Down button pressed this frame (reset next frame)
SMBX PC+0x136 PC+0x136 FIELD_WORD Unknown136
SMBX PC+0x138 PC+0x138 FIELD_FLOAT X momentum push (eg. pushed by a bully)
SMBX PC+0x13C PC+0x13C FIELD_WORD Player death state
SMBX PC+0x13E PC+0x13E FIELD_WORD Player death animation timer
SMBX PC+0x140 PC+0x140 FIELD_WORD Powerup blinking timer (Decrements from 50 (powerup) or 150 (hurt) back to 0, player is invulnerable when this is nonzero)
SMBX PC+0x142 PC+0x142 FIELD_WORD Powerup blinking state (flickers between 0 and -1)
SMBX PC+0x144 PC+0x144 FIELD_WORD Unknown144
Layer Content Below N/A N/A N/A
SMBX PC+0x146 PC+0x146 FIELD_WORD Bottom state (0 not on the ground or standing on sprite, 2 foot contact with a solid layer)
SMBX PC+0x148 PC+0x148 FIELD_WORD Left state (0 no left contact, 1 half or pushed back by a solid layer, 2 pushing against layer)
SMBX PC+0x14A PC+0x14A FIELD_WORD Top state (0 no top contact, 1 half or pushed back by a solid layer, 2 pushing against layer)
SMBX PC+0x14C PC+0x14C FIELD_WORD Right state (0 no right contact, 1 half or pushed back by a solid layer, 2 pushing against layer)
SMBX PC+0x14E PC+0x14E FIELD_WORD Pushed by a moving layer (0 not pushed by any, 2 being pushed to the left or right)
SMBX PC+0x150 PC+0x150 FIELD_WORD Unused150
SMBX PC+0x152 PC+0x152 FIELD_WORD Unused152
Misc Content Below N/A N/A N/A
SMBX PC+0x154 PC+0x154 FIELD_WORD Index of sprite being held (index to a specific sprite object that was generated only, -1 can't carry anything)
SMBX PC+0x156 PC+0x156 FIELD_WORD
SMBX PC+0x158 PC+0x158 FIELD_WORD Powerup box contents (0 no item)
Section Content Below N/A N/A N/A
SMBX PC+0x15A PC+0x15A FIELD_WORD Current section
SMBX PC+0x15C PC+0x15C FIELD_WORD Warp cooldown timer (can't warp / pipe until 0)
SMBX PC+0x15E PC+0x15E FIELD_WORD Target warp exit index/id (not reset after finished warping)
Projectile Content Below N/A N/A N/A
SMBX PC+0x160 PC+0x160 FIELD_WORD Projectile timer (fireballs, hammers, link slash..)
SMBX PC+0x162 PC+0x162 FIELD_WORD Projectile timer 2 (link projectiles)
SMBX PC+0x164 PC+0x164 FIELD_WORD Tail swipe timer
SMBX PC+0x166 PC+0x166 FIELD_WORD Unknown166
Flight Content Below N/A N/A N/A
SMBX PC+0x168 PC+0x168 FIELD_FLOAT Run speed aggregate until flight achieveable
SMBX PC+0x16C PC+0x16C FIELD_WORD Can fly
SMBX PC+0x16E PC+0x16E FIELD_WORD Is flying
SMBX PC+0x170 PC+0x170 FIELD_WORD Flight time remaining
SMBX PC+0x172 PC+0x172 FIELD_WORD Holding flight run button
SMBX PC+0x174 PC+0x174 FIELD_WORD Holding flight button
Misc Content Below N/A N/A N/A
SMBX PC+0x176 PC+0x176 FIELD_WORD Index of sprite being stood on (stores the index into the NPC array + 1. 0 when not standing on an NPC)
SMBX PC+0x178 PC+0x178 FIELD_WORD Unknown X momentum with sprites
SMBX PC+0x17A PC+0x17A FIELD_WORD Usually forced to -1
Unused Content Below N/A N/A N/A
SMBX PC+0x17C PC+0x17C FIELD_WORD Unused17C
SMBX PC+0x17E PC+0x17E FIELD_WORD Unused17E
SMBX PC+0x180 PC+0x180 FIELD_WORD Unused180
SMBX PC+0x182 PC+0x182 FIELD_WORD Unused182
SMBX PC+0x184 PC+0x184 FIELD_WORD Unused184