309
edits
Icecream17 (talk | contribs) (there's more) |
Icecream17 (talk | contribs) (typo) |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
|image= | |image= | ||
|official name= | |official name= | ||
|hex= | |hex= 0x04000440 | ||
|flags= | |flags= moving, allow first person | ||
|group= Moving | |group= Moving | ||
|id= | |id= 0x040 | ||
|into=common moving cancels: [[Water Plunge]], [[Shockwave Bounce]], [[Squished]], [[Standing Death]], [[Quicksand Death]], non-cancel: [[Begin Sliding]], [[Standing against Wall]], [[Breaking]], [[Decelerating]], | |into=common moving cancels: [[Water Plunge]], [[Shockwave Bounce]], [[Squished]], [[Standing Death]], [[Quicksand Death]], non-cancel: [[Begin Sliding]], [[Standing against Wall]], [[Breaking]], [[Decelerating]], (jumps: [[Hold Quicksand Jump Land]], [[Quicksand Jump Land]], [[Steep Jump]], [[Jump]], [[Double Jump]], [[Flying Triple Jump]], [[Triple Jump]]), [[Dive]], [[Move Punching]], [[Turning Around]], [[Crouch Slide]], [[Freefall]], [[Ledge Climb Down]] | ||
|out of= | |out of= (common idle cancels: [[Idle]], [[Start Sleeping]], [[Decelerating]], [[Coughing]], [[In Quicksand]], [[Panting]]), (common action exit: [[Standing Against Wall]], [[Braking Stop]], [[Butt Slide Stop]], [[Jump Land Stop]], [[Double Jump Land Stop]], [[Sideflip Land Stop]], [[Freefall Land Stop]], [[Triple Jump Land Stop]], [[Backflip Land Stop]], [[Lava Boost Land]], [[Long Jump Land Stop]], [[Ledge Climb Slow]], [[Punching]], [[Braking]]), [[Move Punching]], [[Reading Automatic Dialog]], [[Unlocking Key Door]], all underwater actions (is a common cancel) | ||
|animation= | |animation= | ||
|related= | |related= | ||
| Line 14: | Line 14: | ||
[[File:Walking.svg|alt=A velocity/time graph of Mario's speed during the first 45 frames (1.5 seconds) of walking|thumb|Mario's speed during the first 45 frames (1.5 seconds) of walking. Note that this depends on the floor's slope (see [[De facto speed]]).]] | [[File:Walking.svg|alt=A velocity/time graph of Mario's speed during the first 45 frames (1.5 seconds) of walking|thumb|Mario's speed during the first 45 frames (1.5 seconds) of walking. Note that this depends on the floor's slope (see [[De facto speed]]).]] | ||
The '''walking''' action occurs when Mario is moving only by using the analog stick. It can also occur when exiting water (except if exiting water through a [[water jump]]). | The '''walking''' action occurs when Mario is moving only by using the analog stick. It can also occur when exiting water (except if exiting water through a [[water jump]]). | ||
== Interactions == | |||
Mario can interact with [[Door|doors]] when [[Walking]] or [[Decelerating]]. | |||
Mario can talk (with signs or NPCs) while [[Idle]] or [[Walking]]. | |||
Mario can walk into (and so interact with) caps and koopa shells. | |||
== Transition in == | |||
Before even the common cancels or behavior, when transitioning into this action: | |||
# If the floor is not very slippery, and Mario's forward velocity is from [0 to min(intendedMag, 8)) | |||
## Set forward velocity to min(intendedMag, 8) | |||
# Set walking pitch to 0 | |||
== Common moving cancels == | == Common moving cancels == | ||
All actions in the "moving" group check the following cancels before running any behavior script: | All actions in the "moving" group check the following cancels before running any behavior script: | ||
| Line 21: | Line 36: | ||
# If Mario's current action does not have the "invulnerable" flag, and health < 0x100, dropheldobject stopridingobject [[Standing Death]] | # If Mario's current action does not have the "invulnerable" flag, and health < 0x100, dropheldobject stopridingobject [[Standing Death]] | ||
# [[Idle#quicksand death|Potentially cancel into Quicksand Death]] (sinkingSpeed = 0.25) | # [[Idle#quicksand death|Potentially cancel into Quicksand Death]] (sinkingSpeed = 0.25) | ||
== Set jump from landing == | |||
# If quicksand depth > 11, if Mario is holding an object, [[Hold Quicksand Jump Land]] else [[Quicksand Jump Land]] | |||
# If on steep floor, update forwardVelocity and facing direction, [[Steep Jump]] | |||
# Else: | |||
## If double jump timer is 0, or squish timer is not 0, [[Jump]] | |||
## Else if the previous action is: | |||
### [[Jump Land]], [[Freefall Land]], or [[Side Flip Land Stop]]: [[Double Jump]] | |||
### [[Double Jump Land]]; then | |||
#### if has wing cap: [[Flying Triple Jump]] | |||
#### if forward velocity > 20: [[Triple Jump]] | |||
#### [[Jump]] | |||
### else: [[Jump]] | |||
# Set double jump timer to 0 | |||
== Behavior == | == Behavior == | ||
When walking<ref>https://github.com/n64decomp/sm64/blob/master/src/game/mario_actions_moving.c#L777</ref>: | When walking<ref>https://github.com/n64decomp/sm64/blob/master/src/game/mario_actions_moving.c#L777</ref>: | ||
| Line 30: | Line 61: | ||
##if forwardVel >= 16 and m->floor->normal.y >= 0.17364818; [[Braking]] | ##if forwardVel >= 16 and m->floor->normal.y >= 0.17364818; [[Braking]] | ||
##else; [[Decelerating]] | ##else; [[Decelerating]] | ||
#if INPUT_A_PRESSED; | #if INPUT_A_PRESSED; [[#Set jump from landing]]<ref>https://github.com/n64decomp/sm64/blob/1372ae1bb7cbedc03df366393188f4f05dcfc422/src/game/mario.c#L1018 set_jump_from_landing</ref> | ||
#if INPUT_B_PRESSED; | #if INPUT_B_PRESSED; | ||
##if forwardVel >= 29 and stickMag > 48; yVel=20; [[Dive]] | ##if forwardVel >= 29 and stickMag > 48; yVel=20; [[Dive]] | ||
| Line 44: | Line 75: | ||
#check_ledge_climb_down (can transition to [[Ledge Climb Down]]) | #check_ledge_climb_down (can transition to [[Ledge Climb Down]]) | ||
#tilt_body_walking | #tilt_body_walking | ||
Here's what update_walking_speed is for convenience:<syntaxhighlight lang="c"> | Here's what update_walking_speed is for convenience:<syntaxhighlight lang="c"> | ||
void update_walking_speed(struct MarioState *m) { | void update_walking_speed(struct MarioState *m) { | ||
edits