Page 19 of 47

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 1:23 pm
by Kevsoft
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.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 1:49 pm
by Darkonius Mavakar
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?

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 3:03 pm
by Kevsoft
Well did the SMBX application freeze (like a white overlay over the game window) or does the game window doesn't even pop up?

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 3:35 pm
by Kevsoft
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.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 4:05 pm
by Darkonius Mavakar
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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 4:11 pm
by Kevsoft
And before smbx was freezing you started the console application, right?

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 03, 2015 9:09 pm
by TheGoatsefaceKilla
Flagpole Exit API 1.0 Released!

Special Thanks to Kevsoft for looking over my code, you are way too good at this!
Enjoy!

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Wed Nov 04, 2015 3:55 am
by Kevsoft
A Hotfix which fixes the Autocode Module has just been uploaded!

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 4:40 pm
by Cornholio309
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.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 4:48 pm
by HenryRichard
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.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 4:59 pm
by Cornholio309
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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 5:01 pm
by HenryRichard
HenryRichard wrote:You need to make a folder called testworld.lvl and put the lunadll.lua in there.
...except without the .lvl.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 5:08 pm
by Cornholio309
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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 5:15 pm
by HenryRichard
You don't put the level in that folder!

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 06, 2015 5:25 pm
by Cornholio309
Ah-ha! That was my issue. Thank you! It works just fine now.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Tue Nov 10, 2015 9:37 pm
by HenryRichard
I'm kinda wondering this after reading some posts in the SMBX download topic: when will LunaLua hit version 1.0?

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Wed Nov 11, 2015 12:21 am
by Kevsoft
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.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Fri Nov 13, 2015 8:03 am
by Voymo
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)?

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Sat Nov 14, 2015 2:17 am
by Kevsoft
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(...)

Re: LunaLua Offical Thread - SMBX Usermod Framework

Posted: Sat Nov 14, 2015 1:18 pm
by HenryRichard
You forgot something in SDL2_mixer_ext.dll.