Page 1 of 1

Dive.lua 1.3 (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 9:15 am
by MegoZ_
This script allows the player to dive like in Super Mario Odyssey.
Works for 2 players
Compatible with "twirl.lua!"

* Press both Alt-Jump/Spin key AND Down key at the same time in mid-air.

Use dive.showMeDebug = true to show funny debug stuff
You can also use dive.allowEveryCharacter= true to allow every character to dive, though I wouldn't recommend, toad will disappear and talk like mario when diving :? ...

(1.2.1) You can now dive when slow falling with a tanookie suit.
(1.3) There's now only one audio and Luigi can now dive.

Video Preview:
Spoiler: show
1.0:

How to install:
Spoiler: show
1. Extract both "dive.lua" and the ".flac" audio files together into your episode/level folder.
2. Paste the following line into your level/episode's luna.lua file.

Code: Select all

dive = require("dive")
If you're installing this with twirl.lua, make sure they are on the same folder, and they are loaded into the same level/episode!

Download (Zip file, v1.3):
MEGA: https://mega.nz/file/p0lnSSaR#YS81KnTBt ... It522vdMgk
MEDIAFIRE: https://www.mediafire.com/file/cve3fh0r ... o.zip/file
Quick Pastebin (Only for Updates!): https://pastebin.com/LcWe4JVh


Re: Dive.lua (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 10:17 am
by georgespezi12
The input execution is too precise for high action stages.

You have to press the inputs correctly, otherwise Mario ducks and the dash isn't executed

Re: Dive.lua (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 2:37 pm
by MegoZ_
georgespezi12 wrote:
Thu Jun 30, 2022 10:17 am
The input execution is too precise for high action stages.

You have to press the inputs correctly, otherwise Mario ducks and the dash isn't executed
I never thought that would be a problem since I always first pressed altJump and then down, next release I will make it that both ways work, thanks for the feedback!!

Re: Dive.lua (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 2:39 pm
by Chanceux2
Could you also post the link to the YouTube video because I can't watch it

Re: Dive.lua (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 2:56 pm
by MegoZ_
Chanceux2 wrote:
Thu Jun 30, 2022 2:39 pm
Could you also post the link to the YouTube video because I can't watch it
Here:
https://youtu.be/7ujPvJvSPLM
You can also refresh the page. The forum sometimes decides it wants to load the video

also...
georgespezi12 wrote:
Thu Jun 30, 2022 10:17 am
The input execution is too precise for high action stages.

You have to press the inputs correctly, otherwise Mario ducks and the dash isn't executed
The pastebin code has been updated so you can dive while ducking. You can copy the code and replace everything in the dive.lua script. I will also update the mega and mediafire links in a minute if you'd like to download from that!

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 3:43 pm
by Chanceux2
So I tried to test this out and then I got this:

[url=https://postimg.cc/nX0S99xr][img]https://i.postimg.cc/nX0S99xr/Debug-6-3 ... -44-PM.png[/img][/url]

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 4:01 pm
by MegoZ_
Chanceux2 wrote:
Thu Jun 30, 2022 3:43 pm
So I tried to test this out and then I got this:

Image

Are you trying to load this with twirl.lua or is it only dive.lua?
They must retain the same file name and include the .flac audio files. I think they should also be loaded on the same luna.lua file, I recommend calling them in the episode's luna.lua file.

Try updating it and see if the issue is still present. By updating I mean redownload the scripts...

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 4:44 pm
by Chanceux2
1. I'm using both twirl.lua and dive.lua
2. Yes I'm using the episode luna.lua file and I'll update it and check it out

Edit: Nope, same results, I'm getting the same error

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 4:50 pm
by AirShip
Exactly what I was looking for, but unfortunately no compatibility with the other characters.
Do you have plans to make this compatible with the other main characters?

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Thu Jun 30, 2022 11:31 pm
by Marioman2007
AirShip wrote:
Thu Jun 30, 2022 4:50 pm
Exactly what I was looking for, but unfortunately no compatibility with the other characters.
Do you have plans to make this compatible with the other main characters?
Removing this line works for me:
Image

Oh and you also need to remove the "and" at line 81.

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Fri Jul 01, 2022 7:24 am
by MegoZ_
Chanceux2 wrote:
Thu Jun 30, 2022 4:44 pm
1. I'm using both twirl.lua and dive.lua
2. Yes I'm using the episode luna.lua file and I'll update it and check it out

Edit: Nope, same results, I'm getting the same error

It seems to be a problem with the dive.lua script you have. Can you send me both of your twirl.lua and dive.lua files so I can get a look at them? I've tried to recreate the issue but it still works fine for me with the downloads and the pastebin...

In any case, make sure you called both libraries in only one of these three ways:
Image
code to copy: show

Code: Select all

require("twirl")
require("dive")
---OR------------------------
twirl = require("twirl")
dive = require("dive")
---OR------------------------
local twirl = require("twirl")
local dive = require("dive")

If the pastebin of twirl.lua and dive.lua are identical to the files you have, then you should try updating SMBX2 just in case, this is only as a last ditch effort!

I hope this helps!

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Posted: Sat Jul 02, 2022 9:41 am
by ShadowXeldron
Why are you using FLACs? Those take up a lot of space. I'd suggest converting it to an OGG and changing the code accordingly.

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Posted: Sat Jul 02, 2022 2:05 pm
by MegoZ_
Dragon0307 wrote:
Sat Jul 02, 2022 9:41 am
Why are you using FLACs? Those take up a lot of space. I'd suggest converting it to an OGG and changing the code accordingly.
hehe... I like flac. But sure, I will change it eventually since I am looking for the ripped sfx from the game without mario's voice. Those flac files were created by a recording from the video capture thingy on my Switch.

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Posted: Sat Jul 02, 2022 8:26 pm
by MrDoubleA
MegoZ_ wrote:
Sat Jul 02, 2022 2:05 pm
Dragon0307 wrote:
Sat Jul 02, 2022 9:41 am
Why are you using FLACs? Those take up a lot of space. I'd suggest converting it to an OGG and changing the code accordingly.
hehe... I like flac. But sure, I will change it eventually since I am looking for the ripped sfx from the game without mario's voice. Those flac files were created by a recording from the video capture thingy on my Switch.
By the way, audio in switch recordings is of course compressed, so there's not really any benefit to using flac.

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Posted: Tue Jul 05, 2022 2:03 pm
by AirShip
Marioman2007 wrote:
Thu Jun 30, 2022 11:31 pm
AirShip wrote:
Thu Jun 30, 2022 4:50 pm
Exactly what I was looking for, but unfortunately no compatibility with the other characters.
Do you have plans to make this compatible with the other main characters?
Removing this line works for me:
Image

Oh and you also need to remove the "and" at line 81.
Oh yes, that solves the problem, thank you very much!
btw, great job! I've never had so much fun with a lunalua!

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Posted: Wed Jul 06, 2022 12:29 am
by Woshee_real
You could replace a mario sound effect for a sonic one and use the homing attack sound effect instead.

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Posted: Tue Aug 02, 2022 11:09 pm
by Chanceux2
Sorry if this is considered a bump but is it possible to make it compatible with GroundPound.lua

Link: https://smbxgame.com/forums/view ... 01&t=24920

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Posted: Sat Aug 06, 2022 12:02 pm
by MegoZ_
Chanceux2 wrote:
Tue Aug 02, 2022 11:09 pm
Sorry if this is considered a bump but is it possible to make it compatible with GroundPound.lua

Link: https://smbxgame.com/forums/view ... 01&t=24920
It should work fine
Also, I'm working on a new update but it's taking longer because I still need to tweak some things, and lost a bit of motivation. It will eventually come out...

Re: Dive.lua 1.3 (Super Mario Odyssey's Dive)

Posted: Fri Jun 14, 2024 7:01 pm
by jro
I re keybinded it so its compatiable with ground pound aswell!!
enjoy ig
https://mega.nz/file/w3UWgYYR#JH4fVYUGs ... H8t9tThDGs