Idle

From Ukikipedia
Revision as of 19:56, 2 June 2023 by Icecream17 (talk | contribs) (Add animation and related from https://ukikipedia.net/wiki/Template:Action_infobox which is hopefully correct)
Jump to navigation Jump to search
Idle
Properties
Hex 0x0C400201
Action Flags Stationary, Idle, Allow First Person, Pause Exit
Action Group Stationary
ID 0x001
Transitions
Into Water Plunge, Squished, Standing Death, Quicksand Death, In Quicksand, Coughing, Panting, Freefall, Shockwave Bounce, Hold Quicksand Jump Land, Quicksand Jump Land, Steep Jump, Jump, Begin Sliding, First Person Action, Walking, Punching, Start Crouching, Shivering, Start Sleeping
Other
Animation 0xC3, 0xC4, 0xC5
Related Actions
Related Panting, Standing Against Wall, Coughing, Shivering

Idle is the action where Mario stands still, turning his head left to right while not moving.

Behavior

Certain things here are more explained on their individual pages. If something lacks detail, check the link for more information.

Before performing the action, stationary cancels are checked.

When performing the Idle action, the following happens:

  1. If Mario has sunk more than 30 units into quicksand, his action is set to in quicksand.
  2. If Mario is in poison gas, his action is set to coughing.
  3. If Mario is not against a wall and has low health, his action is set to the panting action.
  4. check_common_idle_cancels
  5. If Mario's animation has just ended, his head has turned 10 times, and there is ground behind him (that is not an object)
    1. If Mario is in a cold environment, he starts to shiver, else he goes into the start sleeping action.
  6. If Mario is against a wall, Mario has his animation changed to be standing against the wall. Otherwise, Mario's animation is set depending on which way he is turning his head.

Stationary cancels

A variety of "cancels" are checked prior to actually performing any stationary action. These checks are as follows:[1]

  1. Water - If Mario's height is lower than 100 units below the water height:
    • The camera preset is updated.
    • Mario's forward velocity is divided by 4.
    • Mario's y velocity is divided by 2.
    • Mario's height is set to 100 units below the water height.
    • Mario's action is set to water plunge.
  2. Squish - If Mario is supposed to be squished:
    • The camera preset is updated.
    • Mario's action is set to squished.
  3. If the action is not the unused 0x0E action (always true) and Mario has less than 0x100 health:
    • The camera preset is updated.
    • Mario's action is changed to standing death.
  4. Lastly, Mario can interact with quicksand on a quicksand floor. This only cancels if Mario's action is set to quicksand death.
    • Nothing happens if Mario is riding on a shell (though of course, riding a shell isn't a stationary action).
    • If Mario's floor isn't quicksand, the quicksand depth is set to 0, and nothing happens.
    • Else:
      • If Mario's quicksand depth is less than 1.1, it is set to 1.1
      • Mario's quicksand depth is increased by 0.5
      • If Mario's floor type is SURFACE_SHALLOW_QUICKSAND, SURFACE_SHALLOW_MOVING_QUICKSAND, or (SURFACE_QUICKSAND or SURFACE_MOVING_QUICKSAND), then his quicksand depth is capped to at most 10, 25, and 60 units respectively.
      • If (Mario's floor type is SURFACE_DEEP_QUICKSAND or SURFACE_DEEP_MOVING_QUICKSAND, and his quicksand depth is at least 160) or (Mario's floor type is SURFACE_INSTANT_QUICKSAND or SURFACE_INSTANT_MOVING_QUICKSAND):

The processing goes:

  1. Somehow, m->action is set to a stationary action.
  2. Right before executing the action, stationary cancels are checked.
  3. The action is executed.

Technically, m->action was set to the stationary action. So although the action doesn't really do anything, there is still a "transition" between such stationary action and Water Plunge, Squished, Standing Death, or Quicksand Death. So invariably, for all stationary actions, the infobox contains those 4 actions under "Transitions > Into" first (see top right of page if you don't know what I'm talking about).

check_common_idle_cancels

Note: This is used only in Idle, Start Sleeping, Coughing, In Quicksand, and Panting.

  1. If Mario is on a steep cliff, he is pushed off (into freefall).
  2. If Mario is hit by a shockwave, his action is set to the shockwave bounce action.
  3. If A is pressed, his action is set to a jumping action:
    1. If Mario's quicksand depth is at least 11, then if Mario's holding an object, his action is set to Hold Quicksand Jump Land, else Quicksand Jump Land.
    2. If Mario's floor is steep, his action is set to Steep Jump, else Jump.
  4. If Mario is off the floor, Mario's action is set to freefall.
  5. If Mario is above a slide, he begins sliding.
  6. If Mario goes into first-person mode, his action is set to first person.
  7. If the joystick is held in a direction, Mario's action is set to walking.
  8. If B is pressed, Mario's action is set to punching.
  9. If Z is pressed, Mario's action is set to start crouching.[2]