Difference between revisions of "Interaction Type"

From Ukikipedia
Jump to navigation Jump to search
 
Line 74: Line 74:
 
The Hoot interaction is used by Hoot, the Owl that Mario can hold on to in Whomp's Fortress. This interaction first checks whether Mario is in a suitable state to grab the owl (fulfilled by several airborne states) and checks if the global timer has advanced more than 30 ticks since Mario last let go of Hoot. If both these conditions are met, Mario can grab onto Hoot. Note that since the global timer advances while the game is paused, it is possible to fulfill the second condition right after Mario lets go of Hoot by simply pausing the game for 30 frames. Since the Hoot interaction is the first interaction type internally, and is referenced by the Beta Boo Key and Bowser actors, it is possible that this interaction was repurposed from an earlier type of interaction that was used earlier in development.
 
The Hoot interaction is used by Hoot, the Owl that Mario can hold on to in Whomp's Fortress. This interaction first checks whether Mario is in a suitable state to grab the owl (fulfilled by several airborne states) and checks if the global timer has advanced more than 30 ticks since Mario last let go of Hoot. If both these conditions are met, Mario can grab onto Hoot. Note that since the global timer advances while the game is paused, it is possible to fulfill the second condition right after Mario lets go of Hoot by simply pausing the game for 30 frames. Since the Hoot interaction is the first interaction type internally, and is referenced by the Beta Boo Key and Bowser actors, it is possible that this interaction was repurposed from an earlier type of interaction that was used earlier in development.
 
===Grabbable===
 
===Grabbable===
The Grabbable interaction is used by objects which are grabbable, such as Bob-Ombs and Boxes. This interaction has 5 subtypes: INT_SUBTYPE_GRABS_MARIO which is used by Chuckya and King Bob-Omb and also makes the object heavy, INT_SUBTYPE_HOLDABLE_NPC which lets Mario drop the object gently with no forward velocity, INT_SUBTYPE_DROP_IMMEDIATELY which is used by grabbable NPCs that also talk to Mario so that Mario will drop them when their dialogue is finished, INT_SUBTYPE_KICKABLE for objects that can be kicked and INT_SUBTYPE_NOT_GRABBABLE which is used by Heave-Ho to prevent Mario from picking it up. For the grab to occur, Mario must not be kicking an object of subtype kickable, the object must not have the not grabbable subtype, and the able_to_grab_object condition must be met. If the object being interacted with is not Bowser, the interaction is also set to push Mario 5 units away from the object when he grabs it.
+
The Grabbable interaction is used by objects which are grabbable, such as Bob-Ombs and Boxes. This interaction has 5 subtypes: the grab Mario subtype which is used by Chuckya and King Bob-Omb and also makes the object heavy, the holdable NPC subtype which lets Mario drop the object gently with no forward velocity, the talking drop subtype which is used by grabbable NPCs that also talk to Mario so that Mario will drop them when their dialogue is finished, the kickable subtype for objects that can be kicked and the not grabbable which is used by Heave-Ho to prevent Mario from picking it up. For the grab to occur, Mario must not be kicking an object of the kickable subtype, the object must not have the not grabbable subtype, and the usual conditions for Mario to grab something must be met. If the object being interacted with is not Bowser, the interaction is also set to push Mario 5 units away from the object when he grabs it.
 
===Door===
 
===Door===
 
The Door interaction is used for doors and has a subtype used for Star Doors. When Mario interacts with a door, the game checks to make sure he is walking or decelerating before checking if he has enough stars to open it. If these conditions are met, the game initializes variables for whether to push or pull the door open and a variable for the door’s flag in the save file. If the door Mario interacts with is a regular door, then at this point Mario will either push or pull the door open. If the door Mario interacts with is a star door, a separate check is done and a different action is done for Mario to enter the star door. If the door requires stars to open, the game also runs a check for whether or not the door has been opened before in the save file. If it has not, the game runs an action where Mario uses the power of the stars to open the door. If Mario does not have the required stars, the game displays dialogue dependent on how many stars are required to open the door. In the case where the door requires 70 stars to open, the game displays dialogue and then allows Mario to open the door.
 
The Door interaction is used for doors and has a subtype used for Star Doors. When Mario interacts with a door, the game checks to make sure he is walking or decelerating before checking if he has enough stars to open it. If these conditions are met, the game initializes variables for whether to push or pull the door open and a variable for the door’s flag in the save file. If the door Mario interacts with is a regular door, then at this point Mario will either push or pull the door open. If the door Mario interacts with is a star door, a separate check is done and a different action is done for Mario to enter the star door. If the door requires stars to open, the game also runs a check for whether or not the door has been opened before in the save file. If it has not, the game runs an action where Mario uses the power of the stars to open the door. If Mario does not have the required stars, the game displays dialogue dependent on how many stars are required to open the door. In the case where the door requires 70 stars to open, the game displays dialogue and then allows Mario to open the door.
Line 84: Line 84:
 
This interaction is used for collecting coins, as the name implies. When the interaction occurs, the number of coins Mario has is increased by the value of the coin, his heal counter is increased by 4 times the value of the coin, and the coin’s interaction status is updated to mark that an interaction has occurred. If the course is a main course, the number of coins Mario has minus the value of the coin is less than 100, and Mario has at least 100 coins, the 100 coin star spawns.
 
This interaction is used for collecting coins, as the name implies. When the interaction occurs, the number of coins Mario has is increased by the value of the coin, his heal counter is increased by 4 times the value of the coin, and the coin’s interaction status is updated to mark that an interaction has occurred. If the course is a main course, the number of coins Mario has minus the value of the coin is less than 100, and Mario has at least 100 coins, the 100 coin star spawns.
 
===Cap===
 
===Cap===
This interaction is used for when Mario picks up caps. When the interaction occurs, the game gets Mario’s current cap status, and initializes two variables for the cap timer and cap music. If Mario is not currently being blown away and Mario is wearing some kind of cap already, the game sets Mario’s interactObj flag to the object and sets the object’s interaction attribute to reflect that it has been interacted with. If the object is a Vanish Cap, the cap’s timer is set to 600 and the music is set to the Wing Cap music. If the cap is a Metal Cap, the cap’s timer is set to 600 and the music is set to the Metal Cap music. If the cap is a Wing Cap, the cap’s tiomer is set to 1800 and the music is set to the Wing Cap music. If the cap timer from the cap just collected is greater than Mario’s current cap timer, Mario’s cap timer is set to the collected object’s cap timer. If Mario is idling or Mario is walking, Mario puts the cap on. Otherwise, Mario’s flags are updated to have a cap on his head directly. Then, two sounds play and if the cap music is not set to 0, the cap music plays.  
+
This interaction is used for when Mario picks up caps. When the interaction occurs, the game gets Mario’s current cap status, and initializes two variables for the cap timer and cap music. If Mario is not currently being blown away and Mario is wearing some kind of cap already, the game sets Mario’s interacted object variable to the object and sets the object’s interaction attribute to reflect that it has been interacted with. If the object is a Vanish Cap, the cap’s timer is set to 600 and the music is set to the Wing Cap music. If the cap is a Metal Cap, the cap’s timer is set to 600 and the music is set to the Metal Cap music. If the cap is a Wing Cap, the cap’s timer is set to 1800 and the music is set to the Wing Cap music. If the cap timer from the cap just collected is greater than Mario’s current cap timer, Mario’s cap timer is set to the collected object’s cap timer. If Mario is idling or Mario is walking, Mario puts the cap on. Otherwise, Mario’s flags are updated to have a cap on his head directly. Then, two sounds play and if the cap music is not set to 0, the cap music plays.  
 
===Pole===
 
===Pole===
This interaction is used for things Mario can climb i.e. poles. When the interaction occurs, the game gets Mario’s action and checks if it is a suitable action for pole climbing. If it is, the game checks if Mario is not already on a pole or if Mario’s usedObj attribute is not set to the object he is interacting with. If the condition is met, the game sets a variable that tells whether or not Mario’s forward speed is below 10, makes Mario stop riding or holding any object, set’s Mario’s interactObj and usedObj attributes to the object, sets Mario’s forward and vertical velocities to 0, and sets several attributes regarding Mario and the pole. If Mario’s speed is below 10, Mario grabs the pole slowly. Otherwise, Mario’s pole yaw velocity is set to his forward velocity times 1.4 degrees plus 22.5 degrees, his pitch is reset, and his action is set to grabbing the pole quickly.
+
This interaction is used for things Mario can climb i.e. poles. When the interaction occurs, the game gets Mario’s action and checks if it is a suitable action for pole climbing. If it is, the game checks if Mario is not already on a pole or if Mario’s used object attribute is not set to the object he is interacting with. If the condition is met, the game sets a variable that tells whether or not Mario’s forward speed is below 10, makes Mario stop riding or holding any object, set’s Mario’s interacted object and used object attributes to the object, sets Mario’s forward and vertical velocities to 0, and sets several attributes regarding Mario and the pole. If Mario’s speed is below 10, Mario grabs the pole slowly. Otherwise, Mario’s pole yaw velocity is set to his forward velocity times 1.4 degrees plus 22.5 degrees, his pitch is reset, and his action is set to grabbing the pole quickly.
 
===Koopa===
 
===Koopa===
 
Same as Bounce Top.
 
Same as Bounce Top.
 
===Spiny===
 
===Spiny===
 +
Used for the Spiny when it is walking around. When the interaction occurs, the game checks which interaction occurred between Mario and the object. If the interaction was a punch, then the object has several variables updated and Mario is bounced back. Otherwise, if the interaction would cause Mario to be knocked back and take damage, it does so. If the object has the subtype that it delays the invincibility timer, it does so.
 
===Breakable Block===
 
===Breakable Block===
 
This interaction is used for breakable objects such as boxes. When the interaction occurs, the game checks to see which interaction occurred between Mario and the object. If the interaction was an attack, the game sets the object’s interaction status to the attack and determines how Mario should bounce back from the attack. If Mario is in the air, his forward speed is set to -16 units/frame. If Mario is not in the air his forward speed is set to -48 units/frame. In the case where Mario hits the object from above, Mario is sent upwards with a Y-velocity of 30 units/frame. In the case where Mario hits the object from below, Mario’s Y-velocity is set to 0 units/frame.
 
This interaction is used for breakable objects such as boxes. When the interaction occurs, the game checks to see which interaction occurred between Mario and the object. If the interaction was an attack, the game sets the object’s interaction status to the attack and determines how Mario should bounce back from the attack. If Mario is in the air, his forward speed is set to -16 units/frame. If Mario is not in the air his forward speed is set to -48 units/frame. In the case where Mario hits the object from above, Mario is sent upwards with a Y-velocity of 30 units/frame. In the case where Mario hits the object from below, Mario’s Y-velocity is set to 0 units/frame.
Line 97: Line 98:
  
 
===Star/Key===
 
===Star/Key===
This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: NO_EXIT and GRAND_STAR. When the interaction occurs, a variable labelled StarGrabAction is set to STAR_DANCE_EXIT. Two variables are also set to check whether the object being interacted with has the NO_EXIT or GRAND_STAR subtype. If Mario’s health is at least 256, then Mario stops riding or holding any objects and then the game runs several checks to determine what animation to play. If the object is not of the type NO_EXIT, Mario’s hurt and heal counters are set to 0 and his cap timer is set to equal 1 if it is greater than 1. If the object is of the type NO_EXIT then the starGrabAction is set to STAR_DANCE_NO_EXIT. If Mario is swimming or is wearing the metal cap underwater, then starGrabAction is set to STAR_DANCE_WATER. If Mario is in the air starGrabAction is set to FALL_AFTER_STAR_GRAB. After these checks, the game spawns a smoke puff, sets the object’s InteractStatus to INTERACTED, and sets Mario’s interactObj and usedObj attributes to the object. Then, the game checks the object’s star index and updates Mario’s star count, if applicable. If the object is not of the type NO_EXIT, the level music is set to fade out. If the object is the Grand Star, Mario’s action is set to begin the Grand Star collection cutscene. Otherwise, Mario’s action is set to whatever starGrabAction was set to when the game checked each case.
+
This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: the no exit subtype and the grand star subtype. When the interaction occurs, the action Mario is to perform is set to a star dance with an exit afterwards. Two variables are also set to check whether the object being interacted with has the no exit or grand star subtype. If Mario’s health is at least 256, then Mario stops riding or holding any objects and then the game runs several checks to determine what animation to play. If the object is not of the type no exit, Mario’s hurt and heal counters are set to 0 and his cap timer is set to equal 1 if it is greater than 1. If the object is of the type no exit then the action Mario will perform is set to a star dance with no exit. If Mario is swimming or is wearing the metal cap underwater, then the action to be performed is set to the underwater star dance. If Mario is in the air the action is for Mario to fall and then do a star dance. After these checks, the game spawns a smoke puff, updates the object to reflect that it has been interacted with, and sets Mario’s interacted object and used object attributes to the object. Then, the game checks the object’s star index and updates Mario’s star count, if applicable. If the object is not of the no exit subtype, the level music is set to fade out. If the object is the Grand Star, Mario’s action is set to begin the Grand Star collection cutscene. Otherwise, Mario’s action is set to whatever action he was set to perform when the game checked each case.
 
===Warp===
 
===Warp===
 
===Cannon Base===
 
===Cannon Base===
This interaction is used for Mario entering a cannon. When the interaction occurs, the game first checks to see if Mario is not already in a cannon. If he is not, Mario stops riding or holding any objects, the object’s InteractStatus is set to INTERACTED, Mario’s InteractObj and usedObj attributes are set to the object, and Mario’s action is set so that he is in a cannon.
+
This interaction is used for Mario entering a cannon. When the interaction occurs, the game first checks to see if Mario is not already in a cannon. If he is not, Mario stops riding or holding any objects, the object is updated to reflect that it has been interacted with, Mario’s interacted object and used object attributes are set to the object, and Mario’s action is set so that he is in a cannon.
 
===Bounce Top===
 
===Bounce Top===
 
Bounce top is used for objects Mario can bounce off of such as Goombas. When an interaction between Mario and the object occurs, the game initializes a variable to store what kind of interaction occurred between Mario and the object. If Mario is wearing a metal cap, the variable is set to that of a fast attack. Otherwise, the game checks what sort of interaction occurred and sets the variable to that interaction. If the interaction is an attack, the game checks what kind of attack occurred, checks whether or not Mario should be bounced back from the attack, and then does further actions if the attack was Mario hitting the object from above. If Mario hit the object from above and the object is set to cause Mario to twirl, Mario’s vertical speed is set to 80, hit Y-position is set to be above the object’s hitbox, and his action is set to twirling. If Mario hit the object from above and the object is not set to make Mario twirl, Mario’s vertical speed is set to 30 and his Y-position is set to be above the object’s hitbox. If the interaction between Mario and the object was not an attack, then if the object is set to damage Mario and cause knockback, it does so. If the object’s interaction subtype is set to delay Mario’s invincibility timer going down while the interaction is occurring, it does so.
 
Bounce top is used for objects Mario can bounce off of such as Goombas. When an interaction between Mario and the object occurs, the game initializes a variable to store what kind of interaction occurred between Mario and the object. If Mario is wearing a metal cap, the variable is set to that of a fast attack. Otherwise, the game checks what sort of interaction occurred and sets the variable to that interaction. If the interaction is an attack, the game checks what kind of attack occurred, checks whether or not Mario should be bounced back from the attack, and then does further actions if the attack was Mario hitting the object from above. If Mario hit the object from above and the object is set to cause Mario to twirl, Mario’s vertical speed is set to 80, hit Y-position is set to be above the object’s hitbox, and his action is set to twirling. If Mario hit the object from above and the object is not set to make Mario twirl, Mario’s vertical speed is set to 30 and his Y-position is set to be above the object’s hitbox. If the interaction between Mario and the object was not an attack, then if the object is set to damage Mario and cause knockback, it does so. If the object’s interaction subtype is set to delay Mario’s invincibility timer going down while the interaction is occurring, it does so.
Line 107: Line 108:
 
This interaction is used by water rings like those spawned by the Manta Ray in Dire, Dire Docks and Air Bubbles in Dire, Dire Docks and Jolly Roger Bay. When the interaction occurs, Mario’s heal counter is increased by 4 times the object’s “coin” value and the object’s interaction status is updated to mark that an interaction has occurred.
 
This interaction is used by water rings like those spawned by the Manta Ray in Dire, Dire Docks and Air Bubbles in Dire, Dire Docks and Jolly Roger Bay. When the interaction occurs, Mario’s heal counter is increased by 4 times the object’s “coin” value and the object’s interaction status is updated to mark that an interaction has occurred.
 
===Bully===
 
===Bully===
 
+
Used for Bully enemies. When the interaction occurs, the game checks for which interaction occurred between Mario and the object. If the interaction was Mario attacking the object, then Mario is pushed 5 units away from the object, his forward velocity is set to -16 units/frame, the object’s moving angle is set to Mario’s current facing angle, and the object’s forward velocity is set to 3392 divided by the radius of the object’s hitbox. Otherwise, if Mario is not invulnerable or wearing the vanish cap, Mario’s invincibility timer is set to 2, a sound plays, and Mario is knocked back by the object.
 
===Burns===
 
===Burns===
 
Used for objects that set Mario on fire. If Mario is not invulnerable, not wearing a metal cap, not wearing a vanish cap, and not interacting with an object that delays the invincibility timer, the interaction proceeds. If Mario is swimming or if the distance between the water level at Mario’s current position and Mario’s current Y-position is greater than 50 (Mario is more than 50 units below the water level), a sound plays for putting a flame out. Otherwise, Mario’s burn timer is set to 0, the camera is updated, and a sound plays for Mario being set on fire. If Mario is in the air with a vertical speed less than or equal to 0, Mario’s action while burning is a burning fall. Otherwise, the action is a burning jump.  
 
Used for objects that set Mario on fire. If Mario is not invulnerable, not wearing a metal cap, not wearing a vanish cap, and not interacting with an object that delays the invincibility timer, the interaction proceeds. If Mario is swimming or if the distance between the water level at Mario’s current position and Mario’s current Y-position is greater than 50 (Mario is more than 50 units below the water level), a sound plays for putting a flame out. Otherwise, Mario’s burn timer is set to 0, the camera is updated, and a sound plays for Mario being set on fire. If Mario is in the air with a vertical speed less than or equal to 0, Mario’s action while burning is a burning fall. Otherwise, the action is a burning jump.  
Line 122: Line 123:
 
This interaction is used for Clams, Unagi, and Bubba and has a subtype for if the object can eat Mario. When the interaction occurs, if the interaction has the can eat Mario subtype, Mario is eaten. Otherwise if Mario is in a state to take damage and knockback, he does so. If the object has the subtype that it delays the invincibility timer, it does so.
 
This interaction is used for Clams, Unagi, and Bubba and has a subtype for if the object can eat Mario. When the interaction occurs, if the interaction has the can eat Mario subtype, Mario is eaten. Otherwise if Mario is in a state to take damage and knockback, he does so. If the object has the subtype that it delays the invincibility timer, it does so.
 
===BBH Entrance===
 
===BBH Entrance===
This interaction is used for the cage Mario jumps into to enter Big Boo’s Haunt. When the interaction occurs, first the game checks to see if Mario is already in the act of entering BBH. If he is not, Mario stops riding or holding any objects, the object’s InteractStatus is set to INTERACTED, and Mario’s InteractObj and usedObj attributes are set to the object. The game then sets Mario’s action depending on whether or not he is in the air. If Mario is in the air, Mario’s action is set so that he will spin into the BBH cage. If Mario is not in the air, his action is set so that he will jump into the BBH cage.
+
This interaction is used for the cage Mario jumps into to enter Big Boo’s Haunt. When the interaction occurs, first the game checks to see if Mario is already in the act of entering BBH. If he is not, Mario stops riding or holding any objects, the object is updated to reflect that it has been interacted with, and Mario’s interacted object and used object attributes are set to the object. The game then sets Mario’s action depending on whether or not he is in the air. If Mario is in the air, Mario’s action is set so that he will spin into the BBH cage. If Mario is not in the air, his action is set so that he will jump into the BBH cage.
 
===Snufit Bullet===
 
===Snufit Bullet===
 
===Shocks===
 
===Shocks===
 
 
===Igloo Barrier===
 
===Igloo Barrier===
This interaction is used for the Igloo Barrier object in Snowman’s Land. When the interaction occurs, the game runs a function that pushes Mario away from the object. Unusually, this interaction sets Mario’s usedObj attribute without updating his action, unlike every other interaction in the game. This has the potential to cause several glitches, but these cannot be performed in regular circumstances since the Igloo Barrier is the only object to use this interaction.
+
This interaction is used for the Igloo Barrier object in Snowman’s Land. When the interaction occurs, the game runs a function that pushes Mario away from the object. Unusually, this interaction sets Mario’s used object attribute without updating his action, unlike every other interaction in the game. This has the potential to cause several glitches, but these cannot be performed in regular circumstances since the Igloo Barrier is the only object to use this interaction.
  
 
==References==
 
==References==

Latest revision as of 03:04, 26 March 2020

An interaction type is a property that all objects have. Most objects have exactly one interaction type, but some have zero. No object may have more than one, and if one is hacked to have more than one, it will crash the game as Mario thinks that he is interacting with two different objects, each with one interaction flag, and cannot find them. Interaction types are analogous to action flags, but interaction flags are not, which can be a source of confusion.

List

Index/log2 Description Mask
00 Hoot 0x00000001
01 Grabbable 0x00000002
02 Door 0x00000004
03 Hurtbox 0x00000008
04 Coin 0x00000010
05 Cap 0x00000020
06 Pole 0x00000040
07 Koopa 0x00000080
08 Spiny 0x00000100
09 Breakable Block 0x00000200
10 Wind 0x00000400
11 Warp Door 0x00000800
12 Star/Key 0x00001000
13 Warp 0x00002000
14 Cannon Base 0x00004000
15 Bounce Top 0x00008000
16 Water Ring 0x00010000
17 Bully 0x00020000
18 Burns 0x00040000
19 Koopa Shell 0x00080000
20 (unused) 0x00100000
21 Hurtbox 2 0x00200000
22 Bounce Top/Bottom 0x00400000
23 Text 0x00800000
24 Tornado 0x01000000
25 Whirlpool 0x02000000
26 Clam/Bubba 0x04000000
27 BBH Entrance 0x08000000
28 Snufit Bullet 0x10000000
29 Shocks 0x20000000
30 Igloo Barrier 0x40000000
31 (unused) 0x80000000

Description

Hoot

The Hoot interaction is used by Hoot, the Owl that Mario can hold on to in Whomp's Fortress. This interaction first checks whether Mario is in a suitable state to grab the owl (fulfilled by several airborne states) and checks if the global timer has advanced more than 30 ticks since Mario last let go of Hoot. If both these conditions are met, Mario can grab onto Hoot. Note that since the global timer advances while the game is paused, it is possible to fulfill the second condition right after Mario lets go of Hoot by simply pausing the game for 30 frames. Since the Hoot interaction is the first interaction type internally, and is referenced by the Beta Boo Key and Bowser actors, it is possible that this interaction was repurposed from an earlier type of interaction that was used earlier in development.

Grabbable

The Grabbable interaction is used by objects which are grabbable, such as Bob-Ombs and Boxes. This interaction has 5 subtypes: the grab Mario subtype which is used by Chuckya and King Bob-Omb and also makes the object heavy, the holdable NPC subtype which lets Mario drop the object gently with no forward velocity, the talking drop subtype which is used by grabbable NPCs that also talk to Mario so that Mario will drop them when their dialogue is finished, the kickable subtype for objects that can be kicked and the not grabbable which is used by Heave-Ho to prevent Mario from picking it up. For the grab to occur, Mario must not be kicking an object of the kickable subtype, the object must not have the not grabbable subtype, and the usual conditions for Mario to grab something must be met. If the object being interacted with is not Bowser, the interaction is also set to push Mario 5 units away from the object when he grabs it.

Door

The Door interaction is used for doors and has a subtype used for Star Doors. When Mario interacts with a door, the game checks to make sure he is walking or decelerating before checking if he has enough stars to open it. If these conditions are met, the game initializes variables for whether to push or pull the door open and a variable for the door’s flag in the save file. If the door Mario interacts with is a regular door, then at this point Mario will either push or pull the door open. If the door Mario interacts with is a star door, a separate check is done and a different action is done for Mario to enter the star door. If the door requires stars to open, the game also runs a check for whether or not the door has been opened before in the save file. If it has not, the game runs an action where Mario uses the power of the stars to open the door. If Mario does not have the required stars, the game displays dialogue dependent on how many stars are required to open the door. In the case where the door requires 70 stars to open, the game displays dialogue and then allows Mario to open the door.

Hurtbox 1 & 2

Hurtbox 1 & 2 are identical with their behavior. If Mario makes contact with an object, it will simply knock him back and generally hurt him. Some examples include Chain Chomp, Mr. Blizzard, and bullet bills.

The only distinction between the two is solely based on what file they are in.

Coin

This interaction is used for collecting coins, as the name implies. When the interaction occurs, the number of coins Mario has is increased by the value of the coin, his heal counter is increased by 4 times the value of the coin, and the coin’s interaction status is updated to mark that an interaction has occurred. If the course is a main course, the number of coins Mario has minus the value of the coin is less than 100, and Mario has at least 100 coins, the 100 coin star spawns.

Cap

This interaction is used for when Mario picks up caps. When the interaction occurs, the game gets Mario’s current cap status, and initializes two variables for the cap timer and cap music. If Mario is not currently being blown away and Mario is wearing some kind of cap already, the game sets Mario’s interacted object variable to the object and sets the object’s interaction attribute to reflect that it has been interacted with. If the object is a Vanish Cap, the cap’s timer is set to 600 and the music is set to the Wing Cap music. If the cap is a Metal Cap, the cap’s timer is set to 600 and the music is set to the Metal Cap music. If the cap is a Wing Cap, the cap’s timer is set to 1800 and the music is set to the Wing Cap music. If the cap timer from the cap just collected is greater than Mario’s current cap timer, Mario’s cap timer is set to the collected object’s cap timer. If Mario is idling or Mario is walking, Mario puts the cap on. Otherwise, Mario’s flags are updated to have a cap on his head directly. Then, two sounds play and if the cap music is not set to 0, the cap music plays.

Pole

This interaction is used for things Mario can climb i.e. poles. When the interaction occurs, the game gets Mario’s action and checks if it is a suitable action for pole climbing. If it is, the game checks if Mario is not already on a pole or if Mario’s used object attribute is not set to the object he is interacting with. If the condition is met, the game sets a variable that tells whether or not Mario’s forward speed is below 10, makes Mario stop riding or holding any object, set’s Mario’s interacted object and used object attributes to the object, sets Mario’s forward and vertical velocities to 0, and sets several attributes regarding Mario and the pole. If Mario’s speed is below 10, Mario grabs the pole slowly. Otherwise, Mario’s pole yaw velocity is set to his forward velocity times 1.4 degrees plus 22.5 degrees, his pitch is reset, and his action is set to grabbing the pole quickly.

Koopa

Same as Bounce Top.

Spiny

Used for the Spiny when it is walking around. When the interaction occurs, the game checks which interaction occurred between Mario and the object. If the interaction was a punch, then the object has several variables updated and Mario is bounced back. Otherwise, if the interaction would cause Mario to be knocked back and take damage, it does so. If the object has the subtype that it delays the invincibility timer, it does so.

Breakable Block

This interaction is used for breakable objects such as boxes. When the interaction occurs, the game checks to see which interaction occurred between Mario and the object. If the interaction was an attack, the game sets the object’s interaction status to the attack and determines how Mario should bounce back from the attack. If Mario is in the air, his forward speed is set to -16 units/frame. If Mario is not in the air his forward speed is set to -48 units/frame. In the case where Mario hits the object from above, Mario is sent upwards with a Y-velocity of 30 units/frame. In the case where Mario hits the object from below, Mario’s Y-velocity is set to 0 units/frame.

Wind

Used for when Mario is blown upward by strong wind. When the interaction occurs, the game checks Mario’s action to see if he is already blowing in the wind. If he is not, then Mario stops riding or holding any objects, Mario’s facing angle is set to the wind’s movement angle plus 180 degrees, his forward velocity is set to -24 units/frame, and his vertical velocity is set to 12 units/frame. A sound also plays and the camera is updated and Mario’s action is updated to reflect that he is blowing in the wind.

Warp Door

Star/Key

This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: the no exit subtype and the grand star subtype. When the interaction occurs, the action Mario is to perform is set to a star dance with an exit afterwards. Two variables are also set to check whether the object being interacted with has the no exit or grand star subtype. If Mario’s health is at least 256, then Mario stops riding or holding any objects and then the game runs several checks to determine what animation to play. If the object is not of the type no exit, Mario’s hurt and heal counters are set to 0 and his cap timer is set to equal 1 if it is greater than 1. If the object is of the type no exit then the action Mario will perform is set to a star dance with no exit. If Mario is swimming or is wearing the metal cap underwater, then the action to be performed is set to the underwater star dance. If Mario is in the air the action is for Mario to fall and then do a star dance. After these checks, the game spawns a smoke puff, updates the object to reflect that it has been interacted with, and sets Mario’s interacted object and used object attributes to the object. Then, the game checks the object’s star index and updates Mario’s star count, if applicable. If the object is not of the no exit subtype, the level music is set to fade out. If the object is the Grand Star, Mario’s action is set to begin the Grand Star collection cutscene. Otherwise, Mario’s action is set to whatever action he was set to perform when the game checked each case.

Warp

Cannon Base

This interaction is used for Mario entering a cannon. When the interaction occurs, the game first checks to see if Mario is not already in a cannon. If he is not, Mario stops riding or holding any objects, the object is updated to reflect that it has been interacted with, Mario’s interacted object and used object attributes are set to the object, and Mario’s action is set so that he is in a cannon.

Bounce Top

Bounce top is used for objects Mario can bounce off of such as Goombas. When an interaction between Mario and the object occurs, the game initializes a variable to store what kind of interaction occurred between Mario and the object. If Mario is wearing a metal cap, the variable is set to that of a fast attack. Otherwise, the game checks what sort of interaction occurred and sets the variable to that interaction. If the interaction is an attack, the game checks what kind of attack occurred, checks whether or not Mario should be bounced back from the attack, and then does further actions if the attack was Mario hitting the object from above. If Mario hit the object from above and the object is set to cause Mario to twirl, Mario’s vertical speed is set to 80, hit Y-position is set to be above the object’s hitbox, and his action is set to twirling. If Mario hit the object from above and the object is not set to make Mario twirl, Mario’s vertical speed is set to 30 and his Y-position is set to be above the object’s hitbox. If the interaction between Mario and the object was not an attack, then if the object is set to damage Mario and cause knockback, it does so. If the object’s interaction subtype is set to delay Mario’s invincibility timer going down while the interaction is occurring, it does so.

Water Ring

This interaction is used by water rings like those spawned by the Manta Ray in Dire, Dire Docks and Air Bubbles in Dire, Dire Docks and Jolly Roger Bay. When the interaction occurs, Mario’s heal counter is increased by 4 times the object’s “coin” value and the object’s interaction status is updated to mark that an interaction has occurred.

Bully

Used for Bully enemies. When the interaction occurs, the game checks for which interaction occurred between Mario and the object. If the interaction was Mario attacking the object, then Mario is pushed 5 units away from the object, his forward velocity is set to -16 units/frame, the object’s moving angle is set to Mario’s current facing angle, and the object’s forward velocity is set to 3392 divided by the radius of the object’s hitbox. Otherwise, if Mario is not invulnerable or wearing the vanish cap, Mario’s invincibility timer is set to 2, a sound plays, and Mario is knocked back by the object.

Burns

Used for objects that set Mario on fire. If Mario is not invulnerable, not wearing a metal cap, not wearing a vanish cap, and not interacting with an object that delays the invincibility timer, the interaction proceeds. If Mario is swimming or if the distance between the water level at Mario’s current position and Mario’s current Y-position is greater than 50 (Mario is more than 50 units below the water level), a sound plays for putting a flame out. Otherwise, Mario’s burn timer is set to 0, the camera is updated, and a sound plays for Mario being set on fire. If Mario is in the air with a vertical speed less than or equal to 0, Mario’s action while burning is a burning fall. Otherwise, the action is a burning jump.

Koopa Shell

This interaction is used for the Koopa Shell Mario can ride. When the interaction occurs, first the game checks whether or not Mario is already riding a shell. If he is not, the game runs a function to determine what interaction occurred between Mario and the object. If the interaction with the object is Mario hitting it from above, or if Mario’s action is set to walking, Mario’s interactObj, usedObj, and riddenObj attritubes are set to the object, the game updates Mario’s sound and camera to reflect him riding the shell, the shell music begins, Mario drops any held objects, and Mario’s action is set to riding the shell.

Bounce Top/Bottom

Text

This interaction is used for objects that display text when Mario interacts with them. When the interaction occurs, the game determines which interaction subtype it is. If the interaction has the sign subtype, the game returns a function for Mario to read the sign. If the interaction subtype is the NPC subtype, the game returns a function for Mario to talk to the NPC. Otherwise, the game pushes Mario 2 units away from the object.

Tornado

This interaction is used for the tornadoes in Shifting Sand Land. When the interaction occurs, the game checks to see if Mario is in the tornado twirling action or is squished. If Mario is not in either of this states, Mario stops riding anything or holding anything if he is doing either of those things, his forward velocity is set to 0, a sound effect plays and Mario’s action is set to the tornado twirling action.

Whirlpool

This interaction is used for the Whirlpool in Dire, Dire Docks. When the interaction occurs, the game checks if Mario is already in the caught in whirlpool action. If Mario is not, Mario stops riding any object or holding any object if he is doing either of those things. Then, Mario’s forward velocity is set to 0, a sound effect plays, and Mario’s action is set to the caught in whirlpool action.

Clam/Bubba

This interaction is used for Clams, Unagi, and Bubba and has a subtype for if the object can eat Mario. When the interaction occurs, if the interaction has the can eat Mario subtype, Mario is eaten. Otherwise if Mario is in a state to take damage and knockback, he does so. If the object has the subtype that it delays the invincibility timer, it does so.

BBH Entrance

This interaction is used for the cage Mario jumps into to enter Big Boo’s Haunt. When the interaction occurs, first the game checks to see if Mario is already in the act of entering BBH. If he is not, Mario stops riding or holding any objects, the object is updated to reflect that it has been interacted with, and Mario’s interacted object and used object attributes are set to the object. The game then sets Mario’s action depending on whether or not he is in the air. If Mario is in the air, Mario’s action is set so that he will spin into the BBH cage. If Mario is not in the air, his action is set so that he will jump into the BBH cage.

Snufit Bullet

Shocks

Igloo Barrier

This interaction is used for the Igloo Barrier object in Snowman’s Land. When the interaction occurs, the game runs a function that pushes Mario away from the object. Unusually, this interaction sets Mario’s used object attribute without updating his action, unlike every other interaction in the game. This has the potential to cause several glitches, but these cannot be performed in regular circumstances since the Igloo Barrier is the only object to use this interaction.

References

Decomp File