Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1c]

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Arco
Koopa
Koopa
Posts: 17
Joined: Mon Nov 08, 2021 9:32 pm
Flair: Creative
Pronouns: she/her
Contact:

Re: Super Acorn (With SMM2 Playables Support!) [v1.0b]

Postby Arco » Sun Mar 20, 2022 2:35 am

So I've been using this in one of my episodes to add the acorn powerup to the game, and it works perfectly in testing but when I play the episode in game I get errors regarding failed attempts to find files that don't exist and return values set to null. The errors seem to relate to the modified version of the anotherpowerup.lua file. The error prevents the acorn from working in levels played in the actual game and simply disappears upon collection to no powerup. I've looked into the error's origins and it searches for a base script that doesn't exist?
Image
I've tried to understand what's happening here, but I know too little about Lua to understand what I may be able to do.

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Super Acorn (With SMM2 Playables Support!) [v1.0b]

Postby CaptainMonochrome » Tue Mar 22, 2022 5:35 pm

Arco wrote:
Sun Mar 20, 2022 2:35 am
So I've been using this in one of my episodes to add the acorn powerup to the game, and it works perfectly in testing but when I play the episode in game I get errors regarding failed attempts to find files that don't exist and return values set to null. The errors seem to relate to the modified version of the anotherpowerup.lua file. The error prevents the acorn from working in levels played in the actual game and simply disappears upon collection to no powerup. I've looked into the error's origins and it searches for a base script that doesn't exist?
Image
I've tried to understand what's happening here, but I know too little about Lua to understand what I may be able to do.
Oh, no... well, damn. That's annoying. Thankfully, all I had to do was remove, like, five lines of code. The fixed version should be available in the next release, which is coming in a day or two.

Oh, and also, would you be able to send me a PM once you release your level? I'd love to play it!

Arco
Koopa
Koopa
Posts: 17
Joined: Mon Nov 08, 2021 9:32 pm
Flair: Creative
Pronouns: she/her
Contact:

Re: Super Acorn (With SMM2 Playables Support!) [v1.0b]

Postby Arco » Wed Mar 23, 2022 5:09 am

CaptainMonochrome wrote:
Tue Mar 22, 2022 5:35 pm
Arco wrote:
Sun Mar 20, 2022 2:35 am
So I've been using this in one of my episodes to add the acorn powerup to the game, and it works perfectly in testing but when I play the episode in game I get errors regarding failed attempts to find files that don't exist and return values set to null. The errors seem to relate to the modified version of the anotherpowerup.lua file. The error prevents the acorn from working in levels played in the actual game and simply disappears upon collection to no powerup. I've looked into the error's origins and it searches for a base script that doesn't exist?
Image
I've tried to understand what's happening here, but I know too little about Lua to understand what I may be able to do.
Oh, no... well, damn. That's annoying. Thankfully, all I had to do was remove, like, five lines of code. The fixed version should be available in the next release, which is coming in a day or two.

Oh, and also, would you be able to send me a PM once you release your level? I'd love to play it!
yeah, sure, though there could be the potential I never finish and release it, which is unlikely since I plan to do so, but if I do, yeah, I'll do that. I'll just need to find all the packs I use again to credit the creators. But yes, thanks, I'll give the new code a test once I have it and get back to this about results.

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby CaptainMonochrome » Sun Mar 27, 2022 5:18 pm

BUMP!

I DID IT! I FINALLY DID IT!

cough

Sorry if I seem a bit overexcited. It's just that the Penguin Suit is finally here!
After more than two months of dedication, it's here.
Chances are, we're getting the P-Acorn and a Super Acorn rewrite before the Propeller Mushroom,
since its code makes me want to vanish off the face of the Mushroom Kingdom.

Enjoy!

Arco
Koopa
Koopa
Posts: 17
Joined: Mon Nov 08, 2021 9:32 pm
Flair: Creative
Pronouns: she/her
Contact:

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby Arco » Mon Mar 28, 2022 7:20 am

CaptainMonochrome wrote:
Sun Mar 27, 2022 5:18 pm
BUMP!

I DID IT! I FINALLY DID IT!

cough

Sorry if I seem a bit overexcited. It's just that the Penguin Suit is finally here!
After more than two months of dedication, it's here.
Chances are, we're getting the P-Acorn and a Super Acorn rewrite before the Propeller Mushroom,
since its code makes me want to vanish off the face of the Mushroom Kingdom.

Enjoy!
Right well I plugged in the new code seamlessly and it works a charm. Thanks for the fix. Excited to try the new penguin suit too!

EDIT: So Acorn works fine, having issues with the penguin. The NPC is there, but does nothing when collected but disappear. I will note I have replaced all instances of npc-801 to 799 to avoid conflict with another pack, and I have tested that as well as going into every text file and doing the same where applicable.

Mal8rk
Snifit
Snifit
Posts: 216
Joined: Mon Oct 25, 2021 11:04 pm
Flair: English Speaking Spanish Speaker
Pronouns: He/Him
Contact:

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby Mal8rk » Mon Mar 28, 2022 10:43 am

does this work with default costumes or is it just for smm2 costumes?

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby CaptainMonochrome » Mon Mar 28, 2022 11:14 am

Arco wrote:
Mon Mar 28, 2022 7:20 am
CaptainMonochrome wrote:
Sun Mar 27, 2022 5:18 pm
BUMP!

I DID IT! I FINALLY DID IT!

cough

Sorry if I seem a bit overexcited. It's just that the Penguin Suit is finally here!
After more than two months of dedication, it's here.
Chances are, we're getting the P-Acorn and a Super Acorn rewrite before the Propeller Mushroom,
since its code makes me want to vanish off the face of the Mushroom Kingdom.

Enjoy!
Right well I plugged in the new code seamlessly and it works a charm. Thanks for the fix. Excited to try the new penguin suit too!

EDIT: So Acorn works fine, having issues with the penguin. The NPC is there, but does nothing when collected but disappear. I will note I have replaced all instances of npc-801 to 799 to avoid conflict with another pack, and I have tested that as well as going into every text file and doing the same where applicable.
I know exactly what's happening here. You see, in ap_penguin.lua, there's a little array on line 164 that determines what NPCs give the Penguin Suit. Change that from apt.items = {801} to apt.items = {799}, and everything should start working.

P.S. Also, don't forget to change the ids that appear in your luna.lua file!
POPME wrote: does this work with default costumes or is it just for smm2 costumes?
Unfortunately, just the SMM2 costumes and costumeless Mario for now. At some point, I definitely need to get around to making the SMW costumes compatible, since it seems like a lot of people want to use them.

Arco
Koopa
Koopa
Posts: 17
Joined: Mon Nov 08, 2021 9:32 pm
Flair: Creative
Pronouns: she/her
Contact:

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby Arco » Mon Mar 28, 2022 10:07 pm

CaptainMonochrome wrote:
Mon Mar 28, 2022 11:14 am
Arco wrote:
Mon Mar 28, 2022 7:20 am
CaptainMonochrome wrote:
Sun Mar 27, 2022 5:18 pm
BUMP!

I DID IT! I FINALLY DID IT!

cough

Sorry if I seem a bit overexcited. It's just that the Penguin Suit is finally here!
After more than two months of dedication, it's here.
Chances are, we're getting the P-Acorn and a Super Acorn rewrite before the Propeller Mushroom,
since its code makes me want to vanish off the face of the Mushroom Kingdom.

Enjoy!
Right well I plugged in the new code seamlessly and it works a charm. Thanks for the fix. Excited to try the new penguin suit too!

EDIT: So Acorn works fine, having issues with the penguin. The NPC is there, but does nothing when collected but disappear. I will note I have replaced all instances of npc-801 to 799 to avoid conflict with another pack, and I have tested that as well as going into every text file and doing the same where applicable.
I know exactly what's happening here. You see, in ap_penguin.lua, there's a little array on line 164 that determines what NPCs give the Penguin Suit. Change that from apt.items = {801} to apt.items = {799}, and everything should start working.

P.S. Also, don't forget to change the ids that appear in your luna.lua file!
So I did the first part already (though the file is called ap_penguinsuit.lua, but no matter), but it was the require parts of luna.lua that were the problem. Thank you. Also, I have been using the SMM2 costumes as if they're default as a quick way of having two-player compatibility, though I notice that different frames line up for different animations, how do I fix this? Can I reverse the operation on any of the code to make the code treat the SMM2 sprites as default and vice versa so each frame matches up? Thanks.

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby CaptainMonochrome » Tue Mar 29, 2022 3:27 pm

Arco wrote:
Mon Mar 28, 2022 10:07 pm
So I did the first part already (though the file is called ap_penguinsuit.lua, but no matter), but it was the require parts of luna.lua that were the problem. Thank you. Also, I have been using the SMM2 costumes as if they're default as a quick way of having two-player compatibility, though I notice that different frames line up for different animations, how do I fix this? Can I reverse the operation on any of the code to make the code treat the SMM2 sprites as default and vice versa so each frame matches up? Thanks.
What exactly do you mean by "using the SMM2 costumes as if they're default?" Are you setting the player's costume to one of the SMM2 costumes in onStart or onTick, or did you just paste the SMM2 costumes' mario-x.png and mario-x.ini files into the level or episode folder?

Also, anotherpowerup.lua inherently doesn't support multiple players, so you shouldn't worry about two-player compatibility.

Shodax
Bot
Bot
Posts: 53
Joined: Sat Feb 05, 2022 2:24 pm
Pronouns: he

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby Shodax » Tue Mar 29, 2022 5:23 pm

Hello. Sorry if my question sounds very ignorant but I don't know about LUA.
If I wanted to adapt this code to more characters, in addition to editing sprites, would I have to add new code from scratch or would I just have to adapt the code already made?

Added in 27 minutes 5 seconds:
sorry again but had not understood well (these translators are not very good yet). You just have to edit the sprites. I will edit them little by little and if I achieve it I can here
Image

Arco
Koopa
Koopa
Posts: 17
Joined: Mon Nov 08, 2021 9:32 pm
Flair: Creative
Pronouns: she/her
Contact:

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby Arco » Tue Mar 29, 2022 8:38 pm

CaptainMonochrome wrote:
Tue Mar 29, 2022 3:27 pm
Arco wrote:
Mon Mar 28, 2022 10:07 pm
So I did the first part already (though the file is called ap_penguinsuit.lua, but no matter), but it was the require parts of luna.lua that were the problem. Thank you. Also, I have been using the SMM2 costumes as if they're default as a quick way of having two-player compatibility, though I notice that different frames line up for different animations, how do I fix this? Can I reverse the operation on any of the code to make the code treat the SMM2 sprites as default and vice versa so each frame matches up? Thanks.
What exactly do you mean by "using the SMM2 costumes as if they're default?" Are you setting the player's costume to one of the SMM2 costumes in onStart or onTick, or did you just paste the SMM2 costumes' mario-x.png and mario-x.ini files into the level or episode folder?

Also, anotherpowerup.lua inherently doesn't support multiple players, so you shouldn't worry about two-player compatibility.
The latter but also renamed the Luigi ones too to add 2 player support because I need 2 player support for my levels :/

ElTipsta
Lakitu
Lakitu
Posts: 485
Joined: Fri Dec 20, 2013 3:16 pm
Pronouns: she/her

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby ElTipsta » Wed Mar 30, 2022 3:37 pm

Will definitely be using these. So glad to see more new powerups in SMBX.

Hope you can get more powerups done in the future.

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1]

Postby CaptainMonochrome » Wed Mar 30, 2022 8:30 pm

Arco wrote:
Tue Mar 29, 2022 8:38 pm
The latter but also renamed the Luigi ones too to add 2 player support because I need 2 player support for my levels :/
I see. That's probably why you're having issues.

What you're better off doing is creating a custom costume directory and then forcing the player's costumes to the SMM2 costumes.

Here's how.
Spoiler: show
1. Go into your episode folder and make a folder titled "costumes".

2. Within that folder, make two folders named "mario" and "luigi".

3. Assuming that you intend on leaving Mario as Mario and Luigi as Luigi, put the
SMM2 Mario costume into the Mario folder and the SMM2 Luigi costume
in the Luigi folder.

4. Configure both costumes' costume.lua files however you like.

IMPORTANT
There's no need to load costume.lua in your luna.lua file. Just leave
costume.lua within the costume folders. Otherwise, things will stop working.

5. Place the following code into your luna.lua file, right after you load all of your libraries.

Code: Select all

Player.setCostume(CHARACTER_MARIO,"SMM2-Mario",true)
Player.setCostume(CHARACTER_LUIGI,"SMM2-Luigi",true)
From there, everything should work!

P.S. If it doesn't, try renaming the costumes and then going from there.
Best of luck!
ElTipsta wrote:
Wed Mar 30, 2022 3:37 pm
Will definitely be using these. So glad to see more new powerups in SMBX.

Hope you can get more powerups done in the future.
Thanks! The Propeller Mushroom is on its way, so you've got stuff to look forwards to!

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1b]

Postby CaptainMonochrome » Fri Apr 01, 2022 5:13 pm

All right, it's update time!

This one's a quickie, and it's focused primarily on the Fire and Ice Flowers.
They've been updated to use the Penguin Suit's code for handling when they can fire, making them much more fun to use.

Furthermore, the offset from which characters shoot has been adjusted to be lower, so that it actually looks like it's coming from their hands.

Enjoy!

Mushroom King
Flurry
Flurry
Posts: 186
Joined: Sun May 25, 2014 5:09 am

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1b]

Postby Mushroom King » Sat Apr 02, 2022 10:46 am

I'm not sure why but while the Penguin Suit works, the Ice Flower doesn't with ice balls just disappearing on the ground at the player feet when shot, why no rebound. Ice Mario can only shoot if in the middle of a jump.

CaptainMonochrome
Hoopster
Hoopster
Posts: 47
Joined: Fri Aug 21, 2020 3:40 pm
Flair: SMW sprites rock!
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1c]

Postby CaptainMonochrome » Sat Apr 02, 2022 11:48 am

Mushroom King wrote:
Sat Apr 02, 2022 10:46 am
I'm not sure why but while the Penguin Suit works, the Ice Flower doesn't with ice balls just disappearing on the ground at the player feet when shot, why no rebound. Ice Mario can only shoot if in the middle of a jump.
Oh, shoot. I accidentally wrote "player.height" instead of "player.height/2" in the code.
I just released a new version that fixes it.

Something tells me that rushing out a patch before going to an April Fools Day birthday party is a bad idea, haha.

Shodax
Bot
Bot
Posts: 53
Joined: Sat Feb 05, 2022 2:24 pm
Pronouns: he

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1c]

Postby Shodax » Wed Apr 06, 2022 11:16 pm

here Mario's sprites.

Image
Image
Image

it is not much but little by little I will edit the rest of the characters


donwload
https://www.mediafire.com/file/q19faaac ... o.zip/file

Shodax
Bot
Bot
Posts: 53
Joined: Sat Feb 05, 2022 2:24 pm
Pronouns: he

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1c]

Postby Shodax » Sat Apr 09, 2022 3:19 pm


Registered sand eater
Bot
Bot
Posts: 55
Joined: Fri Jan 28, 2022 4:14 pm
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1c]

Postby Registered sand eater » Tue Apr 26, 2022 10:15 am

This keeps happening for some reason, is there something wrong on my side?
Image

Alexx0612
Swooper
Swooper
Posts: 60
Joined: Wed Apr 13, 2022 5:18 am
Pronouns: he/him

Re: Cpt. Mono's Powerup Pack (Ft. the Penguin Suit!) [v1.1c]

Postby Alexx0612 » Wed Nov 30, 2022 6:37 am

Answer please! Can I use penguin and squirrel suits without "anotherpowerupSMM2" script?


Return to “LunaLua”

Who is online

Users browsing this forum: Insignicial and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari