LunaLua Offical Thread - SMBX Usermod Framework

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

Shall I steam some LunaLua live development?

Yes
171
92%
No
15
8%
 
Total votes: 186
User avatar
Kevsoft
Ripper II
Ripper II
Posts: 373
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sat Feb 28, 2015 11:56 am

Be sure your music file is 44100 Hz.

User avatar
Murphmario
Boom Boom
Boom Boom
Posts: 1787
Joined: Fri Dec 20, 2013 7:07 pm
Location: Smbxville, Murphmario's House

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Murphmario » Sat Feb 28, 2015 12:20 pm

Kevsoft wrote:Be sure your music file is 44100 Hz.


And how do I do that? And if they aren't, how do I change them?

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sat Feb 28, 2015 12:23 pm

Use programs like Audacity. Wohlstand is currently developing a tool, that you can do that with the PGE Editor.

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Mon Mar 02, 2015 3:19 pm

Oh man: Huge update!

Before all the changes to lunalua: This dll is compiled with VS 2013 (+Windows XP Support). If you use an old OS you probably need the Visual C++ Redistributable Packages for Visual Studio 2013.
(I will link on the main Page).

Anyway with the LunaLua v0.6 release, there are following changes:
Spoiler: show
* Added a bunch of lua libraries
* Added a new event called "onTriggerEvent(eventObj, eventName)", which triggers if a SMBX Event is called.
* Added a new class called "Event" [used in onTriggerEvent(eventObj,...)] which provides fields like "eventObj.cancled = true".
Raw Event-Class Overview Code:

Code: Select all

  class_<Event>("Event")
         .property("eventName", &Event::eventName)
         .property("cancleable", &Event::isCancleable)
         .property("cancled", &Event::cancled, &Event::setCancled)
 

* Added a new class called "Data". This can be constructed and should be used as a new version of "userData" with lots of improvements.
Raw Data-Class Overview Code:

Code: Select all

  class_<LuaProxy::Data>("Data")
            .enum_("DataTypes")
            [
               value("DATA_LEVEL", LuaProxy::Data::DATA_LEVEL),
               value("DATA_WORLD", LuaProxy::Data::DATA_WORLD),
               value("DATA_GLOBAL", LuaProxy::Data::DATA_GLOBAL)
            ]
         .def(constructor<LuaProxy::Data::DataType>())
         .def(constructor<LuaProxy::Data::DataType, std::string>())
         .def(constructor<LuaProxy::Data::DataType, bool>())
         .def(constructor<LuaProxy::Data::DataType, std::string, bool>())
         .def("set", &LuaProxy::Data::set)
         .def("get", static_cast<std::string(LuaProxy::Data::*)(std::string)>(&LuaProxy::Data::get))
         .def("get", static_cast<luabind::object(LuaProxy::Data::*)(lua_State*)>(&LuaProxy::Data::get))
         .def("save", static_cast<void(LuaProxy::Data::*)()>(&LuaProxy::Data::save))
         .def("save", static_cast<void(LuaProxy::Data::*)(std::string)>(&LuaProxy::Data::save))
         .property("dataType", &LuaProxy::Data::dataType, &LuaProxy::Data::setDataType)
         .property("sectionName", &LuaProxy::Data::sectionName, &LuaProxy::Data::setSectionName)
         .property("useSaveSlot", &LuaProxy::Data::useSaveSlot, &LuaProxy::Data::setUseSaveSlot)
 


Because I am already pretty tired I will write the doc later. But I provided the "Raw ... Overview Code", some of you might understand it.
Here is a example code for the new Data-Class:

Code: Select all

local myDataFile = nil;
function onLoad()
   --Use Data.DATA_LEVEL for saving in the custom level folder
   --Use Data.DATA_WORLD for saving in the episode folder
   --Use Data.DATA_GLOBAL for saving in the smbx/worlds folder
   --The last parameter is true or false, if the data should be save-slot-local.
   myDataFile = Data(Data.DATA_LEVEL, "mySection", false)
   
end

function onLoop()
   local stars = myDataFile:get("myStarCounter")
   if(stars == "")then
      stars = 0
   else
      stars = tonumber(stars)
   end
   stars = stars + 1
   myDataFile:set("myStarCounter", tostring(stars))
   myDataFile:save()
   printText("Counter: "..stars, 30, 100)
end

Onule
Koopa Troopa
Koopa Troopa
Posts: 27
Joined: Tue Mar 18, 2014 11:54 pm

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Onule » Mon Mar 02, 2015 9:40 pm

Two questions: Is it possible to make an NPC (spawned from a generator) just despawn when it reaches a certain area?
And is there a way to make npc generators start offscreen?

User avatar
FanofSMBX
Bowser
Bowser
Posts: 3800
Joined: Sun Dec 22, 2013 12:01 pm

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby FanofSMBX » Sat Mar 07, 2015 3:28 pm

Is there a code to make SMB1 red Koopas (no wings) jump like red Paragoombas?
I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:
Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/

Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image

KINGBOWSER112 RULES!

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sun Mar 08, 2015 4:20 pm

FanofSMBX wrote:Is there a code to make SMB1 red Koopas (no wings) jump like red Paragoombas?

http://engine.wohlnet.ru/forum/viewtopic.php?f=26&t=338
One of them has a code with non-paragoombas. You can alter the code for that.

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Thu Mar 19, 2015 12:40 pm

LunaLua v0.6.1 is out with following changes:

Spoiler: show
* Resturctured Audio Module [Tutorial]
* New Defines Module
* Added function spawnEffect (replaces runAnimation)
* Added new fields towards the Animation Class
* Added some new function signature overloads for spawnNPC
* Optimzed the VBStr fields, they can now be assigned directly to a string.

DaSpongeBobMan
Pokey
Pokey
Posts: 212
Joined: Tue Apr 15, 2014 2:17 pm

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby DaSpongeBobMan » Fri Mar 20, 2015 11:05 am

I just put the new lua in the smbx folder and it requires all the audio files. I cannot download these at the same time and they contain viruses. What should I do? And what does boolean mean?

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Fri Mar 20, 2015 11:54 am

DaSpongeBobMan wrote:I just put the new lua in the smbx folder and it requires all the audio files.

That's why I put up the link "SMBX Audio Files"

DaSpongeBobMan wrote:I cannot download these at the same time and they contain viruses. What should I do?

They are just marked as a virus because they are using hack techniques.


DaSpongeBobMan wrote:And what does boolean mean?

Boolean is a variable type:

Code: Select all

local myBoolean = true
if(myBoolean)then
  --do stuff
end

local myFalseBoolean = false

True and false are values for the type boolean.

Also:
A LunaLua Hotfix (v0.6.1.1) is out which fixes NPC.direction.

User avatar
Mr Boboo
Hoopster
Hoopster
Posts: 164
Joined: Sat Jan 04, 2014 8:43 am
Current Project: The Ultimate Armada
Location: 'MURICA
Contact:

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Mr Boboo » Sat Mar 21, 2015 10:42 am

z0mg starmun

LunaDLL with Lua, eh? I've always been hoping for an SMBX modding software (or something of the sort) and it looks like my dream is finally coming true. It should be really interesting seeing what people make.
When a Bostonian is really good at peeing he's a wicked pissah

Check out my current project!
Image

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sat Mar 21, 2015 1:45 pm

Mr Boboo wrote:LunaDLL with Lua, eh? I've always been hoping for an SMBX modding software (or something of the sort) and it looks like my dream is finally coming true. It should be really interesting seeing what people make.


Same here. Before LunaLua was created, I was like: Where is my lua in Lunadll and well, now it is here :P
I hope you enjoy it.

User avatar
Wind
Ripper II
Ripper II
Posts: 317
Joined: Fri Dec 20, 2013 12:38 pm
Current Project: The Second Reality Project X
Location: Real life? Interesting, tell me more.

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Wind » Sat Mar 21, 2015 2:00 pm

Is there a non-SDL version?
E: apparently not. f
avatar by martin
<bossedit8> abuse nicely

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sat Mar 21, 2015 2:45 pm

Wind wrote:Is there a non-SDL version?
E: apparently not. f

Do you dislike SDL?

User avatar
Wind
Ripper II
Ripper II
Posts: 317
Joined: Fri Dec 20, 2013 12:38 pm
Current Project: The Second Reality Project X
Location: Real life? Interesting, tell me more.

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Wind » Sat Mar 21, 2015 3:24 pm

No, but all I wanted was Lunadll + lunalua, not additional 16 DLLs.
avatar by martin
<bossedit8> abuse nicely

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sun Mar 22, 2015 11:26 am

I updated the download link, it should be now easier to access LunaLua.

User avatar
Mr Boboo
Hoopster
Hoopster
Posts: 164
Joined: Sat Jan 04, 2014 8:43 am
Current Project: The Ultimate Armada
Location: 'MURICA
Contact:

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Mr Boboo » Sun Mar 22, 2015 3:25 pm

I installed LunaLua properly and decided to run DarkShadeX's Hammer Starman code. I loaded the level and got a text box that said this:
Spoiler: show
Image

I clicked OK and the level loaded correctly, along with the Lua functions, but the player HUD was invisible. I'm not sure why this happens but I don't know how to fix it.
When a Bostonian is really good at peeing he's a wicked pissah

Check out my current project!
Image

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Sun Mar 22, 2015 3:46 pm

As I understand the code right, the hammer (NPC ID: 171) is missing in your level. You have to add this to your level. If you have any additional problems then please forward this error to the orignal creator of the code (DarkShadeX).

User avatar
StarBot
Cheep-Cheep
Cheep-Cheep
Posts: 12
Joined: Wed Mar 11, 2015 6:39 pm

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby StarBot » Mon Mar 23, 2015 4:29 pm

Do you need LunaDLL to download LunaLua? I'm sorry if this should like a dumb question, I don't understand none of this.

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

Re: LunaLua - Lunadll with lua [Now with Overworld]

Postby Kevsoft » Mon Mar 23, 2015 5:03 pm

No, it is just a new version of Lunadll which contains the new lua module.

If you download the first time LunaLua I would recommend to download the whole package including all graphics and sounds.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

cron