Share and discuss custom LunaLua code and content packs for SMBX2.
Moderator: Userbase Moderators
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Sun Aug 30, 2020 11:45 am
NOTE: I'll use Metal Mario to refer to the Metal Cap "Powerup" (its not really a powerup) so Metal Mario can also refer to Metal Luigi/Peach/whatever. I can't guarantee Metal Mario works for everything in the game because my code is most likely 83.1% jank.
Have you ever wanted to use Metal Mario (well, I couldn't find a way to make Metal Mario walk in water, so he's not really "metal" in that sense) in a SMBX2 level? Now you can!
Mild disclaimer: This is really bad coded so if you find any bugs, report them.
Gifs showing how it works: show
(SHAMELESS PLUG!) Gif showing integration with my Water Currents NPCs!: show
To install:
1) Extract everything into your level folder.
2) Put Code: Select all local metalCap = require("metalCap")
in your luna.lua file, at the top.
3) If you want to change any settings, open metalCap.lua. All of the settings are at the top of the file and they are all documented.
4) You're done!
You should probably read this so you know how this can be used after every update.
Metal Mario has been officially released!
Just place the NPC, touch it with the player and you're metal!
Fixed a slight bug where the Metal Mario music would stop when switching sections and would remain as the "section music" if Metal Mario were to go to another section, the metal would run out and you were to go back to the original section.
NOTE: I still haven't fixed the bug where the music would start from the beggining when switching sections because, afaik, there isn't a "start-music-from-somewhere" function in X2. I'll keep trying to do this and release a new version if I find a solution.
Found a solution to the "start-music-from-somewhere" thing! Now when you enter a new section the music keeps going!
Basically scrapped the whole "replace section music with metal mario music" cause it was 100% jank in favour of a new, slightly polished, still jank but less jank nonetheless solution. It's now.. ahem.. "inspired" from the x2 Starman Music thing and uses SFX instead of actual music. This did make me need to "cut" the audio file in 2 (the intro and main) so if you want to change the music you gotta replace both with your intro and loop parts respectively.
Oh wow I did not expect to do another version of this
You can now make metal mario never die! This also means no dying off screen and that you fall through lava, for some reason
Last edited by 9thCore on Sun Jan 02, 2022 2:26 pm, edited 6 times in total.
|
|
|
|
|
|
|
|
|
-
LGLMAKING
- Chain Chomp

- Posts: 342
- Joined: Mon Jun 18, 2018 7:28 am
- Flair: fish
- Pronouns: girlie!!
Postby LGLMAKING » Sun Aug 30, 2020 1:27 pm
9thCore wrote: ↑Sun Aug 30, 2020 11:45 am
NOTE: I'll use Metal Mario to refer to the Metal Cap "Powerup" (its not really a powerup) so Metal Mario can also refer to Metal Luigi/Peach/whatever. I can't guarantee Metal Mario works for everything in the game because my code is most likely 83.1% jank.
Have you ever wanted to use Metal Mario (well, I couldn't find a way to make Metal Mario walk in water, so he's not really "metal" in that sense) in a SMBX2 level? Now you can!
Mild disclaimer: This is really bad coded so if you find any bugs, report them. I'll check daily for any new bug reports.
Gifs showing how it works: show
(SHAMELESS PLUG!) Gif showing integration with my Water Currents NPCs!: show
To install:
1) Extract everything into your level folder.
2) Put Code: Select all local metalCap = require("metalCap")
in your luna.lua file, at the top.
3) If you want to change any settings, open metalCap.lua. All of the settings are at the top of the file and they are all documented.
4) You're done!
You should probably read this so you know how this can be used after every update.
Metal Mario has been officially released!
Just place the NPC, touch it with the player and you're metal!
I'm finding surprisingly many applications for your scripts, so I guess I can say tnx
|
|
|
|
|
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Sun Aug 30, 2020 1:52 pm
LGLMAKING wrote: ↑Sun Aug 30, 2020 1:27 pm
I'm finding surprisingly many applications for your scripts, so I guess I can say tnx
Yeah, I always try to make my scripts as customizable as possible before they're either too hard to manage or its too complicated to use that nobody would try to use them
|
|
|
|
|
|
|
|
|
-
LGLMAKING
- Chain Chomp

