SMBX NPC AI

From Moondust Wiki
Revision as of 15:14, 25 February 2015 by Kevsoft (talk | contribs)
Jump to navigation Jump to search

SMBX stores its AI values in special fields in the SMBX struct.

Para-Goomba (ID: 3)

  • 0x+F0 Increments 1 per tick, at 32 the jumps are starting and it only increments one per jump until 35.
  • 0x+F8/100/108/110 Unused

Piranha Plant (Green) (ID: 8)

  • 0x+F0 Timer
  • 0x+F8 Current AI phase (1=showing up, 2=showing, 3=hiding down, 4=hiding)
  • 0x+100/108/110 Unused

Podoboo (ID: 12)

  • 0x+F0 Timer
  • 0x+F8 Current AI phase (1=jumping up, 2=fall down)
  • 0x+100/108/110 Unused

Boom Boom (ID: 15)

  • 0x+F0 Current AI phase (0=running/walking, 1=spike mode, 2=transforming to spike mode, 3=jumping up)
  • 0x+F8 Decimal Timer
  • 0x+100/108/110 Unused

Bill Blaster (ID: 21)

  • 0x+F0 Timer: Increments 1 per tick, at 200 one bullet bill is fired unless the player is over or underneath the blaster.
  • 0x+F8/100/108/110 Unused

Billy Gun (ID: 22)

  • 0x+F0 Timer: Increments 10 per tick when the player is holding the billy gun, at 200 one bullet bill is fired.
  • 0x+F8/100/108/110 Unused

Ninji (Violet) (ID: 25)

  • 0x+F0 Timer: When touching the ground then a timer decrements from 5 to 0. When the value is back to 0 then the ninji is jumping again.
  • 0x+F8/100/108/110 Unused

Cheep-Cheep (Red) (ID: 28)

  • 0x+F0 The selected Cheep-Cheep AI (From 0...)
  • 0x+F8 Unknown
  • 0x+100 Unknown
  • 0x+108 0 = Swim up, 1 = Swin down
  • 0x+110 Unused

Hammer Bros. (ID: 29)

  • 0x+F0 Timer: Direction Timer, if <0 then moving left, else moving right. Will reset about ~100 ticks (unknown)
  • 0x+F8 Timer: Increments 1 per tick (while not shooting), if reaches 250 then super-jump is executed ==> Timer resets to 0
  • 0x+100 Unknown
  • 0x+108/110 Unused

Super Leaf (ID: 34)

  • 0x+F0 Timer: From 1 to 6. Controls the "swing"-effect for correct speed. When the value 6 is reached the direction of this swing is switched.
  • 0x+F8/100/108/110 Unused

Thwomp (ID: 37)

  • 0x+F0 Current AI phase (0=idle, 1=going down, 2=staying down, 3=going up)
  • 0x+F8 Timer: For state 2 => from 0 to 100; When hit value 100 then state is switched to 3.
  • 0x+100/108/110 Unused

Boo (ID: 38)

  • 0x+F0 Current AI phase (0=idle, 1=following player)
  • 0x+F8/100/108/110 Unused

SMB3 Bowser

  • 0x+F0 Resets to 9 when starting to jump high and decrements 1 per tick. Not sure but may start arcing after it hits 0
  • 0x+F8 Increments by a seemingly random number between 0.0 and 1.0 each tick. Resets from time to time but I don't can't tell exactly why.
  • 0x+100 Increments by 1 per tick. Sometimes it gets reset to 0, but other times it gets reset to a negative number and counts back up to 0 to trigger something.
  • 0x+108 Current AI phase (2=hopping, 3=jumping high+falling, 4=shooting fireballs, 10=turning right after hitting ground, -10=turning left after hitting ground)
  • 0x+110 Other? (0=just after hitting ground, 1=other)

Brown Doughnut Block

  • 0x+F0 0=Not falling, 1=Falling
  • 0x+F8 0=Idle, 1=Wiggling or falling
  • 0x+100 Increments by 1 per tick until 30. Falls at 30.
  • 0x+108/110 Unused

Dry Bones

  • 0x+F0 0=Up walking around, 1=Collapsed
  • 0x+F8 When broken, increments by 1 per tick until 400 at which point it gets up
  • 0x+100 Alternates between 1 and 0 when wiggling (0x+F8 between 300 and 400)
  • 0x+108/110 Unused

SMW Bowser Statue

  • 0x+F0 Increments 1 per tick, resetting when it shoots
  • 0x+F8/100/108/110 Unused

Lakitu

  • 0x+F0 Thrown NPC identity
  • 0x+F8 Init to 1, set to 0 a little while after throwing
  • 0x+100 0=Haven't yet passed over player, 2=Getting ready to throw, 3=Like 0 but after having thrown before
  • 0x+108 When getting ready to throw, resets to 100 and starts decrementing. Throws once 0 again.
  • 0x+110 Always increments 1 per tick, resets to 0 after throw