[NPC.. thing?] Metal Cap from Super Mario 64!

Share and discuss custom LunaLua code and content packs for SMBX2.
9thCore
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things

[NPC.. thing?] Metal Cap from Super Mario 64!

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. I'll check daily for any new bug reports.
Gifs showing how it works: show
Image
Image
Image
(SHAMELESS PLUG!) Gif showing integration with my Water Currents NPCs!: show
Image

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!

Downloads: show

You should probably read this so you know how this can be used after every update.

Changelog: show
V1: show
Metal Mario has been officially released!
Just place the NPC, touch it with the player and you're metal!
V2: show
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.
V3: show
Found a solution to the "start-music-from-somewhere" thing! Now when you enter a new section the music keeps going!
V4: show
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.
Last edited by 9thCore on Tue Nov 03, 2020 2:45 pm, edited 4 times in total.
hello me stupeed person doing stupeed things

User avatar
LGLMAKING
Ripper II
Ripper II
Posts: 326
Joined: Mon Jun 18, 2018 7:28 am
Flair: There's always another secret.

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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
Image
Image
Image
(SHAMELESS PLUG!) Gif showing integration with my Water Currents NPCs!: show
Image

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!

Downloads: show

You should probably read this so you know how this can be used after every update.

Changelog: show
V1: show
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
"I am incredibly lucky I know you and im glad I gave you a chance to be a part of this" -Eri7
"I'm going to call these Janksqueaks from now on." -Clearman06
"IT IS A SKYTREE!!!" -Big K
Image
Image
Image
New producer of the Novaverse, after Eri7's departure from the community.

9thCore
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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
hello me stupeed person doing stupeed things

User avatar
LGLMAKING
Ripper II
Ripper II
Posts: 326
Joined: Mon Jun 18, 2018 7:28 am
Flair: There's always another secret.

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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
"I am incredibly lucky I know you and im glad I gave you a chance to be a part of this" -Eri7
"I'm going to call these Janksqueaks from now on." -Clearman06
"IT IS A SKYTREE!!!" -Big K
Image
Image
Image
New producer of the Novaverse, after Eri7's departure from the community.

9thCore
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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.
hello me stupeed person doing stupeed things

User avatar
MrDoubleA
Bit
Bit
Posts: 134
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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.
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

9thCore
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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!
hello me stupeed person doing stupeed things

Jumper
Fighter Fly
Fighter Fly
Posts: 73
Joined: Tue Feb 02, 2016 9:32 pm

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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?
Supported Projects: show
Image
Image
Spoiler: show
thehelmetguy1 wrote: True rules of SMBX:
1-SMB3 graphics ftw
2-SMB3 graphics are the answer to life
3-If you don't use SMB3 graphics you don't know how to make levels
4-SMB3 graphics are the most important thing to have in your level
5-SMB3 graphics were so loved that someone said they were overrated and this person died 1337 times and became a SMB3 graphic. We could make a religion out of this.

User avatar
SPEEDIE
Hoopster
Hoopster
Posts: 174
Joined: Sat Nov 03, 2018 6:22 pm
Flair: Limitations don't exist, Think different.
Contact:

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

Postby SPEEDIE » Mon Sep 14, 2020 8:41 am

Thanks, I'll have use for this.
If something sounds too good to be true, it probably is.
Check out my YouTube channel for high quality SMBX let's plays and other stuff.
https://www.youtube.com/channel/UCncGyz ... EqBqNJyyTQ

Check out my website for computer related fun..
https://speediegamer.github.io/spd.archive

Join my SMBX discord server for exclusive updates and much more.
https://discord.gg/fahyrvk
Finished Projects:
Image
Ongoing Projects:
Blade of Justice
4lin3r

9thCore
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

Postby 9thCore » Tue Nov 03, 2020 2:47 pm

bump cause its my npc and i want VIEWS
hello me stupeed person doing stupeed things

User avatar
Cedur
Toad
Toad
Posts: 6677
Joined: Tue Jun 28, 2016 10:14 am

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

Postby Cedur » Tue Nov 03, 2020 5:02 pm

Is this Metal Mario also able to walk in lava? Or will he be?
Image
More Supports: show

Image
Image

Still using the legacy editor? Get SMBX2 and PGE, it will improve your experience significantly. Here's why. And remember, Yoshis are tools to be used and discarded.

ShadowStarX (06/14/18) wrote: South Korea is easy deal

9thCore
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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
hello me stupeed person doing stupeed things

Jumper
Fighter Fly
Fighter Fly
Posts: 73
Joined: Tue Feb 02, 2016 9:32 pm

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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?
Supported Projects: show
Image
Image
Spoiler: show
thehelmetguy1 wrote: True rules of SMBX:
1-SMB3 graphics ftw
2-SMB3 graphics are the answer to life
3-If you don't use SMB3 graphics you don't know how to make levels
4-SMB3 graphics are the most important thing to have in your level
5-SMB3 graphics were so loved that someone said they were overrated and this person died 1337 times and became a SMB3 graphic. We could make a religion out of this.

User avatar
Electriking
Posts: 4533
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Contact:

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

Postby Electriking » 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.
SMM2 ID: JJF-P7G-FSF

Jumper
Fighter Fly
Fighter Fly
Posts: 73
Joined: Tue Feb 02, 2016 9:32 pm

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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?
Supported Projects: show
Image
Image
Spoiler: show
thehelmetguy1 wrote: True rules of SMBX:
1-SMB3 graphics ftw
2-SMB3 graphics are the answer to life
3-If you don't use SMB3 graphics you don't know how to make levels
4-SMB3 graphics are the most important thing to have in your level
5-SMB3 graphics were so loved that someone said they were overrated and this person died 1337 times and became a SMB3 graphic. We could make a religion out of this.

User avatar
Electriking
Posts: 4533
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Contact:

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

Postby Electriking » 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.
SMM2 ID: JJF-P7G-FSF

Jumper
Fighter Fly
Fighter Fly
Posts: 73
Joined: Tue Feb 02, 2016 9:32 pm

Re: [NPC.. thing?] Metal Cap from Super Mario 64!

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.
Supported Projects: show
Image
Image
Spoiler: show
thehelmetguy1 wrote: True rules of SMBX:
1-SMB3 graphics ftw
2-SMB3 graphics are the answer to life
3-If you don't use SMB3 graphics you don't know how to make levels
4-SMB3 graphics are the most important thing to have in your level
5-SMB3 graphics were so loved that someone said they were overrated and this person died 1337 times and became a SMB3 graphic. We could make a religion out of this.


Return to “LunaLua”

Who is online

Users browsing this forum: Electriking and 2 guests