LunaDLL - Help thread & Function Examples -

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

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

LunaDLL - Help thread & Function Examples -

Postby DarkShadeX » Tue Sep 02, 2014 12:41 pm

This thread can be used to ask questions about LunaDLL and it's functions!

How Does LunaDLL Work?
-Before you can use it it's highly recommended to get the latest version! (currently v.8+)
LunaDLL can modify codes ingame and thus,can be used to make some outstanding gimmicks and features!
All you have to do is to place LunaDll.dll into the games root folder (where the exe is located),and then make a text document called lunadll.txt in the level
folder (Where all your level specific gfx is located) with the LunaDLL Functions!
But you also can use a text document called lunaglobal.txt or lunaworld.txt (RECOMMENDED !) which you need to place into the episode folder (where your world file is located) to trigger those codes in ALL levels of that episode!

LunaDLL Complete Functions List:
http://www.gamearchaeology.com/TUTORIAL.txt

Cheats:
*THOUARTDAMNED - ???* < Cheat code.
*LUNADEBUG - Enable/Disable LunaDll Debug* < Cheat code.[/spoiler]

Functions Examples:

Player Codes:
Spoiler: show
///Deactivate Spin Jump:
#0
PlayerMemSet,0,0x120,0,0,0,w


///Deactivate Flying (Only Gliding is possible (similar to Super Mario 3D World))
#0
PlayerMemSet,0,0x16C,0,0,0,w
PlayerMemSet,0,0x16E,0,0,0,w

///Change the Player:
FilterPlayer,0,Current Character ID,New Character ID,0,0,0

^^ As a little help for you:
ID - Character
0 = Noone (Should not be used)
1 = Mario
2 = Luigi
3 = Princess Peach
4 = Toad
5 = Link

///Give the player more lives:
MemAssign,0x00B2C5AC,Ammount of lives that you want to add,1

///Disable Tail Swipe:
#0
PlayerMemSet,0,0x164,0xFFFF,0,0,w

///Disable Peachs Hovering:
#0
PlayerMemSet,0,0x18,0,0,0,w
MISC Stuff:
Spoiler: show
///Deactivates Cheating in levels:
#0
ClearInputString,0,0,0,0,0,0

///Change the Section Music:
PlayMusic,0,Section with a new custom music (needs to be an unused section),0,0,Delay (set it to 50/60 or 100 to prevent the game to freeze for a Second...),0

///Disable/Remove all mounts,yoshis or shoes when the level is loading:
#-1
FilterMount,0,0,0,0,0,0



///Draw a text/string on the screen:
#0
ShowText,0,X Position,Y Position,Font(1,2,3 (Use 3 for Best Result)),0,TEXT! (ALWAYS ENABLE CAPS FOR THIS!)

///Trigger an SMBX Event:
#1
TriggerSMBXEvent,0,0,0,0,1,EVENT NAME!

///Give the player more lives:
MemAssign,0x00B2C5AC,Ammount of lives that you want to add,1

///Add a custom cheat to the level:
#0
//This will activate a lunadll event of your choice when you type in the cheat:
OnCustomCheat,0,0,0,#EVENT-NUMBER,0,cheatname

" example:

#0
OnCustomCheat,0,0,0,2000,0,ineedafewlifes

//Give the Player 6 extra lifes:
#2000
MemAssign,0x00B2C5AC,6,1 " (Remove the "")
Player Powerups:
Spoiler: show
Bomb Suit: (For Mario/Luigi/Toad)
//Replaces Hammer Suit!
//REMEMBER:Toads Bomb fly very far. (due the boomerang physics.)
#0
NPCMemSet,171,0xE2,291,0,0,w
NPCMemSet,292,0xE2,291,0,0,w

Golden Flower (NSMB2/3DS):
NPCMemSet,263,0xE2,10,0,0,w
NPCMemSet,10,0x88,32,0,0,df
NPCMemSet,10,0x90,32,0,0,df
Useful Codes:
Spoiler: show
Save after cheating (Thx to FanofSMBX):
http://www.smbxgame.com/forums/v ... ing#p67036

(Better) Autoscrolling (Also thx to FOS):
http://www.smbxgame.com/forums/v ... oll#p60582
NPC Codes:
Spoiler: show
This will keep certain NPCs from despawning, and they will continue processing while not on the screen. (Code from Willhart)
NPCMemSet,NPC ID,0x12A,55,0,0,w
Luna Codes:
Spoiler: show
Hide the HUD (Requires LunaDll 8+ (Latest one,the one with the HUD Bug.))
LunaControl,2,1,0,0,0,0
Player Manipulating Codes:
Spoiler: show
Gravitation and Jump:
Falling (12 is max and smbx default, lower numbers are less weight)
MemAssign,0x00B2C6F4,2,0,0,0,w

Jumping (20 is smbx default, higher numbers are more jumping)
MemAssign,0x00B2C6DC,45,0,0,0,w

If you need help with a function or even a example then Simply ask here ; )
Last edited by DarkShadeX on Tue Oct 07, 2014 1:47 pm, edited 21 times in total.

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

Re: LunaDLL - Function Examples -

Postby FanofSMBX » Tue Sep 02, 2014 12:45 pm

You forget to replace the boomerang with bomb for Toad.
Also could you please add my autoscroll and save after cheating codes?

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

Re: LunaDLL - Function Examples -

Postby DarkShadeX » Tue Sep 02, 2014 12:46 pm

FanofSMBX wrote:You forget to replace the boomerang with bomb for Toad.
Also could you please add my autoscroll and save after cheating codes?
Give me those codes and i add them.
I will fix that toad one xP!


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

Re: LunaDLL - Function Examples -

Postby DarkShadeX » Tue Sep 02, 2014 12:55 pm

Added those Links to the "Useful Codes" Spoiler

glitch4
Banned
Posts: 2577
Joined: Tue Dec 31, 2013 3:43 pm

Re: LunaDLL - Function Examples -

Postby glitch4 » Tue Sep 02, 2014 12:59 pm

I think this thread looks useful for code lists.

Julia Pseudo
Luigi
Luigi
Posts: 5609
Joined: Wed Jan 08, 2014 12:04 am
Flair: gay gaymer girl
Pronouns: She/her

Re: LunaDLL - Function Examples -

Postby Julia Pseudo » Tue Sep 02, 2014 7:41 pm

This is a great topic which I'd suggest sticking alongside similar topics (like the NPC code list) in Help & Support. LunaDLL is pretty freaking awesome.

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

Re: LunaDLL - Help thread & Function Examples -

Postby DarkShadeX » Wed Sep 03, 2014 5:13 am

Updated the First post a bit.

Willhart
Banned
Posts: 368
Joined: Thu Apr 10, 2014 2:18 am

Re: LunaDLL - Help thread & Function Examples -

Postby Willhart » Wed Sep 03, 2014 6:43 am

This will keep certain NPCs from despawning, and they will continue processing while not on the screen. It does not seem to work with generators though.

NPCMemSet,205,0x12A,55,0,0,w

In this example npc 205 is the metroid wall walker thing.

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

Re: LunaDLL - Help thread & Function Examples -

Postby DarkShadeX » Wed Sep 03, 2014 10:20 am

For everyone who uses the latest (yet a lil' buggy lunadll version 8+ (the one with the hud bugs))
Heres an code to HIDE the WHOLE Hud!
LunaControl,2,1,0,0,0,0

KateBulka
Dolphin
Dolphin
Posts: 1112
Joined: Tue Apr 15, 2014 8:29 am
Flair: Bun~
Pronouns: she/her

Re: LunaDLL - Help thread & Function Examples -

Postby KateBulka » Sun Sep 07, 2014 12:36 pm

You have timer for lunadll?

Veudekato
Guest

Re: LunaDLL - Help thread & Function Examples -

Postby Veudekato » Tue Sep 09, 2014 5:21 am

every have timer. is only lunadll code.

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

Re: LunaDLL - Help thread & Function Examples -

Postby FanofSMBX » Mon Oct 06, 2014 1:19 pm

Here's the gold flower codes

NPCMemSet,263,0xE2,10,0,0,w
NPCMemSet,10,0x88,32,0,0,df
NPCMemSet,10,0x90,32,0,0,df
And here's the gravity codes

Falling (12 is max and smbx default, lower numbers are less weight)
MemAssign,0x00B2C6F4,2,0,0,0,w

Jumping (20 is smbx default, higher numbers are more jumping)
MemAssign,0x00B2C6DC,45,0,0,0,w

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaDLL - Help thread & Function Examples -

Postby HenryRichard » Mon Oct 06, 2014 11:53 pm

How do I make more players? Like with supermario4, supermario8, supermario16, etc. I know it involves activating cheats, but how?

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

Re: LunaDLL - Help thread & Function Examples -

Postby FanofSMBX » Tue Oct 07, 2014 12:00 am

You may not want to. I've heard a lot of lunadll stuff only affects player 1

Veudekato
Guest

Re: LunaDLL - Help thread & Function Examples -

Postby Veudekato » Tue Oct 07, 2014 4:26 am

Darkchaox100 wrote:Player Powerups:
Spoiler: show
Bomb Suit: (For Mario/Luigi/Toad)
//Replaces Hammer Suit!
//REMEMBER:Toads Bomb fly very far. (due the boomerang physics.)
#0
NPCMemSet,171,0xE2,291,0,0,w
NPCMemSet,292,0xE2,291,0,0,w
emm, guys
if like this code you can see more here http://engine.wohlnet.ru/forum/viewtopic.php?f=26&t=333 .

more examples:
sall players exept link. every player have it own throw phisycs . remember!
Veudekato wrote:all player throw bombs
NPCMemSet,292,0xE2,291,0,0,w
NPCMemSet,171,0xE2,291,0,0,w

all player throw hammers

NPCMemSet,292,0xE2,171,0,0,w
NPCMemSet,291,0xE2,171,0,0,w

all player throw boomerangs (WARNING : boomerang can be GLITHY)

NPCMemSet,171,0xE2,291,0,0,w
NPCMemSet,291,0xE2,291,0,0,w

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaDLL - Help thread & Function Examples -

Postby HenryRichard » Tue Oct 07, 2014 12:47 pm

FanofSMBX wrote:You may not want to. I've heard a lot of lunadll stuff only affects player 1
It's just for a cutscene though, I need two instances of the player for it. But I can make it work without it.

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

Re: LunaDLL - Help thread & Function Examples -

Postby DarkShadeX » Tue Oct 07, 2014 12:49 pm

HenryRichard wrote:
FanofSMBX wrote:You may not want to. I've heard a lot of lunadll stuff only affects player 1
It's just for a cutscene though, I need two instances of the player for it. But I can make it work without it.
Use Lua for 2 Player support.

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

Re: LunaDLL - Help thread & Function Examples -

Postby DarkShadeX » Tue Oct 07, 2014 1:48 pm

Updated Main Post.

Squishy Rex
Kain
Kain
Posts: 1982
Joined: Sat Dec 21, 2013 4:30 am
Pronouns: he/him
Contact:

Re: LunaDLL - Help thread & Function Examples -

Postby Squishy Rex » Thu Jan 08, 2015 4:29 am

Hey Darkshade, with the Gravitational and Jumping codes, is it possible while using them to disable normal jumping and make a player fall straight down when they run off the edge of a block like in Captain Toad: Treasure Tracker? I'm not overly familiar with these codes so any help would be appreciated. Thanks.


Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari