Custom Loading Screens?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
User avatar
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1370
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Current Project: Mario's Kingdom Adventure
Chat Username: Taycamgame

Custom Loading Screens?

Postby Taycamgame » Mon Jan 20, 2020 3:56 pm

Loading screens, being the ones the player sees when loading into and out of levels while playing. Not the main SMBX2 loading screen, i mean the one that is just a black screen with the SMBX2 logo on the bottom right. I assume it's possible to replace that?
A few questions on making custom loading screens:
1. What size do they need to be?
2. I figure it should replace one of the hardcoded gfx, but I can't tell which one. I suspect it's hardcoded-1, hardcoded-14-1 or hardcoded-14-2 but Idk which one it is?
3. Can multiple different loading screens be available in a single episode, and can it be made so the player can choose which one to use throughout playing?
Official Level Reviewer (My Gold Yoshi Egg rank replaced the level reviewer icon, but i am still a level reviewer).
Check out the World Map Service that i host:
Check out the projects i support:
Spoiler: show
Quotes: show
xDestroy wrote:
Wellington Games wrote:Taycamgame, I know how to take screenshots in the SMBX.
Tower Mario Bros.

Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8569
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: Custom Loading Screens?

Postby Enjl » Mon Jan 20, 2020 4:20 pm

loadscreen.lua in the episode folder runs during load screens, automatically replacing the default. the lua environment is massively restricted, but you have access to all Graphics functions, as well as the onDraw event.
You can override an episode-wide loadscreen with a loadscreen.lua file in a level folder I THINK? Not sure.
To make the player be able to select a load screen, you need to pass some form of user data to loadscreen.lua. I beliiiiieve SaveData and GameData are not available, so you will probably need to use lua's IO library to handle your own custom file for that.Then you can manipulate that from regular gameplay, and access it from the load screen.
You might also want to keep this around, for loading images:
local episodePath = mem(0x00B2C61C, FIELD_STRING)
800x600 is your canvas size. Doesn't resize properly in preview builds, but that bug is fixed in beta 4, where it will scale like everything else in the game.

We'll make sure to add more thorough information about this to the handbook, but this should be enough to get you started.
Last edited by Enjl on Mon Jan 20, 2020 4:41 pm, edited 1 time in total.
The ABC of Creation

User avatar
Larry Koopa
Larry Koopa
Posts: 2164
Joined: Fri Dec 20, 2013 7:07 pm
Current Project: Project planned; waiting for SMBX2 Beta 4

Re: Custom Loading Screens?

Postby Murphmario » Mon Jan 20, 2020 4:35 pm

Also, I think the X2 logo on the loading screen is replacable. I found it in the hardcoded folder as hardcoded-30-5.
Now taking graphics requests: ... #responses

My graphics pack: ... t=1960/url

Really tempted to just make a general graphics thread for all of my graphics instead of just making individual threads for each of them.

Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest