Rivals of Aether

Rivals of Aether

Qua Mario
Floral qua Floral  [developer] 16 Nov, 2021 @ 10:26am
Compat for Devs: Movetypes
Movetypes are the larger, more complex equivalent to Floortypes. They affect Mario's physics on the ground (there are also aerial movetypes, but there's currently no way to access those - message me on Discord if you want to add one to your character and I'll cook up the compat code for you!). It's fairly easy to apply one of Mario's own movetypes to him, and with a bit more effort it's also possible to make your own custom movetypes and apply them to him. If you have an article whose surface is meant to be ice, you could add some code like this to your article:
with(oPlayer) { if(url == 2656419045 && place_meeting(x, y - 1, other)) { override_movetype = "ice"; } }
That's all there is to it! Mario resets this value automatically, so there's no need to worry about doing that for him. The list of available movetypes is:
  • "normal": This is the default movetype, it's how Mario behaves on standard ground.
  • "puddle": This movetype is used for Orcane's puddle. Most of Mario's stats are the same, but when he's in the skid animation he'll have a harder time slowing down.
  • "ice": This movetype is used for Etalus's ice, and for any object frozen by the Ice Flower. It causes Mario to have much more difficulty accelerating, and also makes him perform a pirouette jump if he jumps while moving. This locks him out of his Triple Jump! It also allows him to duck repeatedly to build up speed exponentially, which is a reference to a well-known glitch in 3D World.
  • "grass": This improves values relating to Mario's acceleration and deceleration, but doesn't change his maximum speed at all.
  • "starman": This dramatically improves Mario's acceleration and maximum speed. It also replaces his jump with a flashy somersault, which can give him incredible height - although it does lock him out of midair twirls. I wonder what this is doing in here, hmm...?
  • "superheavy": This reduces Mario's acceleration, and absolutely wrecks his deceleration. It doesn't have any effect on his top speeds, though. I wonder what this is doing in here, hmm...?
  • "agent4_ink": This heavily reduces Mario's maximum speed, but improves his traction. If you're curious about why it exists, read the description for the "agent4_ink" floortype in the Floortypes thread.

For Advanced Users
Much like floortypes, movetypes are nothing more than a struct. You can make your own movetype and apply it to Mario by simply setting his override_movetype variable to the struct, rather than to a string. An exact copy of Mario's default movetype would look like so:
quamario_default_movetype = { name: "Normal", floortype: undefined, neutral_deaccel: 0.13, ducking_deaccel: 0.225, //Walking values walk_accel: 0.25, walk_speed: 3.4, walk_against_momentum_accel: 0.23, overwalk_speed_reduction: 0.1, //Running values run_accel: 0.22, run_speed: 8.5, run_from_standstill_accel: 0.35, run_against_momentum_accel: 0.36, overrun_speed_reduction: 0.1, skid_deaccel: 0.43, skid_frames: 6, skid_threshold: 3.4, //Extras special_run_animstate: "walk", sliding_deaccel: false, triplejump_threshold: 6.2 }
  • name: The name of the movetype. If this is missing, it WILL cause errors. If it's set to "Ice", Mario will perform pirouette jumps and gain speed when he ducks. If this is "Starman", Mario will perform somersault jumps.
  • floortype: The floortype associated with this movetype. If set to undefined, Mario will use whatever floortype is associated with the stage (or any overrides, such as from a custom floorzone). Strings are not accepted here, this must be either a valid floorzone struct or the keyword undefined.
  • neutral_deaccel: The amount of speed Mario loses per frame when he isn't holding any direction on the stick.
  • ducking_deaccel: The amount of speed Mario loses per frame when he's ducking.
Walking values: These values are used when Mario isn't holding the Run button. This means they go completely unused when Mario is carrying something, as releasing Run makes him kick/throw/drop whatever he's carrying.
  • walk_accel: The amount of speed Mario gains per frame when walking.
  • walk_speed: Mario's maximum speed. He won't accelerate above this speed on his own, however it's not a hard cap - Mario's speed won't be snapped down to it immediately if he's pushed to move faster, or his speed is otherwise made to be above this value.
  • walk_against_momentum_accel: The amount of speed Mario loses per frame when the stick is being held in the direction opposite his current momentum.
  • overwalk_speed_reduction: The amount of speed Mario loses per frame when he's moving faster than his maximum walking speed, and the stick is being held in the same direction as his momentum (i.e. he's "trying" to keep his speed). The most common cause for this is when Mario lets go of the Run button while running. It should be kept fairly low, since otherwise Mario will lose a lot of speed if he lets go of Run momentarily to throw a fireball or use a tail attack.
Running values: These values are used when Mario is holding the Run button. The Skidding values are here as well, as skidding is impossible without holding Run.
  • run_accel: The amount of speed Mario gains per frame when running, if he is already moving faster than his maximum walking speed (uses the value from walk_speed).
  • run_speed: Mario's maximum speed. He won't accelerate above this speed on his own, however it's not a hard cap - Mario's speed won't be snapped down to it immediately if he's pushed to move faster, or his speed is otherwise made to be above this value.
  • run_from_standstill_accel: The amount of speed Mario gains per frame when running, when his speed is below his maximum walking speed (uses the value from walk_speed).
  • run_against_momentum_accel: The amount of speed Mario loses per frame when the stick is pointed in the opposite direction of his momentum. This is used if his speed is too low to initiate a Skid, or if he's carrying an object, since he can't skid while carrying something.
  • overrun_speed_reduction: The amount of speed Mario loses per frame when he's moving faster than his maximum running speed, and the stick is being held in the same direction as his momentum (i.e. he's "trying" to keep his speed). This can happen after he lands from a particularly fast Long Jump, or if he lands after receiving high horizontal knockback. Ideally this shouldn't be too high, especially on Adventure Mode stages, since it's fun to be able to keep a ton of momentum.
  • skid_deaccel: The amount of speed Mario loses per frame when he's skidding to a stop. This is impossible when he's carrying something.
  • skid_frames: The number of frames Mario will remain stationary after he finishes skidding. During this time, pressing the Jump button will perform a Sideflip. If this is 1, then a Sideflip becomes frame-perfect (but of course it can be buffered). If it's 0, then Sideflipping becomes impossible. If it's very high, then Mario will be motionless for quite a while after a Skid.
  • skid_threshold: The minimum amount of speed Mario must have to begin skidding. Specifically, he needs to have at least this much speed, be holding the Run button, and tilt the control stick in the direction opposite his current momentum. Skidding is necessary to perform a Sideflip, so if this is high then Mario will need to build up more speed before he can Sideflip. The ice movetype has a fairly high skid_threshold for this purpose. If it's too low, though, it can get annoying, since Mario will have to wait through the skid_frames every time he turns around.
Extra values:
  • special_run_animstate: This changes what animation Mario will use when he's using either his run_against_momentum_accel or run_from_standstill_accel values. On most movetypes, this is just "walk", however on the Ice movetype it's instead "ice_scuttle". Mario's "ice_scuttle" animation just plays a faster version of his normal walk animation, to give the impression that he's trying desperately to get some traction. This value might be removed at some point.
  • sliding_deaccel: This is a boolean, not actually a deaccelerated number. If true, Mario will use the idle animation and play skidding sounds when he's using his neutral_deaccel value. If false, Mario will instead just use his walking animation. This is only set to true on the Ice movetype. This value might be removed at some point.
  • triplejump_threshold: The minimum speed Mario needs to perform a Triple Jump. If this is set to a negative number, then Mario can do Triple Jumps in place, like when he has the Wing Cap. If this value is increased, performing a Triple Jump will be harder. In the Agent Four Ink movetype, this value is unchanged, but his maximum speeds are decreased so far that it becomes extremely difficult for Mario to get enough speed for a Triple Jump.
That's all there is to it!
Last edited by Floral qua Floral; 16 Nov, 2021 @ 10:28am