Inspired by the following topic over in the LunaLua help section of the forum: viewtopic.php?t=29570
I decided to write a lua script for a character select screen. Out of the box, the script is designed to only be accesed from the overworld. You can, however, by modifying the code, it can be also accessed from inside levels. If you need help with this, please feel free to reach out to me again.
I also included an example for a set of conditions for unlocking characters. I also included a how to use file to maybe already answer a few questions.
But without further ado, please view the script in action:
Update: V. 1.1 is out now. It's a rather small update offering to toggle whether or not locked characters should be visible at all
Update 2: V 1.2 out now. Now, you can set whether or not a locked character should be visible in the char select screen for every character individually.
Here comes a small update with the change requested by mariobrigade. Just swap out the characterselect.lua file from the original release with the one from the following download and you are good to go. Feel also free to view the updated how to use file provided with the V 1.1 Update download as well. In the future, I might also work on 2-player-support as well as organizing the chars without spaced for not unlocked characters when hiding not unlocked characters as well as integrating the char select menu into the customPauseMenu script so it does not interfere with worldmap navigation.
And here, finally, a screenshot of the update with hidden unlockable characters in action:
another small update again. It provides a solution to set for each character that is not unlocked (unlocked characters are always visible in the char select screen as wouldn't make sense otherwise) individually, whether it should appear in the character select screen in grey with a lock icon or not appear in the character select screen at all.
Here's a picture of how this could look in action. Mario, Luigi, Toad and Rosalina are unlocked, Peach, Link, Wario and Bowser are locked, but displayed in the character select screen and all other characters are locked and hidden in the character select screen.
Possible usecases for setting characters to not be visible in the char select screen could be to avoid misleading the player into thinking they could play as characters they actually never can or to avoid spoiling future unlockable characters and with those characters maybe parts of the plot.
Do you mean by menu customization rather how the character select menu looks or how it works? If the former, this can be customized rather easily, at least for changing the background, cursor and sprites for the characters. Changing the background and cursor is as easy as replacing a file (make sure it is named exactly like the original file) If the latter, this is what I plan on working next. Here, I want to achieve that the game automatically recognizes, how many characters are shown and then automatically adjust, how many rows and columns are drawn, maybe even adding support for customizing the scale of the sprites. If you mean something completely different, please specify, what exactly you mean.
Last edited by Gaming-Dojo on Mon Aug 18, 2025 2:12 pm, edited 1 time in total.
Like minimumHUD, i wonder if there are various skins you can type in the file and it will change.
also i do recommend changing the title to be more akin to the other lua lib, for example: charSelect.lua - choose your character!
i do also ponder about a SMB2 character select screen, like minimum just the borders, but that is also fine
will definitely come. for the SMB2 background: can be done very easily by just deleting the bg.png file out of the characterSelectGraphics folder, load in the SMB2 Char Select background and rename it to bg.png. However, I'm not sure if the characters fit the layout then. However, this is the next thing I'll be working at after making the char select a menu in customPause.lua which is what I'm working on right now. When finished, this will work with 2 arrays for x and y positions for the individual characters as well as adding an array that only contains the visible characters and using that array then for drawing instead of the full array. This would remove the gaps that are present in the current version.
Also, thanks for the naming idea. Actually sounds pretty nice, so I will see, if I can just change the title of the topic.