Re: LunaDLL help thread
Posted: 13 May 2014, 05:00
Wait if smbx already saves these memory locations then this should already be working. You should be able to set those values using lunadll and smbx will handle saving and loading them.
Okay, I tried that, but when I kill the player my custom event doesn't seem to trigger. For reference, here's my LunaDLL code:Kil wrote:That is how you do it yeah.
I think it's -1 when the player is dead.
Not sure what you mean. Whatever #number you give your custom event, that's the number you use to trigger it.TiKi wrote:How would I go about letting some event (OnPlayerMem) trigger another LunaDLL event? I know they're some number, but how do I find the number of a certain Luna event?
Okay, that works better. Thanks!Kil wrote:I dunno what's wrong with that but I thought of probably a better way. Near the state memory there is actually a death timer which is better understood. The fire condition can be "if death timer is greater than 0"
OnPlayerMem,0x13E,0,1,1007,0,w
Thanks! But I mean, how do I know that a certain event is say, 1007 instead of 1008?Kil wrote:Not sure what you mean. Whatever #number you give your custom event, that's the number you use to trigger it.TiKi wrote:How would I go about letting some event (OnPlayerMem) trigger another LunaDLL event? I know they're some number, but how do I find the number of a certain Luna event?
OnPlayerMem,0x13C,-1,0,1007,0,w
will trigger #1007
nopeDinnerSonic wrote:Do LunaDLL custom cheats activate the "YOU HAVE CHEATED NO SAVING" mode that normal cheats do?
Well, you made it under #1007.TiKi wrote:Thanks! But I mean, how do I know that a certain event is say, 1007 instead of 1008?Kil wrote:Not sure what you mean. Whatever #number you give your custom event, that's the number you use to trigger it.TiKi wrote:How would I go about letting some event (OnPlayerMem) trigger another LunaDLL event? I know they're some number, but how do I find the number of a certain Luna event?
OnPlayerMem,0x13C,-1,0,1007,0,w
will trigger #1007
Code: Select all
//Make the PC enter the level big
#-1
PlayerMemSet,0,0x112,2,0,0,w
// Debug purposes - Delete only after testing level LunaDLL in full!
#0
DebugPrint,0,0,0,0,0,0
// Introduction and listener for player's death
#1
ShowText,0,25,475,3,180,PURIFICATION IN PROGRESS...
Timer,0,1000,0,0,180,0
OnPlayerMem,0x13E,0,1,1007,0,w
// When reaching section 3, have the same UI, with slight changes...
#3
Trigger,0,1000,0,0,1,0
Trigger,0,2002,0,0,1,0
// Detect current PC, status (powerup) and CP (mount)
#1000
OnPlayerMem,0xF0,1,0,1001,0,w
OnPlayerMem,0xF0,2,0,1002,0,w
OnPlayerMem,0xF0,3,0,1003,0,w
OnPlayerMem,0xF0,4,0,1004,0,w
OnPlayerMem,0xF0,5,0,1005,0,w
OnPlayerMem,0x112,1,0,1008,0,w
OnPlayerMem,0x112,2,0,1009,0,w
OnPlayerMem,0x112,3,0,1010,0,w
OnPlayerMem,0x112,4,0,1011,0,w
OnPlayerMem,0x112,5,0,1012,0,w
OnPlayerMem,0x112,6,0,1013,0,w
OnPlayerMem,0x112,7,0,1014,0,w
OnPlayerMem,0x108,0,0,1015,0,w
OnPlayerMem,0x108,1,0,1016,0,w
OnPlayerMem,0x108,2,0,1020,0,w
OnPlayerMem,0x108,3,0,1021,0,w
// Display PC's name after intro is done
#1001
ShowText,0,25,475,3,1,DEMO
Trigger,0,1006,0,0,1,0
#1002
ShowText,0,25,475,3,1,IRIS
Trigger,0,1006,0,0,1,0
#1003
ShowText,0,25,475,3,1,KOOD
Trigger,0,1006,0,0,1,0
#1004
ShowText,0,25,475,3,1,raocow
Trigger,0,1006,0,0,1,0
#1005
ShowText,0,25,475,3,1,SHEATH
Trigger,0,1006,0,0,1,0
// Dummy Trigger command - may need to remove
#1006
Trigger,0,2000,0,0,1,0
// Display the PC's status:
// DEAD - Remove all blocks dealing with Status Effects and CP
#1007
DeleteEventsFrom,1006,0,0,0,1,0
DeleteEventsFrom,1008,0,0,0,1,0
DeleteEventsFrom,1009,0,0,0,1,0
DeleteEventsFrom,1010,0,0,0,1,0
DeleteEventsFrom,1011,0,0,0,1,0
DeleteEventsFrom,1012,0,0,0,1,0
DeleteEventsFrom,1013,0,0,0,1,0
DeleteEventsFrom,1014,0,0,0,1,0
DeleteEventsFrom,1015,0,0,0,1,0
DeleteEventsFrom,1016,0,0,0,1,0
DeleteEventsFrom,1017,0,0,0,1,0
DeleteEventsFrom,1018,0,0,0,1,0
DeleteEventsFrom,1019,0,0,0,1,0
DeleteEventsFrom,1020,0,0,0,1,0
DeleteEventsFrom,1021,0,0,0,1,0
DeleteEventsFrom,1022,0,0,0,1,0
DeleteEventsFrom,1023,0,0,0,1,0
DeleteEventsFrom,1024,0,0,0,1,0
DeleteEventsFrom,1025,0,0,0,1,0
DeleteEventsFrom,1026,0,0,0,1,0
DeleteEventsFrom,1027,0,0,0,1,0
DeleteEventsFrom,1028,0,0,0,1,0
DeleteEventsFrom,1029,0,0,0,1,0
ShowText,0,200,475,3,1,DEAD
ShowText,0,300,475,3,1,HP 0000
ShowText,0,450,475,3,1,CP 000
Trigger,0,2001,0,0,1,0
// POISON (POIS) - Small
#1008
ShowText,0,200,475,3,1,POIS
ShowText,0,300,475,3,1,HP 0001
// PURE - Big/Normal
#1009
ShowText,0,200,475,3,1,PURE
ShowText,0,300,475,3,1,HP 0002
// HASTY (HSTY) - Fire Flower
#1010
ShowText,0,200,475,3,1,HSTY
ShowText,0,300,475,3,1,HP 0003
// FLOATY (FLOT) - Leaf
#1011
ShowText,0,200,475,3,1,FLOT
ShowText,0,300,475,3,1,HP 0008
// STONED (STON) - Tanooki Suit
#1012
ShowText,0,200,475,3,1,STON
ShowText,0,300,475,3,1,HP 0013
// FURY - Hammer Suit
#1013
ShowText,0,200,475,3,1,FURY
ShowText,0,300,475,3,1,HP 0021
// CHILL (CHLL) - Ice Flower
#1014
ShowText,0,200,475,3,1,CHLL
ShowText,0,300,475,3,1,HP 0005
// Display the PC's CP:
// No Mount - No CP
#1015
ShowText,0,450,475,3,1,CP 000
// Boot - Look for type of boot (Kuribo's, Podobo's, Lakitu's)
// Currently assuming boot type does matter
#1016
OnPlayerMem,0x10A,1,0,1017,0,w
OnPlayerMem,0x10A,2,0,1018,0,w
OnPlayerMem,0x10A,3,0,1019,0,w
//ShowText,0,450,475,3,1,CP 020 - Failsafe
// Kuribo's Shoe
#1017
ShowText,0,450,475,3,1,CP 001
// Podobo's Shoe
#1018
ShowText,0,450,475,3,1,CP 020
// Lakitu's Shoe
#1019
ShowText,0,450,475,3,1,CP 070
// Clown Car - Squishy Wizard (MAX CP)
#1020
ShowText,0,450,475,3,1,CP 999
// Yoshi - Look for color of Yoshi (green, blue, yellow, red, black, purple,
// pink, ice)
// Currently assuming Yoshi color does matter
#1021
OnPlayerMem,0x10A,1,0,1022,0,w
OnPlayerMem,0x10A,2,0,1023,0,w
OnPlayerMem,0x10A,3,0,1024,0,w
OnPlayerMem,0x10A,4,0,1025,0,w
OnPlayerMem,0x10A,5,0,1026,0,w
OnPlayerMem,0x10A,6,0,1027,0,w
OnPlayerMem,0x10A,7,0,1028,0,w
OnPlayerMem,0x10A,8,0,1029,0,w
//ShowText,0,450,475,3,1,CP 100 - Failsafe
// Green Yoshi
#1022
ShowText,0,450,475,3,1,CP 003
// Blue Yoshi
#1023
ShowText,0,450,475,3,1,CP 100
// Yellow Yoshi
#1024
ShowText,0,450,475,3,1,CP 010
// Red Yoshi
#1025
ShowText,0,450,475,3,1,CP 005
// Black Yoshi
#1026
ShowText,0,450,475,3,1,CP 118
// Purple Yoshi
#1027
ShowText,0,450,475,3,1,CP 30
// Pink Eldritch Yoshi
#1028
ShowText,0,450,475,3,1,CP 616
// Ice Yoshi
#1029
ShowText,0,450,475,3,1,CP 050
// Display rest of Battle Pseudo-UI. If dead, remove Arrow from commands list.
// Alternatively, move arrow to ATTACK if at end of escape sequence.
#2000
ShowText,0,600,475,3,1,ATTACK
ShowText,0,600,500,3,1,COMPETENCE
ShowText,0,600,525,3,1,OBJECTS
ShowText,0,600,550,3,1,FLEE <
#2001
DeleteEventsFrom,2000,0,0,0,1,0
ShowText,0,600,475,3,1,ATTACK
ShowText,0,600,500,3,1,COMPETENCE
ShowText,0,600,525,3,1,OBJECTS
ShowText,0,600,550,3,1,FLEE
#2002
DeleteEventsFrom,2000,0,0,0,1,0
ShowText,0,600,475,3,1,ATTACK <
ShowText,0,600,500,3,1,COMPETENCE
ShowText,0,600,525,3,1,OBJECTS
ShowText,0,600,550,3,1,FLEE
#ENDJust some experimentation with the capabilities of LunaDLL for a level based on the game OFF. I'm planning on simulating the latter's battle screen UI to extend the homage.Kil wrote:Also what in god's name is going on here...
Code: Select all
// 0x+E2 w = Sprite GFX index // x011C = lakituCode: Select all
NPCMemSet,30,0xE2,127,0,0,wWow! It's a miracle! Thanks!Kil wrote:You pretty much just use NPCMemSet and memory offset 0xE2
to find any NPC with ID 30 and change it to 127Code: Select all
// 0x+E2 w = Sprite GFX index // x011C = lakitu
Code: Select all
NPCMemSet,30,0xE2,127,0,0,w
this is beautiful...Kil wrote:You pretty much just use NPCMemSet and memory offset 0xE2
to find any NPC with ID 30 and change it to 127Code: Select all
// 0x+E2 w = Sprite GFX index // x011C = lakitu
Code: Select all
NPCMemSet,30,0xE2,127,0,0,w