(shouting)

Post your lunadll findings

The second SMBX collab!
TiKi
Posts: 709
Joined: 10 years ago

Post your lunadll findings

Post by TiKi »

This is to prevent the help thread from being clogged up.

https://www.sendspace.com/file/k3yelm
Long story short you can't even force Toad Peach or Link to ride Yoshi

And if you set Mario's form to 8 he's invisible even with a "Mario-8" graphic. Oh well
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

Here's a bunch of codes I made for an example I never ended up making
// -- ADJUSTABLE WIND --
#0

// Activate event every 13 frames
Timer,0,1000,0,1,13,0

// Subtract from player's X push value by 1
#1000
PlayerMemSet,0,0x138,1,2,1,f

#END
// -- PUSHABLE LAYER --
#0

//Apply constant friction/air resistance to layer
DeccelerateLayerX,3,0,0,0,0,0.02

//Trigger event 1000 when wooden square pushed from right
BlockTrigger,0,1,2,1000,0,0

//Trigger event 1001 when wooden square pushed from left
BlockTrigger,0,1,4,1001,0,0

//Move layer left, stop when length runs out
#1000
AccelerateLayerX,3,-2,0,0,2,-0.1


//Move layer right, stop when length runs out
#1001
AccelerateLayerX,3,2,0,0,2,0.1

#END
// -- CHARACTER SWITCH EXAMPLE --
#0

// When tapping up, copy event 1000
OnInput,0,1,1,1000,0,0

#1000
// If tapping up again in the next 11 frames, copy event 1001
OnInput,0,1,1,1001,10,0

#1001
// Event 1001, switch to next player and play sound
CyclePlayerRight,0,0,0,0,1,0
SFX,0,13,0,0,0,0

#END
// -- FREEZE CHEAT CODE --
#0
OnCustomCheat,0,0,0,1000,0,stop

// XOR the memory at 0x00B2C8B4 with the 2 byte value 0xFFFF (switch the freeze switch on/off)
// This will effectively toggle the switch between 0x0000 and 0xFFFF
#1000
MemAssign,0x00B2C8B4,0xFFFF,6,0,1,w

#END
///--Scrolling--///
#0

// Push section 1, left border, +1 each frame
PushScreenBoundary,1,2,0,0,500,1

// Push section 1, right border, +1 each frame
PushScreenBoundary,1,3,0,0,500,1

// After 500 frames, start a different scroll event
Timer,1,1000,1,0,500,0

// Scroll back event
#1000
PushScreenBoundary,1,2,0,0,500,-1
PushScreenBoundary,1,3,0,0,500,-1
Timer,1,1001,1,0,500,0

// Scroll up event
#1001
PushScreenBoundary,1,0,0,0,500,-1
PushScreenBoundary,1,1,0,0,500,-1
Timer,1,1002,1,0,500,0

// Scroll down fast
#1002
PushScreenBoundary,1,0,0,0,500,2.5
PushScreenBoundary,1,1,0,0,500,2.5

#END
// -- BLOCK SWAP --
#-1
SetVar,0,0,0,0,1,SJPressed

#0
OnPlayerMem,0xFC,0xFFFF,0,2000,0,0
OnPlayerMem,0xFC,0,0,2001,0,0

#2000
IfVar,0,0,0,2002,1,SJPressed

#2001
SetVar,0,0,0,0,1,SJPressed

#2002
SetVar,0,0,1,0,1,SJPressed
// Swap all blocks of type 1 and 3
SwapAllBlocks,1,3,0,0,1,0

#END
Also I found out 0x00B250E2 is related to pausing, but I'm not sure if it can be controlled yet
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 10 years ago

Re: Post your lunadll findings

Post by TiKi »

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,#,0,0,0,w

Jumping (20 is smbx default, higher numbers are more jumping)
MemAssign,0x00B2C6DC,#,0,0,0,w
TiKi
Posts: 709
Joined: 10 years ago

Re: Post your lunadll findings

Post by TiKi »

Well apparently manually setting the fairy height and width does nothing.
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

According to my count, SMBX uses on average 8100 windows GDI objects. The max amount the OS allows you to have is 10000. I wonder if that's the source of its limitations.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Darkchaox100
Posts: 0
Joined: 9 years ago

Re: Post your lunadll findings

Post by Darkchaox100 »

This shows how to make a Switch Palace System! (Thx to Kil)
This tells you how to make a Switch Palace system using LunaDLL!

1.Make a txt file and call it lunaworld.
2.Add the following code to it:

Code: Select all

//Enable Disable Switch Blocks:
IfVar,0,0,1,1000,1,Yellow_True
IfVar,0,0,1,1001,1,Green_True
IfVar,0,0,1,1002,1,Red_True
IfVar,0,0,1,1003,1,Blue_True

#1000
//Enable the Yellow Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Yellow Blocks

#1001
//Enable the Green Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Green Blocks

#1002
//Enable the Red Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Red Blocks

#1003
//Enable the Blue Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Blue Blocks
3.It's highly recommended to make a Intro level for reseting the system!
In your Intro's level folder,make a lunadll.txt file and add the following code:

Code: Select all

#0
SetVar,0,0,0,0,1,Yellow_True
SetVar,0,0,0,0,1,Green_True
SetVar,0,0,0,0,1,Red_True
SetVar,0,0,0,0,1,Blue_True
BankVar,0,0,0,0,1,Yellow_True
BankVar,0,0,0,0,1,Green_True
BankVar,0,0,0,0,1,Red_True
BankVar,0,0,0,0,1,Blue_True
WriteBank,0,0,0,0,1,0
Were almost done!
4.Make a lunadll.txt file in the Switch Palace level folder and add the following code:

Code: Select all

#0
IfNPC,1,2,0,1005,0,once

#1005
PlaceSprite,1,2,0,0,0,0
LunaControl,2,1,0,0,0,0
SetVar,0,0,1,0,1,***_True
BankVar,0,0,0,0,1,***_True
WriteBank,0,0,0,0,1,0
#END
Change *** to either Yellow,Green,Blue or Red!
The above code Enables the Switch as soon as you kill the SMB3 Goomba.

5.In all your Levels that should contain Switch Blocks,make 2/4/6/8 Events.
Call the first one "Enable *** Blocks" and the second one "Disable *** Blocks"
Change *** to either Yellow,Green,Blue or Red!
The Enable event shows the Switch Blocks,and the disable one shows only the Disabled Switch Blocks.

And you are done!
User avatar
kitikami
Posts: 853
Joined: 10 years ago

Re: Post your lunadll findings

Post by kitikami »

Someone requested a full list of the hitbox addresses for all the characters. Hopefully I copied all of these down correctly. They can be manipulated with MemAssign:

//Example
//make Mario's hitbox 50 pixels high when small
MemAssign,0x00B2C6FC,50,0,0,1,w

Code: Select all

address	default	description
/size		value

MARIO
00B2C6FC w	30	Mario small hitbox height
00B2C706 w	54	Mario big hitbox height
00B2C710 w	54	Mario fire hitbox height
00B2C71A w	54	Mario leaf hitbox height
00B2C724 w	54	Mario tanuki hitbox height
00B2C72E w	54	Mario hammers hitbox height
00B2C738 w	54	Mario ice hitbox height

00B2C742 w	0	Mario small duck height
00B2C74C w	30	Mario big duck height
00B2C756 w	30	Mario fire duck height
00B2C760 w	30	Mario leaf duck height
00B2C76A w	30	Mario tanuki duck height
00B2C774 w	30	Mario hammers duck height
00B2C77E w	30	Mario ice duck height

00B2C788 w	24	Mario small hitbox width
00B2C792 w	24	Mario big hitbox width
00B2C79C w	24	Mario fire hitbox width
00B2C7A6 w	24	Mario leaf hitbox width
00B2C7B0 w	24	Mario tanuki hitbox width
00B2C7BA w	24	Mario hammers hitbox width
00B2C7C4 w	24	Mario ice hitbox width


LUIGI
00B2C6FE w	30	Luigi small hitbox height
00B2C708 w	60	Luigi big hitbox height
00B2C712 w	60	Luigi fire hitbox height
00B2C71C w	60	Luigi leaf hitbox height
00B2C726 w	60	Luigi tanuki hitbox height
00B2C730 w	60	Luigi hammers hitbox height
00B2C73A w	60	Luigi ice hitbox height

00B2C742 w	0	Luigi small duck height
00B2C74E w	30	Luigi big duck height
00B2C758 w	30	Luigi fire duck height
00B2C762 w	30	Luigi leaf duck height
00B2C76C w	30	Luigi tanuki duck height
00B2C776 w	30	Luigi hammers duck height
00B2C780 w	30	Luigi ice duck height

00B2C78A w	24	Luigi small hitbox width
00B2C794 w	24	Luigi big hitbox width
00B2C79E w	24	Luigi fire hitbox width
00B2C7A8 w	24	Luigi leaf hitbox width
00B2C7B2 w	24	Luigi tanuki hitbox width
00B2C7BC w	24	Luigi hammers hitbox width
00B2C7C6 w	24	Luigi ice hitbox width


PEACH
00B2C700 w	38	Princess small hitbox height
00B2C70A w	60	Princess big hitbox height
00B2C714 w	60	Princess fire hitbox height
00B2C71E w	60	Princess leaf hitbox height
00B2C728 w	60	Princess tanuki hitbox height
00B2C732 w	60	Princess hammers hitbox height
00B2C73C w	60	Princess ice hitbox height

00B2C746 w	26	Princess small duck height
00B2C750 w	30	Princess big duck height
00B2C75A w	30	Princess fire duck height
00B2C764 w	30	Princess leaf duck height
00B2C76E w	30	Princess tanuki duck height
00B2C778 w	30	Princess hammers duck height
00B2C782 w	30	Princess ice duck height

00B2C78C w	24	Princess small hitbox width
00B2C796 w	24	Princess big hitbox width
00B2C7A0 w	24	Princess fire hitbox width
00B2C7AA w	24	Princess leaf hitbox width
00B2C7B4 w	24	Princess tanuki hitbox width
00B2C7BE w	24	Princess hammers hitbox width
00B2C7C8 w	24	Princess ice hitbox width


TOAD
00B2C702 w	30	Toad small hitbox height
00B2C70C w	50	Toad big hitbox height
00B2C716 w	50	Toad fire hitbox height
00B2C720 w	50	Toad leaf hitbox height
00B2C72A w	50	Toad tanuki hitbox height
00B2C734 w	50	Toad hammers hitbox height
00B2C73E w	50	Toad ice hitbox height

00B2C748 w	26	Toad small duck height
00B2C752 w	30	Toad big duck height
00B2C75C w	30	Toad fire duck height
00B2C766 w	30	Toad leaf duck height
00B2C770 w	30	Toad tanuki duck height
00B2C77A w	30	Toad hammers duck height
00B2C784 w	30	Toad ice duck height

00B2C78E w	24	Toad small hitbox width
00B2C798 w	24	Toad big hitbox width
00B2C7A2 w	24	Toad fire hitbox width
00B2C7AC w	24	Toad leaf hitbox width
00B2C7B6 w	24	Toad tanuki hitbox width
00B2C7C0 w	24	Toad hammers hitbox width
00B2C7CA w	24	Toad ice hitbox width


LINK
00B2C704 w	54	Link small hitbox height
00B2C70E w	54	Link big hitbox height
00B2C718 w	54	Link fire hitbox height
00B2C722 w	54	Link leaf hitbox height
00B2C72C w	54	Link tanuki hitbox height
00B2C736 w	54	Link hammers hitbox height
00B2C740 w	54	Link ice hitbox height

00B2C74A w	44	Link small duck height
00B2C754 w	44	Link big duck height
00B2C75E w	44	Link fire duck height
00B2C768 w	44	Link leaf duck height
00B2C772 w	44	Link tanuki duck height
00B2C77C w	44	Link hammers duck height
00B2C786 w	44	Link ice duck height

00B2C790 w	24	Link small hitbox width
00B2C79A w	24	Link big hitbox width
00B2C7A4 w	24	Link fire hitbox width
00B2C7AE w	24	Link leaf hitbox width
00B2C7B8 w	24	Link tanuki hitbox width
00B2C7C2 w	24	Link hammers hitbox width
00B2C7CC w	24	Link ice hitbox width
Last edited by kitikami 9 years ago, edited 1 time in total.
User avatar
Mabel
Just west of wierd
Posts: 302
Joined: 10 years ago
https://marbels.talkhaus.com/

Re: Post your lunadll findings

Post by Mabel »

kitikami wrote:Someone requested a full list of the hitbox addresses for all the characters. Hopefully I copied all of these down correctly. They can be manipulated with MemAssign:

//Example
//make Mario's hitbox 50 pixels high when small
MemAssign,0x00B2C6FC,50,0,0,1,w

Code: Select all

address	default	description
/size		value

MARIO
00B2C6FC w	30	Mario small hitbox height
00B2C706 w	54	Mario big hitbox height
00B2C710 w	54	Mario fire hitbox height
00B2C71A w	54	Mario leaf hitbox height
00B2C724 w	54	Mario tanuki hitbox height
00B2C72E w	54	Mario hammers hitbox height
00B2C738 w	54	Mario ice hitbox height

00B2C742 w	0	Mario small duck height
00B2C74C w	30	Mario big duck height
00B2C756 w	30	Mario fire duck height
00B2C760 w	30	Mario leaf duck height
00B2C76A w	30	Mario tanuki duck height
00B2C774 w	30	Mario hammers duck height
00B2C77E w	30	Mario ice duck height

00B2C788 w	24	Mario small hitbox width
00B2C792 w	24	Mario big hitbox width
00B2C79C w	24	Mario fire hitbox width
00B2C7A6 w	24	Mario leaf hitbox width
00B2C7B0 w	24	Mario tanuki hitbox width
00B2C7BA w	24	Mario hammers hitbox width
00B2C7C4 w	24	Mario ice hitbox width


LUIGI
00B2C6FE w	30	Luigi small hitbox height
00B2C708 w	60	Luigi big hitbox height
00B2C712 w	60	Luigi fire hitbox height
00B2C71C w	60	Luigi leaf hitbox height
00B2C726 w	60	Luigi tanuki hitbox height
00B2C730 w	60	Luigi hammers hitbox height
00B2C73A w	60	Luigi ice hitbox height

00B2C742 w	0	Luigi small duck height
00B2C74E w	30	Luigi big duck height
00B2C758 w	30	Luigi fire duck height
00B2C762 w	30	Luigi leaf duck height
00B2C76C w	30	Luigi tanuki duck height
00B2C776 w	30	Luigi hammers duck height
00B2C780 w	30	Luigi ice duck height

00B2C78A w	24	Luigi small hitbox width
00B2C794 w	24	Luigi big hitbox width
00B2C79E w	24	Luigi fire hitbox width
00B2C7A8 w	24	Luigi leaf hitbox width
00B2C7B2 w	24	Luigi tanuki hitbox width
00B2C7BC w	24	Luigi hammers hitbox width
00B2C7C6 w	24	Luigi ice hitbox width


PEACH
00B2C700 w	38	Princess small hitbox height
00B2C70A w	60	Princess big hitbox height
00B2C714 w	60	Princess fire hitbox height
00B2C71E w	60	Princess leaf hitbox height
00B2C728 w	60	Princess tanuki hitbox height
00B2C732 w	60	Princess hammers hitbox height
00B2C73C w	60	Princess ice hitbox height

00B2C746 w	26	Princess small duck height
00B2C750 w	30	Princess big duck height
00B2C75A w	30	Princess fire duck height
00B2C764 w	30	Princess leaf duck height
00B2C76E w	30	Princess tanuki duck height
00B2C778 w	30	Princess hammers duck height
00B2C782 w	30	Princess ice duck height

00B2C78C w	24	Princess small hitbox width
00B2C796 w	24	Princess big hitbox width
00B2C7A0 w	24	Princess fire hitbox width
00B2C7AA w	24	Princess leaf hitbox width
00B2C7B4 w	24	Princess tanuki hitbox width
00B2C7BE w	24	Princess hammers hitbox width
00B2C7C8 w	24	Princess ice hitbox width


TOAD
00B2C702 w	30	Toad small hitbox height
00B2C70C w	50	Toad big hitbox height
00B2C716 w	50	Toad fire hitbox height
00B2C720 w	50	Toad leaf hitbox height
00B2C72A w	50	Toad tanuki hitbox height
00B2C734 w	50	Toad hammers hitbox height
00B2C73E w	50	Toad ice hitbox height

00B2C748 w	26	Toad small duck height
00B2C752 w	30	Toad big duck height
00B2C75C w	30	Toad fire duck height
00B2C766 w	30	Toad leaf duck height
00B2C770 w	30	Toad tanuki duck height
00B2C77A w	30	Toad hammers duck height
00B2C784 w	30	Toad ice duck height

00B2C78E w	24	Toad small hitbox width
00B2C798 w	24	Toad big hitbox width
00B2C7A2 w	24	Toad fire hitbox width
00B2C7AC w	24	Toad leaf hitbox width
00B2C7B6 w	24	Toad tanuki hitbox width
00B2C7C0 w	24	Toad hammers hitbox width
00B2C7CA w	24	Toad ice hitbox width


LINK
00B2C704 w	54	Link small hitbox height
00B2C70E w	54	Link big hitbox height
00B2C718 w	54	Link fire hitbox height
00B2C722 w	54	Link leaf hitbox height
00B2C72C w	54	Link tanuki hitbox height
00B2C736 w	54	Link hammers hitbox height
00B2C740 w	54	Link ice hitbox height

00B2C74A w	44	Link small duck height
00B2C754 w	44	Link big duck height
00B2C75E w	44	Link fire duck height
00B2C768 w	44	Link leaf duck height
00B2C772 w	44	Link tanuki duck height
00B2C77C w	44	Link hammers duck height
00B2C786 w	44	Link ice duck height
you wouldnt happen to also have Link's attack hitbox length as well would you?
Image
Image
Image Image
TiKi
Posts: 709
Joined: 10 years ago

Re: Post your lunadll findings

Post by TiKi »

Thanks a lot I've already managed to make 3 forms of a player. I would like to note that you forgot Link's width if you could please add that
User avatar
kitikami
Posts: 853
Joined: 10 years ago

Re: Post your lunadll findings

Post by kitikami »

Oops, I must not have selected all the way to the end of my list when I copied it into the post. Thanks for catching that, Link's widths are added now.

I don't know what controls Link's attack hitbox. I'll keep an eye out for it and post if I do find an address for it.
Darkchaox100
Posts: 0
Joined: 9 years ago

Re: Post your lunadll findings

Post by Darkchaox100 »

This code doesn't give you a 1UP after collecting 100 Coins:

Code: Select all

function onLoop()
 local coins=mem(0x00B2C5A8, FIELD_WORD)
  if(coins>=99)then
  coins=0
  mem(0x00B2C5A8, FIELD_WORD, 0)
 end
end
User avatar
Alice
Posts: 2367
Joined: 12 years ago
Pronouns: Girl person
Location: Wonderland

Re: Post your lunadll findings

Post by Alice »

Darkchaox100 wrote:This code doesn't give you a 1UP after collecting 100 Coins:

Code: Select all

function onLoop()
 local coins=mem(0x00B2C5A8, FIELD_WORD)
  if(coins>=99)then
  coins=0
  mem(0x00B2C5A8, FIELD_WORD, 0)
 end
end
I actually haven't used LunaDLL at all yet but doesn't that code just check if you have more than 99 coins then set coins to 0 and nothing else?
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

0x00B2C5B4

This causes you to leave the level when set to 0xFFFF, and maybe some other weird things to boot
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: Post your lunadll findings

Post by Hoeloe »

Adding something here that Kevsoft found, and I've used for the raocoin counter:

Global memory 0x00B2C59E is 0 when in a level, and other values when finishing a level. The value determines what kind of level finish it is. I haven't got the exact values, but I believe 3 means a key and lock exit.

This does not account for warp exits though doors or pipes, or by instant teleporting.
Image
Image
Image
Image
Image
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

0x00B2C880 - w - current menu choice

Not sure what can be accomplished with this
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

It seems the redigitiscool cheat is around here (0x008E7863), and if anyone wanted to hex edit it they would just have to change the char values it's pushing


Image
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: Post your lunadll findings

Post by Hoeloe »

Kil wrote:0x00B2C880 - w - current menu choice

Not sure what can be accomplished with this
Does this apply to the pause menu? I can see some uses if we can detect when the player selects certain options in the pause menu.
Image
Image
Image
Image
Image
TiKi
Posts: 709
Joined: 10 years ago

Re: Post your lunadll findings

Post by TiKi »

Kil wrote:It seems the redigitiscool cheat is around here (0x008E7863), and if anyone wanted to hex edit it they would just have to change the char values it's pushing


Image
whodarestotry
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

It should be for all menus, but I didn't check fully as I think it might not do much since lunadll isn't running during menus


Seems I actually found the purpose of another player memory field when checking out the stickyfingers cheat...

0x156 - w - Player can grab anything setting (0xFFFF = can grab anything)
whodarestotry
That would be amazing. IF anyone thinks it's a good idea to hex edit redigitiscool into "whodarestotrytostopthetimebomb" or something, I'm up to doing it
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

One more from the cheats, 0x00B2C8AC - w - Player has infinite jumps setting (0xFFFF = on)
DON'T PM me. Ask your question in the help thread so everyone can be answered.
User avatar
Hoeloe
A2XT person
Posts: 1016
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: Post your lunadll findings

Post by Hoeloe »

Kil wrote:One more from the cheats, 0x00B2C8AC - w - Player has infinite jumps setting (0xFFFF = on)
Kil wrote: 0x156 - w - Player can grab anything setting (0xFFFF = can grab anything)
I can see some fun gimmick levels occurring from these two codes. Nice find!
Image
Image
Image
Image
Image
TiKi
Posts: 709
Joined: 10 years ago

Re: Post your lunadll findings

Post by TiKi »

I thought hex edited cheats had to be the same amount of letters?
Kil
Posts: 13
Joined: 15 years ago

Re: Post your lunadll findings

Post by Kil »

TiKi wrote:I thought hex edited cheats had to be the same amount of letters?
I would be rewriting the entire routine so there's no need for that

Ok this last one has bored me to tears so im done for now
0x00B25164 - void* - Pointer to some kind of overworld data block involving locked character selection but I'm not 100% sure
DON'T PM me. Ask your question in the help thread so everyone can be answered.
TiKi
Posts: 709
Joined: 10 years ago

Re: Post your lunadll findings

Post by TiKi »

marry me?
User avatar
Kevsoft
LunaLua Master Developer
Posts: 83
Joined: 9 years ago

Re: Post your lunadll findings

Post by Kevsoft »

Okay I've updated defines.h. Remind me if I missed something!
Post Reply