LunaLua Offical Thread - SMBX Usermod Framework

This is the place for discussion and support for LunaLua and related modifications and libraries.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?

Shall I steam some LunaLua live development?

Yes
194
92%
No
17
8%
 
Total votes: 211
User avatar
Quantix
Ripper II
Ripper II
Posts: 325
Joined: Tue Jan 26, 2016 5:04 pm
Location: Yes

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Quantix » Fri Jun 03, 2016 8:19 am

Wohlstand wrote:Nice dragon (or who is this creature?)?
One of the new legendaries from Pokemon Sun & Moon. It's a bat.
viewtopic.php?f=69&p=286856#p286855

Generic Quote Collection:
Spoiler: show
Skant wrote:The egg will fuck you if you don't catch it
rockythechao wrote:f6 is an over-the-counter generic run-of-the-mill store-brand bootleg knockoff f5
some people wrote:The021stYoshiFromThe021stCentury: Who would win, a tophat wearing a tophat, or hoeloe wearing hoeloe?
Hoeloe: yes
glitch4: f6
rockythecomet: that's a trick question
rockythecomet: a top hat wearing a hoeloe
Waffles & Stuff (timocomlita) wrote:No matter what you do, it's impossible to get rid of the impossible.
Petrifying wrote:Piss off with your sex doll SMBX 2.0
Enjl wrote:it puts a twist on classic 4 step level design which i like to call "2 and a half steps backwards design"

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1619
Joined: Tue Feb 11, 2014 4:44 pm
Current Project: Moondust (PGE Project)
Location: Moscow, Russia
Chat Username: Wohlstand
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Wohlstand » Fri Jun 03, 2016 8:23 am

Quantix wrote:
Wohlstand wrote:Nice dragon (or who is this creature?)?
One of the new legendaries from Pokemon Sun & Moon. It's a bat.
Okay, Enjl told me that in chat too, so, I remembered that ;-)
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!
LunaLua
LunaLUA - is a LUA scripting add-on for a LunaDLL

My Media:
My MIDI-music
Pure HQ Music Pack for SMBX
Pure HQ Sound Pack for SMBX
SMBX OPL Sound pack (Created with Yamaha OPL chip and MIDI files)
SMBX38A is here
SMBX-38A download, help and support HERE (SMBX-38A (a.k.a. 1.4.x) - is Chinese unofficial continuation of SMBX)

I'm support:
Image
Image
Image


Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

User avatar
Hoeloe
Ninji
Ninji
Posts: 809
Joined: Sat Oct 03, 2015 6:18 pm
Current Project: A2XT Episode 2

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Hoeloe » Fri Jun 03, 2016 2:40 pm

Wohlstand wrote:
Quantix wrote:
Wohlstand wrote:Nice dragon (or who is this creature?)?
One of the new legendaries from Pokemon Sun & Moon. It's a bat.
Okay, Enjl told me that in chat too, so, I remembered that ;-)
The reason it's come up is that the English name of that Pokemon is "Lunala", which you can see bears a striking resemblance to "LunaLua".

User avatar
Quantumenace
Pokey
Pokey
Posts: 235
Joined: Mon Dec 28, 2015 2:17 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Quantumenace » Sat Jun 04, 2016 8:40 pm

I was able to find the array of block frame values. I haven't tested it with many block types yet, but it looks like you can force non-animated blocks to animate by changing the frame index value for that block type.

Code: Select all

	blockframepointer=mem(0xB2BEA0,FIELD_DWORD)
	blockid = 1
	blockframe = mem(blockframepointer+(blockid-1)*2,FIELD_WORD)
	mem(blockframepointer+(blockid-1)*2,FIELD_WORD,(blockframe+1)%4)
For example, running that with onCameraUpdate makes block type 1 flash through a 4-frame image very quickly (it just flickers if you don't give it a 4-frame image). Giving it a loop with a frame speed of your choice would be easy.

User avatar
ivanmegafanboy
Hoopster
Hoopster
Posts: 168
Joined: Wed Aug 12, 2015 11:47 am
Current Project: Making levels casually. And University. And 1cc this thing called Touhou.
Location: Old Odyssey; Floralia

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby ivanmegafanboy » Tue Jun 14, 2016 10:42 am

What is the difference between these both "target base game" choices and which should I download? :
-SMBX 1.3.0.2 hexed
-SMBX 1.3.0.2 vanilla+launcher
I chosed the vanilla one, but it didn't work. Probably because I don't know how to properly install it. The SMBX version I have is the one that you can download in the front page of this site: the 1.3.1.0 version
By the way, does LunaLua support the lunadll.txt files? Because that is the only "luna" thing I know how to use. I know it's deprecated, but it is simple enough for me to semi-comprehend.
And also, what are those things called source codes, as a casual SMBX user should I download them?

Thanks a lot for your kindness and keep with the good work :)
I like editing levels
Check them out at: viewtopic.php?f=89&t=16926
Spoiler: show
Image
I support
Image
Also The Great Castle Adventure Remake
Spoiler: show
Image

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2830
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Location: http://www.stardustfields.net/files/cool.gif
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Tue Jun 14, 2016 10:26 pm

I would try the hexed version, but make a backup of your current smbx.exe in case the new one gets deleted. If it is deleted, put back your old smbx.exe and try the vanilla + launcher version. To install you just extract the files and drop them in your SMBX root (the folder with worlds, graphics, music, smbx.exe, etc.). LunaLua does kinda support the lunadll.txt files, though I've had minor issues with them in the past. You're way better off learning Lua, because it's much more powerful, easier to use, less complicated, not depreciated, and also actually used by some professional companies (and very similar to others), so you can actually make money in the future with Lua. Finally, source code is the raw, uncompiled data of LunaLua and can't be used unless you compile it. As a casual user you definitely don't need it, and even more serious users don't need it unless theywant to add some function to LunaLua and somewhat know how to.
Image

I'm on Soundcloud | My graphics pack!

Jesus is my savior.

User avatar
ivanmegafanboy
Hoopster
Hoopster
Posts: 168
Joined: Wed Aug 12, 2015 11:47 am
Current Project: Making levels casually. And University. And 1cc this thing called Touhou.
Location: Old Odyssey; Floralia

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby ivanmegafanboy » Sat Jun 18, 2016 3:46 am

HenryRichard wrote:I would try the hexed version, but make a backup of your current smbx.exe in case the new one gets deleted. If it is deleted, put back your old smbx.exe and try the vanilla + launcher version. To install you just extract the files and drop them in your SMBX root (the folder with worlds, graphics, music, smbx.exe, etc.). LunaLua does kinda support the lunadll.txt files, though I've had minor issues with them in the past. You're way better off learning Lua, because it's much more powerful, easier to use, less complicated, not depreciated, and also actually used by some professional companies (and very similar to others), so you can actually make money in the future with Lua. Finally, source code is the raw, uncompiled data of LunaLua and can't be used unless you compile it. As a casual user you definitely don't need it, and even more serious users don't need it unless theywant to add some function to LunaLua and somewhat know how to.
Thanks a lot for your help, and also for the information:
1.- I better tried to download the hexed version with the complete game, so now i have two SMBX :)
2.- I don't think I will have the time and patience to learn some LUA, I don't even study programming or something related to computers :/ Just one question: how do you make a Lua file? Wich program do you use to create that type of file?
3.- Ok, so I better not care about the source code, thanks again, and have a nice day. :D
I like editing levels
Check them out at: viewtopic.php?f=89&t=16926
Spoiler: show
Image
I support
Image
Also The Great Castle Adventure Remake
Spoiler: show
Image

User avatar
PixelPest
Edward
Edward
Posts: 6780
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Location: Canada, Eh?
Chat Username: PixelPest
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby PixelPest » Sat Jun 18, 2016 2:09 pm

ivanmegafanboy wrote:
Create a text file --> Right click (not on the file though) --> Select "Show File Extensions" (may be in Settings, Details, Properties, or on the immediate menu) --> Right click on your text file --> Select "Rename" --> Change .txt to .lua --> Open with Notepad, Notepad++, or a similar program to modify.

User avatar
HVMetal
Pokey
Pokey
Posts: 234
Joined: Tue Dec 29, 2015 9:44 am
Current Project: SMBX: The Mushroom Island

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HVMetal » Mon Jun 27, 2016 6:47 am

My LunaLua is not working for some reason. It says that MSVCP140.dll can't be found and to re-install the whole thing but I get the same error all over the time even after the re-instalation.

S1eth
Spiny
Spiny
Posts: 54
Joined: Sat Apr 23, 2016 10:44 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby S1eth » Mon Jun 27, 2016 6:51 am

HVMetal wrote:My LunaLua is not working for some reason. It says that MSVCP140.dll can't be found and to re-install the whole thing but I get the same error all over the time even after the re-instalation.
Try executing vcredist_x86.exe in your SMBX directory.

User avatar
HVMetal
Pokey
Pokey
Posts: 234
Joined: Tue Dec 29, 2015 9:44 am
Current Project: SMBX: The Mushroom Island

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HVMetal » Mon Jun 27, 2016 6:54 am

S1eth wrote:
HVMetal wrote:My LunaLua is not working for some reason. It says that MSVCP140.dll can't be found and to re-install the whole thing but I get the same error all over the time even after the re-instalation.
Try executing vcredist_x86.exe in your SMBX directory.
Thank you, now its working fine.

Edit: Actually, its pretty much acting like the normal SMBX engine, it doesnt loads anything special, .ogg formats are not working. I have no idea whats wrong now.

User avatar
Mari0no1
Bob-omb
Bob-omb
Posts: 30
Joined: Sat Feb 20, 2016 5:20 pm
Current Project: Super Mario The Newer Adventure
Location: Canada/Quebec
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Mari0no1 » Tue Jun 28, 2016 4:47 pm

Violince wrote:Greetings guys. I have been lurking on these forums for a couple weeks now and the time has come to reveal myself (this shall be my introduction as well I guess). I need technical help. I am working on a post process graphic injector to give a new modern look to SMBX with the use of HQ4X and some other SweetFX shaders. Below is a PREVIEW of what I am working on. It is not done yet and I have only worked on it remotely from work, so tweaking and finalizing the settings will go later. However, it gives a good idea of what is possible.

Now, on the technical side of things, this graphic mod will ABSOLUTELY require LunaLua executable, as I need an opengl render to inject the effect into the game and the original EXE is ActiveX. That's not an issue. The issue I have is that LunaLua forces 4/3 rendering and put black bars instead of stretching the image. I completely understand why this can be appealing for a more authentic experience, but the goal of my mod is to give a more HD design, and a stretched 16/9 image would more adequately fit my vision of what this mod should be.

TLDR ; Is there ANY way I can force 16/9 stretching by using LunaLua exectuable? I searched in the files, but couldn't find anything. Maybe a little help from the devs on this, as I believe the idea of my mod would most likely appeal to some people? :D

Thanks guys! Let's keep the PC Mario editing world alive!

Image
You have SMBX Redrawn ? download link please
My Youtube chanel

Sorry for my bad english I am french

ImageImage

Support Project
Spoiler: show
Image
Image
Support GFX's Pack
Spoiler: show
ImageImage

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2876
Joined: Sat Dec 21, 2013 7:23 am
Current Project: RL
Location: Ukraine (Украина)
Chat Username: h/a troll

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby h2643 » Tue Jun 28, 2016 5:39 pm

Mari0no1 wrote:You have SMBX Redrawn ? download link please
http://www.supermariobrosx.org/forums/v ... 20#p225120
the link was posted in that thread I LINKED endless times, if not more.

Wait, why is this in this thread... whatever...

Super Mario Math
Cheep-Cheep
Cheep-Cheep
Posts: 13
Joined: Sat Jul 25, 2015 6:17 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Super Mario Math » Mon Jul 11, 2016 5:36 pm

There's a bug with the onKeyDown() event. It get's delayed one frame.

mainV2.lua
Debug text location 1

Code: Select all

function EventManager.callEvent(name, ...)
	if name ~= "onKeyboardPress" and name ~= "onKeyboardPressDirect" then
		Text.windowDebug(name)
	end
   local mainName, childName = unpack(name:split("."))
   if(mainName == nil or childName == nil)then
       mainName, childName = unpack(name:split(":"))
   end
   ...
Debug text location 2

Code: Select all

function EventManager.doQueue()
    while(#EventManager.queuedEvents > 0)do
        local nextQueuedEvent = table.remove(EventManager.queuedEvents)
        EventManager.callEvent(nextQueuedEvent.eventName, unpack(nextQueuedEvent.parameters))
    end
    
    if(not isOverworld)then
		Text.windowDebug("classic events")
        __ClassicEvents.doEvents()
    end
end
When printing the events in order (on a frame after the loading one), the events are:
onLoop
classic events (the one that calls onKeyDown())
onLoopSection#
onInputUpdate
onTick
onTickEnd
onDraw
onCameraUpdate
onHUDDraw
onDrawEnd

The game does not register the press of the jump button until onInputUpdate, so when LunaLua checks if the jump button has been pressed, it gets wrong information, but it does read the jump button on the next frame.
This causes my walljump.lua code to cause the player to wall jump if he presses jump while hugging a wall and standing on ground, which is definitely not supposed to happen.
Image
Progress: 19/256

User avatar
Hoeloe
Ninji
Ninji
Posts: 809
Joined: Sat Oct 03, 2015 6:18 pm
Current Project: A2XT Episode 2

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Hoeloe » Mon Jul 11, 2016 9:17 pm

I believe that is known, but fixing it would break basically everything that has used onKeyDown up until this point. Changing the location of an event call can have huge implications.

From what I remember, this is exactly why onInputUpdate was added, so I would suggest using that instead. It's the same reason onTick was added instead of moving onLoop.

User avatar
Kevsoft
Ripper II
Ripper II
Posts: 373
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Tue Jul 12, 2016 2:16 am

Hoeloe wrote:From what I remember, this is exactly why onInputUpdate was added
Pretty much that.
onKeyUp/onKeyDown processes key-updates in onLoop which handled the key update from the last frame.
onInputUpdate however directly intercepts the controls and you can even modify them. If you want something similar to onKeyUp/onKeyDown then considere using Input2.lua instead.

Super Mario Math
Cheep-Cheep
Cheep-Cheep
Posts: 13
Joined: Sat Jul 25, 2015 6:17 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Super Mario Math » Sun Jul 24, 2016 2:30 pm

When the player enters a new section by editing the player.CurrentSection field instead of warping, the music doesn't change, even though the background does. This glitch works only in the main game, not in the level editor.
Image
Progress: 19/256

User avatar
Hoeloe
Ninji
Ninji
Posts: 809
Joined: Sat Oct 03, 2015 6:18 pm
Current Project: A2XT Episode 2

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Hoeloe » Sun Jul 24, 2016 3:26 pm

Super Mario Math wrote:When the player enters a new section by editing the player.CurrentSection field instead of warping, the music doesn't change, even though the background does. This glitch works only in the main game, not in the level editor.
This is also known and not something that is sane to fix. These fields directly map to memory locations in the player struct, so adding side effects to them could have unintended consequences.

User avatar
CynicHost
Level Reviewer
Level Reviewer
Posts: 457
Joined: Fri Dec 25, 2015 9:28 am
Flair: heck
Location: Atlantis

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby CynicHost » Thu Aug 18, 2016 1:13 am

Is the launcher music supposed to be different when running the modded SMBX?

lotus006
Mega Mole
Mega Mole
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Wed Aug 31, 2016 3:20 am

so what is the future of Lunalua, it is dead ? because there is no update since february 0.7.3 (I think) whats happening ?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests