From ba0e5364bb12e9f60fb162e4fdbda59b4380908c Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 7 Jul 2023 22:01:02 -0500 Subject: [PATCH] Major restructuring and bug fixes. Moved a lot of things around, fixed a lot of bugs, made the animations and sounds public. Special thanks to CuckyDev for helping me track down all the small problems that were lingering, and for fixing a major issue with the simulation rate. There's still some stuff to fix and improve, but now this should be more portable and useable by the wider community! :tada: Co-Authored-By: Regan Green --- README.md | 6 +- aftman.toml | 2 +- {sm64 => client}/Enums/Action/Flags.lua | 0 {sm64 => client}/Enums/Action/Groups.lua | 0 {sm64 => client}/Enums/Action/init.lua | 0 {sm64 => client}/Enums/Buttons.lua | 0 {sm64 => client}/Enums/FloorType.lua | 0 {sm64 => client}/Enums/InputFlags.lua | 0 {sm64 => client}/Enums/Mario/Cap.lua | 0 {sm64 => client}/Enums/Mario/Eyes.lua | 0 {sm64 => client}/Enums/Mario/Flags.lua | 0 {sm64 => client}/Enums/Mario/Hands.lua | 0 {sm64 => client}/Enums/Mario/Input.lua | 0 {sm64 => client}/Enums/ModelFlags.lua | 0 {sm64 => client}/Enums/ParticleFlags.lua | 0 {sm64 => client}/Enums/Steps/Air.lua | 0 {sm64 => client}/Enums/Steps/Ground.lua | 0 {sm64 => client}/Enums/Steps/Water.lua | 0 {sm64 => client}/Enums/SurfaceClass.lua | 0 {sm64 => client}/Enums/TerrainType.lua | 0 {sm64 => client}/Enums/init.lua | 0 client/Mario/Airborne/init.client.lua | 1303 +++++++ client/Mario/Airborne/init.meta.json | 6 + .../Mario/Automatic/init.client.lua | 0 client/Mario/Automatic/init.meta.json | 6 + client/Mario/Moving/init.client.lua | 1495 ++++++++ client/Mario/Moving/init.meta.json | 6 + .../Mario/Stationary/init.client.lua | 20 +- client/Mario/Stationary/init.meta.json | 6 + {sm64 => client}/Mario/init.lua | 86 +- {sm64 => client}/Types/Flags.lua | 0 {sm64 => client}/Types/init.lua | 7 +- {sm64 => client}/Util/init.lua | 53 +- {sm64 => client}/Util/init.meta.json | 0 {sm64 => client}/init.client.lua | 377 +- client/init.meta.json | 5 + default.project.json | 57 +- {rbx => server}/LazyNetworking.server.lua | 20 +- .../Appearance/init.meta.json | 5 + .../Appearance/init.server.lua | 12 +- .../StarterCharacter/HumanoidRootPart.rbxmx | 44 - .../StarterCharacter/init.server.lua | 32 +- shared/Animations.model.json | 3040 +++++++++++++++++ shared/README.md | 3 + shared/Sounds.model.json | 773 +++++ shared/init.lua | 320 ++ sm64/Animations.lua | 229 -- sm64/Assets/Animations.rbxmx | 1229 ------- sm64/Assets/README.md | 11 - sm64/Assets/Sounds.rbxmx | 501 --- sm64/Sounds.lua | 96 - 51 files changed, 7377 insertions(+), 2373 deletions(-) rename {sm64 => client}/Enums/Action/Flags.lua (100%) rename {sm64 => client}/Enums/Action/Groups.lua (100%) rename {sm64 => client}/Enums/Action/init.lua (100%) rename {sm64 => client}/Enums/Buttons.lua (100%) rename {sm64 => client}/Enums/FloorType.lua (100%) rename {sm64 => client}/Enums/InputFlags.lua (100%) rename {sm64 => client}/Enums/Mario/Cap.lua (100%) rename {sm64 => client}/Enums/Mario/Eyes.lua (100%) rename {sm64 => client}/Enums/Mario/Flags.lua (100%) rename {sm64 => client}/Enums/Mario/Hands.lua (100%) rename {sm64 => client}/Enums/Mario/Input.lua (100%) rename {sm64 => client}/Enums/ModelFlags.lua (100%) rename {sm64 => client}/Enums/ParticleFlags.lua (100%) rename {sm64 => client}/Enums/Steps/Air.lua (100%) rename {sm64 => client}/Enums/Steps/Ground.lua (100%) rename {sm64 => client}/Enums/Steps/Water.lua (100%) rename {sm64 => client}/Enums/SurfaceClass.lua (100%) rename {sm64 => client}/Enums/TerrainType.lua (100%) rename {sm64 => client}/Enums/init.lua (100%) create mode 100644 client/Mario/Airborne/init.client.lua create mode 100644 client/Mario/Airborne/init.meta.json rename sm64/Mario/Automatic.client.lua => client/Mario/Automatic/init.client.lua (100%) create mode 100644 client/Mario/Automatic/init.meta.json create mode 100644 client/Mario/Moving/init.client.lua create mode 100644 client/Mario/Moving/init.meta.json rename sm64/Mario/Stationary.client.lua => client/Mario/Stationary/init.client.lua (97%) create mode 100644 client/Mario/Stationary/init.meta.json rename {sm64 => client}/Mario/init.lua (95%) rename {sm64 => client}/Types/Flags.lua (100%) rename {sm64 => client}/Types/init.lua (95%) rename {sm64 => client}/Util/init.lua (81%) rename {sm64 => client}/Util/init.meta.json (100%) rename {sm64 => client}/init.client.lua (62%) create mode 100644 client/init.meta.json rename {rbx => server}/LazyNetworking.server.lua (75%) create mode 100644 server/StarterCharacter/Appearance/init.meta.json rename rbx/Appearance.server.lua => server/StarterCharacter/Appearance/init.server.lua (89%) rename {rbx => server}/StarterCharacter/HumanoidRootPart.rbxmx (85%) rename {rbx => server}/StarterCharacter/init.server.lua (63%) create mode 100644 shared/Animations.model.json create mode 100644 shared/README.md create mode 100644 shared/Sounds.model.json create mode 100644 shared/init.lua delete mode 100644 sm64/Animations.lua delete mode 100644 sm64/Assets/Animations.rbxmx delete mode 100644 sm64/Assets/README.md delete mode 100644 sm64/Assets/Sounds.rbxmx delete mode 100644 sm64/Sounds.lua diff --git a/README.md b/README.md index f583cb9..717cd45 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A port of Super Mario 64's movement code into Roblox Luau (in `--!strict` mode), hosted as a [rojo](https://rojo.space) project. Based on the SM64 decompilation project hosted at: https://github.com/n64decomp/sm64 -I wanted to make this public as a curiousity for anyone who wanted to know how I pulled it off. It **does not include any animations, sounds, or assets from Nintendo**. I do provide some of the scripts I used when I originally ported animations from the SM64 ROM into R15 Roblox avatars, but any future public version of this project from me will use commissioned assets that I have permission to use. +I wanted to make this public as a curiousity for anyone who wanted to know how I pulled it off. It **does not include any animations, sounds, or assets from Nintendo**. I do provide some of the scripts I used when I originally ported animations from the SM64 ROM into R15 Roblox avatars, but they are no longer in use. Original game is hosted here:
https://www.roblox.com/games/10238956318/funny-64-bit-platformer @@ -14,6 +14,4 @@ Any bugs or behavioral quirks of the physics in this are intentional and will no ## Terms of Use -You *may* use this in your game **as long as you provide credit** to me and the SM64 Decompilation Project. I would **NOT** advise using it as a foundation for a platformer since it's very rigidly tied to the 30hz physics simulation code of Super Mario 64. It's weirdly programmed and not very intuitive to build off of. - -No animations or sounds are provided by default, so you'll have to substitute those appropriately. It's not a trivial task. +You *may* use this in your game, **but you must provide credit** to this repository and the SM64 Decompilation Project. I would **NOT** advise using it as a foundation for a platformer since it's very rigidly tied to the 30hz physics simulation code of Super Mario 64. It's weirdly programmed and not very intuitive to build off of. \ No newline at end of file diff --git a/aftman.toml b/aftman.toml index 3775946..4e8ee8a 100644 --- a/aftman.toml +++ b/aftman.toml @@ -1,2 +1,2 @@ [tools] -rojo = "rojo-rbx/rojo@7.2.1" \ No newline at end of file +rojo = "rojo-rbx/rojo@7.3.0" \ No newline at end of file diff --git a/sm64/Enums/Action/Flags.lua b/client/Enums/Action/Flags.lua similarity index 100% rename from sm64/Enums/Action/Flags.lua rename to client/Enums/Action/Flags.lua diff --git a/sm64/Enums/Action/Groups.lua b/client/Enums/Action/Groups.lua similarity index 100% rename from sm64/Enums/Action/Groups.lua rename to client/Enums/Action/Groups.lua diff --git a/sm64/Enums/Action/init.lua b/client/Enums/Action/init.lua similarity index 100% rename from sm64/Enums/Action/init.lua rename to client/Enums/Action/init.lua diff --git a/sm64/Enums/Buttons.lua b/client/Enums/Buttons.lua similarity index 100% rename from sm64/Enums/Buttons.lua rename to client/Enums/Buttons.lua diff --git a/sm64/Enums/FloorType.lua b/client/Enums/FloorType.lua similarity index 100% rename from sm64/Enums/FloorType.lua rename to client/Enums/FloorType.lua diff --git a/sm64/Enums/InputFlags.lua b/client/Enums/InputFlags.lua similarity index 100% rename from sm64/Enums/InputFlags.lua rename to client/Enums/InputFlags.lua diff --git a/sm64/Enums/Mario/Cap.lua b/client/Enums/Mario/Cap.lua similarity index 100% rename from sm64/Enums/Mario/Cap.lua rename to client/Enums/Mario/Cap.lua diff --git a/sm64/Enums/Mario/Eyes.lua b/client/Enums/Mario/Eyes.lua similarity index 100% rename from sm64/Enums/Mario/Eyes.lua rename to client/Enums/Mario/Eyes.lua diff --git a/sm64/Enums/Mario/Flags.lua b/client/Enums/Mario/Flags.lua similarity index 100% rename from sm64/Enums/Mario/Flags.lua rename to client/Enums/Mario/Flags.lua diff --git a/sm64/Enums/Mario/Hands.lua b/client/Enums/Mario/Hands.lua similarity index 100% rename from sm64/Enums/Mario/Hands.lua rename to client/Enums/Mario/Hands.lua diff --git a/sm64/Enums/Mario/Input.lua b/client/Enums/Mario/Input.lua similarity index 100% rename from sm64/Enums/Mario/Input.lua rename to client/Enums/Mario/Input.lua diff --git a/sm64/Enums/ModelFlags.lua b/client/Enums/ModelFlags.lua similarity index 100% rename from sm64/Enums/ModelFlags.lua rename to client/Enums/ModelFlags.lua diff --git a/sm64/Enums/ParticleFlags.lua b/client/Enums/ParticleFlags.lua similarity index 100% rename from sm64/Enums/ParticleFlags.lua rename to client/Enums/ParticleFlags.lua diff --git a/sm64/Enums/Steps/Air.lua b/client/Enums/Steps/Air.lua similarity index 100% rename from sm64/Enums/Steps/Air.lua rename to client/Enums/Steps/Air.lua diff --git a/sm64/Enums/Steps/Ground.lua b/client/Enums/Steps/Ground.lua similarity index 100% rename from sm64/Enums/Steps/Ground.lua rename to client/Enums/Steps/Ground.lua diff --git a/sm64/Enums/Steps/Water.lua b/client/Enums/Steps/Water.lua similarity index 100% rename from sm64/Enums/Steps/Water.lua rename to client/Enums/Steps/Water.lua diff --git a/sm64/Enums/SurfaceClass.lua b/client/Enums/SurfaceClass.lua similarity index 100% rename from sm64/Enums/SurfaceClass.lua rename to client/Enums/SurfaceClass.lua diff --git a/sm64/Enums/TerrainType.lua b/client/Enums/TerrainType.lua similarity index 100% rename from sm64/Enums/TerrainType.lua rename to client/Enums/TerrainType.lua diff --git a/sm64/Enums/init.lua b/client/Enums/init.lua similarity index 100% rename from sm64/Enums/init.lua rename to client/Enums/init.lua diff --git a/client/Mario/Airborne/init.client.lua b/client/Mario/Airborne/init.client.lua new file mode 100644 index 0000000..1897d0e --- /dev/null +++ b/client/Mario/Airborne/init.client.lua @@ -0,0 +1,1303 @@ +--!strict + +local System = require(script.Parent) +local Animations = System.Animations +local Sounds = System.Sounds +local Enums = System.Enums +local Util = System.Util + +local Action = Enums.Action +local ActionFlags = Enums.ActionFlags + +local AirStep = Enums.AirStep +local MarioEyes = Enums.MarioEyes +local InputFlags = Enums.InputFlags +local MarioFlags = Enums.MarioFlags +local ParticleFlags = Enums.ParticleFlags + +type Mario = System.Mario + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Helpers +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +local function stopRising(m: Mario) + if m.Velocity.Y > 0 then + m.Velocity *= Vector3.new(1, 0, 1) + end +end + +local function playFlipSounds(m: Mario, frame1: number, frame2: number, frame3: number) + local animFrame = m.AnimFrame + + if animFrame == frame1 or animFrame == frame2 or animFrame == frame3 then + m:PlaySound(Sounds.ACTION_SPIN) + end +end + +local function playFarFallSound(m: Mario) + if m.Flags:Has(MarioFlags.FALLING_FAR) then + return + end + + local action = m.Action + + if action() == Action.TWIRLING then + return + end + + if action() == Action.FLYING then + return + end + + if action:Has(ActionFlags.INVULNERABLE) then + return + end + + if m.PeakHeight - m.Position.Y > 1150 then + m:PlaySound(Sounds.MARIO_WAAAOOOW) + m.Flags:Add(MarioFlags.FALLING_FAR) + end +end + +local function playKnockbackSound(m: Mario) + if m.ActionArg == 0 and math.abs(m.ForwardVel) >= 28 then + m:PlaySoundIfNoFlag(Sounds.MARIO_DOH, MarioFlags.MARIO_SOUND_PLAYED) + else + m:PlaySoundIfNoFlag(Sounds.MARIO_UH, MarioFlags.MARIO_SOUND_PLAYED) + end +end + +local function lavaBoostOnWall(m: Mario) + local wall = m.Wall + + if wall then + local angle = Util.Atan2s(wall.Normal.Z, wall.Normal.X) + m.FaceAngle = Util.SetYint16(m.FaceAngle, angle) + end + + if m.ForwardVel < 24 then + m.ForwardVel = 24 + end + + if not m.Flags:Has(MarioFlags.METAL_CAP) then + m.HurtCounter += if m.Flags:Has(MarioFlags.CAP_ON_HEAD) then 12 else 18 + end + + m:PlaySound(Sounds.MARIO_ON_FIRE) + m:SetAction(Action.LAVA_BOOST, 1) +end + +local function checkFallDamage(m: Mario, hardFallAction: number): boolean + local fallHeight = m.PeakHeight - m.Position.Y + local damageHeight = 1150 + + if m.Action() == Action.TWIRLING then + return false + end + + if m.Velocity.Y < -55 and fallHeight > 3000 then + m.HurtCounter += if m.Flags:Has(MarioFlags.CAP_ON_HEAD) then 16 else 24 + m:PlaySound(Sounds.MARIO_ATTACKED) + m:SetAction(hardFallAction, 4) + elseif fallHeight > damageHeight and not m:FloorIsSlippery() then + m.HurtCounter += if m.Flags:Has(MarioFlags.CAP_ON_HEAD) then 8 else 12 + m:PlaySound(Sounds.MARIO_ATTACKED) + m.SquishTimer = 30 + end + + return false +end + +local function checkKickOrDiveInAir(m: Mario): boolean + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(if m.ForwardVel > 28 then Action.DIVE else Action.JUMP_KICK) + end + + return false +end + +local function updateAirWithTurn(m: Mario) + local dragThreshold = if m.Action() == Action.LONG_JUMP then 48 else 32 + m.ForwardVel = Util.ApproachFloat(m.ForwardVel, 0, 0.35) + + if m.Input:Has(InputFlags.NONZERO_ANALOG) then + local intendedDYaw = m.IntendedYaw - m.FaceAngle.Y + local intendedMag = m.IntendedMag / 32 + + m.ForwardVel += 1.5 * Util.Coss(intendedDYaw) * intendedMag + m.FaceAngle += Vector3int16.new(0, 512 * Util.Sins(intendedDYaw) * intendedMag, 0) + end + + if m.ForwardVel > dragThreshold then + m.ForwardVel -= 1 + end + + if m.ForwardVel < -16 then + m.ForwardVel += 2 + end + + m.SlideVelX = m.ForwardVel * Util.Sins(m.FaceAngle.Y) + m.SlideVelZ = m.ForwardVel * Util.Coss(m.FaceAngle.Y) + m.Velocity = Vector3.new(m.SlideVelX, m.Velocity.Y, m.SlideVelZ) +end + +local function updateAirWithoutTurn(m: Mario) + local dragThreshold = 32 + + if m.Action() == Action.LONG_JUMP then + dragThreshold = 48 + end + + local sidewaysSpeed = 0 + m.ForwardVel = Util.ApproachFloat(m.ForwardVel, 0, 0.35) + + if m.Input:Has(InputFlags.NONZERO_ANALOG) then + local intendedDYaw = m.IntendedYaw - m.FaceAngle.Y + local intendedMag = m.IntendedMag / 32 + + m.ForwardVel += intendedMag * Util.Coss(intendedDYaw) * 1.5 + sidewaysSpeed = intendedMag * Util.Sins(intendedDYaw) * 10 + end + + --! Uncapped air speed. Net positive when moving forward. + if m.ForwardVel > dragThreshold then + m.ForwardVel -= 1 + end + + if m.ForwardVel < -16 then + m.ForwardVel += 2 + end + + m.SlideVelX = m.ForwardVel * Util.Sins(m.FaceAngle.Y) + m.SlideVelZ = m.ForwardVel * Util.Coss(m.FaceAngle.Y) + + m.SlideVelX += sidewaysSpeed * Util.Sins(m.FaceAngle.Y + 0x4000) + m.SlideVelZ += sidewaysSpeed * Util.Coss(m.FaceAngle.Y + 0x4000) + + m.Velocity = Vector3.new(m.SlideVelX, m.Velocity.Y, m.SlideVelZ) +end + +local function updateLavaBoostOrTwirling(m: Mario) + if m.Input:Has(InputFlags.NONZERO_ANALOG) then + local intendedDYaw = m.IntendedYaw - m.FaceAngle.Y + local intendedMag = m.IntendedMag / 32 + + m.ForwardVel += Util.Coss(intendedDYaw) * intendedMag + m.FaceAngle += Vector3int16.new(0, Util.Sins(intendedDYaw) * intendedMag * 1024, 0) + + if m.ForwardVel < 0 then + m.FaceAngle += Vector3int16.new(0, 0x8000, 0) + m.ForwardVel *= -1 + end + + if m.ForwardVel > 32 then + m.ForwardVel -= 2 + end + end + + m.SlideVelX = m.ForwardVel * Util.Sins(m.FaceAngle.Y) + m.SlideVelZ = m.ForwardVel * Util.Coss(m.FaceAngle.Y) + + m.Velocity = Vector3.new(m.SlideVelX, m.Velocity.Y, m.SlideVelZ) +end + +local function updateFlyingYaw(m: Mario) + local targetYawVel = -Util.SignedShort(m.Controller.StickX * (m.ForwardVel / 4)) + + if targetYawVel > 0 then + if m.AngleVel.Y < 0 then + m.AngleVel += Vector3int16.new(0, 0x40, 0) + + if m.AngleVel.Y > 0x10 then + m.AngleVel = Util.SetYint16(m.AngleVel, 0x10) + end + else + local y = Util.ApproachInt(m.AngleVel.Y, targetYawVel, 0x10, 0x20) + m.AngleVel = Util.SetYint16(m.AngleVel, y) + end + elseif targetYawVel < 0 then + if m.AngleVel.Y > 0 then + m.AngleVel -= Vector3int16.new(0, 0x40, 0) + + if m.AngleVel.Y < -0x10 then + m.AngleVel = Util.SetYint16(m.AngleVel, -0x10) + end + else + local y = Util.ApproachInt(m.AngleVel.Y, targetYawVel, 0x20, 0x10) + m.AngleVel = Util.SetYint16(m.AngleVel, y) + end + else + local y = Util.ApproachInt(m.AngleVel.Y, 0, 0x40) + m.AngleVel = Util.SetYint16(m.AngleVel, y) + end + + m.FaceAngle += Vector3int16.new(0, m.AngleVel.Y, 0) + m.FaceAngle = Util.SetZint16(m.FaceAngle, 20 * -m.AngleVel.Y) +end + +local function updateFlyingPitch(m: Mario) + local targetPitchVel = -Util.SignedShort(m.Controller.StickY * (m.ForwardVel / 5)) + + if targetPitchVel > 0 then + if m.AngleVel.X < 0 then + m.AngleVel += Vector3int16.new(0x40, 0, 0) + + if m.AngleVel.X > 0x20 then + m.AngleVel = Util.SetXint16(m.AngleVel, 0x20) + end + else + local x = Util.ApproachInt(m.AngleVel.X, targetPitchVel, 0x20, 0x40) + m.AngleVel = Util.SetXint16(m.AngleVel, x) + end + elseif targetPitchVel < 0 then + if m.AngleVel.X > 0 then + m.AngleVel -= Vector3int16.new(0x40, 0, 0) + + if m.AngleVel.X < -0x20 then + m.AngleVel = Util.SetXint16(m.AngleVel, -0x20) + end + else + local x = Util.ApproachInt(m.AngleVel.X, targetPitchVel, 0x40, 0x20) + m.AngleVel = Util.SetXint16(m.AngleVel, x) + end + else + local x = Util.ApproachInt(m.AngleVel.X, 0, 0x40) + m.AngleVel = Util.SetXint16(m.AngleVel, x) + end +end + +local function updateFlying(m: Mario) + updateFlyingPitch(m) + updateFlyingYaw(m) + + m.ForwardVel -= 2 * (m.FaceAngle.X / 0x4000) + 0.1 + m.ForwardVel -= 0.5 * (1 - Util.Coss(m.AngleVel.Y)) + + if m.ForwardVel < 0 then + m.ForwardVel = 0 + end + + if m.ForwardVel > 16 then + m.FaceAngle += Vector3int16.new((m.ForwardVel - 32) * 6, 0, 0) + elseif m.ForwardVel > 4 then + m.FaceAngle += Vector3int16.new((m.ForwardVel - 32) * 10, 0, 0) + else + m.FaceAngle -= Vector3int16.new(0x400, 0, 0) + end + + m.FaceAngle += Vector3int16.new(m.AngleVel.X, 0, 0) + + if m.FaceAngle.X > 0x2AAA then + m.FaceAngle = Util.SetXint16(m.FaceAngle, 0x2AAA) + end + + if m.FaceAngle.X < -0x2AAA then + m.FaceAngle = Util.SetXint16(m.FaceAngle, -0x2AAA) + end + + local velX = Util.Coss(m.FaceAngle.X) * Util.Sins(m.FaceAngle.Y) + m.SlideVelX = m.ForwardVel * velX + + local velZ = Util.Coss(m.FaceAngle.X) * Util.Coss(m.FaceAngle.Y) + m.SlideVelZ = m.ForwardVel * velZ + + local velY = Util.Sins(m.FaceAngle.X) + m.Velocity = m.ForwardVel * Vector3.new(velX, velY, velZ) +end + +local function commonAirActionStep(m: Mario, landAction: number, anim: Animation, stepArg: number): number + local stepResult + do + updateAirWithoutTurn(m) + stepResult = m:PerformAirStep(stepArg) + end + + if stepResult == AirStep.NONE then + m:SetAnimation(anim) + elseif stepResult == AirStep.LANDED then + if not checkFallDamage(m, Action.HARD_BACKWARD_GROUND_KB) then + m:SetAction(landAction) + end + elseif stepResult == AirStep.HIT_WALL then + m:SetAnimation(anim) + + if m.ForwardVel > 16 then + m:BonkReflection() + m.FaceAngle += Vector3int16.new(0, 0x8000, 0) + + if m.Wall then + m:SetAction(Action.AIR_HIT_WALL) + else + stopRising(m) + + if m.ForwardVel >= 38 then + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_AIR_KB) + else + if m.ForwardVel > 8 then + m:SetForwardVel(-8) + end + + m:SetAction(Action.SOFT_BONK) + end + end + else + m:SetForwardVel(0) + end + elseif stepResult == AirStep.GRABBED_LEDGE then + m:SetAnimation(Animations.IDLE_ON_LEDGE) + m:SetAction(Action.LEDGE_GRAB) + elseif stepResult == AirStep.GRABBED_CEILING then + m:SetAction(Action.START_HANGING) + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + return stepResult +end + +local function commonRolloutStep(m: Mario, anim: Animation) + local stepResult + + if m.ActionState == 0 then + m.Velocity = Util.SetY(m.Velocity, 30) + m.ActionState = 1 + end + + m:PlaySound(Sounds.ACTION_TERRAIN_JUMP) + updateAirWithoutTurn(m) + + stepResult = m:PerformAirStep() + + if stepResult == AirStep.NONE then + if m.ActionState == 1 then + if m:SetAnimation(anim) == 4 then + m:PlaySound(Sounds.ACTION_SPIN) + end + else + m:SetAnimation(Animations.GENERAL_FALL) + end + elseif stepResult == AirStep.LANDED then + m:SetAction(Action.FREEFALL_LAND_STOP) + m:PlayLandingSound() + elseif stepResult == AirStep.HIT_WALL then + m:SetForwardVel(0) + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + if m.ActionState == 1 and m:IsAnimPastEnd() then + m.ActionState = 2 + end +end + +local function commonAirKnockbackStep( + m: Mario, + landAction: number, + hardFallAction: number, + anim: Animation, + speed: number +) + local stepResult + do + m:SetForwardVel(speed) + stepResult = m:PerformAirStep() + end + + if stepResult == AirStep.NONE then + m:SetAnimation(anim) + elseif stepResult == AirStep.LANDED then + if not checkFallDamage(m, hardFallAction) then + local action = m.Action() + + if action == Action.THROWN_FORWARD or action == Action.THROWN_BACKWARD then + m:SetAction(landAction, m.HurtCounter) + else + m:SetAction(landAction, m.ActionArg) + end + end + elseif stepResult == AirStep.HIT_WALL then + m:SetAnimation(Animations.BACKWARD_AIR_KB) + m:BonkReflection() + + stopRising(m) + m:SetForwardVel(-speed) + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + return stepResult +end + +local function checkWallKick(m: Mario) + if m.WallKickTimer ~= 0 then + if m.Input:Has(InputFlags.A_PRESSED) then + if m.PrevAction() == Action.AIR_HIT_WALL then + m.FaceAngle += Vector3int16.new(0, 0x8000, 0) + end + end + end + + return false +end + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Actions +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +local AIR_STEP_CHECK_BOTH = bit32.bor(AirStep.CHECK_LEDGE_GRAB, AirStep.CHECK_HANG) +local DEF_ACTION: (number, (Mario) -> boolean) -> () = System.RegisterAction + +DEF_ACTION(Action.JUMP, function(m: Mario) + if checkKickOrDiveInAir(m) then + return true + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP) + commonAirActionStep(m, Action.JUMP_LAND, Animations.SINGLE_JUMP, AIR_STEP_CHECK_BOTH) + + return false +end) + +DEF_ACTION(Action.DOUBLE_JUMP, function(m: Mario) + local anim = if m.Velocity.Y >= 0 then Animations.DOUBLE_JUMP_RISE else Animations.DOUBLE_JUMP_FALL + + if checkKickOrDiveInAir(m) then + return true + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP, Sounds.MARIO_HOOHOO) + commonAirActionStep(m, Action.DOUBLE_JUMP_LAND, anim, AIR_STEP_CHECK_BOTH) + + return false +end) + +DEF_ACTION(Action.TRIPLE_JUMP, function(m: Mario) + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.DIVE) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP) + commonAirActionStep(m, Action.TRIPLE_JUMP_LAND, Animations.TRIPLE_JUMP, 0) + + playFlipSounds(m, 2, 8, 20) + return false +end) + +DEF_ACTION(Action.BACKFLIP, function(m: Mario) + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP, Sounds.MARIO_YAH_WAH_HOO) + commonAirActionStep(m, Action.BACKFLIP_LAND, Animations.BACKFLIP, 0) + + playFlipSounds(m, 2, 3, 17) + return false +end) + +DEF_ACTION(Action.FREEFALL, function(m: Mario) + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.DIVE) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + local anim + + if m.ActionArg == 0 then + anim = Animations.GENERAL_FALL + elseif m.ActionArg == 1 then + anim = Animations.FALL_FROM_SLIDE + elseif m.ActionArg == 2 then + anim = Animations.FALL_FROM_SLIDE_KICK + end + + commonAirActionStep(m, Action.FREEFALL_LAND, anim, AirStep.CHECK_LEDGE_GRAB) + return false +end) + +DEF_ACTION(Action.SIDE_FLIP, function(m: Mario) + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.DIVE, 0) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP) + commonAirActionStep(m, Action.SIDE_FLIP_LAND, Animations.SLIDEFLIP, AirStep.CHECK_LEDGE_GRAB) + + if m.AnimFrame == 6 then + m:PlaySound(Sounds.ACTION_SIDE_FLIP) + end + + return false +end) + +DEF_ACTION(Action.WALL_KICK_AIR, function(m: Mario) + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.DIVE) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayJumpSound() + commonAirActionStep(m, Action.JUMP_LAND, Animations.SLIDEJUMP, AirStep.CHECK_LEDGE_GRAB) + + return false +end) + +DEF_ACTION(Action.LONG_JUMP, function(m: Mario) + local anim = if m.LongJumpIsSlow then Animations.SLOW_LONGJUMP else Animations.FAST_LONGJUMP + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP, Sounds.MARIO_YAHOO) + commonAirActionStep(m, Action.LONG_JUMP_LAND, anim, AirStep.CHECK_LEDGE_GRAB) + + return false +end) + +DEF_ACTION(Action.TWIRLING, function(m: Mario) + local startTwirlYaw = m.TwirlYaw + local yawVelTarget = 0x1000 + + if m.Input:Has(InputFlags.A_DOWN) then + yawVelTarget = 0x2000 + end + + local yVel = Util.ApproachInt(m.AngleVel.Y, yawVelTarget, 0x200) + m.AngleVel = Util.SetYint16(m.AngleVel, yVel) + m.TwirlYaw += yVel + + m:SetAnimation(if m.ActionArg == 0 then Animations.START_TWIRL else Animations.TWIRL) + + if m:IsAnimPastEnd() then + m.ActionArg = 1 + end + + if startTwirlYaw > m.TwirlYaw then + m:PlaySound(Sounds.ACTION_TWIRL) + end + + local step = m:PerformAirStep() + + if step == AirStep.LANDED then + m:SetAction(Action.TWIRL_LAND) + elseif step == AirStep.HIT_WALL then + m:BonkReflection(false) + elseif step == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + m.GfxAngle += Vector3int16.new(0, m.TwirlYaw, 0) + return false +end) + +DEF_ACTION(Action.DIVE, function(m: Mario) + local airStep + + if m.ActionArg == 0 then + m:PlayMarioSound(Sounds.ACTION_THROW, Sounds.MARIO_HOOHOO) + else + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP) + end + + m:SetAnimation(Animations.DIVE) + updateAirWithoutTurn(m) + airStep = m:PerformAirStep() + + if airStep == AirStep.NONE then + if m.Velocity.Y < 0 and m.FaceAngle.X > -0x2AAA then + m.FaceAngle -= Vector3int16.new(0x200, 0, 0) + + if m.FaceAngle.X < -0x2AAA then + m.FaceAngle = Util.SetXint16(m.FaceAngle, -0x2AAA) + end + end + + m.GfxAngle = Util.SetXint16(m.GfxAngle, -m.FaceAngle.X) + elseif airStep == AirStep.LANDED then + if not checkFallDamage(m, Action.HARD_FORWARD_GROUND_KB) then + m:SetAction(Action.DIVE_SLIDE) + end + + m.FaceAngle *= Vector3int16.new(0, 1, 1) + elseif airStep == AirStep.HIT_WALL then + m:BonkReflection(true) + m.FaceAngle *= Vector3int16.new(0, 1, 1) + + stopRising(m) + + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_AIR_KB) + elseif airStep == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + return false +end) + +DEF_ACTION(Action.STEEP_JUMP, function(m: Mario) + local airStep + + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.DIVE) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP) + m:SetForwardVel(0.98 * m.ForwardVel) + airStep = m:PerformAirStep() + + if airStep == AirStep.LANDED then + if not checkFallDamage(m, Action.HARD_BACKWARD_GROUND_KB) then + m.FaceAngle *= Vector3int16.new(0, 1, 1) + m:SetAction(if m.ForwardVel < 0 then Action.BEGIN_SLIDING else Action.JUMP_LAND) + end + elseif airStep == AirStep.HIT_WALL then + m:SetForwardVel(0) + elseif airStep == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + m:SetAnimation(Animations.SINGLE_JUMP) + m.GfxAngle = Util.SetYint16(m.GfxAngle, m.SteepJumpYaw) + + return false +end) + +DEF_ACTION(Action.GROUND_POUND, function(m: Mario) + local stepResult + local yOffset + + m:PlaySoundIfNoFlag(Sounds.ACTION_THROW, MarioFlags.ACTION_SOUND_PLAYED) + + if m.ActionState == 0 then + if m.ActionTimer < 10 then + yOffset = 20 - 2 * m.ActionTimer + + if m.Position.Y + yOffset + 160 < m.CeilHeight then + m.Position += Vector3.new(0, yOffset, 0) + m.PeakHeight = m.Position.Y + end + end + + m.Velocity = Util.SetY(m.Velocity, -50) + m:SetForwardVel(0) + + m:SetAnimation(if m.ActionArg == 0 then Animations.START_GROUND_POUND else Animations.TRIPLE_JUMP_GROUND_POUND) + + if m.ActionTimer == 0 then + m:PlaySound(Sounds.ACTION_SPIN) + end + + m.ActionTimer += 1 + m.GfxAngle = Vector3int16.new(0, m.FaceAngle.Y, 0) + + if m.ActionTimer >= m.AnimFrameCount + 4 then + m:PlaySound(Sounds.MARIO_GROUND_POUND_WAH) + m.ActionState = 1 + end + else + m:SetAnimation(Animations.GROUND_POUND) + stepResult = m:PerformAirStep() + + if stepResult == AirStep.LANDED then + m:PlayHeavyLandingSound(Sounds.ACTION_HEAVY_LANDING) + + if not checkFallDamage(m, Action.HARD_BACKWARD_GROUND_KB) then + m.ParticleFlags:Add(ParticleFlags.MIST_CIRCLE, ParticleFlags.HORIZONTAL_STAR) + m:SetAction(Action.GROUND_POUND_LAND) + end + elseif stepResult == AirStep.HIT_WALL then + m:SetForwardVel(-16) + stopRising(m) + + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_AIR_KB) + end + end + + return false +end) + +DEF_ACTION(Action.BURNING_JUMP, function(m: Mario) + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP) + m:SetForwardVel(m.ForwardVel) + + if m:PerformAirStep() == AirStep.LANDED then + m:PlayLandingSound() + m:SetAction(Action.BURNING_GROUND) + end + + m:SetAnimation(Animations.GENERAL_FALL) + m.ParticleFlags:Add(ParticleFlags.FIRE) + m:PlaySound(Sounds.MOVING_LAVA_BURN) + + m.BurnTimer += 3 + m.Health -= 10 + + if m.Health < 0x100 then + m.Health = 0xFF + end + + return false +end) + +DEF_ACTION(Action.BURNING_FALL, function(m: Mario) + m:SetForwardVel(m.ForwardVel) + + if m:PerformAirStep() == AirStep.LANDED then + m:PlayLandingSound(Sounds.ACTION_TERRAIN_LANDING) + m:SetAction(Action.BURNING_GROUND) + end + + m:SetAnimation(Animations.GENERAL_FALL) + m.ParticleFlags:Add(ParticleFlags.FIRE) + + m.BurnTimer += 3 + m.Health -= 10 + + if m.Health < 0x100 then + m.Health = 0xFF + end + + return false +end) + +DEF_ACTION(Action.BACKWARD_AIR_KB, function(m: Mario) + if checkWallKick(m) then + return true + end + + playKnockbackSound(m) + commonAirKnockbackStep( + m, + Action.BACKWARD_GROUND_KB, + Action.HARD_BACKWARD_GROUND_KB, + Animations.BACKWARD_AIR_KB, + -16 + ) + + return false +end) + +DEF_ACTION(Action.FORWARD_AIR_KB, function(m: Mario) + if checkWallKick(m) then + return true + end + + playKnockbackSound(m) + commonAirKnockbackStep(m, Action.FORWARD_GROUND_KB, Action.HARD_FORWARD_GROUND_KB, Animations.FORWARD_AIR_KB, 16) + + return false +end) + +DEF_ACTION(Action.HARD_BACKWARD_AIR_KB, function(m: Mario) + if checkWallKick(m) then + return true + end + + playKnockbackSound(m) + commonAirKnockbackStep( + m, + Action.HARD_BACKWARD_GROUND_KB, + Action.HARD_BACKWARD_GROUND_KB, + Animations.BACKWARD_AIR_KB, + -16 + ) + + return false +end) + +DEF_ACTION(Action.HARD_FORWARD_AIR_KB, function(m: Mario) + if checkWallKick(m) then + return true + end + + playKnockbackSound(m) + commonAirKnockbackStep( + m, + Action.HARD_FORWARD_GROUND_KB, + Action.HARD_FORWARD_GROUND_KB, + Animations.FORWARD_AIR_KB, + 16 + ) + + return false +end) + +DEF_ACTION(Action.THROWN_BACKWARD, function(m: Mario) + local landAction = if m.ActionArg ~= 0 then Action.HARD_BACKWARD_GROUND_KB else Action.BACKWARD_GROUND_KB + + m:PlaySoundIfNoFlag(Sounds.MARIO_WAAAOOOW, MarioFlags.MARIO_SOUND_PLAYED) + commonAirKnockbackStep(m, landAction, Action.HARD_BACKWARD_GROUND_KB, Animations.BACKWARD_AIR_KB, m.ForwardVel) + + m.ForwardVel *= 0.98 + return false +end) + +DEF_ACTION(Action.THROWN_FORWARD, function(m: Mario) + local landAction = if m.ActionArg ~= 0 then Action.HARD_FORWARD_GROUND_KB else Action.FORWARD_GROUND_KB + + m:PlaySoundIfNoFlag(Sounds.MARIO_WAAAOOOW, MarioFlags.MARIO_SOUND_PLAYED) + + if + commonAirKnockbackStep(m, landAction, Action.HARD_FORWARD_GROUND_KB, Animations.FORWARD_AIR_KB, m.ForwardVel) + == AirStep.NONE + then + local pitch = Util.Atan2s(m.ForwardVel, -m.Velocity.Y) + + if pitch > 0x1800 then + pitch = 0x1800 + end + + m.GfxAngle = Util.SetXint16(m.GfxAngle, pitch + 0x1800) + end + + m.ForwardVel *= 0.98 + return false +end) + +DEF_ACTION(Action.SOFT_BONK, function(m: Mario) + if checkWallKick(m) then + return true + end + + playKnockbackSound(m) + commonAirKnockbackStep( + m, + Action.FREEFALL_LAND, + Action.HARD_BACKWARD_GROUND_KB, + Animations.GENERAL_FALL, + m.ForwardVel + ) + + return false +end) + +DEF_ACTION(Action.AIR_HIT_WALL, function(m: Mario) + m.ActionTimer += 1 + + if m.ActionTimer <= 2 then + if m.Input:Has(InputFlags.A_PRESSED) then + m.Velocity = Util.SetY(m.Velocity, 52) + m.FaceAngle += Vector3int16.new(0, 0x8000, 0) + return m:SetAction(Action.WALL_KICK_AIR) + end + elseif m.ForwardVel >= 38 then + m.WallKickTimer = 5 + + if m.Velocity.Y > 0 then + m.Velocity = Util.SetY(m.Velocity, 0) + end + + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + return m:SetAction(Action.BACKWARD_AIR_KB) + else + m.WallKickTimer = 5 + + if m.Velocity.Y > 0 then + m.Velocity = Util.SetY(m.Velocity, 0) + end + + if m.ForwardVel > 8 then + m:SetForwardVel(-8) + end + + return m:SetAction(Action.SOFT_BONK) + end + + return m:SetAnimation(Animations.START_WALLKICK) > 0 +end) + +DEF_ACTION(Action.FORWARD_ROLLOUT, function(m: Mario) + commonRolloutStep(m, Animations.FORWARD_SPINNING) + return false +end) + +DEF_ACTION(Action.BACKWARD_ROLLOUT, function(m: Mario) + commonRolloutStep(m, Animations.BACKWARD_SPINNING) + return false +end) + +DEF_ACTION(Action.BUTT_SLIDE_AIR, function(m: Mario) + local stepResult + m.ActionTimer += 1 + + if m.ActionTimer > 30 and m.Position.Y - m.FloorHeight > 500 then + return m:SetAction(Action.FREEFALL, 1) + end + + updateAirWithTurn(m) + stepResult = m:PerformAirStep() + + if stepResult == AirStep.LANDED then + if m.ActionState == 0 and m.Velocity.Y < 0 then + local floor = m.Floor + + if floor and floor.Normal.Y > 0.9848077 then + m.Velocity *= Vector3.new(1, -0.5, 1) + m.ActionState = 1 + else + m:SetAction(Action.BUTT_SLIDE) + end + else + m:SetAction(Action.BUTT_SLIDE) + end + + m:PlayLandingSound() + elseif stepResult == AirStep.HIT_WALL then + stopRising(m) + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_AIR_KB) + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + m:SetAnimation(Animations.SLIDE) + return false +end) + +DEF_ACTION(Action.LAVA_BOOST, function(m: Mario) + local stepResult + m:PlaySoundIfNoFlag(Sounds.MARIO_ON_FIRE, MarioFlags.MARIO_SOUND_PLAYED) + + if not m.Input:Has(InputFlags.NONZERO_ANALOG) then + m.ForwardVel = Util.ApproachFloat(m.ForwardVel, 0, 0.35) + end + + updateLavaBoostOrTwirling(m) + stepResult = m:PerformAirStep() + + if stepResult == AirStep.LANDED then + local floor = m.Floor + local floorType: Enum.Material? + + if floor then + floorType = floor.Material + end + + if floorType == Enum.Material.CrackedLava then + m.ActionState = 0 + + if not m.Flags:Has(MarioFlags.METAL_CAP) then + m.HurtCounter += if m.Flags:Has(MarioFlags.CAP_ON_HEAD) then 12 else 18 + end + + m.Velocity = Util.SetY(m.Velocity, 84) + m:PlaySound(Sounds.MARIO_ON_FIRE) + else + m:PlayHeavyLandingSound(Sounds.ACTION_TERRAIN_BODY_HIT_GROUND) + + if m.ActionState < 2 and m.Velocity.Y < 0 then + m.Velocity *= Vector3.new(1, -0.4, 1) + m:SetForwardVel(m.ForwardVel / 2) + m.ActionState += 1 + else + m:SetAction(Action.LAVA_BOOST_LAND) + end + end + elseif stepResult == AirStep.HIT_WALL then + m:BonkReflection() + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + m:SetAnimation(Animations.FIRE_LAVA_BURN) + + if not m.Flags:Has(MarioFlags.METAL_CAP) and m.Velocity.Y > 0 then + m.ParticleFlags:Add(ParticleFlags.FIRE) + + if m.ActionState == 0 then + m:PlaySound(Sounds.MOVING_LAVA_BURN) + end + end + + m.BodyState.EyeState = MarioEyes.DEAD + return false +end) + +DEF_ACTION(Action.SLIDE_KICK, function(m: Mario) + local stepResult + + if m.ActionState == 0 and m.ActionTimer == 0 then + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP, Sounds.MARIO_HOOHOO) + m:SetAnimation(Animations.SLIDE_KICK) + end + + m.ActionTimer += 1 + + if m.ActionTimer > 30 and m.Position.Y - m.FloorHeight > 500 then + return m:SetAction(Action.FREEFALL, 2) + end + + updateAirWithoutTurn(m) + stepResult = m:PerformAirStep() + + if stepResult == AirStep.NONE then + if m.ActionState == 0 then + local tilt = Util.Atan2s(m.ForwardVel, -m.Velocity.Y) + + if tilt > 0x1800 then + tilt = 0x1800 + end + + m.GfxAngle = Util.SetXint16(m.GfxAngle, tilt) + end + elseif stepResult == AirStep.LANDED then + if m.ActionState == 0 and m.Velocity.Y < 0 then + m.Velocity *= Vector3.new(1, -0.5, 1) + m.ActionState = 1 + m.ActionTimer = 0 + else + m:SetAction(Action.SLIDE_KICK_SLIDE) + end + + m:PlayLandingSound() + elseif stepResult == AirStep.HIT_WALL then + stopRising(m) + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_AIR_KB) + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + return false +end) + +DEF_ACTION(Action.JUMP_KICK, function(m: Mario) + local stepResult + + if m.ActionState == 0 then + m:PlaySoundIfNoFlag(Sounds.MARIO_PUNCH_HOO, MarioFlags.MARIO_SOUND_PLAYED) + m.AnimReset = true + + m:SetAnimation(Animations.AIR_KICK) + m.ActionState = 1 + end + + local animFrame = m.AnimFrame + + if animFrame == 0 then + m.BodyState.PunchType = 2 + m.BodyState.PunchTimer = 6 + end + + if animFrame >= 0 and animFrame < 8 then + m.Flags:Add(MarioFlags.KICKING) + end + + updateAirWithoutTurn(m) + stepResult = m:PerformAirStep() + + if stepResult == AirStep.LANDED then + if not checkFallDamage(m, Action.HARD_BACKWARD_GROUND_KB) then + m:SetAction(Action.FREEFALL_LAND) + end + elseif stepResult == AirStep.HIT_WALL then + m:SetForwardVel(0) + end + + return false +end) + +DEF_ACTION(Action.FLYING, function(m: Mario) + local startPitch = m.FaceAngle.X + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + if not m.Flags:Has(MarioFlags.WING_CAP) then + return m:SetAction(Action.FREEFALL) + end + + if m.ActionState == 0 then + if m.ActionArg == 0 then + m:SetAnimation(Animations.FLY_FROM_CANNON) + else + m:SetAnimation(Animations.FORWARD_SPINNING_FLIP) + + if m.AnimFrame == 1 then + m:PlaySound(Sounds.ACTION_SPIN) + end + end + + if m:IsAnimAtEnd() then + m:SetAnimation(Animations.WING_CAP_FLY) + m.ActionState = 1 + end + end + + local stepResult + do + updateFlying(m) + stepResult = m:PerformAirStep() + end + + if stepResult == AirStep.NONE then + m.GfxAngle = Util.SetXint16(m.GfxAngle, -m.FaceAngle.X) + m.GfxAngle = Util.SetZint16(m.GfxAngle, m.FaceAngle.Z) + m.ActionTimer = 0 + elseif stepResult == AirStep.LANDED then + m:SetAction(Action.DIVE_SLIDE) + m:SetAnimation(Animations.DIVE) + + m:SetAnimToFrame(7) + m.FaceAngle *= Vector3int16.new(0, 1, 1) + elseif stepResult == AirStep.HIT_WALL then + if m.Wall then + m:SetForwardVel(-16) + m.FaceAngle *= Vector3int16.new(0, 1, 1) + + stopRising(m) + m:PlaySound(if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_BONK else Sounds.ACTION_BONK) + + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_AIR_KB) + else + m.ActionTimer += 1 + + if m.ActionTimer == 0 then + m:PlaySound(Sounds.ACTION_HIT) + end + + if m.ActionTimer == 30 then + m.ActionTimer = 0 + end + + m.FaceAngle -= Vector3int16.new(0x200, 0, 0) + + if m.FaceAngle.X < -0x2AAA then + m.FaceAngle = Util.SetXint16(m.FaceAngle, -0x2AAA) + end + + m.GfxAngle = Util.SetXint16(m.GfxAngle, -m.FaceAngle.X) + m.GfxAngle = Util.SetZint16(m.GfxAngle, m.FaceAngle.Z) + end + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + if m.FaceAngle.X > 0x800 and m.ForwardVel >= 48 then + m.ParticleFlags:Add(ParticleFlags.DUST) + end + + if startPitch <= 0 and m.FaceAngle.X > 0 and m.ForwardVel >= 48 then + m:PlaySound(Sounds.ACTION_FLYING_FAST) + m:PlaySound(Sounds.MARIO_YAHOO_WAHA_YIPPEE) + end + + m:PlaySound(Sounds.MOVING_FLYING) + m:AdjustSoundForSpeed() + + return false +end) + +DEF_ACTION(Action.FLYING_TRIPLE_JUMP, function(m: Mario) + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.DIVE) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.GROUND_POUND) + end + + m:PlayMarioSound(Sounds.ACTION_TERRAIN_JUMP, Sounds.MARIO_YAHOO) + + if m.ActionState == 0 then + m:SetAnimation(Animations.TRIPLE_JUMP_FLY) + + if m.AnimFrame == 7 then + m:PlaySound(Sounds.ACTION_SPIN) + end + + if m:IsAnimPastEnd() then + m:SetAnimation(Animations.FORWARD_SPINNING) + m.ActionState = 1 + end + end + + if m.ActionState == 1 and m.AnimFrame == 1 then + m:PlaySound(Sounds.ACTION_SPIN) + end + + if m.Velocity.Y < 4 then + if m.ForwardVel < 32 then + m:SetForwardVel(32) + end + + m:SetAction(Action.FLYING, 1) + end + + m.ActionTimer += 1 + + local stepResult + do + updateAirWithoutTurn(m) + stepResult = m:PerformAirStep() + end + + if stepResult == AirStep.LANDED then + if not checkFallDamage(m, Action.HARD_BACKWARD_GROUND_KB) then + m:SetAction(Action.DOUBLE_JUMP_LAND) + end + elseif stepResult == AirStep.HIT_WALL then + m:BonkReflection() + elseif stepResult == AirStep.HIT_LAVA_WALL then + lavaBoostOnWall(m) + end + + return false +end) + +DEF_ACTION(Action.SPAWN_SPIN_AIRBORNE, function(m: Mario) + m:SetForwardVel(m.ForwardVel) + + if m:PerformAirStep() == AirStep.LANDED then + m:PlayLandingSound(Sounds.ACTION_TERRAIN_LANDING) + m:SetAction(Action.SPAWN_SPIN_LANDING) + end + + if m.ActionState == 0 and m.Position.Y - m.FloorHeight > 300 then + if m:SetAnimation(Animations.FORWARD_SPINNING) == 0 then + m:PlaySound(Sounds.ACTION_SPIN) + end + else + m.ActionState = 1 + m:SetAnimation(Animations.GENERAL_FALL) + end + + return false +end) + +DEF_ACTION(Action.SPAWN_SPIN_LANDING, function(m: Mario) + m:StopAndSetHeightToFloor() + m:SetAnimation(Animations.GENERAL_LAND) + + if m:IsAnimAtEnd() then + m:SetAction(Action.IDLE) + end + + return false +end) + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/client/Mario/Airborne/init.meta.json b/client/Mario/Airborne/init.meta.json new file mode 100644 index 0000000..d3f1b48 --- /dev/null +++ b/client/Mario/Airborne/init.meta.json @@ -0,0 +1,6 @@ +{ + "properties": { + "Disabled": true, + "RunContext": "Client" + } +} \ No newline at end of file diff --git a/sm64/Mario/Automatic.client.lua b/client/Mario/Automatic/init.client.lua similarity index 100% rename from sm64/Mario/Automatic.client.lua rename to client/Mario/Automatic/init.client.lua diff --git a/client/Mario/Automatic/init.meta.json b/client/Mario/Automatic/init.meta.json new file mode 100644 index 0000000..d3f1b48 --- /dev/null +++ b/client/Mario/Automatic/init.meta.json @@ -0,0 +1,6 @@ +{ + "properties": { + "Disabled": true, + "RunContext": "Client" + } +} \ No newline at end of file diff --git a/client/Mario/Moving/init.client.lua b/client/Mario/Moving/init.client.lua new file mode 100644 index 0000000..b3bfe4b --- /dev/null +++ b/client/Mario/Moving/init.client.lua @@ -0,0 +1,1495 @@ +--!strict + +local System = require(script.Parent) +local Animations = System.Animations +local Sounds = System.Sounds +local Enums = System.Enums +local Util = System.Util + +local Action = Enums.Action +local ActionFlags = Enums.ActionFlags +local ActionGroup = Enums.ActionGroups + +local MarioEyes = Enums.MarioEyes +local GroundStep = Enums.GroundStep +local InputFlags = Enums.InputFlags +local MarioFlags = Enums.MarioFlags +local SurfaceClass = Enums.SurfaceClass +local ParticleFlags = Enums.ParticleFlags + +type Mario = System.Mario + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Landing Actions +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +type LandingAction = { + NumFrames: number, + JumpTimer: number, + EndAction: number, + APressedAction: number, +} + +local sJumpLandAction: LandingAction = { + NumFrames = 4, + JumpTimer = 5, + + EndAction = Action.JUMP_LAND_STOP, + APressedAction = Action.DOUBLE_JUMP, +} + +local sFreefallLandAction: LandingAction = { + NumFrames = 4, + JumpTimer = 5, + + EndAction = Action.FREEFALL_LAND_STOP, + APressedAction = Action.DOUBLE_JUMP, +} + +local sSideFlipLandAction: LandingAction = { + NumFrames = 4, + JumpTimer = 5, + + EndAction = Action.SIDE_FLIP_LAND_STOP, + APressedAction = Action.DOUBLE_JUMP, +} + +local sLongJumpLandAction: LandingAction = { + NumFrames = 6, + JumpTimer = 5, + + EndAction = Action.LONG_JUMP_LAND_STOP, + APressedAction = Action.LONG_JUMP, +} + +local sDoubleJumpLandAction: LandingAction = { + NumFrames = 4, + JumpTimer = 5, + + EndAction = Action.DOUBLE_JUMP_LAND_STOP, + APressedAction = Action.JUMP, +} + +local sTripleJumpLandAction: LandingAction = { + NumFrames = 4, + JumpTimer = 0, + + EndAction = Action.TRIPLE_JUMP_LAND_STOP, + APressedAction = Action.UNINITIALIZED, +} + +local sBackflipLandAction: LandingAction = { + NumFrames = 4, + JumpTimer = 0, + + EndAction = Action.BACKFLIP_LAND_STOP, + APressedAction = Action.BACKFLIP, +} + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Helpers +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +local DEF_ACTION: (number, (Mario) -> boolean) -> () = System.RegisterAction +local sPunchingForwardVelocities = { 0, 1, 1, 2, 3, 5, 7, 10 } + +local function tiltBodyRunning(m: Mario) + local pitch = m:FindFloorSlope(0) + pitch = pitch * m.ForwardVel / 40 + + return -pitch +end + +local function playStepSound(m: Mario, frame1: number, frame2: number) + if m:IsAnimPastFrame(frame1) or m:IsAnimPastFrame(frame2) then + if m.Flags:Has(MarioFlags.METAL_CAP) then + m:PlaySoundAndSpawnParticles(Sounds.ACTION_METAL_STEP, 0) + else + m:PlaySoundAndSpawnParticles(Sounds.ACTION_TERRAIN_STEP, 0) + end + end +end + +local function alignWithFloor(m: Mario) + local pos = Util.SetY(m.Position, m.FloorHeight) + m.Position = pos + + local radius = 40 + local minY = -radius * 3 + local yaw = m.FaceAngle.Y + + local p0_x = pos.X + radius * Util.Sins(yaw + 0x2AAA) + local p0_z = pos.Z + radius * Util.Coss(yaw + 0x2AAA) + + local p1_x = pos.X + radius * Util.Sins(yaw + 0x8000) + local p1_z = pos.Z + radius * Util.Coss(yaw + 0x8000) + + local p2_x = pos.X + radius * Util.Sins(yaw + 0xD555) + local p2_z = pos.Z + radius * Util.Coss(yaw + 0xD555) + + local test0 = Vector3.new(p0_x, pos.Y + 150, p0_z) + local test1 = Vector3.new(p1_x, pos.Y + 150, p1_z) + local test2 = Vector3.new(p2_x, pos.Y + 150, p2_z) + + local p0_y = Util.FindFloor(test0) + local p1_y = Util.FindFloor(test1) + local p2_y = Util.FindFloor(test2) + + p0_y = p0_y - pos.Y < minY and pos.Y or p0_y + p1_y = p1_y - pos.Y < minY and pos.Y or p1_y + p2_y = p2_y - pos.Y < minY and pos.Y or p2_y + + local avgY = (p0_y + p1_y + p2_y) / 3 + local forward = Vector3.new(Util.Sins(yaw), 0, Util.Coss(yaw)) + + if avgY >= pos.Y then + pos = Util.SetY(pos, avgY) + end + + local a = Vector3.new(p0_x, p0_y, p0_z) + local b = Vector3.new(p1_x, p1_y, p1_z) + local c = Vector3.new(p2_x, p2_y, p2_z) + + local yColumn = (b - a):Cross(c - a).Unit + local xColumn = yColumn:Cross(forward).Unit + m.ThrowMatrix = CFrame.fromMatrix(pos, xColumn, yColumn) +end + +local function beginWalkingAction(m: Mario, forwardVel: number, action: number, actionArg: number?) + m:SetForwardVel(forwardVel) + m.FaceAngle = Util.SetYint16(m.FaceAngle, m.IntendedYaw) + return m:SetAction(action, actionArg) +end + +local function checkLedgeClimbDown(m: Mario) + if m.ForwardVel < 10 then + local pos, wall = Util.FindWallCollisions(m.Position, -10, 10) + + if wall then + local floorHeight, floor = Util.FindFloor(pos) + + if floor and pos.Y - floorHeight > 160 then + local wallAngle = Util.Atan2s(wall.Normal.Z, wall.Normal.X) + local wallDYaw = wallAngle - m.FaceAngle.Y + + if math.abs(wallDYaw) < 0x4000 then + pos -= Vector3.new(20 * wall.Normal.X, 0, 20 * wall.Normal.Z) + m.Position = pos + + m.FaceAngle *= Vector3int16.new(0, 1, 1) + m.FaceAngle = Util.SetYint16(m.FaceAngle, wallAngle + 0x8000) + + m:SetAction(Action.LEDGE_CLIMB_DOWN) + m:SetAnimation(Animations.CLIMB_DOWN_LEDGE) + end + end + end + end +end + +local function slideBonk(m: Mario, fastAction: number, slowAction: number) + if m.ForwardVel > 16 then + m:BonkReflection(true) + m:SetAction(fastAction) + else + m:SetForwardVel(0) + m:SetAction(slowAction) + end +end + +local function setTripleJumpAction(m: Mario) + if m.Flags:Has(MarioFlags.WING_CAP) then + return m:SetAction(Action.FLYING_TRIPLE_JUMP) + elseif m.ForwardVel > 20 then + return m:SetAction(Action.TRIPLE_JUMP) + else + return m:SetAction(Action.JUMP) + end +end + +local function updateSlidingAngle(m: Mario, accel: number, lossFactor: number) + local newFacingDYaw + local facingDYaw + + local floor = m.Floor + + if not floor then + return + end + + assert(floor) + + local slopeAngle = Util.Atan2s(floor.Normal.Z, floor.Normal.X) + local steepness = math.sqrt(floor.Normal.X ^ 2 + floor.Normal.Z ^ 2) + + m.SlideVelX += accel * steepness * Util.Sins(slopeAngle) + m.SlideVelZ += accel * steepness * Util.Coss(slopeAngle) + + m.SlideVelX *= lossFactor + m.SlideVelZ *= lossFactor + + m.SlideYaw = Util.Atan2s(m.SlideVelZ, m.SlideVelX) + + facingDYaw = Util.SignedShort(m.FaceAngle.Y - m.SlideYaw) + newFacingDYaw = facingDYaw + + if newFacingDYaw > 0 and newFacingDYaw <= 0x4000 then + newFacingDYaw -= 0x200 + + if newFacingDYaw < 0 then + newFacingDYaw = 0 + end + elseif newFacingDYaw > -0x4000 and newFacingDYaw < 0 then + newFacingDYaw += 0x200 + + if newFacingDYaw > 0 then + newFacingDYaw = 0 + end + elseif newFacingDYaw > 0x4000 and newFacingDYaw < 0x8000 then + newFacingDYaw += 0x200 + + if newFacingDYaw > 0x8000 then + newFacingDYaw = 0x8000 + end + elseif newFacingDYaw > -0x8000 and newFacingDYaw < -0x4000 then + newFacingDYaw -= 0x200 + + if newFacingDYaw < -0x8000 then + newFacingDYaw = -0x8000 + end + end + + m.FaceAngle = Util.SetYint16(m.FaceAngle, m.SlideYaw + newFacingDYaw) + m.Velocity = Vector3.new(m.SlideVelX, 0, m.SlideVelZ) + + --! Speed is capped a frame late (butt slide HSG) + m.ForwardVel = math.sqrt(m.SlideVelX ^ 2 + m.SlideVelZ ^ 2) + + if m.ForwardVel > 100 then + m.SlideVelX = m.SlideVelX * 100 / m.ForwardVel + m.SlideVelZ = m.SlideVelZ * 100 / m.ForwardVel + end + + if math.abs(newFacingDYaw) > 0x4000 then + m.ForwardVel *= -1 + end +end + +local function updateSliding(m: Mario, stopSpeed: number) + local intendedDYaw = Util.SignedShort(m.IntendedYaw - m.SlideYaw) + local forward = Util.Coss(intendedDYaw) + local sideward = Util.Sins(intendedDYaw) + + --! 10k glitch + if forward < 0 and m.ForwardVel > 0 then + forward *= 0.5 + 0.5 * m.ForwardVel / 100 + end + + local floorClass = m:GetFloorClass() + local lossFactor + local accel + + if floorClass == SurfaceClass.VERY_SLIPPERY then + accel = 10 + lossFactor = m.IntendedMag / 32 * forward * 0.02 + 0.98 + elseif floorClass == SurfaceClass.SLIPPERY then + accel = 8 + lossFactor = m.IntendedMag / 32 * forward * 0.02 + 0.96 + elseif floorClass == SurfaceClass.DEFAULT then + accel = 7 + lossFactor = m.IntendedMag / 32 * forward * 0.02 + 0.92 + elseif floorClass == SurfaceClass.NOT_SLIPPERY then + accel = 5 + lossFactor = m.IntendedMag / 32 * forward * 0.02 + 0.92 + end + + local oldSpeed = math.sqrt(m.SlideVelX ^ 2 + m.SlideVelZ ^ 2) + + --! This is attempting to use trig derivatives to rotate Mario's speed. + -- It is slightly off/asymmetric since it uses the new X speed, but the old + -- Z speed. + + m.SlideVelX += m.SlideVelZ * (m.IntendedMag / 32) * sideward * 0.05 + m.SlideVelZ -= m.SlideVelX * (m.IntendedMag / 32) * sideward * 0.05 + + local newSpeed = math.sqrt(m.SlideVelX ^ 2 + m.SlideVelZ ^ 2) + + if oldSpeed > 0 and newSpeed > 0 then + m.SlideVelX *= oldSpeed / newSpeed + m.SlideVelZ *= oldSpeed / newSpeed + end + + local stopped = false + updateSlidingAngle(m, accel, lossFactor) + + if not m:FloorIsSlope() and m.ForwardVel ^ 2 < stopSpeed ^ 2 then + m:SetForwardVel(0) + stopped = true + end + + return stopped +end + +local function applySlopeAccel(m: Mario) + local floor = m.Floor + local floorNormal: Vector3 + + if floor then + floorNormal = floor.Normal + else + floorNormal = Vector3.yAxis + end + + local floorDYaw = m.FloorAngle - m.FaceAngle.Y + local steepness = math.sqrt(floorNormal.X ^ 2 + floorNormal.Z ^ 2) + + if m:FloorIsSlope() then + local slopeClass = 0 + local slopeAccel + + if m.Action() ~= Action.SOFT_BACKWARD_GROUND_KB then + if m.Action() ~= Action.SOFT_FORWARD_GROUND_KB then + slopeClass = m:GetFloorClass() + end + end + + if slopeClass == SurfaceClass.VERY_SLIPPERY then + slopeAccel = 5.3 + elseif slopeClass == SurfaceClass.SLIPPERY then + slopeAccel = 2.7 + elseif slopeClass == SurfaceClass.DEFAULT then + slopeAccel = 1.7 + else + slopeAccel = 0 + end + + if floorDYaw > -0x4000 and floorDYaw < 0x4000 then + m.ForwardVel += slopeAccel * steepness + else + m.ForwardVel -= slopeAccel * steepness + end + end + + m.SlideYaw = m.FaceAngle.Y + m.SlideVelX = m.ForwardVel * Util.Sins(m.FaceAngle.Y) + m.SlideVelZ = m.ForwardVel * Util.Coss(m.FaceAngle.Y) + m.Velocity = Vector3.new(m.SlideVelX, 0, m.SlideVelZ) +end + +local function applyLandingAccel(m: Mario, frictionFactor: number) + local stopped = false + applySlopeAccel(m) + + if not m:FloorIsSlope() then + m.ForwardVel *= frictionFactor + + if m.ForwardVel ^ 2 < 1 then + m:SetForwardVel(0) + stopped = true + end + end + + return stopped +end + +local function applySlopeDecel(m: Mario, decelCoef: number) + local decel + local stopped = false + local floorClass = m:GetFloorClass() + + if floorClass == SurfaceClass.VERY_SLIPPERY then + decel = decelCoef * 0.2 + elseif floorClass == SurfaceClass.SLIPPERY then + decel = decelCoef * 0.7 + elseif floorClass == SurfaceClass.DEFAULT then + decel = decelCoef * 2 + elseif floorClass == SurfaceClass.NOT_SLIPPERY then + decel = decelCoef * 3 + end + + m.ForwardVel = Util.ApproachFloat(m.ForwardVel, 0, decel) + + if m.ForwardVel == 0 then + stopped = true + end + + applySlopeAccel(m) + return stopped +end + +local function updateDeceleratingSpeed(m: Mario) + local stopped = false + m.ForwardVel = Util.ApproachFloat(m.ForwardVel, 0, 1) + + if m.ForwardVel == 0 then + stopped = true + end + + m:SetForwardVel(m.ForwardVel) + return stopped +end + +local function updateWalkingSpeed(m: Mario) + local maxTargetSpeed = 32 + local floor = m.Floor + + local targetSpeed = if m.IntendedMag < maxTargetSpeed then m.IntendedMag else maxTargetSpeed + + if m.ForwardVel < 0 then + m.ForwardVel += 1.1 + elseif m.ForwardVel <= targetSpeed then + m.ForwardVel += 1.1 - m.ForwardVel / 43 + elseif floor and floor.Normal.Y >= 0.95 then + m.ForwardVel -= 1 + end + + if m.ForwardVel > 48 then + m.ForwardVel = 48 + end + + local currY = Util.SignedShort(m.IntendedYaw - m.FaceAngle.Y) + local faceY = m.IntendedYaw - Util.ApproachInt(currY, 0, 0x800) + + m.FaceAngle = Util.SetYint16(m.FaceAngle, faceY) + applySlopeAccel(m) +end + +local function shouldBeginSliding(m: Mario) + if m.Input:Has(InputFlags.ABOVE_SLIDE) then + if m.ForwardVel < -1 or m:FacingDownhill() then + return true + end + end + + return false +end + +local function analogStickHeldBack(m: Mario) + local intendedDYaw = Util.SignedShort(m.IntendedYaw - m.FaceAngle.Y) + return math.abs(intendedDYaw) > 0x471C +end + +local function checkGroundDiveOrPunch(m: Mario) + if m.Input:Has(InputFlags.B_PRESSED) then + --! Speed kick (shoutouts to SimpleFlips) + if m.ForwardVel >= 29 and m.Controller.StickMag > 48 then + m.Velocity = Util.SetY(m.Velocity, 20) + return m:SetAction(Action.DIVE, 1) + end + + return m:SetAction(Action.MOVE_PUNCHING) + end + + return false +end + +local function beginBrakingAction(m: Mario) + if m.ActionState == 1 then + m.FaceAngle = Util.SetYint16(m.FaceAngle, m.ActionArg) + return m:SetAction(Action.STANDING_AGAINST_WALL) + end + + if m.ForwardVel > 16 then + local floor = m.Floor + + if floor and floor.Normal.Y >= 0.17364818 then + return m:SetAction(Action.BRAKING) + end + end + + return m:SetAction(Action.DECELERATING) +end + +local function animAndAudioForWalk(m: Mario) + local baseAccel = if m.IntendedMag > m.ForwardVel then m.IntendedMag else m.ForwardVel + + if baseAccel < 4 then + baseAccel = 4 + end + + local targetPitch = 0 + local accel + + while true do + if m.ActionTimer == 0 then + if baseAccel > 8 then + m.ActionTimer = 2 + else + accel = baseAccel / 4 * 0x10000 + + if accel < 0x1000 then + accel = 0x1000 + end + + m:SetAnimationWithAccel(Animations.START_TIPTOE, accel) + playStepSound(m, 7, 22) + + if m:IsAnimPastFrame(23) then + m.ActionTimer = 2 + end + + break + end + elseif m.ActionTimer == 1 then + if baseAccel > 8 then + m.ActionTimer = 2 + else + accel = baseAccel * 0x10000 + + if accel < 0x1000 then + accel = 0x1000 + end + + m:SetAnimationWithAccel(Animations.TIPTOE, accel) + playStepSound(m, 14, 72) + + break + end + elseif m.ActionTimer == 2 then + if baseAccel < 5 then + m.ActionTimer = 1 + elseif baseAccel > 22 then + m.ActionTimer = 3 + else + accel = baseAccel / 4 * 0x10000 + m:SetAnimationWithAccel(Animations.WALKING, accel) + playStepSound(m, 10, 49) + break + end + elseif m.ActionTimer == 3 then + if baseAccel < 18 then + m.ActionTimer = 2 + else + accel = baseAccel / 4 * 0x10000 + m:SetAnimationWithAccel(Animations.RUNNING, accel) + + playStepSound(m, 9, 45) + targetPitch = tiltBodyRunning(m) + + break + end + end + end + + local walkingPitch = Util.ApproachInt(m.WalkingPitch, targetPitch, 0x800) + walkingPitch = Util.SignedShort(walkingPitch) + + m.WalkingPitch = walkingPitch + m.GfxAngle = Util.SetXint16(m.GfxAngle, walkingPitch) +end + +local function pushOrSidleWall(m: Mario, startPos: Vector3) + local wallAngle: number + local dWallAngle: number + + local dx = m.Position.X - startPos.X + local dz = m.Position.Z - startPos.Z + + local movedDist = math.sqrt(dx ^ 2 + dz ^ 2) + local accel = movedDist * 2 * 0x10000 + + if m.ForwardVel > 6 then + m:SetForwardVel(6) + end + + local wall = m.Wall + + if wall then + wallAngle = Util.Atan2s(wall.Normal.Z, wall.Normal.X) + dWallAngle = Util.SignedShort(assert(wallAngle) - m.FaceAngle.Y) + end + + if wall == nil or math.abs(dWallAngle) >= 0x71C8 then + m:SetAnimation(Animations.PUSHING) + playStepSound(m, 6, 18) + else + if dWallAngle < 0 then + m:SetAnimationWithAccel(Animations.SIDESTEP_RIGHT, accel) + else + m:SetAnimationWithAccel(Animations.SIDESTEP_LEFT, accel) + end + + if m.AnimFrame < 20 then + m:PlaySound(Sounds.MOVING_TERRAIN_SLIDE) + m.ParticleFlags:Add(ParticleFlags.DUST) + end + + m.ActionState = 1 + m.ActionArg = Util.SignedShort(wallAngle + 0x8000) + + m.GfxAngle = Util.SetYint16(m.GfxAngle, m.ActionArg) + m.GfxAngle = Util.SetZint16(m.GfxAngle, m:FindFloorSlope(0x4000)) + end +end + +local function tiltBodyWalking(m: Mario, startYaw: number) + local anim = m.AnimCurrent + local bodyState = m.BodyState + + if anim == Animations.WALKING or anim == Animations.RUNNING then + local dYaw = m.FaceAngle.Y - startYaw + + local tiltZ = -math.clamp(dYaw * m.ForwardVel / 12, -0x1555, 0x1555) + local tiltX = math.clamp(m.ForwardVel * 170, 0, 0x1555) + + local torsoAngle = bodyState.TorsoAngle + tiltZ = Util.ApproachInt(torsoAngle.Z, tiltZ, 0x400) + tiltX = Util.ApproachInt(torsoAngle.X, tiltX, 0x400) + + bodyState.TorsoAngle = Vector3int16.new(tiltX, torsoAngle.Y, tiltZ) + else + bodyState.TorsoAngle *= Vector3int16.new(0, 1, 0) + end +end + +local function tiltBodyButtSlide(m: Mario) + local intendedDYaw = m.IntendedYaw - m.FaceAngle.Y + local bodyState = m.BodyState + + local tiltX = 5461.3335 * m.IntendedMag / 32 * Util.Coss(intendedDYaw) + local tiltZ = -(5461.3335 * m.IntendedMag / 32 * Util.Sins(intendedDYaw)) + + local torsoAngle = bodyState.TorsoAngle + bodyState.TorsoAngle = Vector3int16.new(tiltX, torsoAngle.Y, tiltZ) +end + +local function commonSlideAction(m: Mario, endAction: number, airAction: number, anim: Animation) + local pos = m.Position + m:PlaySound(Sounds.MOVING_TERRAIN_SLIDE) + m:AdjustSoundForSpeed() + + local step = m:PerformGroundStep() + + if step == GroundStep.LEFT_GROUND then + m:SetAction(airAction) + + if math.abs(m.ForwardVel) >= 50 then + m:PlaySound(Sounds.MARIO_HOOHOO) + end + elseif step == GroundStep.NONE then + m:SetAnimation(anim) + alignWithFloor(m) + + m.ParticleFlags:Add(ParticleFlags.DUST) + elseif step == GroundStep.HIT_WALL then + local wall = m.Wall + + if not m:FloorIsSlippery() then + if m.ForwardVel > 16 then + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + end + + slideBonk(m, Action.GROUND_BONK, endAction) + elseif wall then + local wallAngle = Util.Atan2s(wall.Normal.Z, wall.Normal.X) + local slideSpeed = math.sqrt(m.SlideVelX ^ 2 + m.SlideVelZ ^ 2) * 0.9 + + if slideSpeed < 4 then + slideSpeed = 4 + end + + local slideYaw = Util.SignedShort(m.SlideYaw - wallAngle) + m.SlideYaw = Util.SignedShort(wallAngle - slideYaw + 0x8000) + m.SlideVelX = slideSpeed * Util.Sins(m.SlideYaw) + m.SlideVelZ = slideSpeed * Util.Coss(m.SlideYaw) + m.Velocity = Vector3.new(m.SlideVelX, m.Velocity.Y, m.SlideVelZ) + end + + alignWithFloor(m) + end +end + +local function commonSlideActionWithJump(m: Mario, stopAction: number, airAction: number, anim: Animation) + if m.ActionTimer == 5 then + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetJumpingAction(Action.JUMP) + end + else + m.ActionTimer += 1 + end + + if updateSliding(m, 4) then + m:SetAction(stopAction) + end + + commonSlideAction(m, stopAction, airAction, anim) + return false +end + +local function commonLandingCancels( + m: Mario, + landingAction: LandingAction, + setAPressAction: (Mario, number, any) -> any +) + local floor = m.Floor + + if floor and floor.Normal.Y < 0.2923717 then + return m:PushOffSteepFloor(Action.FREEFALL) + end + + m.DoubleJumpTimer = landingAction.JumpTimer + + if shouldBeginSliding(m) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.Input:Has(InputFlags.FIRST_PERSON) then + return m:SetAction(landingAction.EndAction) + end + + m.ActionTimer += 1 + + if m.ActionTimer >= landingAction.NumFrames then + return m:SetAction(landingAction.EndAction) + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return setAPressAction(m, landingAction.APressedAction, 0) + end + + if m.Input:Has(InputFlags.OFF_FLOOR) then + return m:SetAction(Action.FREEFALL) + end + + return false +end + +local function stomachSlideAction(m: Mario, stopAction: number, airAction: number, anim: Animation) + if m.ActionTimer == 5 then + if not m.Input:Has(InputFlags.ABOVE_SLIDE) and m.Input:Has(InputFlags.A_PRESSED, InputFlags.B_PRESSED) then + return m:SetAction(if m.ForwardVel >= 0 then Action.FORWARD_ROLLOUT else Action.BACKWARD_ROLLOUT) + end + else + m.ActionTimer += 1 + end + + if updateSliding(m, 4) then + return m:SetAction(stopAction) + end + + commonSlideAction(m, stopAction, airAction, anim) + return false +end + +local function commonGroundKnockbackAction( + m: Mario, + anim: Animation, + minFrame: number, + playHeavyLanding: boolean, + attacked: number +) + local animFrame + + if playHeavyLanding then + m:PlayHeavyLandingSoundOnce(Sounds.ACTION_TERRAIN_BODY_HIT_GROUND) + end + + if attacked > 0 then + m:PlaySoundIfNoFlag(Sounds.MARIO_ATTACKED, MarioFlags.MARIO_SOUND_PLAYED) + else + m:PlaySoundIfNoFlag(Sounds.MARIO_OOOF, MarioFlags.MARIO_SOUND_PLAYED) + end + + m.ForwardVel = math.clamp(m.ForwardVel, -32, 32) + animFrame = m:SetAnimation(anim) + + if animFrame < minFrame then + applyLandingAccel(m, 0.9) + elseif m.ForwardVel > 0 then + m:SetForwardVel(0.1) + else + m:SetForwardVel(-0.1) + end + + if m:PerformGroundStep() == GroundStep.LEFT_GROUND then + if m.ForwardVel >= 0 then + m:SetAction(Action.FORWARD_AIR_KB, attacked) + else + m:SetAction(Action.BACKWARD_AIR_KB, attacked) + end + elseif m:IsAnimAtEnd() then + if m.Health < 0x100 then + m:SetAction(Action.STANDING_DEATH) + else + if attacked > 0 then + m.InvincTimer = 30 + end + + m:SetAction(Action.IDLE) + end + end + + return animFrame +end + +local function commonLandingAction(m: Mario, anim: Animation) + if m.Input:Has(InputFlags.NONZERO_ANALOG) then + applyLandingAccel(m, 0.98) + elseif m.ForwardVel > 16 then + applySlopeDecel(m, 2) + else + m.Velocity *= Vector3.new(1, 0, 1) + end + + local stepResult = m:PerformGroundStep() + + if stepResult == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + elseif stepResult == GroundStep.HIT_WALL then + m:SetAnimation(Animations.PUSHING) + end + + if m.ForwardVel > 16 then + m.ParticleFlags:Add(ParticleFlags.DUST) + end + + m:SetAnimation(anim) + m:PlayLandingSoundOnce(Sounds.ACTION_TERRAIN_LANDING) + + return stepResult +end + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +DEF_ACTION(Action.WALKING, function(m: Mario) + local startPos + local startYaw = m.FaceAngle.Y + + if shouldBeginSliding(m) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.Input:Has(InputFlags.FIRST_PERSON) then + return beginBrakingAction(m) + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetJumpFromLanding() + end + + if checkGroundDiveOrPunch(m) then + return true + end + + if m.Input:Has(InputFlags.UNKNOWN_5) then + return beginBrakingAction(m) + end + + if analogStickHeldBack(m) and m.ForwardVel >= 16 then + return m:SetAction(Action.TURNING_AROUND) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.CROUCH_SLIDE) + end + + local step + do + m.ActionState = 0 + startPos = m.Position + + updateWalkingSpeed(m) + step = m:PerformGroundStep() + end + + if step == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + m:SetAnimation(Animations.GENERAL_FALL) + elseif step == GroundStep.NONE then + animAndAudioForWalk(m) + + if m.IntendedMag - m.ForwardVel > 16 then + m.ParticleFlags:Add(ParticleFlags.DUST) + end + elseif step == GroundStep.HIT_WALL then + pushOrSidleWall(m, startPos) + m.ActionTimer = 0 + end + + checkLedgeClimbDown(m) + tiltBodyWalking(m, startYaw) + + return false +end) + +DEF_ACTION(Action.MOVE_PUNCHING, function(m: Mario) + if shouldBeginSliding(m) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.ActionState == 0 and m.Input:Has(InputFlags.A_DOWN) then + return m:SetAction(Action.JUMP_KICK) + end + + m.ActionState = 1 + m:UpdatePunchSequence() + + if m.ForwardVel > 0 then + applySlopeDecel(m, 0.5) + else + m.ForwardVel += 8 + + if m.ForwardVel >= 0 then + m.ForwardVel = 0 + end + + applySlopeAccel(m) + end + + local step = m:PerformGroundStep() + + if step == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + elseif step == GroundStep.NONE then + m.ParticleFlags:Add(ParticleFlags.DUST) + end + + return false +end) + +DEF_ACTION(Action.TURNING_AROUND, function(m: Mario) + if m.Input:Has(InputFlags.ABOVE_SLIDE) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetAction(Action.SIDE_FLIP) + end + + if not analogStickHeldBack(m) then + return m:SetAction(Action.WALKING) + end + + if applySlopeDecel(m, 2) then + return beginWalkingAction(m, 8, Action.FINISH_TURNING_AROUND) + end + + m:PlaySound(Sounds.MOVING_TERRAIN_SLIDE) + m:AdjustSoundForSpeed() + + local step = m:PerformGroundStep() + + if step == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + elseif step == GroundStep.NONE then + m.ParticleFlags:Add(ParticleFlags.DUST) + end + + if m.ForwardVel >= 18 then + m:SetAnimation(Animations.TURNING_PART1) + else + m:SetAnimation(Animations.TURNING_PART2) + m.GfxAngle += Vector3int16.new(0, 0x8000, 0) + + if m:IsAnimAtEnd() then + if m.ForwardVel > 0 then + beginWalkingAction(m, -m.ForwardVel, Action.WALKING) + else + beginWalkingAction(m, 8, Action.WALKING) + end + end + end + + return false +end) + +DEF_ACTION(Action.FINISH_TURNING_AROUND, function(m: Mario) + if m.Input:Has(InputFlags.ABOVE_SLIDE) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetAction(Action.SIDE_FLIP) + end + + updateWalkingSpeed(m) + m:SetAnimation(Animations.TURNING_PART2) + + if m:PerformGroundStep() == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + end + + if m:IsAnimAtEnd() then + m:SetAction(Action.WALKING) + m.AnimSkipInterp = 2 + end + + return false +end) + +DEF_ACTION(Action.BRAKING, function(m: Mario) + if not m.Input:Has(InputFlags.FIRST_PERSON) then + if + m.Input:Has(InputFlags.NONZERO_ANALOG, InputFlags.A_PRESSED, InputFlags.OFF_FLOOR, InputFlags.ABOVE_SLIDE) + then + return m:CheckCommonActionExits() + end + end + + if applySlopeDecel(m, 2) then + return m:SetAction(Action.BRAKING_STOP) + end + + if m.Input:Has(InputFlags.B_PRESSED) then + return m:SetAction(Action.MOVE_PUNCHING) + end + + local stepResult = m:PerformGroundStep() + + if stepResult == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + elseif stepResult == GroundStep.NONE then + m.ParticleFlags:Add(ParticleFlags.DUST) + elseif stepResult == GroundStep.HIT_WALL then + slideBonk(m, Action.BACKWARD_GROUND_KB, Action.BRAKING_STOP) + end + + m:PlaySound(Sounds.MOVING_TERRAIN_SLIDE) + m:SetAnimation(Animations.SKID_ON_GROUND) + m:AdjustSoundForSpeed() + + return false +end) + +DEF_ACTION(Action.DECELERATING, function(m: Mario) + if not m.Input:Has(InputFlags.FIRST_PERSON) then + if shouldBeginSliding(m) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetJumpFromLanding() + end + + if checkGroundDiveOrPunch(m) then + return true + end + + if m.Input:Has(InputFlags.NONZERO_ANALOG) then + return m:SetAction(Action.WALKING) + end + + if m.Input:Has(InputFlags.Z_PRESSED) then + return m:SetAction(Action.CROUCH_SLIDE) + end + end + + if updateDeceleratingSpeed(m) then + return m:SetAction(Action.IDLE) + end + + local slopeClass = m:GetFloorClass() + local stepResult = m:PerformGroundStep() + + if stepResult == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + elseif stepResult == GroundStep.HIT_WALL then + if slopeClass == SurfaceClass.VERY_SLIPPERY then + m:BonkReflection(true) + else + m:SetForwardVel(0) + end + end + + if slopeClass == SurfaceClass.VERY_SLIPPERY then + m:SetAnimation(Animations.IDLE_HEAD_LEFT) + m:PlaySound(Sounds.MOVING_TERRAIN_SLIDE) + + m:AdjustSoundForSpeed() + m.ParticleFlags:Add(ParticleFlags.DUST) + else + local accel = m.ForwardVel / 4 * 0x10000 + + if accel < 0x1000 then + accel = 0x1000 + end + + m:SetAnimationWithAccel(Animations.WALKING, accel) + playStepSound(m, 10, 49) + end + + return false +end) + +DEF_ACTION(Action.CRAWLING, function(m: Mario) + if shouldBeginSliding(m) then + return m:SetAction(Action.BEGIN_SLIDING) + end + + if m.Input:Has(InputFlags.FIRST_PERSON) then + return m:SetAction(Action.STOP_CRAWLING) + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetJumpingAction(Action.JUMP) + end + + if checkGroundDiveOrPunch(m) then + return true + end + + if m.Input:Has(InputFlags.UNKNOWN_5) then + return m:SetAction(Action.STOP_CRAWLING) + end + + if not m.Input:Has(InputFlags.Z_DOWN) then + return m:SetAction(Action.STOP_CRAWLING) + end + + m.IntendedMag *= 0.1 + updateWalkingSpeed(m) + + local stepResult = m:PerformGroundStep() + + if stepResult == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL) + elseif stepResult == GroundStep.HIT_WALL then + if m.ForwardVel > 10 then + m:SetForwardVel(10) + end + + alignWithFloor(m) + elseif stepResult == GroundStep.NONE then + alignWithFloor(m) + end + + local accel = m.IntendedMag * 2 * 0x10000 + m:SetAnimationWithAccel(Animations.CRAWLING, accel) + playStepSound(m, 26, 79) + + return false +end) + +DEF_ACTION(Action.BURNING_GROUND, function(m: Mario) + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetAction(Action.BURNING_JUMP) + end + + m.BurnTimer += 2 + + if m.BurnTimer > 160 then + return m:SetAction(Action.WALKING) + end + + if m.ForwardVel < 8 then + m.ForwardVel = 8 + end + + if m.ForwardVel > 48 then + m.ForwardVel = 48 + end + + m.ForwardVel = Util.ApproachFloat(m.ForwardVel, 32, 4, 1) + + if m.Input:Has(InputFlags.NONZERO_ANALOG) then + local faceY = m.IntendedYaw - Util.ApproachFloat(m.IntendedYaw - m.FaceAngle.Y, 0, 0x600) + m.FaceAngle = Util.SetYint16(m.FaceAngle, faceY) + end + + applySlopeAccel(m) + + if m:PerformGroundStep() == GroundStep.LEFT_GROUND then + m:SetAction(Action.BURNING_FALL) + end + + local accel = m.ForwardVel / 2 * 0x10000 + m:SetAnimationWithAccel(Animations.RUNNING, accel) + playStepSound(m, 9, 45) + + m.ParticleFlags:Add(ParticleFlags.FIRE) + m:PlaySound(Sounds.MOVING_LAVA_BURN) + + m.Health -= 10 + + if m.Health < 0x100 then + m:SetAction(Action.STANDING_DEATH) + end + + m.BodyState.EyeState = MarioEyes.DEAD + return false +end) + +DEF_ACTION(Action.BUTT_SLIDE, function(m: Mario) + local cancel = commonSlideActionWithJump(m, Action.BUTT_SLIDE_STOP, Action.BUTT_SLIDE_AIR, Animations.SLIDE) + tiltBodyButtSlide(m) + + return cancel +end) + +DEF_ACTION(Action.CROUCH_SLIDE, function(m: Mario) + if m.Input:Has(InputFlags.ABOVE_SLIDE) then + return m:SetAction(Action.BUTT_SLIDE) + end + + if m.ActionTimer < 30 then + m.ActionTimer += 1 + + if m.Input:Has(InputFlags.A_PRESSED) then + if m.ForwardVel > 10 then + return m:SetJumpingAction(Action.LONG_JUMP) + end + end + end + + if m.Input:Has(InputFlags.B_PRESSED) then + if m.ForwardVel >= 10 then + return m:SetAction(Action.SLIDE_KICK) + else + return m:SetAction(Action.MOVE_PUNCHING, 9) + end + end + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetAction(Action.JUMP) + end + + if m.Input:Has(InputFlags.FIRST_PERSON) then + return m:SetAction(Action.BRAKING) + end + + return commonSlideActionWithJump(m, Action.CROUCHING, Action.FREEFALL, Animations.START_CROUCHING) +end) + +DEF_ACTION(Action.SLIDE_KICK_SLIDE, function(m: Mario) + local step + + if m.Input:Has(InputFlags.A_PRESSED) then + return m:SetAction(Action.FORWARD_ROLLOUT) + end + + m:SetAnimation(Animations.SLIDE_KICK) + + if m:IsAnimAtEnd() and m.ForwardVel < 1 then + return m:SetAction(Action.SLIDE_KICK_SLIDE_STOP) + end + + updateSliding(m, 1) + step = m:PerformGroundStep() + + if step == GroundStep.LEFT_GROUND then + m:SetAction(Action.FREEFALL, 2) + elseif step == GroundStep.HIT_WALL then + m:BonkReflection(true) + m.ParticleFlags:Add(ParticleFlags.VERTICAL_STAR) + m:SetAction(Action.BACKWARD_GROUND_KB) + end + + m:PlaySound(Sounds.MOVING_TERRAIN_SLIDE) + m.ParticleFlags:Add(ParticleFlags.DUST) + + return false +end) + +DEF_ACTION(Action.STOMACH_SLIDE, function(m: Mario) + if m.ActionTimer == 5 then + if not m.Input:Has(InputFlags.ABOVE_SLIDE) and m.Input:Has(InputFlags.A_PRESSED, InputFlags.B_PRESSED) then + return m:SetAction(if m.ForwardVel >= 0 then Action.FORWARD_ROLLOUT else Action.BACKWARD_ROLLOUT) + end + else + m.ActionTimer += 1 + end + + if updateSliding(m, 4) then + return m:SetAction(Action.STOMACH_SLIDE_STOP) + end + + commonSlideAction(m, Action.STOMACH_SLIDE_STOP, Action.FREEFALL, Animations.SLIDE_DIVE) + return false +end) + +DEF_ACTION(Action.DIVE_SLIDE, function(m: Mario) + if not m.Input:Has(InputFlags.ABOVE_SLIDE) and m.Input:Has(InputFlags.A_PRESSED, InputFlags.B_PRESSED) then + return m:SetAction(if m.ForwardVel >= 0 then Action.FORWARD_ROLLOUT else Action.BACKWARD_ROLLOUT) + end + + m:PlayLandingSoundOnce(Sounds.ACTION_TERRAIN_BODY_HIT_GROUND) + + if updateSliding(m, 8) and m:IsAnimAtEnd() then + m:SetForwardVel(0) + m:SetAction(Action.STOMACH_SLIDE_STOP) + end + + commonSlideAction(m, Action.STOMACH_SLIDE_STOP, Action.FREEFALL, Animations.DIVE) + return false +end) + +DEF_ACTION(Action.HARD_BACKWARD_GROUND_KB, function(m: Mario) + local animFrame = commonGroundKnockbackAction(m, Animations.FALL_OVER_BACKWARDS, 43, true, m.ActionArg) + + if animFrame == 43 and m.Health < 0x100 then + m:SetAction(Action.DEATH_ON_BACK) + end + + if animFrame == 54 and m.PrevAction() == Action.SPECIAL_DEATH_EXIT then + m:PlaySound(Sounds.MARIO_MAMA_MIA) + end + + if animFrame == 69 then + m:PlayLandingSoundOnce(Sounds.ACTION_TERRAIN_LANDING) + end + + return false +end) + +DEF_ACTION(Action.HARD_FORWARD_GROUND_KB, function(m: Mario) + local animFrame = commonGroundKnockbackAction(m, Animations.LAND_ON_STOMACH, 21, true, m.ActionArg) + + if animFrame == 23 and m.Health < 0x100 then + m:SetAction(Action.DEATH_ON_STOMACH) + end + + return false +end) + +DEF_ACTION(Action.BACKWARD_GROUND_KB, function(m: Mario) + commonGroundKnockbackAction(m, Animations.BACKWARD_KB, 22, true, m.ActionArg) + return false +end) + +DEF_ACTION(Action.FORWARD_GROUND_KB, function(m: Mario) + commonGroundKnockbackAction(m, Animations.FORWARD_KB, 20, true, m.ActionArg) + return false +end) + +DEF_ACTION(Action.SOFT_BACKWARD_GROUND_KB, function(m: Mario) + commonGroundKnockbackAction(m, Animations.SOFT_BACK_KB, 100, false, m.ActionArg) + return false +end) + +DEF_ACTION(Action.SOFT_FORWARD_GROUND_KB, function(m: Mario) + commonGroundKnockbackAction(m, Animations.SOFT_FRONT_KB, 100, false, m.ActionArg) + return false +end) + +DEF_ACTION(Action.GROUND_BONK, function(m: Mario) + local animFrame = commonGroundKnockbackAction(m, Animations.GROUND_BONK, 32, true, m.ActionArg) + + if animFrame == 32 then + m:PlayLandingSound(Sounds.ACTION_TERRAIN_LANDING) + end + + return false +end) + +DEF_ACTION(Action.JUMP_LAND, function(m: Mario) + if commonLandingCancels(m, sJumpLandAction, m.SetJumpingAction) then + return true + end + + commonLandingAction(m, Animations.LAND_FROM_SINGLE_JUMP) + return false +end) + +DEF_ACTION(Action.FREEFALL_LAND, function(m: Mario) + if commonLandingCancels(m, sFreefallLandAction, m.SetJumpingAction) then + return true + end + + commonLandingAction(m, Animations.GENERAL_LAND) + return false +end) + +DEF_ACTION(Action.SIDE_FLIP_LAND, function(m: Mario) + if commonLandingCancels(m, sSideFlipLandAction, m.SetJumpingAction) then + return true + end + + if commonLandingAction(m, Animations.SLIDEFLIP_LAND) ~= GroundStep.HIT_WALL then + --m.GfxAngle += Vector3int16.new(0, 0x8000, 0) + end + + return false +end) + +DEF_ACTION(Action.LONG_JUMP_LAND, function(m: Mario) + if not m.Input:Has(InputFlags.Z_DOWN) then + m.Input:Remove(InputFlags.A_PRESSED) + end + + if commonLandingCancels(m, sLongJumpLandAction, m.SetJumpingAction) then + return true + end + + if not m.Input:Has(InputFlags.NONZERO_ANALOG) then + m:PlaySoundIfNoFlag(Sounds.MARIO_UH, MarioFlags.MARIO_SOUND_PLAYED) + end + + commonLandingAction( + m, + if m.LongJumpIsSlow then Animations.CROUCH_FROM_FAST_LONGJUMP else Animations.CROUCH_FROM_SLOW_LONGJUMP + ) + + return false +end) + +DEF_ACTION(Action.DOUBLE_JUMP_LAND, function(m: Mario) + if commonLandingCancels(m, sDoubleJumpLandAction, setTripleJumpAction) then + return true + end + + commonLandingAction(m, Animations.LAND_FROM_DOUBLE_JUMP) + return false +end) + +DEF_ACTION(Action.TRIPLE_JUMP_LAND, function(m: Mario) + m.Input:Remove(InputFlags.A_PRESSED) + + if commonLandingCancels(m, sTripleJumpLandAction, m.SetJumpingAction) then + return true + end + + if not m.Input:Has(InputFlags.NONZERO_ANALOG) then + m:PlaySoundIfNoFlag(Sounds.MARIO_HAHA, MarioFlags.MARIO_SOUND_PLAYED) + end + + commonLandingAction(m, Animations.TRIPLE_JUMP_LAND) + return false +end) + +DEF_ACTION(Action.BACKFLIP_LAND, function(m: Mario) + if not m.Input:Has(InputFlags.Z_DOWN) then + m.Input:Remove(InputFlags.A_PRESSED) + end + + if commonLandingCancels(m, sBackflipLandAction, m.SetJumpingAction) then + return true + end + + if not m.Input:Has(InputFlags.NONZERO_ANALOG) then + m:PlaySoundIfNoFlag(Sounds.MARIO_HAHA, MarioFlags.MARIO_SOUND_PLAYED) + end + + commonLandingAction(m, Animations.TRIPLE_JUMP_LAND) + return false +end) + +DEF_ACTION(Action.PUNCHING, function(m: Mario) + if m.Input:Has(InputFlags.STOMPED) then + return m:SetAction(Action.SHOCKWAVE_BOUNCE) + end + + if m.Input:Has(InputFlags.NONZERO_ANALOG, InputFlags.A_PRESSED, InputFlags.OFF_FLOOR, InputFlags.ABOVE_SLIDE) then + return m:CheckCommonActionExits() + end + + if m.ActionState and m.Input:Has(InputFlags.A_DOWN) then + return m:SetAction(Action.JUMP_KICK) + end + + m.ActionState = 1 + + if m.ActionArg == 0 then + m.ActionTimer = 7 + end + + m:SetForwardVel(sPunchingForwardVelocities[m.ActionTimer + 1]) + + if m.ActionTimer > 0 then + m.ActionTimer -= 1 + end + + m:UpdatePunchSequence() + m:PerformGroundStep() + + return false +end) diff --git a/client/Mario/Moving/init.meta.json b/client/Mario/Moving/init.meta.json new file mode 100644 index 0000000..d3f1b48 --- /dev/null +++ b/client/Mario/Moving/init.meta.json @@ -0,0 +1,6 @@ +{ + "properties": { + "Disabled": true, + "RunContext": "Client" + } +} \ No newline at end of file diff --git a/sm64/Mario/Stationary.client.lua b/client/Mario/Stationary/init.client.lua similarity index 97% rename from sm64/Mario/Stationary.client.lua rename to client/Mario/Stationary/init.client.lua index 9ed4856..7c73f54 100644 --- a/sm64/Mario/Stationary.client.lua +++ b/client/Mario/Stationary/init.client.lua @@ -7,14 +7,9 @@ local Enums = System.Enums local Util = System.Util local Action = Enums.Action -local ActionFlags = Enums.ActionFlags -local ActionGroup = Enums.ActionGroups - -local AirStep = Enums.AirStep local MarioEyes = Enums.MarioEyes local InputFlags = Enums.InputFlags local MarioFlags = Enums.MarioFlags -local ParticleFlags = Enums.ParticleFlags type Mario = System.Mario @@ -545,6 +540,8 @@ DEF_ACTION(Action.SIDE_FLIP_LAND_STOP, function(m: Mario) end landingStep(m, Animations.SLIDEFLIP_LAND, Action.IDLE) + --m.GfxAngle += Vector3int16.new(0, 0x8000, 0) + return false end) @@ -562,7 +559,7 @@ DEF_ACTION(Action.TRIPLE_JUMP_LAND_STOP, function(m: Mario) return true end - landingStep(m, Animations.GENERAL_LAND, Action.IDLE) + landingStep(m, Animations.TRIPLE_JUMP_LAND, Action.IDLE) return false end) @@ -596,13 +593,10 @@ DEF_ACTION(Action.LONG_JUMP_LAND_STOP, function(m: Mario) if checkCommonLandingCancels(m, Action.JUMP) then return true end - - -- stylua: ignore - landingStep(m, - if m.LongJumpIsSlow - then Animations.CROUCH_FROM_FAST_LONGJUMP - else Animations.CROUCH_FROM_SLOW_LONGJUMP, - + + landingStep( + m, + if m.LongJumpIsSlow then Animations.CROUCH_FROM_FAST_LONGJUMP else Animations.CROUCH_FROM_SLOW_LONGJUMP, Action.CROUCHING ) diff --git a/client/Mario/Stationary/init.meta.json b/client/Mario/Stationary/init.meta.json new file mode 100644 index 0000000..d3f1b48 --- /dev/null +++ b/client/Mario/Stationary/init.meta.json @@ -0,0 +1,6 @@ +{ + "properties": { + "Disabled": true, + "RunContext": "Client" + } +} \ No newline at end of file diff --git a/sm64/Mario/init.lua b/client/Mario/init.lua similarity index 95% rename from sm64/Mario/init.lua rename to client/Mario/init.lua index a5b3960..0dbb912 100644 --- a/sm64/Mario/init.lua +++ b/client/Mario/init.lua @@ -3,10 +3,14 @@ local Mario = {} Mario.__index = Mario local SM64 = script.Parent +local Core = SM64.Parent + local Util = require(SM64.Util) local Enums = require(SM64.Enums) -local Sounds = require(SM64.Sounds) -local Animations = require(SM64.Animations) +local Shared = require(Core.Shared) + +local Sounds = Shared.Sounds +local Animations = Shared.Animations local Types = require(SM64.Types) local Flags = Types.Flags @@ -28,7 +32,6 @@ local SurfaceClass = Enums.SurfaceClass local ParticleFlags = Enums.ParticleFlags local AirStep = Enums.AirStep -local WaterStep = Enums.WaterStep local GroundStep = Enums.GroundStep export type BodyState = Types.BodyState @@ -44,7 +47,7 @@ export type Class = Mario -- BINDINGS ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -local actions: { [number]: MarioAction } = {} +local actions: { MarioAction } = {} Mario.Animations = Animations Mario.Actions = actions Mario.Sounds = Sounds @@ -86,7 +89,7 @@ function Mario.SetAnimation(m: Mario, anim: Animation): number m.AnimCurrent = nil end - local startFrame: number = anim:GetAttribute("StartFrame") or -1 + local startFrame: number = anim:GetAttribute("StartFrame") or 0 m.AnimAccelAssist = 0 m.AnimAccel = 0 @@ -101,8 +104,10 @@ function Mario.SetAnimationWithAccel(m: Mario, anim: Animation, accel: number) if m.AnimCurrent ~= anim then m:SetAnimation(anim) m.AnimAccelAssist = -accel - m.AnimAccel = accel end + + m.AnimAccel = accel + return m.AnimFrame end function Mario.SetAnimToFrame(m: Mario, frame: number) @@ -190,7 +195,7 @@ function Mario.PlayJumpSound(m: Mario) end function Mario.AdjustSoundForSpeed(m: Mario) - local absForwardVel = math.abs(m.ForwardVel) + local _absForwardVel = math.abs(m.ForwardVel) -- TODO: Adjust Moving Speed Pitch end @@ -234,12 +239,12 @@ function Mario.PlayActionSound(m: Mario, sound: Instance?, wave: number?) end end -function Mario.PlayLandingSound(m: Mario, sound: Instance?) - local sound = sound or Sounds.ACTION_TERRAIN_LANDING +function Mario.PlayLandingSound(m: Mario, maybeSound: Instance?) + local sound = maybeSound or Sounds.ACTION_TERRAIN_LANDING -- stylua: ignore local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) - then Sounds.ACTION_METAL_LANDING + then Sounds.ACTION_METAL_LANDING else sound m:PlaySoundAndSpawnParticles(landSound, 1) @@ -312,16 +317,10 @@ function Mario.GetFloorClass(m: Mario): number local floor = m.Floor if floor then - local hit: BasePart? = floor.Instance - - if hit then - local material = floor.Material - local physics = hit.CustomPhysicalProperties - - if not physics then - physics = PhysicalProperties.new(material) - end + local hit = floor.Instance + if hit and hit:IsA("BasePart") then + local physics = hit.CurrentPhysicalProperties local friction = physics.Friction if friction <= 0.025 then @@ -372,7 +371,7 @@ function Mario.FloorIsSlippery(m: Mario) if floor then local floorClass = m:GetFloorClass() - local deg: number = 90 + local deg = 90 if floorClass == SurfaceClass.VERY_SLIPPERY then deg = 10 @@ -394,7 +393,7 @@ function Mario.FloorIsSlope(m: Mario) if floor then local floorClass = m:GetFloorClass() - local deg: number = 15 + local deg = 15 if floorClass == SurfaceClass.VERY_SLIPPERY then deg = 5 @@ -416,7 +415,7 @@ function Mario.FloorIsSteep(m: Mario) if floor and not m:FacingDownhill() then local floorClass = m:GetFloorClass() - local deg: number = 30 + local deg = 30 if floorClass == SurfaceClass.VERY_SLIPPERY then deg = 15 @@ -641,9 +640,9 @@ function Mario.SetActionCutscene(m: Mario, action: number, actionArg: number): n return action end -function Mario.SetAction(m: Mario, action: number, actionArg: number?): boolean +function Mario.SetAction(m: Mario, action: number, maybeActionArg: number?): boolean local group = bit32.band(action, ActionGroups.GROUP_MASK) - local actionArg: number = actionArg or 0 + local actionArg = maybeActionArg or 0 if group == ActionGroups.MOVING then action = m:SetActionMoving(action, actionArg) @@ -888,14 +887,14 @@ function Mario.StationaryGroundStep(m: Mario): number end function Mario.PerformGroundQuarterStep(m: Mario, nextPos: Vector3): number - local lowerPos, lowerWall = Util.FindWallCollisions(nextPos, 30, 24) + local lowerPos, _lowerWall = Util.FindWallCollisions(nextPos, 30, 24) nextPos = lowerPos local upperPos, upperWall = Util.FindWallCollisions(nextPos, 60, 50) nextPos = upperPos local floorHeight, floor = Util.FindFloor(nextPos) - local ceilHeight, ceil = Util.FindCeil(nextPos, floorHeight) + local ceilHeight, _ceil = Util.FindCeil(nextPos, floorHeight) m.Wall = upperWall @@ -923,7 +922,7 @@ function Mario.PerformGroundQuarterStep(m: Mario, nextPos: Vector3): number m.Position = Vector3.new(nextPos.X, floorHeight, nextPos.Z) if upperWall then - local wallDYaw = Util.Atan2s(upperWall.Normal.Z, upperWall.Normal.X) - m.FaceAngle.Y + local wallDYaw = Util.SignedShort(Util.Atan2s(upperWall.Normal.Z, upperWall.Normal.X) - m.FaceAngle.Y) if math.abs(wallDYaw) >= 0x2AAA and math.abs(wallDYaw) <= 0x5555 then return GroundStep.NONE @@ -1015,7 +1014,7 @@ function Mario.PerformAirQuarterStep(m: Mario, intendedPos: Vector3, stepArg: nu nextPos = lowerPos local floorHeight, floor = Util.FindFloor(nextPos) - local ceilHeight, ceil = Util.FindCeil(nextPos) + local ceilHeight, _ceil = Util.FindCeil(nextPos, floorHeight) m.Wall = nil @@ -1073,7 +1072,7 @@ function Mario.PerformAirQuarterStep(m: Mario, intendedPos: Vector3, stepArg: nu if upperWall or lowerWall then local wall = assert(upperWall or lowerWall) - local wallDYaw = Util.Atan2s(wall.Normal.Z, wall.Normal.X) - m.FaceAngle.Y + local wallDYaw = Util.SignedShort(Util.Atan2s(wall.Normal.Z, wall.Normal.X) - m.FaceAngle.Y) m.Wall = wall if math.abs(wallDYaw) > 0x6000 then @@ -1166,9 +1165,9 @@ function Mario.ApplyGravity(m: Mario) end end -function Mario.PerformAirStep(m: Mario, stepArg: number?) +function Mario.PerformAirStep(m: Mario, maybeStepArg: number?) + local stepArg = maybeStepArg or 0 local stepResult = AirStep.NONE - local stepArg = stepArg or 0 m.Wall = nil for i = 1, 4 do @@ -1255,7 +1254,11 @@ function Mario.UpdateJoystickInputs(m: Mario) end if m.IntendedMag > 0 then - m.IntendedYaw = Util.Atan2s(-controller.StickY, controller.StickX) + local camera = workspace.CurrentCamera + local lookVector = camera.CFrame.LookVector + local cameraYaw = Util.Atan2s(-lookVector.Z, -lookVector.X) + + m.IntendedYaw = Util.SignedShort(Util.Atan2s(-controller.StickY, controller.StickX) + cameraYaw) m.Input:Add(InputFlags.NONZERO_ANALOG) else m.IntendedYaw = m.FaceAngle.Y @@ -1332,10 +1335,10 @@ end function Mario.UpdateCaps(m: Mario): Flags local flags = m.Flags - local action + local _action if m.CapTimer > 0 then - action = m.Action + _action = m.Action if m.CapTimer <= 60 then m.CapTimer -= 1 @@ -1395,9 +1398,15 @@ end function Mario.CheckKickOrPunchWall(m: Mario) if m.Flags:Has(MarioFlags.PUNCHING, MarioFlags.KICKING, MarioFlags.TRIPPING) then - local range = Vector3.new(Util.Sins(m.FaceAngle.Y), 0, Util.Coss(m.FaceAngle.Y)) - local detector = m.Position + range - local disp, wall = Util.FindWallCollisions(detector, 80, 5) + -- stylua: ignore + local range = Vector3.new( + Util.Sins(m.FaceAngle.Y), + 0, + Util.Coss(m.FaceAngle.Y) + ) + + local detector = m.Position + (range * 50) + local _disp, wall = Util.FindWallCollisions(detector, 80, 5) if wall then if m.Action() ~= Action.MOVE_PUNCHING or m.ForwardVel >= 0 then @@ -1464,7 +1473,7 @@ function Mario.ExecuteAction(m: Mario): number m.GfxAngle *= 0 m.AnimDirty = true m.ThrowMatrix = nil - m.AnimSkipInterp = false + m.AnimSkipInterp = math.max(0, m.AnimSkipInterp - 1) m:ResetBodyState() m:UpdateInputs() @@ -1606,6 +1615,7 @@ function Mario.new(): Mario AnimReset = false, AnimFrameCount = 0, AnimAccelAssist = 0, + AnimSkipInterp = 0, } return setmetatable(state, Mario) diff --git a/sm64/Types/Flags.lua b/client/Types/Flags.lua similarity index 100% rename from sm64/Types/Flags.lua rename to client/Types/Flags.lua diff --git a/sm64/Types/init.lua b/client/Types/init.lua similarity index 95% rename from sm64/Types/init.lua rename to client/Types/init.lua index 06ed5f7..d89726b 100644 --- a/sm64/Types/init.lua +++ b/client/Types/init.lua @@ -105,8 +105,9 @@ export type MarioState = { AnimDirty: boolean, AnimReset: boolean, AnimSetFrame: number, - AnimSkipInterp: boolean?, + AnimSkipInterp: number, } -local result = { Flags = Flags } -return table.freeze(result) +return table.freeze({ + Flags = Flags, +}) diff --git a/sm64/Util/init.lua b/client/Util/init.lua similarity index 81% rename from sm64/Util/init.lua rename to client/Util/init.lua index 88dfcc1..9b1ea6b 100644 --- a/sm64/Util/init.lua +++ b/client/Util/init.lua @@ -1,13 +1,14 @@ --!strict +local Core = script.Parent.Parent local Util = { - TruncateRaycasts = true, GlobalTimer = 0, Scale = 1 / 16, } local rayParams = RaycastParams.new() -rayParams.CollisionGroup = "Player" +rayParams.RespectCanCollide = true +rayParams.IgnoreWater = true local SHORT_TO_RAD = (2 * math.pi) / 0x10000 local VECTOR3_XZ = Vector3.one - Vector3.yAxis @@ -57,18 +58,18 @@ end function Util.ToRotation(v: Vector3int16): CFrame local angle = Util.ToEulerAngles(v) - - -- stylua: ignore - local matrix = CFrame.fromAxisAngle(Vector3.yAxis, angle.Y) - * CFrame.fromAxisAngle(Vector3.xAxis, -angle.X) - * CFrame.fromAxisAngle(Vector3.zAxis, -angle.Z) + + local matrix = CFrame.fromAxisAngle(Vector3.yAxis, angle.Y) + * CFrame.fromAxisAngle(Vector3.xAxis, -angle.X) + * CFrame.fromAxisAngle(Vector3.zAxis, -angle.Z) return matrix end -function Util.Raycast(pos: Vector3, dir: Vector3, rayParams: RaycastParams?, worldRoot: WorldRoot?): RaycastResult? +function Util.Raycast(pos: Vector3, dir: Vector3, maybeParams: RaycastParams?, worldRoot: WorldRoot?): RaycastResult? local root = worldRoot or workspace - local result: RaycastResult? = root:Raycast(pos, dir) + local params = maybeParams or rayParams + local result: RaycastResult? = root:Raycast(pos, dir, params) if script:GetAttribute("Debug") then local color = Color3.new(result and 0 or 1, result and 1 or 0, 0) @@ -106,16 +107,17 @@ end function Util.FindFloor(pos: Vector3): (number, RaycastResult?) local newPos = pos + local height = -11000 - if Util.TruncateRaycasts then + if Core:GetAttribute("EmulateLimits") then local trunc = Vector3int16.new(pos.X, pos.Y, pos.Z) if math.abs(trunc.X) >= 0x2000 then - return -11000, nil + return height, nil end if math.abs(trunc.Z) >= 0x2000 then - return -11000, nil + return height, nil end newPos = Vector3.new(trunc.X, trunc.Y, trunc.Z) @@ -124,7 +126,7 @@ function Util.FindFloor(pos: Vector3): (number, RaycastResult?) local result = Util.RaycastSM64(newPos + (Vector3.yAxis * 100), -Vector3.yAxis * 10000) if result then - local height = Util.SignedShort(result.Position.Y) + height = Util.SignedShort(result.Position.Y) result.Position = Vector3.new(pos.X, height, pos.Z) return height, result @@ -134,8 +136,8 @@ function Util.FindFloor(pos: Vector3): (number, RaycastResult?) end function Util.FindCeil(pos: Vector3, height: number?): (number, RaycastResult?) - local pos = Vector3.new(pos.X, (height or pos.Y) + 80, pos.Z) - local result = Util.RaycastSM64(pos, Vector3.yAxis * 10000) + local head = Vector3.new(pos.X, (height or pos.Y) + 80, pos.Z) + local result = Util.RaycastSM64(head, Vector3.yAxis * 10000) if result then return result.Position.Y, result @@ -146,7 +148,6 @@ end function Util.FindWallCollisions(pos: Vector3, offset: number, radius: number): (Vector3, RaycastResult?) local origin = pos + Vector3.new(0, offset, 0) - local walls: { RaycastResult } = {} local lastWall: RaycastResult? local disp = Vector3.zero @@ -158,8 +159,8 @@ function Util.FindWallCollisions(pos: Vector3, offset: number, radius: number): if math.abs(normal.Y) < 0.01 then local surface = contact.Position - local offset = (surface - pos) * VECTOR3_XZ - local dist = offset.Magnitude + local move = (surface - pos) * VECTOR3_XZ + local dist = move.Magnitude if dist < radius then disp += (contact.Normal * VECTOR3_XZ) * (radius - dist) @@ -215,17 +216,23 @@ function Util.ApproachInt(current: number, target: number, inc: number, dec: num end function Util.Sins(short: number): number - short = Util.SignedShort(short) - return math.sin(short * SHORT_TO_RAD) + local value = Util.SignedShort(short) + value = math.floor(value / 16) * 16 + + return math.sin(value * SHORT_TO_RAD) end function Util.Coss(short: number): number - short = Util.SignedShort(short) + local value = Util.SignedShort(short) + value = math.floor(value / 16) * 16 + return math.cos(short * SHORT_TO_RAD) end local function atan2_lookup(y: number, x: number) - return math.atan2(y, x) / SHORT_TO_RAD + local value = math.atan2(y, x) / SHORT_TO_RAD + value = math.floor(value / 16) * 16 + return Util.SignedShort(value) end function Util.Atan2s(y: number, x: number): number @@ -270,4 +277,4 @@ function Util.Atan2s(y: number, x: number): number return Util.SignedShort(ret) end -return table.freeze(Util) +return Util diff --git a/sm64/Util/init.meta.json b/client/Util/init.meta.json similarity index 100% rename from sm64/Util/init.meta.json rename to client/Util/init.meta.json diff --git a/sm64/init.client.lua b/client/init.client.lua similarity index 62% rename from sm64/init.client.lua rename to client/init.client.lua index 8265e81..f224cac 100644 --- a/sm64/init.client.lua +++ b/client/init.client.lua @@ -1,4 +1,15 @@ --!strict +local Core = script.Parent + +if Core:GetAttribute("HotLoading") then + task.wait(3) +end + +for i, desc in script:GetDescendants() do + if desc:IsA("BaseScript") then + desc.Enabled = true + end +end local Players = game:GetService("Players") local RunService = game:GetService("RunService") @@ -8,7 +19,9 @@ local UserInputService = game:GetService("UserInputService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ContextActionService = game:GetService("ContextActionService") -local Sounds = require(script.Sounds) +local Shared = require(Core.Shared) +local Sounds = Shared.Sounds + local Enums = require(script.Enums) local Mario = require(script.Mario) local Types = require(script.Types) @@ -16,7 +29,7 @@ local Util = require(script.Util) local Action = Enums.Action local Buttons = Enums.Buttons -local InputFlags = Enums.InputFlags +local MarioFlags = Enums.MarioFlags local ParticleFlags = Enums.ParticleFlags type InputType = Enum.UserInputType | Enum.KeyCode @@ -24,7 +37,15 @@ type Controller = Types.Controller type Mario = Mario.Class local player: Player = assert(Players.LocalPlayer) +local FLIP = CFrame.Angles(0, math.pi, 0) + local STEP_RATE = 30 +local NULL_TEXT = `NULL` + +local debugStats = Instance.new("BoolValue") +debugStats.Name = "DebugStats" +debugStats.Archivable = false +debugStats.Parent = game local PARTICLE_CLASSES = { Fire = true, @@ -33,41 +54,63 @@ local PARTICLE_CLASSES = { ParticleEmitter = true, } -local FLIP = CFrame.Angles(0, math.pi, 0) +local AUTO_STATS = { + "Position", + "Velocity", + "AnimFrame", + "FaceAngle", + + "ActionState", + "ActionTimer", + "ActionArg", + + "ForwardVel", + "SlideVelX", + "SlideVelZ", + + "CeilHeight", + "FloorHeight", +} + +local ControlModule: { + GetMoveVector: (self: any) -> Vector3, +} + +while not ControlModule do + local inst = player:FindFirstChild("ControlModule", true) + + if inst then + ControlModule = (require :: any)(inst) + end + + task.wait(0.1) +end ------------------------------------------------------------------------------------------------------------------------------------------------- -- Input Driver ------------------------------------------------------------------------------------------------------------------------------------------------- -local MATH_TAU = math.pi * 2 -local BUTTON_FEED: { Enum.UserInputState } = {} -local BUTTON_A = "BTN_" .. Buttons.A_BUTTON +-- NOTE: I had to replace the default BindAction via KeyCode and UserInputType +-- BindAction forces some mappings (such as R2 mapping to MouseButton1) which you +-- can't turn off otherwise. + +local BUTTON_FEED = {} +local BUTTON_BINDS = {} local function toStrictNumber(str: string): number local result = tonumber(str) return assert(result, "Invalid number!") end -local function processAction(id: string, state: Enum.UserInputState) - if id == "MarioDebug" then +local function processAction(id: string, state: Enum.UserInputState, input: InputObject) + if id == "MarioDebug" and Core:GetAttribute("DebugToggle") then if state == Enum.UserInputState.Begin then - local isDebug = not script.Util:GetAttribute("Debug") local character = player.Character - - -- stylua: ignore - local rootPart = if character - then character.PrimaryPart - else nil - if rootPart then - local action = rootPart:FindFirstChild("Action") - - if action and action:IsA("BillboardGui") then - action.Enabled = isDebug - end + if character then + local isDebug = not character:GetAttribute("Debug") + character:SetAttribute("Debug", isDebug) end - - script.Util:SetAttribute("Debug", isDebug) end else local button = toStrictNumber(id:sub(5)) @@ -75,23 +118,40 @@ local function processAction(id: string, state: Enum.UserInputState) end end +local function processInput(input: InputObject, gameProcessedEvent: boolean) + if gameProcessedEvent then + return + end + if BUTTON_BINDS[input.UserInputType] ~= nil then + processAction(BUTTON_BINDS[input.UserInputType], input.UserInputState, input) + end + if BUTTON_BINDS[input.KeyCode] ~= nil then + processAction(BUTTON_BINDS[input.KeyCode], input.UserInputState, input) + end +end + +UserInputService.InputBegan:Connect(processInput) +UserInputService.InputChanged:Connect(processInput) +UserInputService.InputEnded:Connect(processInput) + local function bindInput(button: number, label: string, ...: InputType) local id = "BTN_" .. button - ContextActionService:BindAction(id, processAction, true, ...) if UserInputService.TouchEnabled then + ContextActionService:BindAction(id, processAction, true) ContextActionService:SetTitle(id, label) end + + for i, input in { ... } do + BUTTON_BINDS[input] = id + end end local function updateCollisions() for i, player in Players:GetPlayers() do - assert(player:IsA("Player")) - -- stylua: ignore - local rootPart = if player.Character - then player.Character.PrimaryPart - else nil + local character = player.Character + local rootPart = character and character.PrimaryPart if rootPart then local parts = rootPart:GetConnectedParts(true) @@ -105,12 +165,24 @@ local function updateCollisions() end end -local function updateController(controller: Controller, humanoid: Humanoid) - local moveDir = humanoid.MoveDirection - local pos = Vector2.new(moveDir.X, -moveDir.Z) - local len = math.min(1, pos.Magnitude) +local function updateController(controller: Controller, humanoid: Humanoid?) + if not humanoid then + return + end - controller.StickMag = len * 64 + local moveDir = ControlModule:GetMoveVector() + local pos = Vector2.new(moveDir.X, -moveDir.Z) + local mag = 0 + + if pos.Magnitude > 0 then + if pos.Magnitude > 1 then + pos = pos.Unit + end + + mag = pos.Magnitude + end + + controller.StickMag = mag * 64 controller.StickX = pos.X * 64 controller.StickY = pos.Y * 64 @@ -119,26 +191,47 @@ local function updateController(controller: Controller, humanoid: Humanoid) if humanoid.Jump then BUTTON_FEED[Buttons.A_BUTTON] = Enum.UserInputState.Begin - humanoid.Jump = false elseif controller.ButtonDown:Has(Buttons.A_BUTTON) then BUTTON_FEED[Buttons.A_BUTTON] = Enum.UserInputState.End end + local character = humanoid.Parent + local lastButtonValue = controller.ButtonDown() + for button, state in pairs(BUTTON_FEED) do if state == Enum.UserInputState.Begin then controller.ButtonDown:Add(button) - controller.ButtonPressed:Add(button) elseif state == Enum.UserInputState.End then controller.ButtonDown:Remove(button) end end + local buttonValue = controller.ButtonDown() + controller.ButtonPressed:Set(buttonValue) table.clear(BUTTON_FEED) + + if character and character:GetAttribute("TAS") then + return + end + + if Core:GetAttribute("ToolAssistedInput") then + return + end + + local diff = bit32.bxor(buttonValue, lastButtonValue) + controller.ButtonPressed:Band(diff) end ContextActionService:BindAction("MarioDebug", processAction, false, Enum.KeyCode.P) bindInput(Buttons.B_BUTTON, "B", Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonX) -bindInput(Buttons.Z_TRIG, "Z", Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift, Enum.KeyCode.ButtonL2) +bindInput( + Buttons.Z_TRIG, + "Z", + Enum.KeyCode.LeftShift, + Enum.KeyCode.RightShift, + Enum.KeyCode.ButtonL2, + Enum.KeyCode.ButtonR2 +) ------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Network Dispatch @@ -152,11 +245,7 @@ assert(lazyNetwork:IsA("RemoteEvent"), "bad lazyNetwork!") function Commands.PlaySound(player: Player, name: string) local sound: Sound? = Sounds[name] local character = player.Character - - -- stylua: ignore - local rootPart = if character - then character.PrimaryPart - else nil + local rootPart = character and character.PrimaryPart if rootPart and sound then local oldSound: Instance? = rootPart:FindFirstChild(name) @@ -177,19 +266,11 @@ end function Commands.SetParticle(player: Player, name: string, set: boolean) local character = player.Character - - -- stylua: ignore - local rootPart = if character - then character.PrimaryPart - else nil + local rootPart = character and character.PrimaryPart if rootPart then local particles = rootPart:FindFirstChild("Particles") - - -- stylua: ignore - local inst = if particles - then particles:FindFirstChild(name) - else nil + local inst = particles and particles:FindFirstChild(name) if inst and PARTICLE_CLASSES[inst.ClassName] then local particle = inst :: ParticleEmitter @@ -206,11 +287,7 @@ end function Commands.SetAngle(player: Player, angle: Vector3int16) local character = player.Character - - -- stylua: ignore - local waist = if character - then character:FindFirstChild("Waist", true) - else nil + local waist = character and character:FindFirstChild("Waist", true) if waist and waist:IsA("Motor6D") then local props = { C1 = Util.ToRotation(-angle) + waist.C1.Position } @@ -219,6 +296,17 @@ function Commands.SetAngle(player: Player, angle: Vector3int16) end end +function Commands.SetCamera(player: Player, cf: CFrame?) + local camera = workspace.CurrentCamera + + if cf ~= nil then + camera.CameraType = Enum.CameraType.Scriptable + camera.CFrame = cf + else + camera.CameraType = Enum.CameraType.Custom + end +end + local function processCommand(player: Player, cmd: string, ...: any) local command = Commands[cmd] @@ -248,16 +336,15 @@ lazyNetwork.OnClientEvent:Connect(onNetworkReceive) local lastUpdate = os.clock() local lastAngle: Vector3int16? - local mario: Mario = Mario.new() -local controller = mario.Controller -local enumMap = {} -local goalCF: CFrame -local activeTrack: AnimationTrack? -local peakSpeed = 0 +local subframe = 0 -- 30hz subframe local emptyId = "" +local goalCF: CFrame +local prevCF: CFrame +local activeTrack: AnimationTrack? + local reset = Instance.new("BindableEvent") reset.Archivable = false reset.Parent = script @@ -274,8 +361,23 @@ while not player.Character do end local character = assert(player.Character) -local pivot = character:GetPivot().Position -mario.Position = Util.ToSM64(pivot) +local pivot = character:GetPivot() +mario.Position = Util.ToSM64(pivot.Position) + +goalCF = pivot +prevCF = pivot + +local function setDebugStat(key: string, value: any) + if typeof(value) == "Vector3" then + value = string.format("%.3f, %.3f, %.3f", value.X, value.Y, value.Z) + elseif typeof(value) == "Vector3int16" then + value = string.format("%i, %i, %i", value.X, value.Y, value.Z) + elseif type(value) == "number" then + value = string.format("%.3f", value) + end + + debugStats:SetAttribute(key, value) +end local function onReset() local roblox = Vector3.yAxis * 100 @@ -284,13 +386,16 @@ local function onReset() if char then local reset = char:FindFirstChild("Reset") + local cf = CFrame.new(roblox) + char:PivotTo(cf) + + goalCF = cf + prevCF = cf if reset and reset:IsA("RemoteEvent") then reset:FireServer() end - - char:PivotTo(cf) end mario.SlideVelX = 0 @@ -314,32 +419,46 @@ local function update() local now = os.clock() local gfxRot = CFrame.identity - + -- stylua: ignore - local humanoid = if character - then character:FindFirstChildOfClass("Humanoid") - else nil + local scale = character:GetScale() + Util.Scale = scale / 16 -- HACK! Should this be instanced? - local simSpeed = tonumber(script:GetAttribute("TimeScale") or nil) or 1 - local frames = math.floor((now - lastUpdate) * (STEP_RATE * simSpeed)) + local pos = character:GetPivot().Position + local dist = (Util.ToRoblox(mario.Position) - pos).Magnitude + local humanoid = character:FindFirstChildOfClass("Humanoid") - if frames > 0 and humanoid then - lastUpdate = now - updateCollisions() - - for i = 1, math.min(4, frames) do - updateController(mario.Controller, humanoid) - mario:ExecuteAction() - end - - local pos = Util.ToRoblox(mario.Position) - local rot = Util.ToRotation(mario.FaceAngle) - - gfxRot = Util.ToRotation(mario.GfxAngle) - goalCF = CFrame.new(pos) * FLIP * gfxRot + if dist > (scale * 20) then + mario.Position = Util.ToSM64(pos) end - local interp = math.min(1, simSpeed / 2) + local simSpeed = tonumber(character:GetAttribute("TimeScale") or nil) or 1 + subframe += (now - lastUpdate) * (STEP_RATE * simSpeed) + lastUpdate = now + + if character:GetAttribute("WingCap") or Core:GetAttribute("WingCap") then + mario.Flags:Add(MarioFlags.WING_CAP) + mario.Flags:Remove(MarioFlags.NORMAL_CAP) + else + mario.Flags:Add(MarioFlags.NORMAL_CAP) + mario.Flags:Remove(MarioFlags.WING_CAP) + end + + subframe = math.min(subframe, 4) -- Prevent execution runoff + + while subframe >= 1 do + subframe -= 1 + updateCollisions() + + updateController(mario.Controller, humanoid) + mario:ExecuteAction() + + local gfxPos = Util.ToRoblox(mario.Position) + gfxRot = Util.ToRotation(mario.GfxAngle) + + prevCF = goalCF + goalCF = CFrame.new(gfxPos) * FLIP * gfxRot + end if character and goalCF then local cf = character:GetPivot() @@ -351,6 +470,13 @@ local function update() local animSpeed = 0.1 / simSpeed if activeTrack and (activeTrack.Animation ~= anim or mario.AnimReset) then + if tostring(activeTrack.Animation) == "TURNING_PART1" then + if anim and anim.Name == "TURNING_PART2" then + mario.AnimSkipInterp = 2 + animSpeed *= 2 + end + end + activeTrack:Stop(animSpeed) activeTrack = nil end @@ -389,50 +515,59 @@ local function update() end if rootPart then - local action = rootPart:FindFirstChild("Action") local particles = rootPart:FindFirstChild("Particles") local alignPos = rootPart:FindFirstChildOfClass("AlignPosition") local alignCF = rootPart:FindFirstChildOfClass("AlignOrientation") + + local actionId = mario.Action() local throw = mario.ThrowMatrix if throw then - local pos = Util.ToRoblox(throw.Position) - goalCF = throw.Rotation * FLIP + pos + local throwPos = Util.ToRoblox(throw.Position) + goalCF = throw.Rotation * FLIP + throwPos end if alignCF then - cf = cf:Lerp(goalCF, interp) + local nextCF = prevCF:Lerp(goalCF, subframe) + + -- stylua: ignore + cf = if mario.AnimSkipInterp > 0 + then cf.Rotation + nextCF.Position + else nextCF + alignCF.CFrame = cf.Rotation end - - -- stylua: ignore - local debugLabel = if action - then action:FindFirstChildOfClass("TextLabel") - else nil - if debugLabel then - local actionId = mario.Action() - - -- stylua: ignore - local anim = if activeTrack - then activeTrack.Animation - else nil - - -- stylua: ignore - local animName = if anim - then anim.Name - else nil + local isDebug = character:GetAttribute("Debug") + local limits = character:GetAttribute("EmulateLimits") - local debugText = "Action: " - .. Enums.GetName(Action, actionId) - .. "\n" - .. "Animation: " - .. tostring(animName) - .. "\n" - .. "ForwardVel: " - .. string.format("%.2f", mario.ForwardVel) + script.Util:SetAttribute("Debug", isDebug) + debugStats.Value = isDebug - debugLabel.Text = debugText + if limits ~= nil then + Core:SetAttribute("TruncateBounds", limits) + end + + if isDebug then + local animName = activeTrack and tostring(activeTrack.Animation) + setDebugStat("Animation", animName) + + local actionName = Enums.GetName(Action, actionId) + setDebugStat("Action", actionName) + + local wall = mario.Wall + setDebugStat("Wall", wall and wall.Instance.Name or NULL_TEXT) + + local floor = mario.Floor + setDebugStat("Floor", floor and floor.Instance.Name or NULL_TEXT) + + local ceil = mario.Ceil + setDebugStat("Ceiling", ceil and ceil.Instance.Name or NULL_TEXT) + end + + for _, name in AUTO_STATS do + local value = rawget(mario :: any, name) + setDebugStat(name, value) end if alignPos then @@ -440,14 +575,12 @@ local function update() end local bodyState = mario.BodyState - local action = mario.Action() + local ang = bodyState.TorsoAngle - if action ~= Action.BUTT_SLIDE and action ~= Action.WALKING then + if actionId ~= Action.BUTT_SLIDE and actionId ~= Action.WALKING then bodyState.TorsoAngle *= 0 end - local ang = bodyState.TorsoAngle - if ang ~= lastAngle then networkDispatch("SetAngle", ang) lastAngle = ang @@ -458,9 +591,7 @@ local function update() local inst = particles:FindFirstChild(name) if inst and PARTICLE_CLASSES[inst.ClassName] then - local name = inst.Name local particle = inst :: ParticleEmitter - local emit = particle:GetAttribute("Emit") local hasFlag = mario.ParticleFlags:Has(flag) diff --git a/client/init.meta.json b/client/init.meta.json new file mode 100644 index 0000000..b846766 --- /dev/null +++ b/client/init.meta.json @@ -0,0 +1,5 @@ +{ + "properties": { + "RunContext": "Client" + } +} \ No newline at end of file diff --git a/default.project.json b/default.project.json index f5e3402..c716dd3 100644 --- a/default.project.json +++ b/default.project.json @@ -5,55 +5,32 @@ "$className": "DataModel", "$ignoreUnknownInstances": true, - "ReplicatedFirst": { - "$className": "ReplicatedFirst", + "Workspace": { + "$className": "Workspace", "$ignoreUnknownInstances": true, "SM64": { - "$path": "SM64", - "$ignoreUnknownInstances": true - } - }, - - "ServerScriptService": { - "$className": "ServerScriptService", - "$ignoreUnknownInstances": true, - - "LazyNetworking": { - "$path": "rbx/LazyNetworking.server.lua" - }, - - "StarterCharacter": { - "$path": "rbx/StarterCharacter" - } - }, - - "StarterPlayer": { - "$className": "StarterPlayer", - "$ignoreUnknownInstances": true, - - "$properties": { - "EnableMouseLockOption": false - }, - - "StarterCharacterScripts": { - "$className": "StarterCharacterScripts", - "$ignoreUnknownInstances": true, - - "Animate": { - "$className": "Hole" + "$className": "Folder", + + "$attributes": { + "TimeScale": 1, + "WingCap": false, + "HotLoading": false, + "DebugToggle": true, + "TruncateBounds": true, + "ToolAssistedInput": true }, - "Sound": { - "$className": "Hole" + "Client": { + "$path": "client" }, - "Health": { - "$className": "Hole" + "Server": { + "$path": "server" }, - "Appearance": { - "$path": "rbx/Appearance.server.lua" + "Shared": { + "$path": "shared" } } } diff --git a/rbx/LazyNetworking.server.lua b/server/LazyNetworking.server.lua similarity index 75% rename from rbx/LazyNetworking.server.lua rename to server/LazyNetworking.server.lua index e1f94d1..2ead0c0 100644 --- a/rbx/LazyNetworking.server.lua +++ b/server/LazyNetworking.server.lua @@ -3,13 +3,15 @@ local Validators: { [string]: (Player, ...any) -> boolean } = {} type Echo = () -> () local ReplicatedStorage = game:GetService("ReplicatedStorage") -local ReplicatedFirst = game:GetService("ReplicatedFirst") -local PhysicsService = game:GetService("PhysicsService") -local Sounds = require(ReplicatedFirst.SM64.Sounds) +local Core = script.Parent.Parent + +local Shared = require(Core.Shared) +local Sounds = Shared.Sounds local lazy = Instance.new("RemoteEvent") lazy.Parent = ReplicatedStorage lazy.Name = "LazyNetwork" +lazy.Archivable = false function Validators.PlaySound(player: Player, name: string) local sound: Instance? = Sounds[name] @@ -27,19 +29,11 @@ function Validators.SetParticle(player: Player, name: string, set: boolean?) end local character = player.Character - - -- stylua: ignore - local rootPart = if character - then character.PrimaryPart - else nil + local rootPart = character and character.PrimaryPart if rootPart then local particles = rootPart:FindFirstChild("Particles") - - -- stylua: ignore - local particle = if particles - then particles:FindFirstChild(name) - else nil + local particle = particles and particles:FindFirstChild(name) if particle then return true diff --git a/server/StarterCharacter/Appearance/init.meta.json b/server/StarterCharacter/Appearance/init.meta.json new file mode 100644 index 0000000..720e9d7 --- /dev/null +++ b/server/StarterCharacter/Appearance/init.meta.json @@ -0,0 +1,5 @@ +{ + "properties": { + "Disabled": true + } +} \ No newline at end of file diff --git a/rbx/Appearance.server.lua b/server/StarterCharacter/Appearance/init.server.lua similarity index 89% rename from rbx/Appearance.server.lua rename to server/StarterCharacter/Appearance/init.server.lua index a1934e5..3a25e20 100644 --- a/rbx/Appearance.server.lua +++ b/server/StarterCharacter/Appearance/init.server.lua @@ -12,7 +12,7 @@ local userId = player.UserId local hDesc: HumanoidDescription? local function patchCollision(desc: Instance) - if desc:IsA("BasePart") and desc.CollisionGroupId ~= 1 then + if desc:IsA("BasePart") and desc.CollisionGroup ~= "Player" then local canCollide = desc:GetPropertyChangedSignal("CanCollide") desc.CollisionGroup = "Player" desc.CanQuery = false @@ -35,8 +35,18 @@ end task.spawn(patchAllCollision) character.DescendantAdded:Connect(patchCollision) +character:SetAttribute("TimeScale", 1) local function reload() + character:ScaleTo(1) + + task.spawn(function() + for i = 1, 5 do + character:PivotTo(CFrame.new(0, 100, 0)) + task.wait() + end + end) + for retry = 1, 10 do local success, result = pcall(function() return Players:GetHumanoidDescriptionFromUserId(userId) diff --git a/rbx/StarterCharacter/HumanoidRootPart.rbxmx b/server/StarterCharacter/HumanoidRootPart.rbxmx similarity index 85% rename from rbx/StarterCharacter/HumanoidRootPart.rbxmx rename to server/StarterCharacter/HumanoidRootPart.rbxmx index 6a6608b..c2c61b2 100644 --- a/rbx/StarterCharacter/HumanoidRootPart.rbxmx +++ b/server/StarterCharacter/HumanoidRootPart.rbxmx @@ -221,49 +221,5 @@ - - - true - true - 1 - true - false - 1 - Action - - 0 - 400 - 0 - 100 - - - 0 - 5 - 0 - - 1 - - - - 1 - 4 - Label - - 1 - 0 - 1 - 0 - - - - 1 - 1 - 1 - - true - 0 - - - \ No newline at end of file diff --git a/rbx/StarterCharacter/init.server.lua b/server/StarterCharacter/init.server.lua similarity index 63% rename from rbx/StarterCharacter/init.server.lua rename to server/StarterCharacter/init.server.lua index 04b79f8..39dc418 100644 --- a/rbx/StarterCharacter/init.server.lua +++ b/server/StarterCharacter/init.server.lua @@ -1,8 +1,9 @@ --!strict -local PhysicsService = game:GetService("PhysicsService") -local StarterPlayer = game:GetService("StarterPlayer") local Players = game:GetService("Players") +local StarterPlayer = game:GetService("StarterPlayer") +local PhysicsService = game:GetService("PhysicsService") +local StarterCharacterScripts = StarterPlayer.StarterCharacterScripts local hDesc = Instance.new("HumanoidDescription") hDesc.HeightScale = 1.3 @@ -27,15 +28,38 @@ if bodyColors then bodyColors:Destroy() end -local newRoot = script.HumanoidRootPart:Clone() +local newRoot = script.HumanoidRootPart newRoot.Parent = character :: any local humanoid = assert(character:FindFirstChildOfClass("Humanoid")) humanoid:BuildRigFromAttachments() +local dummyScripts = { + "Animate", + "Health", + "Sound", +} + +for _, dummy in dummyScripts do + local stub = Instance.new("Hole", StarterCharacterScripts) + stub.Name = dummy +end + +for _, child in script:GetChildren() do + child.Parent = StarterCharacterScripts + + if child:IsA("Script") then + child.Disabled = false + end +end + character.Name = "StarterCharacter" character.PrimaryPart = newRoot character.Parent = StarterPlayer -PhysicsService:CreateCollisionGroup("Player") +PhysicsService:RegisterCollisionGroup("Player") PhysicsService:CollisionGroupSetCollidable("Default", "Player", false) + +for _, player in Players:GetPlayers() do + task.spawn(player.LoadCharacter, player) +end diff --git a/shared/Animations.model.json b/shared/Animations.model.json new file mode 100644 index 0000000..4ba57e4 --- /dev/null +++ b/shared/Animations.model.json @@ -0,0 +1,3040 @@ +{ + "className": "Folder", + + "children": [ + { + "name": "AIRBORNE_ON_STOMACH", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "4F6FDC" + } + }, + + { + "name": "AIR_KICK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049498" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "5290E4" + } + }, + + { + "name": "A_POSE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049348" + }, + + "attributes": { + "Loop": true, + "NumFrames": 1, + "StartAddress": "4F4E7C" + } + }, + + { + "name": "BACKFLIP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048293" + }, + + "attributes": { + "Loop": false, + "NumFrames": 32, + "StartAddress": "4EFED4" + } + }, + + { + "name": "BACKWARDS_WATER_KB", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 49, + "StartAddress": "55C9F0" + } + }, + + { + "name": "BACKWARD_AIR_KB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051378" + }, + + "attributes": { + "Loop": false, + "NumFrames": 79, + "StartAddress": "4ED1E8" + } + }, + + { + "name": "BACKWARD_KB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050703" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "546DE8" + } + }, + + { + "name": "BACKWARD_SPINNING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048630" + }, + + "attributes": { + "Loop": true, + "NumFrames": 9, + "StartAddress": "53E68C" + } + }, + + { + "name": "BEING_GRABBED", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "52E7BC" + } + }, + + { + "name": "BEND_KNESS_RIDING_SHELL", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "52AD28" + } + }, + + { + "name": "BOTTOM_STUCK_IN_GROUND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 153, + "StartAddress": "520594" + } + }, + + { + "name": "BREAKDANCE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051730" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "53E804" + } + }, + + { + "name": "CLIMB_DOWN_LEDGE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051211" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "4FCDE8" + } + }, + + { + "name": "CLIMB_UP_POLE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 88, + "StartAddress": "4F08C0" + } + }, + + { + "name": "COUGHING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 88, + "StartAddress": "511504" + } + }, + + { + "name": "CRAWLING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052115" + }, + + "attributes": { + "Loop": true, + "NumFrames": 91, + "StartAddress": "55897C" + } + }, + + { + "name": "CREDITS_LOOK_BACK_THEN_RUN", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 119, + "StartAddress": "50353C" + } + }, + + { + "name": "CREDITS_LOOK_UP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "4FD880" + } + }, + + { + "name": "CREDITS_LOWER_HAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 33, + "StartAddress": "5000DC" + } + }, + + { + "name": "CREDITS_PEACE_SIGN", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 111, + "StartAddress": "509924" + } + }, + + { + "name": "CREDITS_RAISE_HAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 94, + "StartAddress": "4FE3F4" + } + }, + + { + "name": "CREDITS_RETURN_FROM_LOOK_UP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "4FDF90" + } + }, + + { + "name": "CREDITS_START_WALK_LOOK_UP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 99, + "StartAddress": "501410" + } + }, + + { + "name": "CREDITS_TAKE_OFF_CAP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 26, + "StartAddress": "500C24" + } + }, + + { + "name": "CREDITS_WAVING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 33, + "StartAddress": "4FD208" + } + }, + + { + "name": "CROUCHING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047610" + }, + + "attributes": { + "Loop": false, + "NumFrames": 88, + "StartAddress": "557DA0" + } + }, + + { + "name": "CROUCH_FROM_FAST_LONGJUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050905" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "4F56EC" + } + }, + + { + "name": "CROUCH_FROM_SLIDE_KICK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051333" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "554540" + } + }, + + { + "name": "CROUCH_FROM_SLOW_LONGJUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051177" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "4F5C98" + } + }, + + { + "name": "DIVE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047742" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "552224" + } + }, + + { + "name": "DOUBLE_JUMP_FALL", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051260" + }, + + "attributes": { + "Loop": false, + "NumFrames": 8, + "StartAddress": "52826C" + } + }, + + { + "name": "DOUBLE_JUMP_RISE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051650" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "529824" + } + }, + + { + "name": "DROWNING_PART1", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 79, + "StartAddress": "55FF88" + } + }, + + { + "name": "DROWNING_PART2", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 69, + "StartAddress": "5614B8" + } + }, + + { + "name": "DYING_FALL_OVER", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 94, + "StartAddress": "515604" + } + }, + + { + "name": "DYING_IN_QUICKSAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 99, + "StartAddress": "54141C" + } + }, + + { + "name": "DYING_ON_BACK", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 63, + "StartAddress": "4EECAC" + } + }, + + { + "name": "DYING_ON_STOMACH", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 45, + "StartAddress": "50EA0C" + } + }, + + { + "name": "ELECTROCUTION", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 52, + "StartAddress": "545BF8" + } + }, + + { + "name": "FALL_FROM_SLIDE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047641" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "555214" + } + }, + + { + "name": "FALL_FROM_SLIDE_KICK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051585" + }, + + "attributes": { + "Loop": false, + "NumFrames": 24, + "StartAddress": "52A460" + } + }, + + { + "name": "FALL_FROM_SLIDING_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "524F78" + } + }, + + { + "name": "FALL_FROM_WATER", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "564558" + } + }, + + { + "name": "FALL_LAND_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "524940" + } + }, + + { + "name": "FALL_OVER_BACKWARDS", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051687" + }, + + "attributes": { + "Loop": false, + "NumFrames": 79, + "StartAddress": "4ED1D0" + } + }, + + { + "name": "FALL_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 1, + "StartAddress": "524E10" + } + }, + + { + "name": "FAST_LEDGE_GRAB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047471" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "518218" + } + }, + + { + "name": "FAST_LONGJUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047402" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "4F62D4" + } + }, + + { + "name": "FIRE_LAVA_BURN", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052065" + }, + + "attributes": { + "Loop": true, + "NumFrames": 9, + "StartAddress": "50C254" + } + }, + + { + "name": "FIRST_PERSON", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 88, + "StartAddress": "570CB0" + } + }, + + { + "name": "FIRST_PUNCH", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049234" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "53C1B4" + } + }, + + { + "name": "FIRST_PUNCH_FAST", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050809" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "53C6B4" + } + }, + + { + "name": "FLUTTERKICK", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "565610" + } + }, + + { + "name": "FLUTTERKICK_WITH_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "55E164" + } + }, + + { + "name": "FLY_FROM_CANNON", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049444" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "5307F0" + } + }, + + { + "name": "FORWARD_AIR_KB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049706" + }, + + "attributes": { + "Loop": false, + "NumFrames": 79, + "StartAddress": "50D304" + } + }, + + { + "name": "FORWARD_FLIP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "527248" + } + }, + + { + "name": "FORWARD_KB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048586" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "547834" + } + }, + + { + "name": "FORWARD_SPINNING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051497" + }, + + "attributes": { + "Loop": true, + "NumFrames": 9, + "StartAddress": "53E674" + } + }, + + { + "name": "FORWARD_SPINNING_FLIP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052012" + }, + + "attributes": { + "Loop": false, + "NumFrames": 41, + "StartAddress": "578C80" + } + }, + + { + "name": "GENERAL_FALL", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049372" + }, + + "attributes": { + "Loop": true, + "NumFrames": 22, + "StartAddress": "52E078" + } + }, + + { + "name": "GENERAL_LAND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047093" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "52E090" + } + }, + + { + "name": "GRAB_HEAVY_OBJECT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 36, + "StartAddress": "52ED0C" + } + }, + + { + "name": "GRAB_POLE_SHORT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 11, + "StartAddress": "4F2078" + } + }, + + { + "name": "GRAB_POLE_SWING_PART1", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "4F2508" + } + }, + + { + "name": "GRAB_POLE_SWING_PART2", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "4F2520" + } + }, + + { + "name": "GROUND_BONK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051423" + }, + + "attributes": { + "Loop": false, + "NumFrames": 39, + "StartAddress": "55283C" + } + }, + + { + "name": "GROUND_KICK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049273" + }, + + "attributes": { + "Loop": false, + "NumFrames": 24, + "StartAddress": "53B904" + } + }, + + { + "name": "GROUND_POUND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047298" + }, + + "attributes": { + "StartFrame": 9, + "NumFrames": 9, + "Loop": false, + "StartAddress": "520178" + } + }, + + { + "name": "GROUND_POUND_LANDING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047167" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "51F90C" + } + }, + + { + "name": "GROUND_THROW", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "53B14C" + } + }, + + { + "name": "HANDSTAND_IDLE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": true, + "NumFrames": 35, + "StartAddress": "4F38F0" + } + }, + + { + "name": "HANDSTAND_JUMP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "4F43F4" + } + }, + + { + "name": "HANDSTAND_LEFT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 49, + "StartAddress": "573CF8" + } + }, + + { + "name": "HANDSTAND_RIGHT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 49, + "StartAddress": "574490" + } + }, + + { + "name": "HANG_ON_CEILING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 52, + "StartAddress": "518840" + } + }, + + { + "name": "HANG_ON_OWL", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 39, + "StartAddress": "50CBA8" + } + }, + + { + "name": "HEAD_STUCK_IN_GROUND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 153, + "StartAddress": "51C774" + } + }, + + { + "name": "HEAVY_THROW", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 24, + "StartAddress": "56C42C" + } + }, + + { + "name": "IDLE_HEAD_CENTER", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052244" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "57344C" + } + }, + + { + "name": "IDLE_HEAD_LEFT", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050647" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "5722F4" + } + }, + + { + "name": "IDLE_HEAD_RIGHT", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051871" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "572BA0" + } + }, + + { + "name": "IDLE_HEAVY_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 39, + "StartAddress": "548244" + } + }, + + { + "name": "IDLE_IN_QUICKSAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": true, + "NumFrames": 99, + "StartAddress": "542758" + } + }, + + { + "name": "IDLE_ON_LEDGE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048196" + }, + + "attributes": { + "Loop": true, + "NumFrames": 49, + "StartAddress": "5175EC" + } + }, + + { + "name": "IDLE_ON_POLE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": true, + "NumFrames": 111, + "StartAddress": "4F4A64" + } + }, + + { + "name": "IDLE_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": true, + "NumFrames": 60, + "StartAddress": "52338C" + } + }, + + { + "name": "JUMP_LAND_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 18, + "StartAddress": "5240B8" + } + }, + + { + "name": "JUMP_RIDING_SHELL", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 6, + "StartAddress": "527870" + } + }, + + { + "name": "JUMP_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "524614" + } + }, + + { + "name": "LAND_FROM_DOUBLE_JUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051292" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "527BEC" + } + }, + + { + "name": "LAND_FROM_SINGLE_JUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047870" + }, + + "attributes": { + "StartFrame": 27, + "NumFrames": 36, + "Loop": false, + "StartAddress": "528638" + } + }, + + { + "name": "LAND_ON_STOMACH", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049322" + }, + + "attributes": { + "Loop": false, + "NumFrames": 79, + "StartAddress": "50D2EC" + } + }, + + { + "name": "LEGS_STUCK_IN_GROUND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 150, + "StartAddress": "52B360" + } + }, + + { + "name": "MISSING_CAP", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 153, + "StartAddress": "531760" + } + }, + + { + "name": "MOVE_IN_QUICKSAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 147, + "StartAddress": "54320C" + } + }, + + { + "name": "MOVE_ON_WIRE_NET_LEFT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 18, + "StartAddress": "5311D4" + } + }, + + { + "name": "MOVE_ON_WIRE_NET_RIGHT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "530BD4" + } + }, + + { + "name": "PICK_UP_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "53CFFC" + } + }, + + { + "name": "PLACE_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "53E0F0" + } + }, + + { + "name": "PULL_DOOR_WALK_IN", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 58, + "StartAddress": "5347C4" + } + }, + + { + "name": "PUSHING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050923" + }, + + "attributes": { + "Loop": true, + "NumFrames": 26, + "StartAddress": "53D4BC" + } + }, + + { + "name": "PUSH_DOOR_WALK_IN", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 49, + "StartAddress": "535C9C" + } + }, + + { + "name": "PUT_CAP_ON", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 45, + "StartAddress": "5197CC" + } + }, + + { + "name": "QUICKLY_PUT_CAP_ON", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 11, + "StartAddress": "51C314" + } + }, + + { + "name": "REACH_POCKET", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 32, + "StartAddress": "53A3E8" + } + }, + + { + "name": "RETURN_FROM_HANDSTAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 51, + "StartAddress": "4F2BF0" + } + }, + + { + "name": "RETURN_FROM_STAR_DANCE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "5785B8" + } + }, + + { + "name": "RETURN_FROM_WATER_STAR_DANCE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "56A478" + } + }, + + { + "name": "RETURN_STAR_APPROACH_DOOR", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 24, + "StartAddress": "55C144" + } + }, + + { + "name": "RIDING_SHELL", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "5258EC" + } + }, + + { + "name": "RUNNING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052200" + }, + + "attributes": { + "Loop": true, + "NumFrames": 70, + "StartAddress": "53F138" + } + }, + + { + "name": "RUNNING_UNUSED", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": true, + "NumFrames": 70, + "StartAddress": "53F150" + } + }, + + { + "name": "RUN_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": true, + "NumFrames": 75, + "StartAddress": "4F870C" + } + }, + + { + "name": "SECOND_PUNCH", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049182" + }, + + "attributes": { + "Loop": false, + "NumFrames": 3, + "StartAddress": "53C44C" + } + }, + + { + "name": "SECOND_PUNCH_FAST", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048802" + }, + + "attributes": { + "Loop": false, + "NumFrames": 12, + "StartAddress": "53CAC4" + } + }, + + { + "name": "SHIVERING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 63, + "StartAddress": "4FC1A8" + } + }, + + { + "name": "SHIVERING_RETURN_TO_IDLE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "4FBC18" + } + }, + + { + "name": "SHIVERING_WARMING_HAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 85, + "StartAddress": "4FA618" + } + }, + + { + "name": "SHOCKED", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "546B40" + } + }, + + { + "name": "SIDESTEP_LEFT", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048019" + }, + + "attributes": { + "Loop": true, + "NumFrames": 63, + "StartAddress": "549A84" + } + }, + + { + "name": "SIDESTEP_RIGHT", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048466" + }, + + "attributes": { + "Loop": true, + "NumFrames": 63, + "StartAddress": "54A9C0" + } + }, + + { + "name": "SINGLE_JUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047064" + }, + + "attributes": { + "Loop": false, + "NumFrames": 36, + "StartAddress": "528620" + } + }, + + { + "name": "SKID_ON_GROUND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047121" + }, + + "attributes": { + "Loop": false, + "NumFrames": 18, + "StartAddress": "4F4FE0" + } + }, + + { + "name": "SLEEP_IDLE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049661" + }, + + "attributes": { + "Loop": true, + "NumFrames": 39, + "StartAddress": "550C30" + } + }, + + { + "name": "SLEEP_LYING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048132" + }, + + "attributes": { + "Loop": true, + "NumFrames": 49, + "StartAddress": "551AF4" + } + }, + + { + "name": "SLEEP_START_LYING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048165" + }, + + "attributes": { + "Loop": false, + "NumFrames": 39, + "StartAddress": "550E88" + } + }, + + { + "name": "SLIDE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047259" + }, + + "attributes": { + "Loop": false, + "NumFrames": 6, + "StartAddress": "55571C" + } + }, + + { + "name": "SLIDEFLIP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047005" + }, + + "attributes": { + "NumFrames": 22, + "Flip": true, + "Loop": false, + "StartAddress": "56EEAC" + } + }, + + { + "name": "SLIDEFLIP_LAND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047032" + }, + + "attributes": { + "NumFrames": 9, + "Flip": true, + "Loop": false, + "StartAddress": "56EAA0" + } + }, + + { + "name": "SLIDEJUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052142" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "5769D0" + } + }, + + { + "name": "SLIDE_DIVE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048497" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "55223C" + } + }, + + { + "name": "SLIDE_KICK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047204" + }, + + "attributes": { + "Loop": false, + "NumFrames": 6, + "StartAddress": "5541A4" + } + }, + + { + "name": "SLIDE_MOTIONLESS", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "554A94" + } + }, + + { + "name": "SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "525318" + } + }, + + { + "name": "SLOW_LAND_FROM_DIVE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051792" + }, + + "attributes": { + "Loop": false, + "NumFrames": 36, + "StartAddress": "52FA0C" + } + }, + + { + "name": "SLOW_LEDGE_GRAB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050847" + }, + + "attributes": { + "Loop": false, + "NumFrames": 33, + "StartAddress": "4EC690" + } + }, + + { + "name": "SLOW_LONGJUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050966" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "4F6A78" + } + }, + + { + "name": "SLOW_WALK_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 99, + "StartAddress": "4F93A0" + } + }, + + { + "name": "SOFT_BACK_KB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051970" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "54035C" + } + }, + + { + "name": "SOFT_FRONT_KB", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052043" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "540BA4" + } + }, + + { + "name": "STAND_UP_FROM_LAVA_BOOST", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051900" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "50BD4C" + } + }, + + { + "name": "STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "525330" + } + }, + + { + "name": "START_CRAWLING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047517" + }, + + "attributes": { + "Loop": false, + "NumFrames": 6, + "StartAddress": "55A990" + } + }, + + { + "name": "START_CROUCHING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050939" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "557AEC" + } + }, + + { + "name": "START_FORWARD_SPINNING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "529ADC" + } + }, + + { + "name": "START_GROUND_POUND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049543" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "520160" + } + }, + + { + "name": "START_HANDSTAND", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "4F440C" + } + }, + + { + "name": "START_REACH_POCKET", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "539FEC" + } + }, + + { + "name": "START_RIDING_SHELL", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "53DAD4" + } + }, + + { + "name": "START_SLEEP_IDLE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047689" + }, + + "attributes": { + "Loop": false, + "NumFrames": 49, + "StartAddress": "54BB6C" + } + }, + + { + "name": "START_SLEEP_SCRATCH", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048360" + }, + + "attributes": { + "Loop": false, + "NumFrames": 66, + "StartAddress": "54CD54" + } + }, + + { + "name": "START_SLEEP_SITTING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048251" + }, + + "attributes": { + "Loop": false, + "NumFrames": 63, + "StartAddress": "54F888" + } + }, + + { + "name": "START_SLEEP_YAWN", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051942" + }, + + "attributes": { + "Loop": false, + "NumFrames": 58, + "StartAddress": "54E4F4" + } + }, + + { + "name": "START_TIPTOE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051161" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "5760EC" + } + }, + + { + "name": "START_TWIRL", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048529" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "557504" + } + }, + + { + "name": "START_WALLKICK", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049598" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "5769E8" + } + }, + + { + "name": "STAR_DANCE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 61, + "StartAddress": "577064" + } + }, + + { + "name": "STOP_CRAWLING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051464" + }, + + "attributes": { + "Loop": false, + "NumFrames": 6, + "StartAddress": "55A5F8" + } + }, + + { + "name": "STOP_CROUCHING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "557730" + } + }, + + { + "name": "STOP_GRAB_OBJ_WATER", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "55ECCC" + } + }, + + { + "name": "STOP_REACH_POCKET", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "53AB58" + } + }, + + { + "name": "STOP_SKID", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048056" + }, + + "attributes": { + "StartFrame": 6, + "NumFrames": 18, + "Loop": false, + "StartAddress": "4F4FF8" + } + }, + + { + "name": "STOP_SLIDE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047796" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "554AAC" + } + }, + + { + "name": "STOP_SLIDE_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 36, + "StartAddress": "5534F4" + } + }, + + { + "name": "SUFFOCATING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 99, + "StartAddress": "50F6F4" + } + }, + + { + "name": "SUMMON_STAR", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 63, + "StartAddress": "55AD1C" + } + }, + + { + "name": "SWIM_PART1", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 12, + "StartAddress": "564D2C" + } + }, + + { + "name": "SWIM_PART2", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "56520C" + } + }, + + { + "name": "SWIM_WITH_OBJ_PART1", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "55DAAC" + } + }, + + { + "name": "SWIM_WITH_OBJ_PART2", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "55DEC8" + } + }, + + { + "name": "TAKE_CAP_OFF_THEN_ON", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 99, + "StartAddress": "51A754" + } + }, + + { + "name": "THROW_CATCH_KEY", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 138, + "StartAddress": "512B4C" + } + }, + + { + "name": "THROW_LIGHT_OBJECT", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "529FDC" + } + }, + + { + "name": "TIPTOE", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051080" + }, + + "attributes": { + "Loop": true, + "NumFrames": 114, + "StartAddress": "55593C" + } + }, + + { + "name": "TRIPLE_JUMP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052291" + }, + + "attributes": { + "Loop": false, + "NumFrames": 35, + "StartAddress": "5701F8" + } + }, + + { + "name": "TRIPLE_JUMP_FLY", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352049410" + }, + + "attributes": { + "Loop": false, + "NumFrames": 13, + "StartAddress": "579828" + } + }, + + { + "name": "TRIPLE_JUMP_GROUND_POUND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050763" + }, + + "attributes": { + "Loop": false, + "NumFrames": 15, + "StartAddress": "51FB98" + } + }, + + { + "name": "TRIPLE_JUMP_LAND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352052333" + }, + + "attributes": { + "Loop": false, + "NumFrames": 30, + "StartAddress": "56F750" + } + }, + + { + "name": "TURNING_PART1", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047143" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "56E37C" + } + }, + + { + "name": "TURNING_PART2", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048732" + }, + + "attributes": { + "Loop": false, + "NumFrames": 16, + "StartAddress": "56E394" + } + }, + + { + "name": "TWIRL", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047341" + }, + + "attributes": { + "Loop": false, + "NumFrames": 1, + "StartAddress": "5573A0" + } + }, + + { + "name": "TWIRL_LAND", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352048089" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "557030" + } + }, + + { + "name": "UNLOCK_DOOR", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 146, + "StartAddress": "536D64" + } + }, + + { + "name": "WAKE_FROM_LYING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352050992" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "575844" + } + }, + + { + "name": "WAKE_FROM_SLEEP", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352047932" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "5750C0" + } + }, + + { + "name": "WALKING", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051130" + }, + + "attributes": { + "Loop": true, + "NumFrames": 76, + "StartAddress": "525D48" + } + }, + + { + "name": "WALK_PANTING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 19, + "StartAddress": "56CD54" + } + }, + + { + "name": "WALK_WITH_HEAVY_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 96, + "StartAddress": "56D244" + } + }, + + { + "name": "WALK_WITH_LIGHT_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 99, + "StartAddress": "4F7494" + } + }, + + { + "name": "WATER_ACTION_END", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 24, + "StartAddress": "565DD0" + } + }, + + { + "name": "WATER_ACTION_END_WITH_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 22, + "StartAddress": "55E610" + } + }, + + { + "name": "WATER_DYING", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 39, + "StartAddress": "5627F4" + } + }, + + { + "name": "WATER_FORWARD_KB", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 49, + "StartAddress": "5634FC" + } + }, + + { + "name": "WATER_GRAB_OBJ_PART1", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 4, + "StartAddress": "56747C" + } + }, + + { + "name": "WATER_GRAB_OBJ_PART2", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 24, + "StartAddress": "566AF8" + } + }, + + { + "name": "WATER_IDLE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "5681D0" + } + }, + + { + "name": "WATER_IDLE_WITH_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 29, + "StartAddress": "55F800" + } + }, + + { + "name": "WATER_PICK_UP_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 9, + "StartAddress": "566628" + } + }, + + { + "name": "WATER_STAR_DANCE", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 82, + "StartAddress": "568A04" + } + }, + + { + "name": "WATER_THROW_OBJ", + "className": "Animation", + + "properties": { + "AnimationId": "" + }, + + "attributes": { + "Loop": false, + "NumFrames": 27, + "StartAddress": "567748" + } + }, + + { + "name": "WING_CAP_FLY", + "className": "Animation", + + "properties": { + "AnimationId": "rbxassetid://11352051549" + }, + + "attributes": { + "Loop": true, + "NumFrames": 39, + "StartAddress": "50C5B0" + } + } + ] +} \ No newline at end of file diff --git a/shared/README.md b/shared/README.md new file mode 100644 index 0000000..5a585d8 --- /dev/null +++ b/shared/README.md @@ -0,0 +1,3 @@ +# Shared - Cloud Assets + +This folder contains cloud asset mapping for custom Roblox assets that I use in funny 64-bit platformer. The content linked in here does not source from any assets or content from Nintendo. Voice acting was done by me, and animation work was done by Stalkalek. I also borrowed some stock sounds from Roblox. \ No newline at end of file diff --git a/shared/Sounds.model.json b/shared/Sounds.model.json new file mode 100644 index 0000000..fcd37f3 --- /dev/null +++ b/shared/Sounds.model.json @@ -0,0 +1,773 @@ +{ + "className": "Folder", + + "children": [ + { + "name": "ACTION_BONK", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/hit.wav" + } + }, + + { + "name": "ACTION_FLYING_FAST", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_HEAVY_LANDING", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/action_jump_land.mp3" + } + }, + + { + "name": "ACTION_HIT", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://9117969584" + } + }, + + { + "name": "ACTION_METAL_BONK", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_METAL_HEAVY_LANDING", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_METAL_LANDING", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_METAL_STEP", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_PAT_BACK", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_SIDE_FLIP", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://6552141879" + } + }, + + { + "name": "ACTION_SPIN", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://6552141879" + } + }, + + { + "name": "ACTION_TERRAIN_BODY_HIT_GROUND", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://268933841" + } + }, + + { + "name": "ACTION_TERRAIN_JUMP", + "className": "Configuration" + }, + + { + "name": "ACTION_TERRAIN_LANDING", + "className": "Configuration" + }, + + { + "name": "ACTION_TERRAIN_LANDING_DEFAULT", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_GRASS", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_ICE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_METAL", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_SAND", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_SNOW", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_SPOOKY", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_STONE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_LANDING_WATER", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_STEP", + "className": "Configuration" + }, + + { + "name": "ACTION_TERRAIN_STEP_DEFAULT", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://5761648082" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_GRASS", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://7340372339" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_ICE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_METAL", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_SAND", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://8453417974" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_SNOW", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/flashbulb.wav" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_SPOOKY", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://6703174876" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_STONE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://5761648082" + } + }, + + { + "name": "ACTION_TERRAIN_STEP_WATER", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxasset://sounds/switch.wav" + } + }, + + { + "name": "ACTION_THROW", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "ACTION_TWIRL", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MARIO_ATTACKED", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MARIO_DIE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MARIO_DOH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276169318" + } + }, + + { + "name": "MARIO_GROUND_POUND_WAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MARIO_HAHA", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276161775" + } + }, + + { + "name": "MARIO_HOO", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11277164346" + } + }, + + { + "name": "MARIO_HOOHOO", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276429582" + } + }, + + { + "name": "MARIO_IMA_TIRED", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276995011" + } + }, + + { + "name": "MARIO_JUMP", + "className": "Configuration" + }, + + { + "name": "MARIO_JUMP_HOO", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276348319" + } + }, + + { + "name": "MARIO_JUMP_WAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276772310" + } + }, + + { + "name": "MARIO_MAMA_MIA", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276475451" + } + }, + + { + "name": "MARIO_ON_FIRE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276465437" + } + }, + + { + "name": "MARIO_OOOF", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276487760" + } + }, + + { + "name": "MARIO_PANTING", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MARIO_PUNCH_HOO", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276348319" + } + }, + + { + "name": "MARIO_PUNCH_WAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276374733" + } + }, + + { + "name": "MARIO_PUNCH_YAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276361489" + } + }, + + { + "name": "MARIO_SNORING1", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11277042069" + } + }, + + { + "name": "MARIO_SNORING2", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11277042275" + } + }, + + { + "name": "MARIO_SNORING3", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11277042405" + } + }, + + { + "name": "MARIO_THROW_YAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276138169" + } + }, + + { + "name": "MARIO_UH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276507663" + } + }, + + { + "name": "MARIO_UH2", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276529034" + } + }, + + { + "name": "MARIO_WAAAOOOW", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MARIO_WAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276772310" + } + }, + + { + "name": "MARIO_WAHA", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276223526" + } + }, + + { + "name": "MARIO_WHOA", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276240769" + } + }, + + { + "name": "MARIO_YAH", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276266154" + } + }, + + { + "name": "MARIO_YAHOO", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276297854" + } + }, + + { + "name": "MARIO_YAHOO_WAHA_YIPPEE", + "className": "Configuration", + + "attributes": { + "MARIO_WAHA": 1, + "MARIO_YAHOO": 3, + "MARIO_YIPPEE": 1 + } + }, + + { + "name": "MARIO_YAH_WAH_HOO", + "className": "Configuration", + + "attributes": { + "MARIO_YAH": 1, + "MARIO_HOO": 1, + "MARIO_WAH": 1 + } + }, + + { + "name": "MARIO_YAWNING", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276996044" + } + }, + + { + "name": "MARIO_YIPPEE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "rbxassetid://11276223467" + } + }, + + { + "name": "MOVING_FLYING", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MOVING_LAVA_BURN", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + }, + + { + "name": "MOVING_TERRAIN_SLIDE", + "className": "Sound", + + "properties": { + "RollOffMinDistance": 8, + "RollOffMaxDistance": 128, + "SoundId": "" + } + } + ] +} \ No newline at end of file diff --git a/shared/init.lua b/shared/init.lua new file mode 100644 index 0000000..6097130 --- /dev/null +++ b/shared/init.lua @@ -0,0 +1,320 @@ +--!strict +local Animations = script.Animations +local Sounds = script.Sounds + +local AnimTable = { + SLOW_LEDGE_GRAB = Animations.SLOW_LEDGE_GRAB, + FALL_OVER_BACKWARDS = Animations.FALL_OVER_BACKWARDS, + BACKWARD_AIR_KB = Animations.BACKWARD_AIR_KB, + DYING_ON_BACK = Animations.DYING_ON_BACK, + BACKFLIP = Animations.BACKFLIP, + CLIMB_UP_POLE = Animations.CLIMB_UP_POLE, + GRAB_POLE_SHORT = Animations.GRAB_POLE_SHORT, + GRAB_POLE_SWING_PART1 = Animations.GRAB_POLE_SWING_PART1, + GRAB_POLE_SWING_PART2 = Animations.GRAB_POLE_SWING_PART2, + HANDSTAND_IDLE = Animations.HANDSTAND_IDLE, + HANDSTAND_JUMP = Animations.HANDSTAND_JUMP, + START_HANDSTAND = Animations.START_HANDSTAND, + RETURN_FROM_HANDSTAND = Animations.RETURN_FROM_HANDSTAND, + IDLE_ON_POLE = Animations.IDLE_ON_POLE, + A_POSE = Animations.A_POSE, + SKID_ON_GROUND = Animations.SKID_ON_GROUND, + STOP_SKID = Animations.STOP_SKID, + CROUCH_FROM_FAST_LONGJUMP = Animations.CROUCH_FROM_FAST_LONGJUMP, + CROUCH_FROM_SLOW_LONGJUMP = Animations.CROUCH_FROM_SLOW_LONGJUMP, + FAST_LONGJUMP = Animations.FAST_LONGJUMP, + SLOW_LONGJUMP = Animations.SLOW_LONGJUMP, + AIRBORNE_ON_STOMACH = Animations.AIRBORNE_ON_STOMACH, + WALK_WITH_LIGHT_OBJ = Animations.WALK_WITH_LIGHT_OBJ, + RUN_WITH_LIGHT_OBJ = Animations.RUN_WITH_LIGHT_OBJ, + SLOW_WALK_WITH_LIGHT_OBJ = Animations.SLOW_WALK_WITH_LIGHT_OBJ, + SHIVERING_WARMING_HAND = Animations.SHIVERING_WARMING_HAND, + SHIVERING_RETURN_TO_IDLE = Animations.SHIVERING_RETURN_TO_IDLE, + SHIVERING = Animations.SHIVERING, + CLIMB_DOWN_LEDGE = Animations.CLIMB_DOWN_LEDGE, + CREDITS_WAVING = Animations.CREDITS_WAVING, + CREDITS_LOOK_UP = Animations.CREDITS_LOOK_UP, + CREDITS_RETURN_FROM_LOOK_UP = Animations.CREDITS_RETURN_FROM_LOOK_UP, + CREDITS_RAISE_HAND = Animations.CREDITS_RAISE_HAND, + CREDITS_LOWER_HAND = Animations.CREDITS_LOWER_HAND, + CREDITS_TAKE_OFF_CAP = Animations.CREDITS_TAKE_OFF_CAP, + CREDITS_START_WALK_LOOK_UP = Animations.CREDITS_START_WALK_LOOK_UP, + CREDITS_LOOK_BACK_THEN_RUN = Animations.CREDITS_LOOK_BACK_THEN_RUN, + -- FINAL_BOWSER_RAISE_HAND_SPIN = Animations.FINAL_BOWSER_RAISE_HAND_SPIN; + -- FINAL_BOWSER_WING_CAP_TAKE_OFF = Animations.FINAL_BOWSER_WING_CAP_TAKE_OFF; + CREDITS_PEACE_SIGN = Animations.CREDITS_PEACE_SIGN, + STAND_UP_FROM_LAVA_BOOST = Animations.STAND_UP_FROM_LAVA_BOOST, + FIRE_LAVA_BURN = Animations.FIRE_LAVA_BURN, + WING_CAP_FLY = Animations.WING_CAP_FLY, + HANG_ON_OWL = Animations.HANG_ON_OWL, + LAND_ON_STOMACH = Animations.LAND_ON_STOMACH, + FORWARD_AIR_KB = Animations.FORWARD_AIR_KB, + DYING_ON_STOMACH = Animations.DYING_ON_STOMACH, + SUFFOCATING = Animations.SUFFOCATING, + COUGHING = Animations.COUGHING, + THROW_CATCH_KEY = Animations.THROW_CATCH_KEY, + DYING_FALL_OVER = Animations.DYING_FALL_OVER, + IDLE_ON_LEDGE = Animations.IDLE_ON_LEDGE, + FAST_LEDGE_GRAB = Animations.FAST_LEDGE_GRAB, + HANG_ON_CEILING = Animations.HANG_ON_CEILING, + PUT_CAP_ON = Animations.PUT_CAP_ON, + TAKE_CAP_OFF_THEN_ON = Animations.TAKE_CAP_OFF_THEN_ON, + QUICKLY_PUT_CAP_ON = Animations.QUICKLY_PUT_CAP_ON, -- unused + HEAD_STUCK_IN_GROUND = Animations.HEAD_STUCK_IN_GROUND, + GROUND_POUND_LANDING = Animations.GROUND_POUND_LANDING, + TRIPLE_JUMP_GROUND_POUND = Animations.TRIPLE_JUMP_GROUND_POUND, + START_GROUND_POUND = Animations.START_GROUND_POUND, + GROUND_POUND = Animations.GROUND_POUND, + BOTTOM_STUCK_IN_GROUND = Animations.BOTTOM_STUCK_IN_GROUND, + IDLE_WITH_LIGHT_OBJ = Animations.IDLE_WITH_LIGHT_OBJ, + JUMP_LAND_WITH_LIGHT_OBJ = Animations.JUMP_LAND_WITH_LIGHT_OBJ, + JUMP_WITH_LIGHT_OBJ = Animations.JUMP_WITH_LIGHT_OBJ, + FALL_LAND_WITH_LIGHT_OBJ = Animations.FALL_LAND_WITH_LIGHT_OBJ, + FALL_WITH_LIGHT_OBJ = Animations.FALL_WITH_LIGHT_OBJ, + FALL_FROM_SLIDING_WITH_LIGHT_OBJ = Animations.FALL_FROM_SLIDING_WITH_LIGHT_OBJ, + SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ = Animations.SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ, + STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ = Animations.STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ, + RIDING_SHELL = Animations.RIDING_SHELL, + WALKING = Animations.WALKING, + FORWARD_FLIP = Animations.FORWARD_FLIP, -- unused + JUMP_RIDING_SHELL = Animations.JUMP_RIDING_SHELL, + LAND_FROM_DOUBLE_JUMP = Animations.LAND_FROM_DOUBLE_JUMP, + DOUBLE_JUMP_FALL = Animations.DOUBLE_JUMP_FALL, + SINGLE_JUMP = Animations.SINGLE_JUMP, + LAND_FROM_SINGLE_JUMP = Animations.LAND_FROM_SINGLE_JUMP, + AIR_KICK = Animations.AIR_KICK, + DOUBLE_JUMP_RISE = Animations.DOUBLE_JUMP_RISE, + START_FORWARD_SPINNING = Animations.START_FORWARD_SPINNING, -- unused + THROW_LIGHT_OBJECT = Animations.THROW_LIGHT_OBJECT, + FALL_FROM_SLIDE_KICK = Animations.FALL_FROM_SLIDE_KICK, + BEND_KNESS_RIDING_SHELL = Animations.BEND_KNESS_RIDING_SHELL, -- unused + LEGS_STUCK_IN_GROUND = Animations.LEGS_STUCK_IN_GROUND, + GENERAL_FALL = Animations.GENERAL_FALL, + GENERAL_LAND = Animations.GENERAL_LAND, + BEING_GRABBED = Animations.BEING_GRABBED, + GRAB_HEAVY_OBJECT = Animations.GRAB_HEAVY_OBJECT, + SLOW_LAND_FROM_DIVE = Animations.SLOW_LAND_FROM_DIVE, + FLY_FROM_CANNON = Animations.FLY_FROM_CANNON, + MOVE_ON_WIRE_NET_RIGHT = Animations.MOVE_ON_WIRE_NET_RIGHT, + MOVE_ON_WIRE_NET_LEFT = Animations.MOVE_ON_WIRE_NET_LEFT, + MISSING_CAP = Animations.MISSING_CAP, + PULL_DOOR_WALK_IN = Animations.PULL_DOOR_WALK_IN, + PUSH_DOOR_WALK_IN = Animations.PUSH_DOOR_WALK_IN, + UNLOCK_DOOR = Animations.UNLOCK_DOOR, + START_REACH_POCKET = Animations.START_REACH_POCKET, -- unused, reaching keys maybe? + REACH_POCKET = Animations.REACH_POCKET, -- unused + STOP_REACH_POCKET = Animations.STOP_REACH_POCKET, -- unused + GROUND_THROW = Animations.GROUND_THROW, + GROUND_KICK = Animations.GROUND_KICK, + FIRST_PUNCH = Animations.FIRST_PUNCH, + SECOND_PUNCH = Animations.SECOND_PUNCH, + FIRST_PUNCH_FAST = Animations.FIRST_PUNCH_FAST, + SECOND_PUNCH_FAST = Animations.SECOND_PUNCH_FAST, + PICK_UP_LIGHT_OBJ = Animations.PICK_UP_LIGHT_OBJ, + PUSHING = Animations.PUSHING, + START_RIDING_SHELL = Animations.START_RIDING_SHELL, + PLACE_LIGHT_OBJ = Animations.PLACE_LIGHT_OBJ, + FORWARD_SPINNING = Animations.FORWARD_SPINNING, + BACKWARD_SPINNING = Animations.BACKWARD_SPINNING, + BREAKDANCE = Animations.BREAKDANCE, + RUNNING = Animations.RUNNING, + RUNNING_UNUSED = Animations.RUNNING_UNUSED, -- unused duplicate, originally part 2? + SOFT_BACK_KB = Animations.SOFT_BACK_KB, + SOFT_FRONT_KB = Animations.SOFT_FRONT_KB, + DYING_IN_QUICKSAND = Animations.DYING_IN_QUICKSAND, + IDLE_IN_QUICKSAND = Animations.IDLE_IN_QUICKSAND, + MOVE_IN_QUICKSAND = Animations.MOVE_IN_QUICKSAND, + ELECTROCUTION = Animations.ELECTROCUTION, + SHOCKED = Animations.SHOCKED, + BACKWARD_KB = Animations.BACKWARD_KB, + FORWARD_KB = Animations.FORWARD_KB, + IDLE_HEAVY_OBJ = Animations.IDLE_HEAVY_OBJ, + -- STAND_AGAINST_WALL = Animations.STAND_AGAINST_WALL; + SIDESTEP_LEFT = Animations.SIDESTEP_LEFT, + SIDESTEP_RIGHT = Animations.SIDESTEP_RIGHT, + START_SLEEP_IDLE = Animations.START_SLEEP_IDLE, + START_SLEEP_SCRATCH = Animations.START_SLEEP_SCRATCH, + START_SLEEP_YAWN = Animations.START_SLEEP_YAWN, + START_SLEEP_SITTING = Animations.START_SLEEP_SITTING, + SLEEP_IDLE = Animations.SLEEP_IDLE, + SLEEP_START_LYING = Animations.SLEEP_START_LYING, + SLEEP_LYING = Animations.SLEEP_LYING, + DIVE = Animations.DIVE, + SLIDE_DIVE = Animations.SLIDE_DIVE, + GROUND_BONK = Animations.GROUND_BONK, + STOP_SLIDE_LIGHT_OBJ = Animations.STOP_SLIDE_LIGHT_OBJ, + SLIDE_KICK = Animations.SLIDE_KICK, + CROUCH_FROM_SLIDE_KICK = Animations.CROUCH_FROM_SLIDE_KICK, + SLIDE_MOTIONLESS = Animations.SLIDE_MOTIONLESS, -- unused + STOP_SLIDE = Animations.STOP_SLIDE, + FALL_FROM_SLIDE = Animations.FALL_FROM_SLIDE, + SLIDE = Animations.SLIDE, + TIPTOE = Animations.TIPTOE, + TWIRL_LAND = Animations.TWIRL_LAND, + TWIRL = Animations.TWIRL, + START_TWIRL = Animations.START_TWIRL, + STOP_CROUCHING = Animations.STOP_CROUCHING, + START_CROUCHING = Animations.START_CROUCHING, + CROUCHING = Animations.CROUCHING, + CRAWLING = Animations.CRAWLING, + STOP_CRAWLING = Animations.STOP_CRAWLING, + START_CRAWLING = Animations.START_CRAWLING, + SUMMON_STAR = Animations.SUMMON_STAR, + RETURN_STAR_APPROACH_DOOR = Animations.RETURN_STAR_APPROACH_DOOR, + BACKWARDS_WATER_KB = Animations.BACKWARDS_WATER_KB, + SWIM_WITH_OBJ_PART1 = Animations.SWIM_WITH_OBJ_PART1, + SWIM_WITH_OBJ_PART2 = Animations.SWIM_WITH_OBJ_PART2, + FLUTTERKICK_WITH_OBJ = Animations.FLUTTERKICK_WITH_OBJ, + WATER_ACTION_END_WITH_OBJ = Animations.WATER_ACTION_END_WITH_OBJ, -- either swimming or flutterkicking + STOP_GRAB_OBJ_WATER = Animations.STOP_GRAB_OBJ_WATER, + WATER_IDLE_WITH_OBJ = Animations.WATER_IDLE_WITH_OBJ, + DROWNING_PART1 = Animations.DROWNING_PART1, + DROWNING_PART2 = Animations.DROWNING_PART2, + WATER_DYING = Animations.WATER_DYING, + WATER_FORWARD_KB = Animations.WATER_FORWARD_KB, + FALL_FROM_WATER = Animations.FALL_FROM_WATER, + SWIM_PART1 = Animations.SWIM_PART1, + SWIM_PART2 = Animations.SWIM_PART2, + FLUTTERKICK = Animations.FLUTTERKICK, + WATER_ACTION_END = Animations.WATER_ACTION_END, -- either swimming or flutterkicking + WATER_PICK_UP_OBJ = Animations.WATER_PICK_UP_OBJ, + WATER_GRAB_OBJ_PART2 = Animations.WATER_GRAB_OBJ_PART2, + WATER_GRAB_OBJ_PART1 = Animations.WATER_GRAB_OBJ_PART1, + WATER_THROW_OBJ = Animations.WATER_THROW_OBJ, + WATER_IDLE = Animations.WATER_IDLE, + WATER_STAR_DANCE = Animations.WATER_STAR_DANCE, + RETURN_FROM_WATER_STAR_DANCE = Animations.RETURN_FROM_WATER_STAR_DANCE, + -- GRAB_BOWSER = Animations.GRAB_BOWSER; + -- SWINGING_BOWSER = Animations.SWINGING_BOWSER; + -- RELEASE_BOWSER = Animations.RELEASE_BOWSER; + -- HOLDING_BOWSER = Animations.HOLDING_BOWSER; + HEAVY_THROW = Animations.HEAVY_THROW, + WALK_PANTING = Animations.WALK_PANTING, + WALK_WITH_HEAVY_OBJ = Animations.WALK_WITH_HEAVY_OBJ, + TURNING_PART1 = Animations.TURNING_PART1, + TURNING_PART2 = Animations.TURNING_PART2, + SLIDEFLIP_LAND = Animations.SLIDEFLIP_LAND, + SLIDEFLIP = Animations.SLIDEFLIP, + TRIPLE_JUMP_LAND = Animations.TRIPLE_JUMP_LAND, + TRIPLE_JUMP = Animations.TRIPLE_JUMP, + FIRST_PERSON = Animations.FIRST_PERSON, + IDLE_HEAD_LEFT = Animations.IDLE_HEAD_LEFT, + IDLE_HEAD_RIGHT = Animations.IDLE_HEAD_RIGHT, + IDLE_HEAD_CENTER = Animations.IDLE_HEAD_CENTER, + HANDSTAND_LEFT = Animations.HANDSTAND_LEFT, + HANDSTAND_RIGHT = Animations.HANDSTAND_RIGHT, + WAKE_FROM_SLEEP = Animations.WAKE_FROM_SLEEP, + WAKE_FROM_LYING = Animations.WAKE_FROM_LYING, + START_TIPTOE = Animations.START_TIPTOE, + SLIDEJUMP = Animations.SLIDEJUMP, -- pole jump and wall kick + START_WALLKICK = Animations.START_WALLKICK, + STAR_DANCE = Animations.STAR_DANCE, + RETURN_FROM_STAR_DANCE = Animations.RETURN_FROM_STAR_DANCE, + FORWARD_SPINNING_FLIP = Animations.FORWARD_SPINNING_FLIP, + TRIPLE_JUMP_FLY = Animations.TRIPLE_JUMP_FLY, +} + +local SoundTable = { + ACTION_BONK = Sounds.ACTION_BONK, + ACTION_FLYING_FAST = Sounds.ACTION_FLYING_FAST, + ACTION_HIT = Sounds.ACTION_HIT, + ACTION_METAL_BONK = Sounds.ACTION_METAL_BONK, + ACTION_METAL_HEAVY_LANDING = Sounds.ACTION_METAL_HEAVY_LANDING, + ACTION_METAL_LANDING = Sounds.ACTION_METAL_LANDING, + ACTION_METAL_STEP = Sounds.ACTION_METAL_STEP, + ACTION_PAT_BACK = Sounds.ACTION_PAT_BACK, + ACTION_SIDE_FLIP = Sounds.ACTION_SIDE_FLIP, + ACTION_SPIN = Sounds.ACTION_SPIN, + ACTION_HEAVY_LANDING = Sounds.ACTION_HEAVY_LANDING, + ACTION_TERRAIN_BODY_HIT_GROUND = Sounds.ACTION_TERRAIN_BODY_HIT_GROUND, + ACTION_TERRAIN_JUMP = Sounds.ACTION_TERRAIN_JUMP, + ACTION_TERRAIN_LANDING = Sounds.ACTION_TERRAIN_LANDING, + ACTION_TERRAIN_STEP = Sounds.ACTION_TERRAIN_STEP, + ACTION_THROW = Sounds.ACTION_THROW, + ACTION_TWIRL = Sounds.ACTION_TWIRL, + + MARIO_ATTACKED = Sounds.MARIO_ATTACKED, + MARIO_DOH = Sounds.MARIO_DOH, + MARIO_GROUND_POUND_WAH = Sounds.MARIO_GROUND_POUND_WAH, + MARIO_HAHA = Sounds.MARIO_HAHA, + MARIO_HOO = Sounds.MARIO_HOO, + MARIO_HOOHOO = Sounds.MARIO_HOOHOO, + MARIO_IMA_TIRED = Sounds.MARIO_IMA_TIRED, + MARIO_MAMA_MIA = Sounds.MARIO_MAMA_MIA, + MARIO_ON_FIRE = Sounds.MARIO_ON_FIRE, + MARIO_OOOF = Sounds.MARIO_OOOF, + MARIO_PANTING = Sounds.MARIO_PANTING, + MARIO_PUNCH_YAH = Sounds.MARIO_PUNCH_YAH, + MARIO_PUNCH_WAH = Sounds.MARIO_PUNCH_WAH, + MARIO_PUNCH_HOO = Sounds.MARIO_PUNCH_HOO, + MARIO_SNORING1 = Sounds.MARIO_SNORING1, + MARIO_SNORING2 = Sounds.MARIO_SNORING2, + MARIO_SNORING3 = Sounds.MARIO_SNORING3, + MARIO_UH = Sounds.MARIO_UH, + MARIO_UH2 = Sounds.MARIO_UH2, + MARIO_WAAAOOOW = Sounds.MARIO_WAAAOOOW, + MARIO_WAH = Sounds.MARIO_WAH, + MARIO_WAHA = Sounds.MARIO_WAHA, + MARIO_WHOA = Sounds.MARIO_WHOA, + MARIO_YAH = Sounds.MARIO_YAH, + MARIO_YAHOO = Sounds.MARIO_YAHOO, + MARIO_YAWNING = Sounds.MARIO_YAWNING, + MARIO_YIPPEE = Sounds.MARIO_YIPPEE, + + MOVING_FLYING = Sounds.MOVING_FLYING, + MOVING_LAVA_BURN = Sounds.MOVING_LAVA_BURN, + MOVING_TERRAIN_SLIDE = Sounds.MOVING_TERRAIN_SLIDE, + + MARIO_JUMP = Sounds.MARIO_JUMP, + MARIO_YAH_WAH_HOO = Sounds.MARIO_YAH_WAH_HOO, + MARIO_YAHOO_WAHA_YIPPEE = Sounds.MARIO_YAHOO_WAHA_YIPPEE, + + ACTION_TERRAIN_STEP_DEFAULT = Sounds.ACTION_TERRAIN_STEP_DEFAULT, + ACTION_TERRAIN_STEP_GRASS = Sounds.ACTION_TERRAIN_STEP_GRASS, + ACTION_TERRAIN_STEP_ICE = Sounds.ACTION_TERRAIN_STEP_ICE, + ACTION_TERRAIN_STEP_METAL = Sounds.ACTION_TERRAIN_STEP_METAL, + ACTION_TERRAIN_STEP_SAND = Sounds.ACTION_TERRAIN_STEP_SAND, + ACTION_TERRAIN_STEP_SNOW = Sounds.ACTION_TERRAIN_STEP_SNOW, + ACTION_TERRAIN_STEP_SPOOKY = Sounds.ACTION_TERRAIN_STEP_SPOOKY, + ACTION_TERRAIN_STEP_STONE = Sounds.ACTION_TERRAIN_STEP_STONE, + + ACTION_TERRAIN_LANDING_DEFAULT = Sounds.ACTION_TERRAIN_LANDING_DEFAULT, + ACTION_TERRAIN_LANDING_GRASS = Sounds.ACTION_TERRAIN_LANDING_GRASS, + ACTION_TERRAIN_LANDING_ICE = Sounds.ACTION_TERRAIN_LANDING_ICE, + ACTION_TERRAIN_LANDING_METAL = Sounds.ACTION_TERRAIN_LANDING_METAL, + ACTION_TERRAIN_LANDING_SAND = Sounds.ACTION_TERRAIN_LANDING_SAND, + ACTION_TERRAIN_LANDING_SNOW = Sounds.ACTION_TERRAIN_LANDING_SNOW, + ACTION_TERRAIN_LANDING_SPOOKY = Sounds.ACTION_TERRAIN_LANDING_SPOOKY, + ACTION_TERRAIN_LANDING_STONE = Sounds.ACTION_TERRAIN_LANDING_STONE, + + ACTION_TERRAIN_JUMP_DEFAULT = Sounds.ACTION_TERRAIN_LANDING_DEFAULT, + ACTION_TERRAIN_JUMP_GRASS = Sounds.ACTION_TERRAIN_LANDING_GRASS, + ACTION_TERRAIN_JUMP_ICE = Sounds.ACTION_TERRAIN_LANDING_ICE, + ACTION_TERRAIN_JUMP_METAL = Sounds.ACTION_TERRAIN_LANDING_METAL, + ACTION_TERRAIN_JUMP_SAND = Sounds.ACTION_TERRAIN_LANDING_SAND, + ACTION_TERRAIN_JUMP_SNOW = Sounds.ACTION_TERRAIN_LANDING_SNOW, + ACTION_TERRAIN_JUMP_SPOOKY = Sounds.ACTION_TERRAIN_LANDING_SPOOKY, + ACTION_TERRAIN_JUMP_STONE = Sounds.ACTION_TERRAIN_LANDING_STONE, +} + +task.spawn(function() + local ContentProvider = game:GetService("ContentProvider") + local preload = {} + + for _, anim in pairs(AnimTable) do + table.insert(preload, anim) + end + + ContentProvider:PreloadAsync(preload) +end) + +setmetatable(SoundTable, { + __index = function(_, k) + warn("UNKNOWN SOUND:", k) + end, +}) + +return { + Animations = AnimTable, + Sounds = SoundTable, +} diff --git a/sm64/Animations.lua b/sm64/Animations.lua deleted file mode 100644 index 8e459fe..0000000 --- a/sm64/Animations.lua +++ /dev/null @@ -1,229 +0,0 @@ ---!strict -local System = script.Parent -local Assets = System.Assets -local Anims = Assets.Animations - -local Data = table.freeze({ - SLOW_LEDGE_GRAB = Anims.SLOW_LEDGE_GRAB, - FALL_OVER_BACKWARDS = Anims.FALL_OVER_BACKWARDS, - BACKWARD_AIR_KB = Anims.BACKWARD_AIR_KB, - DYING_ON_BACK = Anims.DYING_ON_BACK, - BACKFLIP = Anims.BACKFLIP, - CLIMB_UP_POLE = Anims.CLIMB_UP_POLE, - GRAB_POLE_SHORT = Anims.GRAB_POLE_SHORT, - GRAB_POLE_SWING_PART1 = Anims.GRAB_POLE_SWING_PART1, - GRAB_POLE_SWING_PART2 = Anims.GRAB_POLE_SWING_PART2, - HANDSTAND_IDLE = Anims.HANDSTAND_IDLE, - HANDSTAND_JUMP = Anims.HANDSTAND_JUMP, - START_HANDSTAND = Anims.START_HANDSTAND, - RETURN_FROM_HANDSTAND = Anims.RETURN_FROM_HANDSTAND, - IDLE_ON_POLE = Anims.IDLE_ON_POLE, - A_POSE = Anims.A_POSE, - SKID_ON_GROUND = Anims.SKID_ON_GROUND, - STOP_SKID = Anims.STOP_SKID, - CROUCH_FROM_FAST_LONGJUMP = Anims.CROUCH_FROM_FAST_LONGJUMP, - CROUCH_FROM_SLOW_LONGJUMP = Anims.CROUCH_FROM_SLOW_LONGJUMP, - FAST_LONGJUMP = Anims.FAST_LONGJUMP, - SLOW_LONGJUMP = Anims.SLOW_LONGJUMP, - AIRBORNE_ON_STOMACH = Anims.AIRBORNE_ON_STOMACH, - WALK_WITH_LIGHT_OBJ = Anims.WALK_WITH_LIGHT_OBJ, - RUN_WITH_LIGHT_OBJ = Anims.RUN_WITH_LIGHT_OBJ, - SLOW_WALK_WITH_LIGHT_OBJ = Anims.SLOW_WALK_WITH_LIGHT_OBJ, - SHIVERING_WARMING_HAND = Anims.SHIVERING_WARMING_HAND, - SHIVERING_RETURN_TO_IDLE = Anims.SHIVERING_RETURN_TO_IDLE, - SHIVERING = Anims.SHIVERING, - CLIMB_DOWN_LEDGE = Anims.CLIMB_DOWN_LEDGE, - CREDITS_WAVING = Anims.CREDITS_WAVING, - CREDITS_LOOK_UP = Anims.CREDITS_LOOK_UP, - CREDITS_RETURN_FROM_LOOK_UP = Anims.CREDITS_RETURN_FROM_LOOK_UP, - CREDITS_RAISE_HAND = Anims.CREDITS_RAISE_HAND, - CREDITS_LOWER_HAND = Anims.CREDITS_LOWER_HAND, - CREDITS_TAKE_OFF_CAP = Anims.CREDITS_TAKE_OFF_CAP, - CREDITS_START_WALK_LOOK_UP = Anims.CREDITS_START_WALK_LOOK_UP, - CREDITS_LOOK_BACK_THEN_RUN = Anims.CREDITS_LOOK_BACK_THEN_RUN, - -- FINAL_BOWSER_RAISE_HAND_SPIN = Anims.FINAL_BOWSER_RAISE_HAND_SPIN; - -- FINAL_BOWSER_WING_CAP_TAKE_OFF = Anims.FINAL_BOWSER_WING_CAP_TAKE_OFF; - CREDITS_PEACE_SIGN = Anims.CREDITS_PEACE_SIGN, - STAND_UP_FROM_LAVA_BOOST = Anims.STAND_UP_FROM_LAVA_BOOST, - FIRE_LAVA_BURN = Anims.FIRE_LAVA_BURN, - WING_CAP_FLY = Anims.WING_CAP_FLY, - HANG_ON_OWL = Anims.HANG_ON_OWL, - LAND_ON_STOMACH = Anims.LAND_ON_STOMACH, - FORWARD_AIR_KB = Anims.FORWARD_AIR_KB, - DYING_ON_STOMACH = Anims.DYING_ON_STOMACH, - SUFFOCATING = Anims.SUFFOCATING, - COUGHING = Anims.COUGHING, - THROW_CATCH_KEY = Anims.THROW_CATCH_KEY, - DYING_FALL_OVER = Anims.DYING_FALL_OVER, - IDLE_ON_LEDGE = Anims.IDLE_ON_LEDGE, - FAST_LEDGE_GRAB = Anims.FAST_LEDGE_GRAB, - HANG_ON_CEILING = Anims.HANG_ON_CEILING, - PUT_CAP_ON = Anims.PUT_CAP_ON, - TAKE_CAP_OFF_THEN_ON = Anims.TAKE_CAP_OFF_THEN_ON, - QUICKLY_PUT_CAP_ON = Anims.QUICKLY_PUT_CAP_ON, -- unused - HEAD_STUCK_IN_GROUND = Anims.HEAD_STUCK_IN_GROUND, - GROUND_POUND_LANDING = Anims.GROUND_POUND_LANDING, - TRIPLE_JUMP_GROUND_POUND = Anims.TRIPLE_JUMP_GROUND_POUND, - START_GROUND_POUND = Anims.START_GROUND_POUND, - GROUND_POUND = Anims.GROUND_POUND, - BOTTOM_STUCK_IN_GROUND = Anims.BOTTOM_STUCK_IN_GROUND, - IDLE_WITH_LIGHT_OBJ = Anims.IDLE_WITH_LIGHT_OBJ, - JUMP_LAND_WITH_LIGHT_OBJ = Anims.JUMP_LAND_WITH_LIGHT_OBJ, - JUMP_WITH_LIGHT_OBJ = Anims.JUMP_WITH_LIGHT_OBJ, - FALL_LAND_WITH_LIGHT_OBJ = Anims.FALL_LAND_WITH_LIGHT_OBJ, - FALL_WITH_LIGHT_OBJ = Anims.FALL_WITH_LIGHT_OBJ, - FALL_FROM_SLIDING_WITH_LIGHT_OBJ = Anims.FALL_FROM_SLIDING_WITH_LIGHT_OBJ, - SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ = Anims.SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ, - STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ = Anims.STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ, - RIDING_SHELL = Anims.RIDING_SHELL, - WALKING = Anims.WALKING, - FORWARD_FLIP = Anims.FORWARD_FLIP, -- unused - JUMP_RIDING_SHELL = Anims.JUMP_RIDING_SHELL, - LAND_FROM_DOUBLE_JUMP = Anims.LAND_FROM_DOUBLE_JUMP, - DOUBLE_JUMP_FALL = Anims.DOUBLE_JUMP_FALL, - SINGLE_JUMP = Anims.SINGLE_JUMP, - LAND_FROM_SINGLE_JUMP = Anims.LAND_FROM_SINGLE_JUMP, - AIR_KICK = Anims.AIR_KICK, - DOUBLE_JUMP_RISE = Anims.DOUBLE_JUMP_RISE, - START_FORWARD_SPINNING = Anims.START_FORWARD_SPINNING, -- unused - THROW_LIGHT_OBJECT = Anims.THROW_LIGHT_OBJECT, - FALL_FROM_SLIDE_KICK = Anims.FALL_FROM_SLIDE_KICK, - BEND_KNESS_RIDING_SHELL = Anims.BEND_KNESS_RIDING_SHELL, -- unused - LEGS_STUCK_IN_GROUND = Anims.LEGS_STUCK_IN_GROUND, - GENERAL_FALL = Anims.GENERAL_FALL, - GENERAL_LAND = Anims.GENERAL_LAND, - BEING_GRABBED = Anims.BEING_GRABBED, - GRAB_HEAVY_OBJECT = Anims.GRAB_HEAVY_OBJECT, - SLOW_LAND_FROM_DIVE = Anims.SLOW_LAND_FROM_DIVE, - FLY_FROM_CANNON = Anims.FLY_FROM_CANNON, - MOVE_ON_WIRE_NET_RIGHT = Anims.MOVE_ON_WIRE_NET_RIGHT, - MOVE_ON_WIRE_NET_LEFT = Anims.MOVE_ON_WIRE_NET_LEFT, - MISSING_CAP = Anims.MISSING_CAP, - PULL_DOOR_WALK_IN = Anims.PULL_DOOR_WALK_IN, - PUSH_DOOR_WALK_IN = Anims.PUSH_DOOR_WALK_IN, - UNLOCK_DOOR = Anims.UNLOCK_DOOR, - START_REACH_POCKET = Anims.START_REACH_POCKET, -- unused, reaching keys maybe? - REACH_POCKET = Anims.REACH_POCKET, -- unused - STOP_REACH_POCKET = Anims.STOP_REACH_POCKET, -- unused - GROUND_THROW = Anims.GROUND_THROW, - GROUND_KICK = Anims.GROUND_KICK, - FIRST_PUNCH = Anims.FIRST_PUNCH, - SECOND_PUNCH = Anims.SECOND_PUNCH, - FIRST_PUNCH_FAST = Anims.FIRST_PUNCH_FAST, - SECOND_PUNCH_FAST = Anims.SECOND_PUNCH_FAST, - PICK_UP_LIGHT_OBJ = Anims.PICK_UP_LIGHT_OBJ, - PUSHING = Anims.PUSHING, - START_RIDING_SHELL = Anims.START_RIDING_SHELL, - PLACE_LIGHT_OBJ = Anims.PLACE_LIGHT_OBJ, - FORWARD_SPINNING = Anims.FORWARD_SPINNING, - BACKWARD_SPINNING = Anims.BACKWARD_SPINNING, - BREAKDANCE = Anims.BREAKDANCE, - RUNNING = Anims.RUNNING, - RUNNING_UNUSED = Anims.RUNNING_UNUSED, -- unused duplicate, originally part 2? - SOFT_BACK_KB = Anims.SOFT_BACK_KB, - SOFT_FRONT_KB = Anims.SOFT_FRONT_KB, - DYING_IN_QUICKSAND = Anims.DYING_IN_QUICKSAND, - IDLE_IN_QUICKSAND = Anims.IDLE_IN_QUICKSAND, - MOVE_IN_QUICKSAND = Anims.MOVE_IN_QUICKSAND, - ELECTROCUTION = Anims.ELECTROCUTION, - SHOCKED = Anims.SHOCKED, - BACKWARD_KB = Anims.BACKWARD_KB, - FORWARD_KB = Anims.FORWARD_KB, - IDLE_HEAVY_OBJ = Anims.IDLE_HEAVY_OBJ, - -- STAND_AGAINST_WALL = Anims.STAND_AGAINST_WALL; - SIDESTEP_LEFT = Anims.SIDESTEP_LEFT, - SIDESTEP_RIGHT = Anims.SIDESTEP_RIGHT, - START_SLEEP_IDLE = Anims.START_SLEEP_IDLE, - START_SLEEP_SCRATCH = Anims.START_SLEEP_SCRATCH, - START_SLEEP_YAWN = Anims.START_SLEEP_YAWN, - START_SLEEP_SITTING = Anims.START_SLEEP_SITTING, - SLEEP_IDLE = Anims.SLEEP_IDLE, - SLEEP_START_LYING = Anims.SLEEP_START_LYING, - SLEEP_LYING = Anims.SLEEP_LYING, - DIVE = Anims.DIVE, - SLIDE_DIVE = Anims.SLIDE_DIVE, - GROUND_BONK = Anims.GROUND_BONK, - STOP_SLIDE_LIGHT_OBJ = Anims.STOP_SLIDE_LIGHT_OBJ, - SLIDE_KICK = Anims.SLIDE_KICK, - CROUCH_FROM_SLIDE_KICK = Anims.CROUCH_FROM_SLIDE_KICK, - SLIDE_MOTIONLESS = Anims.SLIDE_MOTIONLESS, -- unused - STOP_SLIDE = Anims.STOP_SLIDE, - FALL_FROM_SLIDE = Anims.FALL_FROM_SLIDE, - SLIDE = Anims.SLIDE, - TIPTOE = Anims.TIPTOE, - TWIRL_LAND = Anims.TWIRL_LAND, - TWIRL = Anims.TWIRL, - START_TWIRL = Anims.START_TWIRL, - STOP_CROUCHING = Anims.STOP_CROUCHING, - START_CROUCHING = Anims.START_CROUCHING, - CROUCHING = Anims.CROUCHING, - CRAWLING = Anims.CRAWLING, - STOP_CRAWLING = Anims.STOP_CRAWLING, - START_CRAWLING = Anims.START_CRAWLING, - SUMMON_STAR = Anims.SUMMON_STAR, - RETURN_STAR_APPROACH_DOOR = Anims.RETURN_STAR_APPROACH_DOOR, - BACKWARDS_WATER_KB = Anims.BACKWARDS_WATER_KB, - SWIM_WITH_OBJ_PART1 = Anims.SWIM_WITH_OBJ_PART1, - SWIM_WITH_OBJ_PART2 = Anims.SWIM_WITH_OBJ_PART2, - FLUTTERKICK_WITH_OBJ = Anims.FLUTTERKICK_WITH_OBJ, - WATER_ACTION_END_WITH_OBJ = Anims.WATER_ACTION_END_WITH_OBJ, -- either swimming or flutterkicking - STOP_GRAB_OBJ_WATER = Anims.STOP_GRAB_OBJ_WATER, - WATER_IDLE_WITH_OBJ = Anims.WATER_IDLE_WITH_OBJ, - DROWNING_PART1 = Anims.DROWNING_PART1, - DROWNING_PART2 = Anims.DROWNING_PART2, - WATER_DYING = Anims.WATER_DYING, - WATER_FORWARD_KB = Anims.WATER_FORWARD_KB, - FALL_FROM_WATER = Anims.FALL_FROM_WATER, - SWIM_PART1 = Anims.SWIM_PART1, - SWIM_PART2 = Anims.SWIM_PART2, - FLUTTERKICK = Anims.FLUTTERKICK, - WATER_ACTION_END = Anims.WATER_ACTION_END, -- either swimming or flutterkicking - WATER_PICK_UP_OBJ = Anims.WATER_PICK_UP_OBJ, - WATER_GRAB_OBJ_PART2 = Anims.WATER_GRAB_OBJ_PART2, - WATER_GRAB_OBJ_PART1 = Anims.WATER_GRAB_OBJ_PART1, - WATER_THROW_OBJ = Anims.WATER_THROW_OBJ, - WATER_IDLE = Anims.WATER_IDLE, - WATER_STAR_DANCE = Anims.WATER_STAR_DANCE, - RETURN_FROM_WATER_STAR_DANCE = Anims.RETURN_FROM_WATER_STAR_DANCE, - -- GRAB_BOWSER = Anims.GRAB_BOWSER; - -- SWINGING_BOWSER = Anims.SWINGING_BOWSER; - -- RELEASE_BOWSER = Anims.RELEASE_BOWSER; - -- HOLDING_BOWSER = Anims.HOLDING_BOWSER; - HEAVY_THROW = Anims.HEAVY_THROW, - WALK_PANTING = Anims.WALK_PANTING, - WALK_WITH_HEAVY_OBJ = Anims.WALK_WITH_HEAVY_OBJ, - TURNING_PART1 = Anims.TURNING_PART1, - TURNING_PART2 = Anims.TURNING_PART2, - SLIDEFLIP_LAND = Anims.SLIDEFLIP_LAND, - SLIDEFLIP = Anims.SLIDEFLIP, - TRIPLE_JUMP_LAND = Anims.TRIPLE_JUMP_LAND, - TRIPLE_JUMP = Anims.TRIPLE_JUMP, - FIRST_PERSON = Anims.FIRST_PERSON, - IDLE_HEAD_LEFT = Anims.IDLE_HEAD_LEFT, - IDLE_HEAD_RIGHT = Anims.IDLE_HEAD_RIGHT, - IDLE_HEAD_CENTER = Anims.IDLE_HEAD_CENTER, - HANDSTAND_LEFT = Anims.HANDSTAND_LEFT, - HANDSTAND_RIGHT = Anims.HANDSTAND_RIGHT, - WAKE_FROM_SLEEP = Anims.WAKE_FROM_SLEEP, - WAKE_FROM_LYING = Anims.WAKE_FROM_LYING, - START_TIPTOE = Anims.START_TIPTOE, - SLIDEJUMP = Anims.SLIDEJUMP, -- pole jump and wall kick - START_WALLKICK = Anims.START_WALLKICK, - STAR_DANCE = Anims.STAR_DANCE, - RETURN_FROM_STAR_DANCE = Anims.RETURN_FROM_STAR_DANCE, - FORWARD_SPINNING_FLIP = Anims.FORWARD_SPINNING_FLIP, - TRIPLE_JUMP_FLY = Anims.TRIPLE_JUMP_FLY, -}) - -task.spawn(function() - local ContentProvider = game:GetService("ContentProvider") - local preload = {} - - for name, anim in pairs(Data) do - table.insert(preload, anim) - end - - ContentProvider:PreloadAsync(preload) -end) - -return Data diff --git a/sm64/Assets/Animations.rbxmx b/sm64/Assets/Animations.rbxmx deleted file mode 100644 index 8021b6d..0000000 --- a/sm64/Assets/Animations.rbxmx +++ /dev/null @@ -1,1229 +0,0 @@ - - - - - - Animations - - - - - AIRBORNE_ON_STOMACH - - - - - - AIR_KICK - - - - - - A_POSE - - - - - - BACKFLIP - - - - - - BACKWARDS_WATER_KB - - - - - - BACKWARD_AIR_KB - - - - - - BACKWARD_KB - - - - - - BACKWARD_SPINNING - - - - - - BEING_GRABBED - - - - - - BEND_KNESS_RIDING_SHELL - - - - - - BOTTOM_STUCK_IN_GROUND - - - - - - BREAKDANCE - - - - - - CLIMB_DOWN_LEDGE - - - - - - CLIMB_UP_POLE - - - - - - COUGHING - - - - - - CRAWLING - - - - - - CREDITS_LOOK_BACK_THEN_RUN - - - - - - CREDITS_LOOK_UP - - - - - - CREDITS_LOWER_HAND - - - - - - CREDITS_PEACE_SIGN - - - - - - CREDITS_RAISE_HAND - - - - - - CREDITS_RETURN_FROM_LOOK_UP - - - - - - CREDITS_START_WALK_LOOK_UP - - - - - - CREDITS_TAKE_OFF_CAP - - - - - - CREDITS_WAVING - - - - - - CROUCHING - - - - - - CROUCH_FROM_FAST_LONGJUMP - - - - - - CROUCH_FROM_SLIDE_KICK - - - - - - CROUCH_FROM_SLOW_LONGJUMP - - - - - - DIVE - - - - - - DOUBLE_JUMP_FALL - - - - - - DOUBLE_JUMP_RISE - - - - - - DROWNING_PART1 - - - - - - DROWNING_PART2 - - - - - - DYING_FALL_OVER - - - - - - DYING_IN_QUICKSAND - - - - - - DYING_ON_BACK - - - - - - DYING_ON_STOMACH - - - - - - ELECTROCUTION - - - - - - FALL_FROM_SLIDE - - - - - - FALL_FROM_SLIDE_KICK - - - - - - FALL_FROM_SLIDING_WITH_LIGHT_OBJ - - - - - - FALL_FROM_WATER - - - - - - FALL_LAND_WITH_LIGHT_OBJ - - - - - - FALL_OVER_BACKWARDS - - - - - - FALL_WITH_LIGHT_OBJ - - - - - - FAST_LEDGE_GRAB - - - - - - FAST_LONGJUMP - - - - - - FIRE_LAVA_BURN - - - - - - FIRST_PERSON - - - - - - FIRST_PUNCH - - - - - - FIRST_PUNCH_FAST - - - - - - FLUTTERKICK - - - - - - FLUTTERKICK_WITH_OBJ - - - - - - FLY_FROM_CANNON - - - - - - FORWARD_AIR_KB - - - - - - FORWARD_FLIP - - - - - - FORWARD_KB - - - - - - FORWARD_SPINNING - - - - - - FORWARD_SPINNING_FLIP - - - - - - GENERAL_FALL - - - - - - GENERAL_LAND - - - - - - GRAB_HEAVY_OBJECT - - - - - - GRAB_POLE_SHORT - - - - - - GRAB_POLE_SWING_PART1 - - - - - - GRAB_POLE_SWING_PART2 - - - - - - GROUND_BONK - - - - - - GROUND_KICK - - - - - - GROUND_POUND - - - - - - GROUND_POUND_LANDING - - - - - - GROUND_THROW - - - - - - HANDSTAND_IDLE - - - - - - HANDSTAND_JUMP - - - - - - HANDSTAND_LEFT - - - - - - HANDSTAND_RIGHT - - - - - - HANG_ON_CEILING - - - - - - HANG_ON_OWL - - - - - - HEAD_STUCK_IN_GROUND - - - - - - HEAVY_THROW - - - - - - IDLE_HEAD_CENTER - - - - - - IDLE_HEAD_LEFT - - - - - - IDLE_HEAD_RIGHT - - - - - - IDLE_HEAVY_OBJ - - - - - - IDLE_IN_QUICKSAND - - - - - - IDLE_ON_LEDGE - - - - - - IDLE_ON_POLE - - - - - - IDLE_WITH_LIGHT_OBJ - - - - - - JUMP_LAND_WITH_LIGHT_OBJ - - - - - - JUMP_RIDING_SHELL - - - - - - JUMP_WITH_LIGHT_OBJ - - - - - - LAND_FROM_DOUBLE_JUMP - - - - - - LAND_FROM_SINGLE_JUMP - - - - - - LAND_ON_STOMACH - - - - - - LEGS_STUCK_IN_GROUND - - - - - - MISSING_CAP - - - - - - MOVE_IN_QUICKSAND - - - - - - MOVE_ON_WIRE_NET_LEFT - - - - - - MOVE_ON_WIRE_NET_RIGHT - - - - - - PICK_UP_LIGHT_OBJ - - - - - - PLACE_LIGHT_OBJ - - - - - - PULL_DOOR_WALK_IN - - - - - - PUSHING - - - - - - PUSH_DOOR_WALK_IN - - - - - - PUT_CAP_ON - - - - - - QUICKLY_PUT_CAP_ON - - - - - - REACH_POCKET - - - - - - RETURN_FROM_HANDSTAND - - - - - - RETURN_FROM_STAR_DANCE - - - - - - RETURN_FROM_WATER_STAR_DANCE - - - - - - RETURN_STAR_APPROACH_DOOR - - - - - - RIDING_SHELL - - - - - - RUNNING - - - - - - RUNNING_UNUSED - - - - - - RUN_WITH_LIGHT_OBJ - - - - - - SECOND_PUNCH - - - - - - SECOND_PUNCH_FAST - - - - - - SHIVERING - - - - - - SHIVERING_RETURN_TO_IDLE - - - - - - SHIVERING_WARMING_HAND - - - - - - SHOCKED - - - - - - SIDESTEP_LEFT - - - - - - SIDESTEP_RIGHT - - - - - - SINGLE_JUMP - - - - - - SKID_ON_GROUND - - - - - - SLEEP_IDLE - - - - - - SLEEP_LYING - - - - - - SLEEP_START_LYING - - - - - - SLIDE - - - - - - SLIDEFLIP - - - - - - SLIDEFLIP_LAND - - - - - - SLIDEJUMP - - - - - - SLIDE_DIVE - - - - - - SLIDE_KICK - - - - - - SLIDE_MOTIONLESS - - - - - - SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ - - - - - - SLOW_LAND_FROM_DIVE - - - - - - SLOW_LEDGE_GRAB - - - - - - SLOW_LONGJUMP - - - - - - SLOW_WALK_WITH_LIGHT_OBJ - - - - - - SOFT_BACK_KB - - - - - - SOFT_FRONT_KB - - - - - - STAND_UP_FROM_LAVA_BOOST - - - - - - STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ - - - - - - START_CRAWLING - - - - - - START_CROUCHING - - - - - - START_FORWARD_SPINNING - - - - - - START_GROUND_POUND - - - - - - START_HANDSTAND - - - - - - START_REACH_POCKET - - - - - - START_RIDING_SHELL - - - - - - START_SLEEP_IDLE - - - - - - START_SLEEP_SCRATCH - - - - - - START_SLEEP_SITTING - - - - - - START_SLEEP_YAWN - - - - - - START_TIPTOE - - - - - - START_TWIRL - - - - - - START_WALLKICK - - - - - - STAR_DANCE - - - - - - STOP_CRAWLING - - - - - - STOP_CROUCHING - - - - - - STOP_GRAB_OBJ_WATER - - - - - - STOP_REACH_POCKET - - - - - - STOP_SKID - - - - - - STOP_SLIDE - - - - - - STOP_SLIDE_LIGHT_OBJ - - - - - - SUFFOCATING - - - - - - SUMMON_STAR - - - - - - SWIM_PART1 - - - - - - SWIM_PART2 - - - - - - SWIM_WITH_OBJ_PART1 - - - - - - SWIM_WITH_OBJ_PART2 - - - - - - TAKE_CAP_OFF_THEN_ON - - - - - - THROW_CATCH_KEY - - - - - - THROW_LIGHT_OBJECT - - - - - - TIPTOE - - - - - - TRIPLE_JUMP - - - - - - TRIPLE_JUMP_FLY - - - - - - TRIPLE_JUMP_GROUND_POUND - - - - - - TRIPLE_JUMP_LAND - - - - - - TURNING_PART1 - - - - - - TURNING_PART2 - - - - - - TWIRL - - - - - - TWIRL_LAND - - - - - - UNLOCK_DOOR - - - - - - WAKE_FROM_LYING - - - - - - WAKE_FROM_SLEEP - - - - - - WALKING - - - - - - WALK_PANTING - - - - - - WALK_WITH_HEAVY_OBJ - - - - - - WALK_WITH_LIGHT_OBJ - - - - - - WATER_ACTION_END - - - - - - WATER_ACTION_END_WITH_OBJ - - - - - - WATER_DYING - - - - - - WATER_FORWARD_KB - - - - - - WATER_GRAB_OBJ_PART1 - - - - - - WATER_GRAB_OBJ_PART2 - - - - - - WATER_IDLE - - - - - - WATER_IDLE_WITH_OBJ - - - - - - WATER_PICK_UP_OBJ - - - - - - WATER_STAR_DANCE - - - - - - WATER_THROW_OBJ - - - - - - WING_CAP_FLY - - - - \ No newline at end of file diff --git a/sm64/Assets/README.md b/sm64/Assets/README.md deleted file mode 100644 index f371ff3..0000000 --- a/sm64/Assets/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Assets - -These are empty asset definitions for the animations and sounds used by the SM64 script.
-The animations define some metadata such as: - -* How many frames the animation is -* Whether an animation should loop or freeze at the end -* The address of the animation data in the SM64 (USA) ROM. -* What the upload hash of the asset is (empty) - -Sounds can be configuration objects with named sound attributes defining their weight of being rolled. \ No newline at end of file diff --git a/sm64/Assets/Sounds.rbxmx b/sm64/Assets/Sounds.rbxmx deleted file mode 100644 index 0c82cf9..0000000 --- a/sm64/Assets/Sounds.rbxmx +++ /dev/null @@ -1,501 +0,0 @@ - - - - Sounds - - - - 8 - ACTION_BONK - 128 - - - - - 8 - ACTION_FLYING_FAST - 128 - - - - - 8 - ACTION_HEAVY_LANDING - 128 - - - - - 8 - ACTION_HIT - 128 - - - - - 8 - ACTION_METAL_BONK - 128 - - - - - 8 - ACTION_METAL_HEAVY_LANDING - 128 - - - - - 8 - ACTION_METAL_LANDING - 128 - - - - - 8 - ACTION_METAL_STEP - 128 - - - - - 8 - ACTION_PAT_BACK - 128 - - - - - 8 - ACTION_SIDE_FLIP - 128 - - - - - 8 - ACTION_SPIN - 128 - - - - - 8 - ACTION_TERRAIN_BODY_HIT_GROUND - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_DEFAULT - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_GRASS - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_ICE - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_METAL - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_SAND - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_SNOW - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_SPOOKY - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_STONE - 128 - - - - - 8 - ACTION_TERRAIN_LANDING_WATER - 128 - - - - - 8 - ACTION_TERRAIN_STEP_DEFAULT - 128 - - - - - 8 - ACTION_TERRAIN_STEP_GRASS - 128 - - - - - 8 - ACTION_TERRAIN_STEP_ICE - 128 - - - - - 8 - ACTION_TERRAIN_STEP_METAL - 128 - - - - - 8 - ACTION_TERRAIN_STEP_SAND - 128 - - - - - 8 - ACTION_TERRAIN_STEP_SNOW - 128 - - - - - 8 - ACTION_TERRAIN_STEP_SPOOKY - 128 - - - - - 8 - ACTION_TERRAIN_STEP_STONE - 128 - - - - - 8 - ACTION_TERRAIN_STEP_WATER - 128 - - - - - 8 - ACTION_THROW - 128 - - - - - 8 - ACTION_TWIRL - 128 - - - - - 8 - MARIO_ATTACKED - 128 - - - - - 8 - MARIO_DIE - 128 - - - - - 8 - MARIO_DOH - 128 - - - - - 8 - MARIO_GROUND_POUND_WAH - 128 - - - - - 8 - MARIO_HAHA - 128 - - - - - 8 - MARIO_HOO - 128 - - - - - 8 - MARIO_HOOHOO - 128 - - - - - 8 - MARIO_IMA_TIRED - 128 - - - - - 8 - MARIO_JUMP_HOO - 128 - - - - - 8 - MARIO_JUMP_WAH - 128 - - - - - 8 - MARIO_MAMA_MIA - 128 - - - - - 8 - MARIO_ON_FIRE - 128 - - - - - 8 - MARIO_OOOF - 128 - - - - - 8 - MARIO_PANTING - 128 - - - - - 8 - MARIO_PUNCH_HOO - 128 - - - - - 8 - MARIO_PUNCH_WAH - 128 - - - - - 8 - MARIO_PUNCH_YAH - 128 - - - - - 8 - MARIO_SNORING1 - 128 - - - - - 8 - MARIO_SNORING2 - 128 - - - - - 8 - MARIO_SNORING3 - 128 - - - - - 8 - MARIO_THROW_YAH - 128 - - - - - 8 - MARIO_UH - 128 - - - - - 8 - MARIO_UH2 - 128 - - - - - 8 - MARIO_WAAAOOOW - 128 - - - - - 8 - MARIO_WAH - 128 - - - - - 8 - MARIO_WAHA - 128 - - - - - 8 - MARIO_WHOA - 128 - - - - - 8 - MARIO_YAH - 128 - - - - - 8 - MARIO_YAHOO - 128 - - - - - 8 - MARIO_YAWNING - 128 - - - - - 8 - MARIO_YIPPEE - 128 - - - - - 8 - MOVING_FLYING - 128 - - - - - 8 - MOVING_LAVA_BURN - 128 - - - - - 8 - MOVING_TERRAIN_SLIDE - 128 - - - - - ACTION_TERRAIN_JUMP - - - - - ACTION_TERRAIN_LANDING - - - - - ACTION_TERRAIN_STEP - - - - - MARIO_JUMP - - - - - - MARIO_YAHOO_WAHA_YIPPEE - - - - - - MARIO_YAH_WAH_HOO - - - - \ No newline at end of file diff --git a/sm64/Sounds.lua b/sm64/Sounds.lua deleted file mode 100644 index 58ad26a..0000000 --- a/sm64/Sounds.lua +++ /dev/null @@ -1,96 +0,0 @@ ---!strict - -local System = script.Parent -local Assets = System.Assets -local Sounds = Assets.Sounds - -local Data = { - ACTION_BONK = Sounds.ACTION_BONK, - ACTION_FLYING_FAST = Sounds.ACTION_FLYING_FAST, - ACTION_HIT = Sounds.ACTION_HIT, - ACTION_METAL_BONK = Sounds.ACTION_METAL_BONK, - ACTION_METAL_HEAVY_LANDING = Sounds.ACTION_METAL_HEAVY_LANDING, - ACTION_METAL_LANDING = Sounds.ACTION_METAL_LANDING, - ACTION_METAL_STEP = Sounds.ACTION_METAL_STEP, - ACTION_PAT_BACK = Sounds.ACTION_PAT_BACK, - ACTION_SIDE_FLIP = Sounds.ACTION_SIDE_FLIP, - ACTION_SPIN = Sounds.ACTION_SPIN, - ACTION_HEAVY_LANDING = Sounds.ACTION_HEAVY_LANDING, - ACTION_TERRAIN_BODY_HIT_GROUND = Sounds.ACTION_TERRAIN_BODY_HIT_GROUND, - ACTION_TERRAIN_JUMP = Sounds.ACTION_TERRAIN_JUMP, - ACTION_TERRAIN_LANDING = Sounds.ACTION_TERRAIN_LANDING, - ACTION_TERRAIN_STEP = Sounds.ACTION_TERRAIN_STEP, - ACTION_THROW = Sounds.ACTION_THROW, - ACTION_TWIRL = Sounds.ACTION_TWIRL, - - MARIO_ATTACKED = Sounds.MARIO_ATTACKED, - MARIO_DOH = Sounds.MARIO_DOH, - MARIO_GROUND_POUND_WAH = Sounds.MARIO_GROUND_POUND_WAH, - MARIO_HAHA = Sounds.MARIO_HAHA, - MARIO_HOO = Sounds.MARIO_HOO, - MARIO_HOOHOO = Sounds.MARIO_HOOHOO, - MARIO_IMA_TIRED = Sounds.MARIO_IMA_TIRED, - MARIO_MAMA_MIA = Sounds.MARIO_MAMA_MIA, - MARIO_ON_FIRE = Sounds.MARIO_ON_FIRE, - MARIO_OOOF = Sounds.MARIO_OOOF, - MARIO_PANTING = Sounds.MARIO_PANTING, - MARIO_PUNCH_YAH = Sounds.MARIO_PUNCH_YAH, - MARIO_PUNCH_WAH = Sounds.MARIO_PUNCH_WAH, - MARIO_PUNCH_HOO = Sounds.MARIO_PUNCH_HOO, - MARIO_SNORING1 = Sounds.MARIO_SNORING1, - MARIO_SNORING2 = Sounds.MARIO_SNORING2, - MARIO_SNORING3 = Sounds.MARIO_SNORING3, - MARIO_UH = Sounds.MARIO_UH, - MARIO_UH2 = Sounds.MARIO_UH2, - MARIO_WAAAOOOW = Sounds.MARIO_WAAAOOOW, - MARIO_WAH = Sounds.MARIO_WAH, - MARIO_WAHA = Sounds.MARIO_WAHA, - MARIO_WHOA = Sounds.MARIO_WHOA, - MARIO_YAH = Sounds.MARIO_YAH, - MARIO_YAHOO = Sounds.MARIO_YAHOO, - MARIO_YAWNING = Sounds.MARIO_YAWNING, - MARIO_YIPPEE = Sounds.MARIO_YIPPEE, - - MOVING_FLYING = Sounds.MOVING_FLYING, - MOVING_LAVA_BURN = Sounds.MOVING_LAVA_BURN, - MOVING_TERRAIN_SLIDE = Sounds.MOVING_TERRAIN_SLIDE, - - MARIO_JUMP = Sounds.MARIO_JUMP, - MARIO_YAH_WAH_HOO = Sounds.MARIO_YAH_WAH_HOO, - MARIO_YAHOO_WAHA_YIPPEE = Sounds.MARIO_YAHOO_WAHA_YIPPEE, - - ACTION_TERRAIN_STEP_DEFAULT = Sounds.ACTION_TERRAIN_STEP_DEFAULT, - ACTION_TERRAIN_STEP_GRASS = Sounds.ACTION_TERRAIN_STEP_GRASS, - ACTION_TERRAIN_STEP_ICE = Sounds.ACTION_TERRAIN_STEP_ICE, - ACTION_TERRAIN_STEP_METAL = Sounds.ACTION_TERRAIN_STEP_METAL, - ACTION_TERRAIN_STEP_SAND = Sounds.ACTION_TERRAIN_STEP_SAND, - ACTION_TERRAIN_STEP_SNOW = Sounds.ACTION_TERRAIN_STEP_SNOW, - ACTION_TERRAIN_STEP_SPOOKY = Sounds.ACTION_TERRAIN_STEP_SPOOKY, - ACTION_TERRAIN_STEP_STONE = Sounds.ACTION_TERRAIN_STEP_STONE, - - ACTION_TERRAIN_LANDING_DEFAULT = Sounds.ACTION_TERRAIN_LANDING_DEFAULT, - ACTION_TERRAIN_LANDING_GRASS = Sounds.ACTION_TERRAIN_LANDING_GRASS, - ACTION_TERRAIN_LANDING_ICE = Sounds.ACTION_TERRAIN_LANDING_ICE, - ACTION_TERRAIN_LANDING_METAL = Sounds.ACTION_TERRAIN_LANDING_METAL, - ACTION_TERRAIN_LANDING_SAND = Sounds.ACTION_TERRAIN_LANDING_SAND, - ACTION_TERRAIN_LANDING_SNOW = Sounds.ACTION_TERRAIN_LANDING_SNOW, - ACTION_TERRAIN_LANDING_SPOOKY = Sounds.ACTION_TERRAIN_LANDING_SPOOKY, - ACTION_TERRAIN_LANDING_STONE = Sounds.ACTION_TERRAIN_LANDING_STONE, - - ACTION_TERRAIN_JUMP_DEFAULT = Sounds.ACTION_TERRAIN_LANDING_DEFAULT, - ACTION_TERRAIN_JUMP_GRASS = Sounds.ACTION_TERRAIN_LANDING_GRASS, - ACTION_TERRAIN_JUMP_ICE = Sounds.ACTION_TERRAIN_LANDING_ICE, - ACTION_TERRAIN_JUMP_METAL = Sounds.ACTION_TERRAIN_LANDING_METAL, - ACTION_TERRAIN_JUMP_SAND = Sounds.ACTION_TERRAIN_LANDING_SAND, - ACTION_TERRAIN_JUMP_SNOW = Sounds.ACTION_TERRAIN_LANDING_SNOW, - ACTION_TERRAIN_JUMP_SPOOKY = Sounds.ACTION_TERRAIN_LANDING_SPOOKY, - ACTION_TERRAIN_JUMP_STONE = Sounds.ACTION_TERRAIN_LANDING_STONE, -} - -setmetatable(Data, { - __index = function(t, k) - warn("UNKNOWN SOUND:", k) - end, -}) - -return table.freeze(Data)