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
200
92%
No
17
8%
 
Total votes: 217
User avatar
fireflower30
Rex
Rex
Posts: 83
Joined: Wed Sep 23, 2015 2:24 pm
Current Project: Beyond the Mushroom Kingdom, Boss Rush (99% done)
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby fireflower30 » Fri Nov 20, 2015 2:35 pm

Question: Can I use SMBX 1.3.0.1 for LunaLua?
"I know you have been afraid before, but you don't have to be anymore"

Is it a minority to like Evangelion 3.0?

PixelPest
Link
Link
Posts: 7116
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby PixelPest » Fri Nov 20, 2015 2:43 pm

fireflower30 wrote:Question: Can I use SMBX 1.3.0.1 for LunaLua?
Did you seriously just ask that?

Image
Spoiler: show
Yes you can.

User avatar
fireflower30
Rex
Rex
Posts: 83
Joined: Wed Sep 23, 2015 2:24 pm
Current Project: Beyond the Mushroom Kingdom, Boss Rush (99% done)
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby fireflower30 » Fri Nov 20, 2015 2:50 pm

PixelPest wrote:
fireflower30 wrote:Question: Can I use SMBX 1.3.0.1 for LunaLua?
Did you seriously just ask that?

Image
Spoiler: show
Yes you can.
Can't believe I just fucking said that...

maybe I could try to make bosses with this in my new episode... but I what part of it makes bosses changable
"I know you have been afraid before, but you don't have to be anymore"

Is it a minority to like Evangelion 3.0?

User avatar
RudeGuy
Luigi
Luigi
Posts: 4985
Joined: Fri Dec 27, 2013 7:36 am
Flair: help
Current Project: a random smw hack
Chat Username: rudeguy

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby RudeGuy » Fri Nov 20, 2015 2:58 pm

fireflower30 wrote:maybe I could try to make bosses with this in my new episode... but I what part of it makes bosses changable
What about taking a look at this first?
im bored

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
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 20, 2015 8:33 pm

I'm trying to redo the world map HUD, but I can't seem to get it to work. I'm putting the code in my lunaworld.lua - am I supposed to put it somewhere else?
Here's my code:

Code: Select all

function onLoop()
	if(isOverworld == true) then
		Graphics.activateOverworldHud(WHUD_NONE);
		Text.print("Coins: " .. mem(0x00B2C5A8, FIELD_WORD), 200, 0);
		Text.print("Lives: " .. mem(0x00B2C5AC, FIELD_WORD), 200, 16);
		Text.print("Points: " .. mem(0x00B2C8E4, FIELD_WORD), 400, 0);
		if(mem(0x00B251E0, FIELD_WORD) > 0) then
			Text.print("Stars: " .. mem(0x00B251E0, FIELD_WORD), 400, 16);
		end
	else
		--do level stuff
	end
end
Jesus is my savior.

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8256
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Enjl » Fri Nov 20, 2015 8:36 pm

The name for the world .lua file is lunaoverworld.lua
Please do not use any of my assets (graphics, scripts) in works affiliated with the Novaverse. This applies to the original releases of those assets as well as any third-party variations (recolours, script alterations). Thank you.
________________________________________________________

The ABC of Creation
________________________________________________________
Image

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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Fri Nov 20, 2015 9:20 pm

I'm really surprised about the progress i've done to my inventory, I started now savedata and it's almost work now for when we collect items it's follow you
over the level :) , just a question how i'm saving onto the folder where is lunaworld instead of the level folder ?

And also I'm stuck again with sprites, I have some question about the size of the addon when he is finished for the user, is it a problem
if the pack will be over 3 or 4 mb the size I mean ? and I try to do concatenate

Code: Select all

local SelMushroom  		= {}
for i=1, 6 do
table.insert(SelMushroom .. i , Graphics.loadImage(resPath .. "\\SelMushroom.png") );
end
it's say i can concatenate a upvalue something like this, or I got an another solution is to duplicate img "\\SelMushroom" .. i .. ".png "
but the size of the addon will grow alot with this :(

Any solutions ?
I'm desesperate with loop and local variable of image :( nothing work because uservalue

Thanks in advance.

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
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 20, 2015 10:58 pm

Enjl wrote:The name for the world .lua file is lunaoverworld.lua
Thanks! I've managed to make this with your help:
Spoiler: show
Image
...also, is it possible to fix the fact that the gif recording go way too fast?
Jesus is my savior.

User avatar
Mosaic
Ludwig von Koopa
Ludwig von Koopa
Posts: 2844
Joined: Fri Feb 27, 2015 8:07 pm
Flair: All has a reason behind it, even if it's tough.
Current Project: The Mosaic Group's Journey, Toad's SMB Adventure, Mosaic Adventures and Other Secret Projects?
Chat Username: Mosaic
Contact:

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Mosaic » Sat Nov 21, 2015 3:25 am

Does anyone know how to make a money system sort of like the one Sambo has on his episode?
I'm trying to figure out lunalua, but i really can't understand the commands. Does anyone know how I can implement a
money system?
EDIT:
I'm actually going to try to figure this out myself.
Last edited by Mosaic on Sat Nov 21, 2015 2:04 pm, edited 1 time in total.

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
And Here's The Proof
My Rainbow Of Levels
Mosaic's Museum(My Discord)

Image

Image

Danny wrote:Here's some constructive criticism: What the hell.
Witchking wrote:Approved!

Discord Quotes: show
Image


User avatar
Voymo
Spiny
Spiny
Posts: 46
Joined: Sat Sep 26, 2015 10:07 am
Current Project: Making All-Stars versions of Wario Land 1

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Voymo » Sat Nov 21, 2015 4:45 am

Guys, there is a (new) bug in the 7.2.2 version of SMBX 1.3.0.2 (haven't tested 1.3.0.1). After start, if you load an episode that has custom NPC graphics FIRST, then quitting and load an episode that has the default NPC graphics, the NPC's mask gets messed up (the old custom mask will still be used). However this doesn't happen if you load an episode with default graphics first and THEN another one that has custom graphics.
Not sure if this only applies to NPC custom graphics...

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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Kevsoft » Sat Nov 21, 2015 8:09 am

Voymo wrote:Guys, there is a (new) bug in the 7.2.2 version of SMBX 1.3.0.2 (haven't tested 1.3.0.1). After start, if you load an episode that has custom NPC graphics FIRST, then quitting and load an episode that has the default NPC graphics, the NPC's mask gets messed up (the old custom mask will still be used). However this doesn't happen if you load an episode with default graphics first and THEN another one that has custom graphics.
Not sure if this only applies to NPC custom graphics...
Are you talking about the custom NPC graphics with ".gif" or the new one with ".png"?

User avatar
Voymo
Spiny
Spiny
Posts: 46
Joined: Sat Sep 26, 2015 10:07 am
Current Project: Making All-Stars versions of Wario Land 1

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Voymo » Sat Nov 21, 2015 8:33 am

@Kevsoft The one with .gif files.

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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Sat Nov 21, 2015 11:50 am

lotus006 wrote:I'm really surprised about the progress i've done to my inventory, I started now savedata and it's almost work now for when we collect items it's follow you
over the level :) , just a question how i'm saving onto the folder where is lunaworld instead of the level folder ?

And also I'm stuck again with sprites, I have some question about the size of the addon when he is finished for the user, is it a problem
if the pack will be over 3 or 4 mb the size I mean ? and I try to do concatenate

Code: Select all

local SelMushroom  		= {}
for i=1, 6 do
table.insert(SelMushroom .. i , Graphics.loadImage(resPath .. "\\SelMushroom.png") );
end
it's say i can concatenate a upvalue something like this, or I got an another solution is to duplicate img "\\SelMushroom" .. i .. ".png "
but the size of the addon will grow alot with this :(

Any solutions ?

I'm desesperate with loop and local variable of image :( nothing work because uservalue

Thanks in advance.
Ok I think I start to understand why no one have already made the inventory mode, is already started in the lunalua LuaScriptsLib folder but not yet finished
I think is not possible to make the original one because there is no possible way to make more than 1 same sprites without make a copy of the png when
is loaded in the game the same png will not appear until you make a copy of a copy of the png, I hope in the next Lunalua this bug will be corrected.

I will take a break now because I think is impossbile to make the inventory mode for now. :(

PS.: Is there a reason why smb3inventory is in the folder but not working. ?

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8256
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Enjl » Sat Nov 21, 2015 11:58 am

lotus006 wrote:because there is no possible way to make more than 1 same sprites without make a copy of the png when
is loaded in the game the same png will not appear until you make a copy of a copy of the png, I hope in the next Lunalua this bug will be corrected.

I will take a break now because I think is impossbile to make the inventory mode for now. :(
sprite = Graphics.loadImage("sprite.png)

function onLoop()
Graphics.drawImage(sprite, 0, 0)
Graphics.drawImage(sprite, 32, 0)
Graphics.drawImage(sprite, 64, 0)
Graphics.drawImage(sprite, 96, 0)
end

Just a simple example of how to draw the same image multiple times.
Please do not use any of my assets (graphics, scripts) in works affiliated with the Novaverse. This applies to the original releases of those assets as well as any third-party variations (recolours, script alterations). Thank you.
________________________________________________________

The ABC of Creation
________________________________________________________
Image

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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Sat Nov 21, 2015 2:54 pm

Enjl wrote:
lotus006 wrote:because there is no possible way to make more than 1 same sprites without make a copy of the png when
is loaded in the game the same png will not appear until you make a copy of a copy of the png, I hope in the next Lunalua this bug will be corrected.

I will take a break now because I think is impossbile to make the inventory mode for now. :(
sprite = Graphics.loadImage("sprite.png)

function onLoop()
Graphics.drawImage(sprite, 0, 0)
Graphics.drawImage(sprite, 32, 0)
Graphics.drawImage(sprite, 64, 0)
Graphics.drawImage(sprite, 96, 0)
end

Just a simple example of how to draw the same image multiple times.
Thanks for this, but in this case it should work but I test on my stuff and isnt should work because
I use unplaceSprites also and is remove the last one because of this :(

like this -->

Code: Select all

Graphics.unplaceSprites(inv2);
Graphics.placeSprite(1,inv2,   160  , 518   );
This is how I use this for moving graphic :)
or maybe I can try I just have an idea but i dont know why before I tested without unplacesprites and I make it so laging because its placing indefinitely the sprites on the loops but now is not laging weird ?
I will test to make it when is not moving do not use function unplacesprites with If then else.

Edit :

I tried again without Unplacesprites but after 30 sec the game start to lag because the sprite is never stop to be added on the loop
but with Unplacesprites there is no problem if I leave it loaded even after 30 sec

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
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 21, 2015 7:16 pm

Why not find a way to make it work with Graphics.drawImage?
Jesus is my savior.

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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Sat Nov 21, 2015 7:32 pm

HenryRichard wrote:Why not find a way to make it work with Graphics.drawImage?
what is the difference ?

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
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 21, 2015 7:49 pm

lotus006 wrote:
HenryRichard wrote:Why not find a way to make it work with Graphics.drawImage?
what is the difference ?
Graphics.drawImage draws the image for only one frame - it's gone the next one.
Graphics.placeSprite makes the image drawn until it's removed with Graphics.unplaceSprite.
Jesus is my savior.

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

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby lotus006 » Sat Nov 21, 2015 7:52 pm

HenryRichard wrote:
lotus006 wrote:
HenryRichard wrote:Why not find a way to make it work with Graphics.drawImage?
what is the difference ?
Graphics.drawImage draws the image for only one frame - it's gone the next one.
Graphics.placeSprite makes the image drawn until it's removed with Graphics.unplaceSprite.
Even if is in the loop section ?
And I can alway make moving with Graphics.drawImage ?

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8256
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: LunaLua Offical Thread - SMBX Usermod Framework

Postby Enjl » Sat Nov 21, 2015 7:55 pm

lotus006 wrote: Even if is in the loop section ?
And I can alway make moving with Graphics.drawImage ?
I mean you can make dynamic x and y values depending on how many items are already in your inventory. Since drawImage is only shown for one frame, it's even easier "move" it than placeSprite (though I never used placeSprite so whatever)
Please do not use any of my assets (graphics, scripts) in works affiliated with the Novaverse. This applies to the original releases of those assets as well as any third-party variations (recolours, script alterations). Thank you.
________________________________________________________

The ABC of Creation
________________________________________________________
Image


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 4 guests