And, said Sound Effect: http://www.mediafire.com/listen/onfiavc ... icking.wavSAJewers wrote:the P-switch thingy in ASMT was an ASM patch that replaced the P-switch music with a ticking sound effect that played over the level music. Here's an example from raocow's ASMT LP, or a TAS of that level if you don't want commentary. I can easily grab that sound effect.Rednaxela wrote:1) I've given it a try disabling the pause menu but no real luck thus far. I'll look further into it some time. Worst case, I'll have to modify LunaDLL to add some extra functionality for control of allowing/disallowing pausing, since my initial attempt of blocking the control input failed.SAJewers wrote:Is there a way to fix "A World 1 Level" From Episode 1 by disallowing the player from entering the pause menu?
2) How does disallowing the player from entering the pause menu help "A World 1 Level" from Ep 1? I don't recall that level or what's wrong with it.
I'm unaware of what was done in ASMT/A2MT for no P-Switch music (was it just have no music file or a silent music file?), but any reason the same can't be done?SAJewers wrote:EDIT: Also, Is it possible to have no P-Switch music, like in ASMT/A2MT?
I'm now however thinking that in the next few days I may look into adding a "p-switch settings" thing to LunaLua, so various things about p-switches could be set from Lua, which would be via the lunaworld.lua file for making something episode-wide. Might think about making it so in addition to silent or not, maybe allowing the duration to be changed by Lua code (not super relevant to A2XT stuff at the episode level but maybe some level creators would find it handy)
EDIT: If it's any use to you, here's the ASMT resources pack, which includes the ASM patch for the ticking p-switch (\patches\ticking.asm)
As for "A World 1 Level", the main part the level uses events that sync up with the music. Pausing the game causes the events to stop until you unpause, which causes the music and the events to desync.
LunaDLL/LunaLUA help thread
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
- Rednaxela
- Maker of Shenanigans
- Posts: 897
- Joined: 9 years ago
- Pronouns: they/them
- https://rednaxela.talkhaus.com
Re: LunaDLL/LunLUA help thread
Sounds good. I've found the parts of the SMBX ASM that I need to add hooks to, and within the next week I expect to have things set up so that some Lua code placed in lunaworld.lua can apply such a modified p-switch behavior with that sound effect and leaving the music running.SAJewers wrote:And, said Sound Effect: http://www.mediafire.com/listen/onfiavc ... icking.wav
Re: LunaDLL/LunLUA help thread
I have a question for you LunaLua guys. I've been rewatching Super Talking Time Bros. 2 recently and yesterday got to this episode which features a level with screen wrap where raocow ends up getting hit in a really cheap way by a rex wrapping around that he couldn't have possibly seen coming. My question is this: How feasible would it be using LunaLua to make it so instead of wrapping around the way it does the camera just kept scrolling around so it was completely seamless? I'd assume this would be fairly difficult, if even possible, but it seems like it could actually make for some interesting level construction so I thought I'd ask.
Re: LunaDLL/LunLUA help thread
The way I'd do it is have a copy of the first screen's worth of level at the end, and when you pass the centre of that screen, set the player's X coordinate to the respective position on the left. The downside to this is of course that enemies won't carry over in the wrap, but other than using the same trick for them, there's not much you can do about that.Alice wrote:I have a question for you LunaLua guys. I've been rewatching Super Talking Time Bros. 2 recently and yesterday got to this episode which features a level with screen wrap where raocow ends up getting hit in a really cheap way by a rex wrapping around that he couldn't have possibly seen coming. My question is this: How feasible would it be using LunaLua to make it so instead of wrapping around the way it does the camera just kept scrolling around so it was completely seamless? I'd assume this would be fairly difficult, if even possible, but it seems like it could actually make for some interesting level construction so I thought I'd ask.





- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
I'm looking at the Audio function stuff.
I got a music partially working, but it looks like Audio.MusicTitleTag only grabs the Track name, and not the Artist Name of Album title. Is there something for those values, or is that not implemented?
EDIT: Also, how to I replicate Autocode's "print string for only a certain amount of time"? Would that be just setting a var, use an eventu timer to change that var, then use an if/then to display the text if var == true?
EDIT2: Second Question:
While that does kick me out of the level, back to the OW, the OW pause menu shows up. Is there a way for that not to happen. I figure using Global Memory to set 0x00B250E2 might work, but I can't figure out the syntax.[/s]NVM FIGURED IT OUT
EDIT3:This works, but the OW stays black, and the level continues until I either let go of select first, or press another button. An ideas?
I got a music partially working, but it looks like Audio.MusicTitleTag only grabs the Track name, and not the Artist Name of Album title. Is there something for those values, or is that not implemented?
EDIT: Also, how to I replicate Autocode's "print string for only a certain amount of time"? Would that be just setting a var, use an eventu timer to change that var, then use an if/then to display the text if var == true?
EDIT2: Second Question:
Code: Select all
function onInputUpdate()
if (player.pauseKeyPressing and player.dropItemKeyPressing) then
player.pauseKeyPressing = false
player.dropItemKeyPressing = false
Level.exit()
end
endEDIT3:
Code: Select all
function onInputUpdate()
if (player.dropItemKeyPressing and player.pauseKeyPressing) then
Level.exit()
mem(0x00B250E2,FIELD_FLOAT,0)
player.dropItemKeyPressing = false
player.pauseKeyPressing = false
end
if (player.pauseKeyPressing) then
Text.print("RUN2",60,400)
end
if (player.dropItemKeyPressing) then
Text.print("SELECT",80,400)
end
end- Wohlstand
- Moondust and TheXTech developer
- Posts: 186
- Joined: 9 years ago
- First name: Vitaly
- Pronouns: he/him/his
- Location: Moscow, Russia
Re: LunaDLL/LunLUA help thread
I though to implement artist/album title printing too, but we with Kevin are though than it is not so important. But I'l implement that on "SDL mixer X" side.SAJewers wrote: I got a music partially working, but it looks like Audio.MusicTitleTag only grabs the Track name, and not the Artist Name of Album title. Is there something for those values, or is that not implemented?
P.S> Yea, we with Kevin are calling forked version of SDL2_mixer as "SDL Mixer X" which has different functional set and additional API additions.
Sources are here:
https://github.com/Wohlhabend-Networks/ ... r_modified
to build it, you need a qmake (you need to install Qt 5 and MinGW)
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
Ah, ok. Yeah, it's probably only useful for A2Xt, so I can understand why.
Still looking for help on this one.SAJewers wrote:
EDIT3:This works, but the OW stays black, and the level continues until I either let go of select first, or press another button. An ideas?Code: Select all
function onInputUpdate() if (player.dropItemKeyPressing and player.pauseKeyPressing) then Level.exit() mem(0x00B250E2,FIELD_FLOAT,0) player.dropItemKeyPressing = false player.pauseKeyPressing = false end if (player.pauseKeyPressing) then Text.print("RUN2",60,400) end if (player.dropItemKeyPressing) then Text.print("SELECT",80,400) end end
- WestonSmith
- Bunny
- Posts: 186
- Joined: 9 years ago
Re: LunaDLL/LunLUA help thread
I understand most of it, but what in the dickens does the magic bar represent?
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
I think that seals the fact that we should have a "crazy gimmick levels" world with that, My Shooter level that I need to work on (preferably with help), Willhart's Demo's Fluffy Dream level...
Re: LunaDLL/LunLUA help thread
Magic bar has two purposes. It shows you how much fairy you have left, and how much statue you have left, depending on which one you're using.WestonSmith wrote:I understand most of it, but what in the dickens does the magic bar represent?





- WestonSmith
- Bunny
- Posts: 186
- Joined: 9 years ago
Re: LunaDLL/LunLUA help thread
Alternative thoughts;SAJewers wrote:I think that seals the fact that we should have a "crazy gimmick levels" world with that, My Shooter level that I need to work on (preferably with help), Willhart's Demo's Fluffy Dream level...
(1) A secret gimmick level per world that has zero bearing on plot or world theme
(2) A gimmick level per world that thematically matches and is either the last or pre-last level of each world
(3) Or, yeah, just a total gimmick world
Also, a visual representation of fairy form would be super neat. Nice touch.
-
WasabiJellyfish
- Posts: 117
- Joined: 7 years ago
Re: LunaDLL/LunLUA help thread
*cough* I may have been messing with some of your base code for that to make it smoother *cough*SAJewers wrote:My Shooter level that I need to work on (preferably with help)
What exactly do you want it to be, stylewise?
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
- romajiQuadhash
- typos "raocow" as "roacow" (and I TAS)
- Posts: 12
- Joined: 8 years ago
- First name: Romaji Quadhash
- Pronouns: ke/keh/ker
- Location: ""Canada""
Re: LunaDLL/LunLUA help thread
OrWestonSmith wrote:Alternative thoughts;SAJewers wrote:I think that seals the fact that we should have a "crazy gimmick levels" world with that, My Shooter level that I need to work on (preferably with help), Willhart's Demo's Fluffy Dream level...
(1) A secret gimmick level per world that has zero bearing on plot or world theme
(2) A gimmick level per world that thematically matches and is either the last or pre-last level of each world
(3) Or, yeah, just a total gimmick world
Also, a visual representation of fairy form would be super neat. Nice touch.
(4) Gimmick levels are randomly thrown in, and with an intro added to "make them fit in"
This is a sig
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
Am I right in saying that there''s currently no way to grab leek information from a save?
I'm talking like the "0/1" indicator or whatever in a HUB. There's no way currently to grab that info and put it in a variable, correct?
I'm talking like the "0/1" indicator or whatever in a HUB. There's no way currently to grab that info and put it in a variable, correct?
Re: LunaDLL/LunLUA help thread
What version of smbx makes it so it can play the .ogg music files?
also, how do I spawn an NPC with velocity?
also, how do I spawn an NPC with velocity?
Last edited by 7NameSam 7 years ago, edited 1 time in total.
- Voltgloss
- Ask, and you shall be given. Think, and you shall find.
- Posts: 1146
- Joined: 9 years ago
- Pronouns: he/him/his
- Location: exploring the world, now with friends
Re: LunaDLL/LunLUA help thread
Kitikami's Touhou level would fit here as well.SAJewers wrote:I think that seals the fact that we should have a "crazy gimmick levels" world with that, My Shooter level that I need to work on (preferably with help), Willhart's Demo's Fluffy Dream level...



Re: LunaDLL/LunaLUA help thread
I fixed a typo in the title. I think luna devs like kevsoft should get mod status of this board so they can do maintenance stuff.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
- Rednaxela
- Maker of Shenanigans
- Posts: 897
- Joined: 9 years ago
- Pronouns: they/them
- https://rednaxela.talkhaus.com
Re: LunaDLL/LunLUA help thread
So far as I'm aware anyway, the way of doing this is not currently known no.SAJewers wrote:Am I right in saying that there''s currently no way to grab leek information from a save?
I'm talking like the "0/1" indicator or whatever in a HUB. There's no way currently to grab that info and put it in a variable, correct?
Any version with a LunaDLL/LunaLua version from 2015 should allow .oog music files to work :)7NameSam wrote:What version of smbx makes it so it can play the .ogg music files?
also, how do I spawn an NPC with velocity?
To spawn an NPC with velocity, something like this example:
Code: Select all
-- Spawn a goomba 70px above the player
local myNewNPC = NPC.spawn(1, player.x, player.y - 70, player.section)
-- Give the newly spawned NPC a velocity such that it is traveling upwards when spawned
myNewNPC.speedY = -10
- Wohlstand
- Moondust and TheXTech developer
- Posts: 186
- Joined: 9 years ago
- First name: Vitaly
- Pronouns: he/him/his
- Location: Moscow, Russia
Re: LunaDLL/LunaLUA help thread
Also, links at main post are super-legacy (gamearcheology host is dead), therefore I have collected stuff at me:Kil wrote:I fixed a typo in the title. I think luna devs like kevsoft should get mod status of this board so they can do maintenance stuff.
http://engine.wohlnet.ru/docs/Collected ... unaDLL.htm
and
http://engine.wohlnet.ru/docs/Collected ... torial.txt
however it legacy now. So, modern stuff is here: http://engine.wohlnet.ru/pgewiki/Category:LunaLua_API
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
Aww. Oh well.Rednaxela wrote:So far as I'm aware anyway, the way of doing this is not currently known no.SAJewers wrote:Am I right in saying that there''s currently no way to grab leek information from a save?
I'm talking like the "0/1" indicator or whatever in a HUB. There's no way currently to grab that info and put it in a variable, correct?
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 3920
- Joined: 10 years ago
- Location: Nova Scotia
Re: LunaDLL/LunLUA help thread
Still getting this issue. Any ideas? Try it in A2XT Ep1 as a lunaworld.lua if you want to see it.SAJewers wrote:
EDIT3:This works, but I get a blank overworld frame, and the level music continues until I either let go of select first, or press another button. An ideas?Code: Select all
function onInputUpdate() if (player.dropItemKeyPressing and player.pauseKeyPressing) then Level.exit() mem(0x00B250E2,FIELD_FLOAT,0) player.dropItemKeyPressing = false player.pauseKeyPressing = false end if (player.pauseKeyPressing) then Text.print("RUN2",60,400) end if (player.dropItemKeyPressing) then Text.print("SELECT",80,400) end end
Re: LunaDLL/LunaLUA help thread
I have a question about npc index.
I am checking if Mario stands on an NPC using the offset 0x176 which returns the "Index of sprite being stood on".
So, if I have 3 NPCs, it returns a number from 1 to 3.
I wrapped specific NPCs of the player's current section into pNPCs (because I need to keep track of states over multiple ticks).
So, I wonder, how do I check which pNPC this index number corresponds to?
Is this the same as the pNPC's "uid"?
That seemed to work in my limited testing with 3 NPCs in a single section. (but I don't know if that would work if I manually spawned new npcs, or used findnpcs again for a different section.
I am checking if Mario stands on an NPC using the offset 0x176 which returns the "Index of sprite being stood on".
So, if I have 3 NPCs, it returns a number from 1 to 3.
I wrapped specific NPCs of the player's current section into pNPCs (because I need to keep track of states over multiple ticks).
So, I wonder, how do I check which pNPC this index number corresponds to?
Is this the same as the pNPC's "uid"?
That seemed to work in my limited testing with 3 NPCs in a single section. (but I don't know if that would work if I manually spawned new npcs, or used findnpcs again for a different section.






