How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Share and discuss custom SMBX graphics.

Moderator: Userbase Moderators

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby DarkShadeX » Thu Sep 04, 2014 7:17 am

This shows you how to make a custom HUD like this:
Spoiler: show
Image
-What's Required?
1.You need the LATEST LunaDLL version (currently 8+)
you can get it here: (http://www.gamearchaeology.com/LunaDll.dll)
2.You need a Tool to make/draw the HUD like Paint.net or Photoshop.
3.Save this on your Computer:
Spoiler: show
Image
4.OPTIONAL:extr25 (Extractor) to hide the original icons/Reserve box.

After you got everything,start to make the HUD (use the above template as help (Second Spoiler)) and apply a PINK (Copy color from Template) Background to it this will be the transparent area.After you're done with the HUD,save it as a .bmp file.
It should look like this then:
Spoiler: show
Image
Place this .bmp file into the Level Folder that should use this HUD.
Now,make an lunadll or lunaworld Text Document and apply the following code to it:
Spoiler: show

Code: Select all

#-1
// --> Load image into slot 1 with transparency color FF00DC (Pink)
LoadImage,1,0xDC00FF,0,0,0,YOUR FILE NAME.bmp

// Place spritetype 1 from image slot 1 at X:0 Y:0
PlaceSprite,1,1,0,0,0,0
Start SMBX and the level and you should now see your new HUD!

REMEMBER:
-This BMP Sprite is 1 layer behind the Original Hud,that means it isn't infront of the original hud,so you can also just make a border for the original hud.

Heres also the Template for Toad/Peach/Link:
[rimg]http://www11.pic-upload.de/04.09.14/ubyi57hnii.png[/rimg]

Tutorial 1.5: How to make custom Life and Coins HUD text?
Spoiler: show
Simply add the following codes to the lunadll document:

Code: Select all

#-1
//Create 2 Variables for Coins and Lifes:
$CurrentCoins,SetVar,0,0,0,-1,1,0
$CurrentLifes,SetVar,0,0,0,-1,2,0

#0
//Show HUD data.
$CurrentCoins,LoadGlobalVar,0x00B2C5A8,0,0,0,0,w
$CurrentLifes,LoadGlobalVar,0x00B2C5AC,0,0,0,0,f
$CurrentCoins,ShowVar,0,X Position,Y Position,1,0,
$CurrentLifes,ShowVar,0,X Position,Y Position,1,0,
Multiplayer (2 Player/Battle) Templates:
Spoiler: show
Here are the Template for Super Mario and Super Luigi (2P):
[rimg]http://www11.pic-upload.de/04.09.14/5ll1sktw28h.png[/rimg]
Here is the Template for a Character Mix (2P)
[rimg]http://www11.pic-upload.de/04.09.14/3zwdzok48f62.png[/rimg]
Tutorial/Example 2: Get HUD sprite depending on Character:
Spoiler: show
NOW that is really easy!
Simply Add this Codes:

Code: Select all

#-1
// Load the Hud sprites into the Slot of your choice with transparency color FF00DC (PINK!!!)
LoadImage,1,0xDC00FF,0,0,0,MARIO_HUD.bmp
LoadImage,2,0xDC00FF,0,0,0,LUIGI_HUD.bmp
LoadImage,3,0xDC00FF,0,0,0,TOAD_HUD.bmp
LoadImage,4,0xDC00FF,0,0,0,PEACHY_HUD.bmp
LoadImage,5,0xDC00FF,0,0,0,HEY_HUD.bmp

//Get Player ID:
//OnPlayerMem,0xF0,Character ID,0,Event that starts to draw the hud,0,w
OnPlayerMem,0xF0,1,0,1101,0,w *Mario*
OnPlayerMem,0xF0,2,0,1102,0,w *Luigi*
OnPlayerMem,0xF0,3,0,1103,0,w *Toad*
OnPlayerMem,0xF0,4,0,1104,0,w *Peach*
OnPlayerMem,0xF0,6,0,1105,0,w *Link*
//Remove the *NAME*

//Now that we got dat,activate the HUD depending on character:
//Marios HUD:
#1101
PlaceSprite,1,1,0,0,0,0
//Luigis HUD:
#1102
PlaceSprite,1,2,0,0,0,0
//Toads HUD:
#1103
PlaceSprite,1,3,0,0,0,0
//Princess Peach's HUD:
#1104
PlaceSprite,1,4,0,0,0,0
//Links HUD:
#1105
PlaceSprite,1,5,0,0,0,0
//DONE!
Last edited by DarkShadeX on Thu Sep 04, 2014 12:11 pm, edited 7 times in total.

zernicalohd
Swooper
Swooper
Posts: 62
Joined: Mon Aug 18, 2014 1:37 pm

Re: How to make a Custom HUD (LunaDLL V.8+)

Postby zernicalohd » Thu Sep 04, 2014 8:15 am

Very nice tuto, and very well explained thank you so much ^^

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

Re: How to make a Custom HUD (LunaDLL V.8+)

Postby DarkShadeX » Thu Sep 04, 2014 8:19 am

Just a preview what else can be done using lunadll and this tutorial ;)
(I will later explain how to draw the text at a custom position)
Spoiler: show
Image

Mudkip
Lakitu
Lakitu
Posts: 458
Joined: Mon Jan 06, 2014 11:35 pm

Re: How to make a Custom HUD (LunaDLL V.8+)

Postby Mudkip » Thu Sep 04, 2014 8:24 am

Darkeyyyy you are a genius :D

Mikepjr
Buster Beetle
Buster Beetle
Posts: 95
Joined: Mon Jun 16, 2014 1:55 am

Re: How to make a Custom HUD (LunaDLL V.8+)

Postby Mikepjr » Thu Sep 04, 2014 8:40 am

Sweeeeeet.
Can't wait to finally get a status hud how i want it.
I hate the default one with a passion.. too simple looking i suppose.

zernicalohd
Swooper
Swooper
Posts: 62
Joined: Mon Aug 18, 2014 1:37 pm

Re: How to make a Custom HUD (LunaDLL V.8+)

Postby zernicalohd » Thu Sep 04, 2014 9:16 am

Darkchaox100 wrote:Just a preview what else can be done using lunadll and this tutorial ;)
(I will later explain how to draw the text at a custom position)
Spoiler: show
Image
OMG, I'm waiting that tuto with all my passion :P I want to make something especial ^^

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby DarkShadeX » Thu Sep 04, 2014 11:45 am

Updated Main post a bit.

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby DarkShadeX » Thu Sep 04, 2014 12:05 pm

Alrighty,the Main post is done now,it also includes a code for each characters own hud (It might be the best to use this only in 1 Player Mode.)

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby FanofSMBX » Thu Sep 04, 2014 1:02 pm

Could please post example level?

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby DarkShadeX » Thu Sep 04, 2014 1:08 pm

FanofSMBX wrote:Could please post example level?
Here:
https://www.sendspace.com/file/w7y35m

Sambo
Snifit
Snifit
Posts: 211
Joined: Fri Jan 24, 2014 6:43 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby Sambo » Sat Nov 15, 2014 6:06 pm

It seems that your spoilers are broken. Will you fix it?

Cognition
Buster Beetle
Buster Beetle
Posts: 83
Joined: Sun Oct 05, 2014 10:13 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby Cognition » Thu Nov 20, 2014 8:56 pm

I downloaded everything, made my own HUD, but when I put it all in the levels graphics folder and start SMBX I get Demos 0/65. I just need someone to explain what I'm doing wrong. Thanks

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby DarkShadeX » Fri Nov 21, 2014 1:07 pm

You have a really old LunaDLL version then.
Get this one:
dl.dropboxusercontent.com/u/45743579/Lunadll%20with%20lua%200.3.4.2.zip

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby FanofSMBX » Fri Nov 21, 2014 1:21 pm

You don't need to hack the exe. You can use LunaControl to remove the HUD.

Cognition
Buster Beetle
Buster Beetle
Posts: 83
Joined: Sun Oct 05, 2014 10:13 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby Cognition » Fri Nov 21, 2014 3:31 pm

DarkShadeX wrote:You have a really old LunaDLL version then.
Get this one:
dl.dropboxusercontent.com/u/45743579/Lunadll%20with%20lua%200.3.4.2.zip
Thanks! I tried it out and it worked great. I'm going to start looking deeper into LunaDLL. Maybe change some power-ups.

Edit: I take back what I said about it working out great. It is now acting funny and only showing my custom HUD. It's not showing how many coins I have, how any lives or stars. It isn't even showing the reserve item. I want it to be like the original HUD just somewhat recolored. The only thing that is not recolored is the 1-Up symbol.

DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby DarkShadeX » Sat Nov 22, 2014 9:27 am

You seem to use the LunaControl code.
Just remove it to unhide the original HUD.

Cognition
Buster Beetle
Buster Beetle
Posts: 83
Joined: Sun Oct 05, 2014 10:13 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby Cognition » Sat Nov 22, 2014 4:45 pm

I see what I'm doing wrong... Even though I don't want to hack the .exe, I just need the extr25 (Extractor) which I have downloaded. Thanks for the help again, but if there is a different way to remove the old HUD but keep the numbers where they are let me know. :)

Anphiba
Nipper
Nipper
Posts: 404
Joined: Sun Apr 20, 2014 8:29 am

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby Anphiba » Sun Nov 23, 2014 5:39 pm

Amazing.
Custom HUD using LunaDLL.
I guess that means no more extr25!! I hope...
This post should be sticky!!

hacheipe399
Swooper
Swooper
Posts: 64
Joined: Mon Feb 10, 2014 12:29 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby hacheipe399 » Thu Dec 11, 2014 9:51 pm

Hey Dark did you found the offset for star count?

Catskart
Swooper
Swooper
Posts: 70
Joined: Wed Jan 29, 2014 4:59 pm

Re: How to make a Custom HUD (LunaDLL V.8+) UPDATED!

Postby Catskart » Fri Dec 12, 2014 8:49 am

How do we do for the Mario's (or Luigi's) reserve box ? :3


Return to “Graphics”

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 5 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari