LunaDLL/LunaLUA help thread
- Willhart
- Stalker, Doxxer, and Sexual Harasser
- Banned
- Posts: 2434
- Joined: 13 years ago
- Location: Finland
Re: LunaDLL help thread
Is it possible to make a block act as a background? Rezised frendly npcs have a nasty tendency to despawn in certain situations, making them unideal for a background terrain in large levels. Blocks would work better for this if they had no collision.
Re: LunaDLL help thread
There's currently no way to modify blocks
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
I haven't tested this. It will either lower the warp timer or break the entire game
Change the 9s to get different warp times (maybe)
Code: Select all
#0
// If warp timer is greater than 9...
OnPlayerMem,348,9,2,1000,0,w
#1000
// Lower it
PlayerMemSet,348,9,0,0,1,w
#END
DON'T PM me. Ask your question in the help thread so everyone can be answered.
-
- All the DinnerSonics
- Posts: 80
- Joined: 11 years ago
- First name: Matthew
- Pronouns: he/him/his
- Location: United States
Re: LunaDLL help thread
Do you have any plans on future updates to LunaDLL, with new commands and the like? There are a few seemingly simple and intermediate features that I've found I wish were there, during those moments when I get caught up in all the things it otherwise can do.
The ability for ModParam to read values from global/player memory or variables would add a whole lot(IE setting an NPC to the X position of a player or setting a timer based on number of stars) I feel, as an example, or setting/modifying Layer position values directly along with the speed settings, but I won't go listing a bunch of random possibilities if it's essentially finished or you have your own plans.
The ability for ModParam to read values from global/player memory or variables would add a whole lot(IE setting an NPC to the X position of a player or setting a timer based on number of stars) I feel, as an example, or setting/modifying Layer position values directly along with the speed settings, but I won't go listing a bunch of random possibilities if it's essentially finished or you have your own plans.
Re: LunaDLL help thread
If anyone has good ideas for stuff to add I'll add it.
By the way, you can't set the position of a layer because there aren't actually layers. There's just a bunch of blocks with names in them like "default", so when layers move the game just sets the X and Y speed of all the blocks that are named "default". The only way to set the position of a layer would be to manually set the X and Y position of every block.
By the way, you can't set the position of a layer because there aren't actually layers. There's just a bunch of blocks with names in them like "default", so when layers move the game just sets the X and Y speed of all the blocks that are named "default". The only way to set the position of a layer would be to manually set the X and Y position of every block.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
-
- All the DinnerSonics
- Posts: 80
- Joined: 11 years ago
- First name: Matthew
- Pronouns: he/him/his
- Location: United States
Re: LunaDLL help thread
As I mentioned, then, I feel that some way to read values from memory/variables and use them for other commands(I assume as a feature of/alternative to ModParam would be easier to code than changing the way values work for everything) would open up a decent amount of possibilities.
I'd also like to see the ability to trigger things whenever a SMBX event is activated. Might make a few things easier to pull off, such as making block switches trigger a LunaDLL event.
Would it be possible to read NPC memory the same way you can global/player memory? Essentially a mix between IfNPC and OnPlayerMem. It might not be perfect as it would check every copy of an NPC, but it would be useful for checking certain values for boss NPCs, or if any of a certain NPC is at an X position lower than a certain value. Not as useful due to targeting every NPC, and I'm guessing a way to modify only a specific copy of an NPC would be a whole different ballgame.
What about the chances of a way to trigger events when the player dies and the level is exited? So you could run events to reset variables if both players die? In fact, can't variables be used(and reset upon hitting a goal) to make multiple midpoints? Can they be saved to the save data yet?
Lastly, sort of tying in to that, is there a way you could make a command to display a variable or memory value(player, global or NPC) on screen in the same way you can display timers?
I swear I had half a dozen more command ideas that seemed useful but actually plausible to make but I forgot them all.
As far as actual questions/help goes, I notice you can change the X and Y position and the section the player is in, but if you change all three they don't actually get put in the section correctly(as you can see if you use two player mode) being in some sort of partly there invisible frozen state. Any idea what the missing part of the puzzle here is for my attempt at a DIY anywhere warp?
I'd also like to see the ability to trigger things whenever a SMBX event is activated. Might make a few things easier to pull off, such as making block switches trigger a LunaDLL event.
Would it be possible to read NPC memory the same way you can global/player memory? Essentially a mix between IfNPC and OnPlayerMem. It might not be perfect as it would check every copy of an NPC, but it would be useful for checking certain values for boss NPCs, or if any of a certain NPC is at an X position lower than a certain value. Not as useful due to targeting every NPC, and I'm guessing a way to modify only a specific copy of an NPC would be a whole different ballgame.
What about the chances of a way to trigger events when the player dies and the level is exited? So you could run events to reset variables if both players die? In fact, can't variables be used(and reset upon hitting a goal) to make multiple midpoints? Can they be saved to the save data yet?
Lastly, sort of tying in to that, is there a way you could make a command to display a variable or memory value(player, global or NPC) on screen in the same way you can display timers?
I swear I had half a dozen more command ideas that seemed useful but actually plausible to make but I forgot them all.
As far as actual questions/help goes, I notice you can change the X and Y position and the section the player is in, but if you change all three they don't actually get put in the section correctly(as you can see if you use two player mode) being in some sort of partly there invisible frozen state. Any idea what the missing part of the puzzle here is for my attempt at a DIY anywhere warp?
Re: LunaDLL help thread
Using values from one thing and putting them into another is gonna be hard, if you use ModParam or any new command, because it's too hard to specify what you want to take and where you want it to go. ModParam already barely works with the identifier thing and is very limited because of it. I'm open to ideas on how to add a command like that.
Getting should be easy enough. There can be a GetVar command which gets the value and puts it in the variable bank with the others. But how can you specify where exactly it goes?
I would've added an SMBX event trigger but it's too hard to detect what an SMBX event is doing. I found the whole event data structure but the timers and states aren't in there.
Yep, IfNPC needs to be redone to be like the others. IfNPC is quite old and put in before I had better ideas. The problem is that it has to scan all the NPCs and can't target an individual one, making it of maybe questionable use. Also not much NPC memory is even understood.
The only problem with the show value thing (which is actually partially in the code already) is that it has to be done 3 times. One to show values for player memory, one for NPC memory, and one for global memory, and it's really annoying and honestly probably two people in the world will ever use it
You should be able to warp that way. There's probably like some master section variable in global memory stating which section player 1 is on. But I have no idea where it is right now. If you know how to use something like Cheat Engine you could scan memory and find the address of it. It should start with an 00B
Getting should be easy enough. There can be a GetVar command which gets the value and puts it in the variable bank with the others. But how can you specify where exactly it goes?
I would've added an SMBX event trigger but it's too hard to detect what an SMBX event is doing. I found the whole event data structure but the timers and states aren't in there.
Yep, IfNPC needs to be redone to be like the others. IfNPC is quite old and put in before I had better ideas. The problem is that it has to scan all the NPCs and can't target an individual one, making it of maybe questionable use. Also not much NPC memory is even understood.
The only problem with the show value thing (which is actually partially in the code already) is that it has to be done 3 times. One to show values for player memory, one for NPC memory, and one for global memory, and it's really annoying and honestly probably two people in the world will ever use it
You should be able to warp that way. There's probably like some master section variable in global memory stating which section player 1 is on. But I have no idea where it is right now. If you know how to use something like Cheat Engine you could scan memory and find the address of it. It should start with an 00B
DON'T PM me. Ask your question in the help thread so everyone can be answered.
- Mabel
- Just west of wierd
- Posts: 302
- Joined: 10 years ago
- https://marbels.talkhaus.com/
-
- All the DinnerSonics
- Posts: 80
- Joined: 11 years ago
- First name: Matthew
- Pronouns: he/him/his
- Location: United States
Re: LunaDLL help thread
How hard would it be to add another value to all the commands, used purely as an identifier the way the unused one gets used for some values? I realize without that, anything that requires the type of byte would fall apart, which includes several of the ideas I tried to toss at you.
Can LunaDLL be set to simply assume any values that weren't listed are 0 or null? I notice that many of the commands have a few 0s at the end for things they simply don't use, and while I figure it would allow more control over ModParam style commands, I know backwards compatibility would mess up if it failed when commands lacked this new extra identifier that could be stacked on top of commands that use strings already.
As for getting and directing a variable... well dang, this one would probably fall apart unless it used the theoretical second identifier string for something else, or even more for memory changes because you have to point out the type of value. Could there be some sort of database put into a LunaDLL.txt file that points out how you'd like to handle a memory value if it gets referenced without byte size details? When a command that requires it is used it would check them for the data size.
Does any of this make sense as a possibility?
As for the showing value thing, it could simply show only variables, and just let the player figure out how to set variables to whatever they'd want to show(Boss HP, number of rooms in a puzzle cleared) though I guess if most don't have a use for it it'd still be a bit of a waste. I think one use I had wanted it for was purely to debug values I was unsure of without re-finding them with Cheat Engine.
I'm not a programmer but I still use Multimedia Fusion 2 and the like, so I'm probably thinking on this DLL in too much of a coding sense with all this wishing to copy from/to stuff. I can't even remember WHY I wanted some of these, just that I did once.
The warp thing works perfectly, it just turns out that I forgot Section 1 is actually Section 0 in the memory and so on. That, and I had it constantly triggering, so even when the player was sort of there in a way they were frozen in place.
EDIT: Speaking of Cheat Engine, I had found the location of Player 2's data after Player 1's(at least where it was stored for the current playsession), and I tried to force the player memory modifier to change Player 2's by just adding the difference, but it didn't seem to work. Is there some safety thing keeping me from going beyond Player 1's memory? I was hoping to try and grab Player 2 and stick them where Player 1 is if they're not at a goal so the auto-goal movements I have set up in a level don't have Player 2 wander into a random enemy.
Can LunaDLL be set to simply assume any values that weren't listed are 0 or null? I notice that many of the commands have a few 0s at the end for things they simply don't use, and while I figure it would allow more control over ModParam style commands, I know backwards compatibility would mess up if it failed when commands lacked this new extra identifier that could be stacked on top of commands that use strings already.
As for getting and directing a variable... well dang, this one would probably fall apart unless it used the theoretical second identifier string for something else, or even more for memory changes because you have to point out the type of value. Could there be some sort of database put into a LunaDLL.txt file that points out how you'd like to handle a memory value if it gets referenced without byte size details? When a command that requires it is used it would check them for the data size.
As for the showing value thing, it could simply show only variables, and just let the player figure out how to set variables to whatever they'd want to show(Boss HP, number of rooms in a puzzle cleared) though I guess if most don't have a use for it it'd still be a bit of a waste. I think one use I had wanted it for was purely to debug values I was unsure of without re-finding them with Cheat Engine.
I'm not a programmer but I still use Multimedia Fusion 2 and the like, so I'm probably thinking on this DLL in too much of a coding sense with all this wishing to copy from/to stuff. I can't even remember WHY I wanted some of these, just that I did once.
The warp thing works perfectly, it just turns out that I forgot Section 1 is actually Section 0 in the memory and so on. That, and I had it constantly triggering, so even when the player was sort of there in a way they were frozen in place.
EDIT: Speaking of Cheat Engine, I had found the location of Player 2's data after Player 1's(at least where it was stored for the current playsession), and I tried to force the player memory modifier to change Player 2's by just adding the difference, but it didn't seem to work. Is there some safety thing keeping me from going beyond Player 1's memory? I was hoping to try and grab Player 2 and stick them where Player 1 is if they're not at a goal so the auto-goal movements I have set up in a level don't have Player 2 wander into a random enemy.
Re: LunaDLL help thread
There is a safety thing, or that would've worked. Maybe I'll just get rid of it.
I was thinking the same thing about the 7th identifier parameter, but it won't work at the end. It might actually work best at the beginning
I was thinking the same thing about the 7th identifier parameter, but it won't work at the end. It might actually work best at the beginning
Code: Select all
// Get coin amount and put it into variable named REFCOINS
$REFCOINS,GetVar,0x00B2C5A8,0,0,0,0,1,w
// You can use SetVar to manipulate the value further if you want here
// Assign REFCOINS into the p switch timer memory
$REFCOINS,MemAssign,0x00B2C8B4,0,0,0,1,w
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
You know the "play xxx.mp3" command? Does that overwrite the current level music, or just add to it? I was thinking that a skull switch, a timer code upon death, and a music play would make a great Wario Land 4 type thing, so I was wondering.
Re: LunaDLL help thread
Currently the only way to play custom music is by section. So if your section 20 and 21 is empty, you can set those to xxx.mp3 and then use PlayMusic to play the music from section 21 or 20, or whatever. The only limit is obviously 21 musics per level.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Thanks for reminding me! That's a pretty clever way to have multiple musics.
About ideas for adding stuff, would there be a way to implement multiple checkpoints?
And I got an idea: how about an applet that "walks you through" making codes, similar to LuigiFan2010's NPC code maker on supermariobrosx.org forums? Like for SetHits
"Section?"
"NPC number?" (Have a list of applicable NPCs)
"Hits?" (With an explanation of the hits system, and maybe tables for how many hits specific NPCs have)
PlayMusic
"File name?"
"Section you're taking the music from?"
I know Darkchao tried to make one, but it was never completed.
Also I'd like to remind you this, maybe add it to future tutorial, that Ludwig has 15 hits to death by default, and that a fireball is one hit, and a stomp is 5. (Yeah I'm that FanofSMBX guy)
About ideas for adding stuff, would there be a way to implement multiple checkpoints?
And I got an idea: how about an applet that "walks you through" making codes, similar to LuigiFan2010's NPC code maker on supermariobrosx.org forums? Like for SetHits
"Section?"
"NPC number?" (Have a list of applicable NPCs)
"Hits?" (With an explanation of the hits system, and maybe tables for how many hits specific NPCs have)
PlayMusic
"File name?"
"Section you're taking the music from?"
I know Darkchao tried to make one, but it was never completed.
Also I'd like to remind you this, maybe add it to future tutorial, that Ludwig has 15 hits to death by default, and that a fireball is one hit, and a stomp is 5. (Yeah I'm that FanofSMBX guy)
Re: LunaDLL help thread
Well that explains a lot.
I'm thinking about making a code creator eventually, because there's too much stuff to remember. If I wanted to make a Timer command right now I couldn't tell you how. I'd have to look it up. But I don't really want to right now because all the work on LunaDLL is going to end up wasted if those russian guys finish their engine.
You can currently make your own multiple checkpoints but it's a bit complicated and there's multiple ways to do it. You could use like, TriggerZone which activates an event when you step in it. That event can use Setvar to set a variable like "MyCheckpoint1" to 1. Then at the first room in your level you can have an IfVar thing which checks to see if "MyCheckpoint1" is set to 1. If it is, that means the player has activated your extra midpoint and you can manually set the player's position to somewhere later in your level. Yeah, it's hard. Personally I'll just continue to use luna tower midpoints because that's too much work.
I'm thinking about making a code creator eventually, because there's too much stuff to remember. If I wanted to make a Timer command right now I couldn't tell you how. I'd have to look it up. But I don't really want to right now because all the work on LunaDLL is going to end up wasted if those russian guys finish their engine.
You can currently make your own multiple checkpoints but it's a bit complicated and there's multiple ways to do it. You could use like, TriggerZone which activates an event when you step in it. That event can use Setvar to set a variable like "MyCheckpoint1" to 1. Then at the first room in your level you can have an IfVar thing which checks to see if "MyCheckpoint1" is set to 1. If it is, that means the player has activated your extra midpoint and you can manually set the player's position to somewhere later in your level. Yeah, it's hard. Personally I'll just continue to use luna tower midpoints because that's too much work.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Oh! Speaking of sections, may I suggest a command that applies a section ID to either star npc? As in, you have two stars in the same section, but one secretly is the Section 21 star in the game data/save file?
Re: LunaDLL help thread
Not really sure if that's possible at all, but I'll look into it. Maybe.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Hi! When i start Luna Dll. It does not work. Can someone tell me step by step how to start it and use the timer? When i start Luna dll it also gives an error.
Re: LunaDLL help thread
you probably need to install this http://www.microsoft.com/en-us/download ... px?id=5555
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
I already have the newest version.
Re: LunaDLL help thread
I'm pretty sure it is working. I sent him a lunadll code, and he said it worked.
If you type toggledemocounter does it change anything in the game?
If you type toggledemocounter does it change anything in the game?
Re: LunaDLL help thread
Wait! I did not type that! Where do i need to type that to be honest?
Re: LunaDLL help thread
Anywhere in a level, just like a cheat.LukasSMBX wrote:Wait! I did not type that! Where do i need to type that to be honest?
Also, Kil: if I show a boss on a layer (I'm doing a Yoshi's Island type deal where a POW Block "magic" kills an enemy, which shows the boss), do HP modifying codes not work? I'm trying it on Larry, maybe it jus doesn't work on him?
Re: LunaDLL help thread
Where do i need do type thinks like cheats. Is there a cheat window? Or can i type it in chat?
Re: LunaDLL help thread
Just anywhere in a level. There's no window. Just type them.LukasSMBX wrote:Where do i need do type thinks like cheats. Is there a cheat window? Or can i type it in chat?
Re: LunaDLL help thread
Nope noding helped. I tryd it with a p switch type it in events. Everywhere! And nothing changed!