LunaLua Offical Thread - SMBX Usermod Framework

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

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
200
92%
No
17
8%
 
Total votes: 217
Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Tue Nov 03, 2015 1:23 pm

I just checked the code. It is nearly perfect. The only issue is that events has to be in the API's namespace.

so instead of:

Code: Select all

function run()
you do

Code: Select all

function flagpole_exit.run()
because only stuff which is in flagpole_exit is usable for the user (who uses your API) and the event manager (--> registerEvent)

(the same you have to do with the locks-function)

EDIT: Here is the fixed version: http://pastebin.com/1Lcwe2Sy
Also I would like to remind that single functions which are not used by the end-user should be marked as "local". This prevents naming-conflicts with other apis.

Darkonius Mavakar
Torpedo Ted
Torpedo Ted
Posts: 1781
Joined: Fri Dec 27, 2013 2:45 pm
Flair: Dreams of a forgotten reality
Pronouns: He/Him
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Darkonius Mavakar » Tue Nov 03, 2015 1:49 pm

alright i finally managed to do the cmd thing, here's what came out:


https://www.dropbox.com/s/waz9q4ll7y0xn ... 6.png?dl=0


...does this help figuring out what's wrong with my lualoader?

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Tue Nov 03, 2015 3:03 pm

Well did the SMBX application freeze (like a white overlay over the game window) or does the game window doesn't even pop up?

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Tue Nov 03, 2015 3:35 pm

LunaLua v0.7.2.1 has just been released. This is an important update because it fixes an exploit which manages to run assembler code on your computer throught lunadll.txt due to an exploit in the Autocode module.

Additional changes are:
Spoiler: show
* Extended NPC class
* Added cheat values. Some cheat can now be toggled by value. (Defines.* namespace)
* Added Audio.MusicArtistTag(), Audio.MusicAlbumTag() and Audio.MusicCopyrightTag() functions
* Added console class. You can now use the windows console for debugging. (See LunaLua command arguments at the wiki)
* Hotfix Bugfix [LunaLua]: Fixed ROP exploit at the Autocode module.

Darkonius Mavakar
Torpedo Ted
Torpedo Ted
Posts: 1781
Joined: Fri Dec 27, 2013 2:45 pm
Flair: Dreams of a forgotten reality
Pronouns: He/Him
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Darkonius Mavakar » Tue Nov 03, 2015 4:05 pm

Kevsoft wrote:Well did the SMBX application freeze (like a white overlay over the game window) or does the game window doesn't even pop up?
it freezes

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Tue Nov 03, 2015 4:11 pm

And before smbx was freezing you started the console application, right?

TheGoatsefaceKilla
Cheep-Cheep
Cheep-Cheep
Posts: 12
Joined: Sun Nov 01, 2015 10:32 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby TheGoatsefaceKilla » Tue Nov 03, 2015 9:09 pm

Flagpole Exit API 1.0 Released!

Special Thanks to Kevsoft for looking over my code, you are way too good at this!
Enjoy!
Last edited by TheGoatsefaceKilla on Fri Jan 15, 2016 8:58 pm, edited 1 time in total.

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Wed Nov 04, 2015 3:55 am

A Hotfix which fixes the Autocode Module has just been uploaded!

Cornholio309
Koopa
Koopa
Posts: 19
Joined: Fri Nov 06, 2015 4:26 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Cornholio309 » Fri Nov 06, 2015 4:40 pm

Just registered on the forums to ask this: How exactly can I be sure that LunaLua's lua functions are indeed working? I've tried tinkering with them for a couple of minutes now and can't get them to work.

I get a nice notification in intro.lvl telling me what version of LunaLua I have, I can change between the letterbox mode and "stretch mode" that this page describes, but using the lunadll.lua file doesn't appear to work. I've tried copying and pasting the example on the first page, no dice. I've tried using the "double jump" lua file example made by another user, and that doesn't appear to work either.

For the record, this is what the folder of my test level looks like:

Image

Despite this, both lua examples don't appear to work.

Is there something I'm missing that's preventing this from working? I downloaded the latest revision, with the hex edited SMBX 1.3.0.2, and I kept the full base game included. My operating system is Windows 10 as well.

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Fri Nov 06, 2015 4:48 pm

You need to make a folder called testworld.lvl and put the lunadll.lua in there. If you want to have lunadll.lua files that apply to all levels in the folder, you call it lunaworld.lua.

Cornholio309
Koopa
Koopa
Posts: 19
Joined: Fri Nov 06, 2015 4:26 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Cornholio309 » Fri Nov 06, 2015 4:59 pm

Strangely the lunadll.lua file still doesn't appear to be working, but lunaworld.lua works just fine. Any ideas why?

Otherwise, I really appreciate the quick and kind reply! Still slightly curious about this in case I ever run into an issue where I want to use lunadll.lua rather than applying everything to every level in the folder.

Image

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Fri Nov 06, 2015 5:01 pm

HenryRichard wrote:You need to make a folder called testworld.lvl and put the lunadll.lua in there.
...except without the .lvl.

Cornholio309
Koopa
Koopa
Posts: 19
Joined: Fri Nov 06, 2015 4:26 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Cornholio309 » Fri Nov 06, 2015 5:08 pm

HenryRichard wrote:...except without the .lvl.
I tried that earlier. Oddly enough, nothing seems to happen. I'm using the double jump lua example. If I shove that into a lua file named lunaworld.dll, it works fine. If I use just lunadll.lua, nothing seems to happen.

Image

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Fri Nov 06, 2015 5:15 pm

You don't put the level in that folder!

Cornholio309
Koopa
Koopa
Posts: 19
Joined: Fri Nov 06, 2015 4:26 pm

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Cornholio309 » Fri Nov 06, 2015 5:25 pm

Ah-ha! That was my issue. Thank you! It works just fine now.

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Tue Nov 10, 2015 9:37 pm

I'm kinda wondering this after reading some posts in the SMBX download topic: when will LunaLua hit version 1.0?

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Wed Nov 11, 2015 12:21 am

LunaLua will hit 1.0 when:
1.) If all known fields has been implemented.
2.) If it is stable. This would require however a few people who help me bugtestig every API.

Voymo
Hoopster
Hoopster
Posts: 46
Joined: Sat Sep 26, 2015 10:07 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Voymo » Fri Nov 13, 2015 8:03 am

Hey, another question regarding LunaLUA. Does someone know a code to remove the Image's from Toad, Peach and Link's HUD when using a LunaDLL code to make them have 4 HP instead of the default 3 (so the hearts are unused then anyway)?
Last edited by Voymo on Sat Nov 14, 2015 4:44 pm, edited 2 times in total.

Kevsoft
Ripper II
Ripper II
Posts: 375
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Sat Nov 14, 2015 2:17 am

LunaLua v0.7.2.2 has been released with following changes:
Spoiler: show
* Extended NPC class
* Bugfix [LunaLua]: Fixed Camera.width and Camera.height
* Bugfix [LunaLua]: Fixed the bug, where the functions Blocks.get and Blocks.getInterseting don't includes the last block.
* Added onNPCKill event
* Block can now be spawned with Block.spawn(...)

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby HenryRichard » Sat Nov 14, 2015 1:18 pm

You forgot something in SDL2_mixer_ext.dll.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari