Reserve Powerup Systems for (almost) everyone!

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

Moderator: Userbase Moderators

Gaming-Dojo
Monty Mole
Monty Mole
Posts: 124
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Reserve Powerup Systems for (almost) everyone!

Postby Gaming-Dojo » Tue Mar 12, 2019 8:16 am

Hello there,

After regaining motivation after years and also getting way more experience in coding thanks to godot and GD Script, I can finally present you the single player version of my Item reserve script which gives every character (except for megaman, as he has his own Item selection menu which is mapped to the drop item button) an item reserve like Mario and Luigi have. I also designed an individual reserve box for each character. I also plan on adding a second scipt for multiplayer support as well as looking into the custom powerup script someone else wrote to assure easy support of custom powerups with my script.

Usage is easy: just copy the contents of the zip folder into your episode folder and type the following in your luna.lua file:

Code: Select all

local reserveforall = require("reserveforall")
local super_flower = require("super_flower")
local hp_system = require("hp_system")
hp system and reserveforall are strictly necessary for the script to function, the superflower script was included as I find it pretty nice. As the superflower script is not written by myself, I want to give credit to the original creator. If you don't want to use the superflower, just don't type the require line, take the superflower sprites replacing the fireflower sprites out of your world folder and replace the following section of the script beginning in line 244

Code: Select all

 if myData:get("store_1") == 3 then
    Graphics.drawImageWP(super,item_pos_x,item_pos_y,5)
 end
with this:

Code: Select all

 if myData:get("store_1") == 3 then
    Graphics.drawImageWP(fire,item_pos_x,item_pos_y,5)
 end
I think I will also make another folder with just the script and the required graphics without the superflower in the next few days.

And now without further ado, please see some images of the script in action:
Image

Image

Image

Image

apart from these pictures, I also made 2 videos of the script in action:



and last but not least, the download link:
https://drive.google.com/file/d/14LCH8_ ... drive_link

Read you soon
Gaming-Dojo
Last edited by Gaming-Dojo on Sun Jun 15, 2025 3:52 pm, edited 13 times in total.

Fuyu
Fry Guy
Fry Guy
Posts: 3137
Joined: Sat Dec 21, 2013 2:40 pm
Pronouns: He/Him

Re: Resrve Powerup for Toad, Peach, Link

Postby Fuyu » Tue Mar 12, 2019 10:14 am

I think a visual representation of the reserve box in action would be nice.

As for making the characters keep the power-ups in-between levels, you need the data class. The only way to store data and use it in other levels, or the world map even.

Gaming-Dojo
Monty Mole
Monty Mole
Posts: 124
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Re: Resrve Powerup for Toad, Peach, Link

Postby Gaming-Dojo » Tue Mar 12, 2019 5:05 pm

Natsu wrote:
Tue Mar 12, 2019 10:14 am
I think a visual representation of the reserve box in action would be nice.

As for making the characters keep the power-ups in-between levels, you need the data class. The only way to store data and use it in other levels, or the world map even.
Thanks for mentioning I forgot the Video when reposting the Topic. Unfortunately, I have no idea of how to use the data class but will check the corresponding section on the PGE Wiki and if that doesn't help, ask on the Forum for help.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Reserve Powerup for Toad, Peach, Link

Postby PixelPest » Thu Mar 14, 2019 12:03 am

I feel like that's not a great choice for placement for the item box. It makes the HUD no longer have equal spacing on each side. I think it would be better to place it either underneath the hearts (and then drop functionality would make sense as would be expected with the itembox but I didn't see it in the video) or above the hearts with the hearts redrawn lower

horehey
Koopa
Koopa
Posts: 19
Joined: Thu Feb 21, 2019 7:44 am

Re: Reserve Powerup for Toad, Peach, Link

Postby horehey » Thu Mar 14, 2019 3:47 am

Perfect, i've been wanting for something like this
but how can i use it?

Eri7
Banned
Posts: 1770
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Good Foundation allows for strong Execution
Contact:

Re: Reserve Powerup for Toad, Peach, Link

Postby Eri7 » Thu Mar 14, 2019 9:38 am

Hey that's a useful script, it will definitely be useful for some people... maybe for me...

MmmMario
Tweeter
Tweeter
Posts: 127
Joined: Sun Aug 05, 2018 6:28 am
Flair: Yeet

Re: Reserve Powerup for Toad, Peach, Link

Postby MmmMario » Sat Mar 16, 2019 3:44 am

Well, we finally have both hearts for M&L and reserve p-ups for Toad, Peach and Link. Nice!

Added in 3 minutes 29 seconds:
And also I don't know where this code for a propeller suit and cloud flower are. Can someone pls link them?

Westretroman
Eerie
Eerie
Posts: 704
Joined: Tue Mar 29, 2016 6:50 pm

Re: Reserve Powerup for Toad, Peach, Link

Postby Westretroman » Sat Mar 16, 2019 9:06 am

MmmMario wrote:
Sat Mar 16, 2019 3:48 am
Well, we finally have both hearts for M&L and reserve p-ups for Toad, Peach and Link. Nice!

Added in 3 minutes 29 seconds:
And also I don't know where this code for a propeller suit and cloud flower are. Can someone pls link them?
Cloud Flower: viewtopic.php?f=87&t=16490&p=238519&hilit=Cloud#p238519
Propeller Powerup:
viewtopic.php?f=31&t=19448&p=292253&hil ... up#p292253

Beware, though, the propeller may not be working but I haven't checked.

Gaming-Dojo
Monty Mole
Monty Mole
Posts: 124
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Re: Reserve Powerup for Toad, Peach, Link

Postby Gaming-Dojo » Sat Mar 16, 2019 1:44 pm

Added in 3 minutes 29 seconds:
And also I don't know where this code for a propeller suit and cloud flower are. Can someone pls link them?
Cloud Flower: https://www.smbxgame.com/forums/viewtopic.php?f=87&t=16490&p=238519&hilit=Cloud#p238519
Propeller Powerup:
https://www.smbxgame.com/forums/viewtopic.php?f=31&t=19448&p=292253&hilit=Powerup#p292253

Beware, though, the propeller may not be working but I haven't checked.
Thanks for linking these powerups. However, I'm not sure if the original scripts work for Toad either but am working right now on moddifying them so they do and have finished with Propeller and Superflower.However,the cloudflower seems a lot more difficult so I may add it later if I manage to get it to work at all.So for now I'll Focus on getting it to look alright when used with splitscreen.

Reserve Powerup for Toad, Peach, Link How to use Camera Memory Offset 0x20?
Hello Guys,

Finally got the reserve sytem to work with 2 Player mode.However, my box for player2 gets offscreen in splitscreen. However, I found the camera class and the Is Split Screen? Offset address. So I tried this but got an error saying Camera class not having static mem. address Offset:

Code: Select all

if Camera:mem(0x020,FIELD_BOOL) == true then
As I have no idea whether this value could solve that split screen issue and if so how to use it properly I'd really apreciated if someone could tell me how to use it or if I have to do it with Player 1.x > player2.x + z or player1.x < Player2.x - z with z being the first Pixel after which screen is split. I don't know the exact difference after which screen splits though so feel free to tell me if you do.

Gaming-Dojo
Monty Mole
Monty Mole
Posts: 124
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Re: Reserve Powerup for Toad, Peach, Link

Postby Gaming-Dojo » Sun Mar 17, 2019 8:52 am

PixelPest wrote:
Thu Mar 14, 2019 12:03 am
I feel like that's not a great choice for placement for the item box. It makes the HUD no longer have equal spacing on each side. I think it would be better to place it either underneath the hearts (and then drop functionality would make sense as would be expected with the itembox but I didn't see it in the video) or above the hearts with the hearts redrawn lower
For the placement, you're absolutely right so it will be changed in next update. Have placed it now underneath the hearts. For the drop functionallity: that's something I'll try as well as I think it's just spawning the powerup-npc in the reserve, setting its x-speed to 0 and its y speed to some value if the dropItemKey is pressed.
However, I have to fix all possible Scenarios of placement of item reserve first, especially with the support of 2 Player mode which I want to add in the next update. There has to be considered the splitscreen as well as the case where one player uses Mario or Luigi and the other one Link, Peach or Toad. However, I don't know exactly when I have how much time I have the next few weeks due to exams and me moving houses to the city where I'm studying during the week (except for holidays)

MegaDood
Charged Spiny
Charged Spiny
Posts: 1822
Joined: Wed Nov 01, 2017 2:43 am

Re: Reserve Powerup for Toad, Peach, Link

Postby MegaDood » Thu Apr 11, 2019 5:49 am

Geez this looks very fun. Imagine speedrunning a level and quickly switching between powerups as you go.

Gaming-Dojo
Monty Mole
Monty Mole
Posts: 124
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Update incoming

Postby Gaming-Dojo » Sat Jun 14, 2025 7:43 pm

Hello folks,

after a long long wait I have finally good news for you:
I recently regained interest in SMBX and LunaLua and therefore have done a good junk of fixing my old script from years ago, so drop functionallity and instant change work flawlessly in single player. They also would work already for more characters except for toad peach and link (I quickly tested Wario tonight and will continue with chars like rosalina, Megaman, etc. tomorrow as well as designing and implementing the item box design for these characters as I think a powerup floating in mid-air looks kinda weird. Another thing I plan on looking at is the custom powerup script someone made and set my reserve script up in a way it works with said script and therefore (theoretically) endless powerups. So stay tunes as I should be able to post an update with a new download as well as new video material tomorrow or the day after.

Read you again tomorrow
Gaming-Dojo

Prismarine
2025 Egg Hunter
2025 Egg Hunter
Posts: 325
Joined: Thu Jul 25, 2024 5:34 am
Flair: fish
Pronouns: i identify as sand

Re: Reserve Powerup Systems for (almost) everyone!

Postby Prismarine » Sun Jun 15, 2025 3:58 pm

5 years just for a update
what a comeback icl

Gaming-Dojo
Monty Mole
Monty Mole
Posts: 124
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Re: Reserve Powerup Systems for (almost) everyone!

Postby Gaming-Dojo » Sun Jun 15, 2025 5:44 pm

Prismarine wrote:
Sun Jun 15, 2025 3:58 pm
5 years just for a update
what a comeback icl
idk if you are referring to the post just above yours. If so, I updated the op in the meantime with a new script which fixed some flaws from the old one as well as graphics for item reserve for each character and the corresponding code to display the correct item box based on the character played. Furthermore, I merged the scripts for drop functionality and instant change and also cleaned up the script to be more readable.

Best Regards
Gaming-Dojo


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari