Page 1 of 2

LunaDLL - Help thread & Function Examples -

Posted: Tue Sep 02, 2014 12:41 pm
by DarkShadeX
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 ; )

Re: LunaDLL - Function Examples -

Posted: Tue Sep 02, 2014 12:45 pm
by FanofSMBX
You forget to replace the boomerang with bomb for Toad.
Also could you please add my autoscroll and save after cheating codes?

Re: LunaDLL - Function Examples -

Posted: Tue Sep 02, 2014 12:46 pm
by DarkShadeX
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!

Re: LunaDLL - Function Examples -

Posted: Tue Sep 02, 2014 12:51 pm
by FanofSMBX

Re: LunaDLL - Function Examples -

Posted: Tue Sep 02, 2014 12:55 pm
by DarkShadeX
Added those Links to the "Useful Codes" Spoiler

Re: LunaDLL - Function Examples -

Posted: Tue Sep 02, 2014 12:59 pm
by glitch4
I think this thread looks useful for code lists.

Re: LunaDLL - Function Examples -

Posted: Tue Sep 02, 2014 7:41 pm
by Julia Pseudo
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.

Re: LunaDLL - Help thread & Function Examples -

Posted: Wed Sep 03, 2014 5:13 am
by DarkShadeX
Updated the First post a bit.

Re: LunaDLL - Help thread & Function Examples -

Posted: Wed Sep 03, 2014 6:43 am
by Willhart
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.

Re: LunaDLL - Help thread & Function Examples -

Posted: Wed Sep 03, 2014 10:20 am
by DarkShadeX
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

Re: LunaDLL - Help thread & Function Examples -

Posted: Sun Sep 07, 2014 12:36 pm
by KateBulka
You have timer for lunadll?

Re: LunaDLL - Help thread & Function Examples -

Posted: Tue Sep 09, 2014 5:21 am
by Veudekato
every have timer. is only lunadll code.

Re: LunaDLL - Help thread & Function Examples -

Posted: Mon Oct 06, 2014 1:19 pm
by FanofSMBX
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

Re: LunaDLL - Help thread & Function Examples -

Posted: Mon Oct 06, 2014 11:53 pm
by HenryRichard
How do I make more players? Like with supermario4, supermario8, supermario16, etc. I know it involves activating cheats, but how?

Re: LunaDLL - Help thread & Function Examples -

Posted: Tue Oct 07, 2014 12:00 am
by FanofSMBX
You may not want to. I've heard a lot of lunadll stuff only affects player 1

Re: LunaDLL - Help thread & Function Examples -

Posted: Tue Oct 07, 2014 4:26 am
by Veudekato
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

Re: LunaDLL - Help thread & Function Examples -

Posted: Tue Oct 07, 2014 12:47 pm
by HenryRichard
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.

Re: LunaDLL - Help thread & Function Examples -

Posted: Tue Oct 07, 2014 12:49 pm
by DarkShadeX
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.

Re: LunaDLL - Help thread & Function Examples -

Posted: Tue Oct 07, 2014 1:48 pm
by DarkShadeX
Updated Main Post.

Re: LunaDLL - Help thread & Function Examples -

Posted: Thu Jan 08, 2015 4:29 am
by Squishy Rex
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.