- Posts: 342
- Joined: Mon Jun 18, 2018 7:28 am
- Flair: fish
- Pronouns: girlie!!
Postby LGLMAKING » Mon Aug 31, 2020 7:38 am
Anyhow, I think to have found a bug: the Metal Mario music stops working once you switch sections
|
|
|
|
|
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Wed Sep 02, 2020 2:07 am
LGLMAKING wrote: ↑Mon Aug 31, 2020 7:38 am
Anyhow, I think to have found a bug: the Metal Mario music stops working once you switch sections
I have kind of fixed the solution, making the Metal Cap music start again when you switch sections
I still have a problem where the music would start from the beginning when you go to another section, I'll keep trying to fix this.
|
|
|
|
|
|
|
|
|
-
MrDoubleA
- Ripper II

- Posts: 394
- Joined: Mon Aug 20, 2018 7:02 am
- Flair: How much munchers?
Postby MrDoubleA » Fri Sep 04, 2020 8:09 am
9thCore wrote: ↑Wed Sep 02, 2020 2:07 am
LGLMAKING wrote: ↑Mon Aug 31, 2020 7:38 am
Anyhow, I think to have found a bug: the Metal Mario music stops working once you switch sections
I have kind of fixed the solution, making the Metal Cap music start again when you switch sections
I still have a problem where the music would start from the beginning when you go to another section, I'll keep trying to fix this.
You could use what the starman and mega mushroom do. They store the music volume, set the real volume to 0, and then plays a sound effect with 0 loops (which actually just means looping forever), and then stop it whenever it ends.
|
|
|
|
|
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Fri Sep 04, 2020 9:24 am
MrDoubleA wrote: ↑Fri Sep 04, 2020 8:09 am
9thCore wrote: ↑Wed Sep 02, 2020 2:07 am
LGLMAKING wrote: ↑Mon Aug 31, 2020 7:38 am
Anyhow, I think to have found a bug: the Metal Mario music stops working once you switch sections
I have kind of fixed the solution, making the Metal Cap music start again when you switch sections
I still have a problem where the music would start from the beginning when you go to another section, I'll keep trying to fix this.
You could use what the starman and mega mushroom do. They store the music volume, set the real volume to 0, and then plays a sound effect with 0 loops (which actually just means looping forever), and then stop it whenever it ends.
oh
i'll try to implement it, thanks for the help!
|
|
|
|
|
|
|
|
|
-
Jumper
- Tweeter

- Posts: 130
- Joined: Tue Feb 02, 2016 9:32 pm
Postby Jumper » Wed Sep 09, 2020 11:13 pm
This was actually quite helpful with a project I have in the works; thanks!
Do you plan on potentially adding more Caps from Super Mario 64?
|
|
|
|
|
|
|
|
|
-
SPEEDIE
- Flurry

- Posts: 180
- Joined: Sat Nov 03, 2018 6:22 pm
- Flair: u fucking wot
- Pronouns: he/him
-
Contact:
Postby SPEEDIE » Mon Sep 14, 2020 8:41 am
Thanks, I'll have use for this.
|
|
|
|
|
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Tue Nov 03, 2020 2:47 pm
bump cause its my npc and i want VIEWS
|
|
|
|
|
|
|
|
|
-
Cedur
- Link

- Posts: 7073
- Joined: Tue Jun 28, 2016 10:14 am
- Flair: I'm gone, for chess and minesweeper
- Pronouns: he/him
Postby Cedur » Tue Nov 03, 2020 5:02 pm
Is this Metal Mario also able to walk in lava? Or will he be?
|
|
|
|
|
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Tue Nov 03, 2020 11:36 pm
Cedur wrote: ↑Tue Nov 03, 2020 5:02 pm
Is this Metal Mario also able to walk in lava? Or will he be?
He can't cause SMBX handles lava in such a way that you can't just do "if mario is metal then walk on lava". I'm sure there is a way to do that (if workaround-y) but I'm not at my PC yet so can't do anything. Also, don't count on me to actually do it cause i'm a bad coder
|
|
|
|
|
|
|
|
|
-
Jumper
- Tweeter

- Posts: 130
- Joined: Tue Feb 02, 2016 9:32 pm
Postby Jumper » Wed Nov 04, 2020 6:12 am
9thCore wrote: ↑Tue Nov 03, 2020 11:36 pm
Cedur wrote: ↑Tue Nov 03, 2020 5:02 pm
Is this Metal Mario also able to walk in lava? Or will he be?
He can't cause SMBX handles lava in such a way that you can't just do "if mario is metal then walk on lava". I'm sure there is a way to do that (if workaround-y) but I'm not at my PC yet so can't do anything. Also, don't count on me to actually do it cause i'm a bad coder
The Podoboo Shoe does let you be able to survive on lava, so maybe borrowing some code (if possible) from that?
|
|
|
|
|
|
|
|
|
-
ElectriKong
- Bowser

- Posts: 4651
- Joined: Mon Jun 06, 2016 4:32 pm
- Flair: I have NO idea what to put here
- Pronouns: he/him
-
Contact:
Postby ElectriKong » Wed Nov 04, 2020 7:02 am
Jumper wrote: ↑Wed Nov 04, 2020 6:12 am
9thCore wrote: ↑Tue Nov 03, 2020 11:36 pm
Cedur wrote: ↑Tue Nov 03, 2020 5:02 pm
Is this Metal Mario also able to walk in lava? Or will he be?
He can't cause SMBX handles lava in such a way that you can't just do "if mario is metal then walk on lava". I'm sure there is a way to do that (if workaround-y) but I'm not at my PC yet so can't do anything. Also, don't count on me to actually do it cause i'm a bad coder
The Podoboo Shoe does let you be able to survive on lava, so maybe borrowing some code (if possible) from that?
There isn't any lua code that can be 'borrowed' for anything present in SMBX versions prior to SMBX2.
|
|
|
|
|
|
|
|
|
-
Jumper
- Tweeter

- Posts: 130
- Joined: Tue Feb 02, 2016 9:32 pm
Postby Jumper » Wed Nov 04, 2020 6:46 pm
Electriking wrote: ↑Wed Nov 04, 2020 7:02 am
Jumper wrote: ↑Wed Nov 04, 2020 6:12 am
9thCore wrote: ↑Tue Nov 03, 2020 11:36 pm
He can't cause SMBX handles lava in such a way that you can't just do "if mario is metal then walk on lava". I'm sure there is a way to do that (if workaround-y) but I'm not at my PC yet so can't do anything. Also, don't count on me to actually do it cause i'm a bad coder
The Podoboo Shoe does let you be able to survive on lava, so maybe borrowing some code (if possible) from that?
There isn't any lua code that can be 'borrowed' for anything present in SMBX versions prior to SMBX2.
I know, but can't we use the open source code available, or not?
|
|
|
|
|
|
|
|
|
-
ElectriKong
- Bowser

- Posts: 4651
- Joined: Mon Jun 06, 2016 4:32 pm
- Flair: I have NO idea what to put here
- Pronouns: he/him
-
Contact:
Postby ElectriKong » Wed Nov 04, 2020 6:48 pm
Jumper wrote: ↑Wed Nov 04, 2020 6:46 pm
Electriking wrote: ↑Wed Nov 04, 2020 7:02 am
Jumper wrote: ↑Wed Nov 04, 2020 6:12 am
The Podoboo Shoe does let you be able to survive on lava, so maybe borrowing some code (if possible) from that?
There isn't any lua code that can be 'borrowed' for anything present in SMBX versions prior to SMBX2.
I know, but can't we use the open source code available, or not?
If you mean the 1.3 source code, then no.
|
|
|
|
|
|
|
|
|
-
Jumper
- Tweeter

- Posts: 130
- Joined: Tue Feb 02, 2016 9:32 pm
Postby Jumper » Wed Nov 04, 2020 6:54 pm
Electriking wrote: ↑Wed Nov 04, 2020 6:48 pm
Jumper wrote: ↑Wed Nov 04, 2020 6:46 pm
Electriking wrote: ↑Wed Nov 04, 2020 7:02 am
There isn't any lua code that can be 'borrowed' for anything present in SMBX versions prior to SMBX2.
I know, but can't we use the open source code available, or not?
If you mean the 1.3 source code, then no.
Ah, well nevermind.
also, 69 posts. nice.
|
|
|
|
|
|
|
|
|
-
rael1up
- Shy Guy

- Posts: 6
- Joined: Thu Jan 14, 2021 8:27 am
- Pronouns: he/him
Postby rael1up » Mon Jan 25, 2021 5:13 pm
Great! Nice! I will download it!
|
|
|
|
|
|
|
|
|
-
9thCore
- 2025 Egg Hunter

- Posts: 41
- Joined: Tue Mar 10, 2015 1:46 pm
- Flair: hewo
- Pronouns: he/him
Postby 9thCore » Sun Jan 02, 2022 2:28 pm
New update out, you can now disable all forms of death
This also means no death from falling offscreen so uh... yeah
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 3 guests
|