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?
|
|
|
|
-
Snessy the duck
- Mouser

- Posts: 2699
- Joined: Sat Sep 20, 2014 6:04 am
Postby Snessy the duck » Fri Oct 14, 2016 2:32 pm
So, I've been playing a lot of airship attack lately, and it's an absolute blast to play! However, I'm currently at the 99 lives cap, and this makes me avoid going after dragon coins, extra lives and such, because it's pointless. This made me wonder, is there any way to increase the max lives cap from 99 to 999, like in the advance games? Sorry if this is a really stupid question, but I'm kinda new to the whole LunaLUA thing! Also, would it be possible to apply the code to an already existing episode with a save file without breaking said save file?
|
|
|
|
|
|
|
|
|
-
Cedur
- Link

- Posts: 7073
- Joined: Tue Jun 28, 2016 10:14 am
- Flair: I'm gone, for chess and minesweeper
- Pronouns: he/him
Postby Cedur » Fri Oct 14, 2016 2:54 pm
Snessy the duck wrote:However, I'm currently at the 99 lives cap, and this makes me avoid going after dragon coins, extra lives and such, because it's pointless.
It's not pointless if you still go for scores. (I'm having a statistic of all scores tallied together on all episodes I played thus far).
And I know that Lua makes the impossible possible but I'd be quite surprised if this was possible as well.
|
|
|
|
|
|
|
|
|
-
Snessy the duck
- Mouser

- Posts: 2699
- Joined: Sat Sep 20, 2014 6:04 am
Postby Snessy the duck » Fri Oct 14, 2016 2:59 pm
Supershroom wrote:Snessy the duck wrote:However, I'm currently at the 99 lives cap, and this makes me avoid going after dragon coins, extra lives and such, because it's pointless.
It's not pointless if you still go for scores. (I'm having a statistic of all scores tallied together on all episodes I played thus far).
And I know that Lua makes the impossible possible but I'd be quite surprised if this was possible as well.
I think scores are pointless! I only really think they're worth something in score based games and games that award high scores (Such as the japanese version of Sonic 1 which gives extra lives if the player gets a high score) but otherwise, I find them just as a leftover from the arcades! Besides, SMBX doesn't save your score, thus making it even more pointless!
|
|
|
|
|
|
|
|
|
-
Cedur
- Link

- Posts: 7073
- Joined: Tue Jun 28, 2016 10:14 am
- Flair: I'm gone, for chess and minesweeper
- Pronouns: he/him
Postby Cedur » Fri Oct 14, 2016 3:23 pm
I've actually said that because SMBX doesn't save scores, I'm making a manual statistic. The rest is your opinion.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Fri Oct 14, 2016 3:47 pm
Supershroom wrote:Snessy the duck wrote:However, I'm currently at the 99 lives cap, and this makes me avoid going after dragon coins, extra lives and such, because it's pointless.
And I know that Lua makes the impossible possible but I'd be quite surprised if this was possible as well.
It's pretty simple. You make a data class variable, call it "extendedLives" or whatever, keep the internal lives counter at 98 once it goes there and...
-if it turns 99, set it to 98 and add 1 to extendedLives
-if it turns 97, subtract 1 from extendedLives if it's greater than zero and set it to 98. If extendedLives is 0, do nothing and just let it count down
-change the hud so that it displays vanilla lives + extendedLives. You can do this by either using Capture Buffer or by drawing a completely new HUD. Replacement of singular HUD parts is planned for the future.
|
|
|
|
|
|
|
|
|
-
Snessy the duck
- Mouser

- Posts: 2699
- Joined: Sat Sep 20, 2014 6:04 am
Postby Snessy the duck » Sat Oct 15, 2016 7:32 am
Enjl wrote:Supershroom wrote:Snessy the duck wrote:However, I'm currently at the 99 lives cap, and this makes me avoid going after dragon coins, extra lives and such, because it's pointless.
And I know that Lua makes the impossible possible but I'd be quite surprised if this was possible as well.
It's pretty simple. You make a data class variable, call it "extendedLives" or whatever, keep the internal lives counter at 98 once it goes there and...
-if it turns 99, set it to 98 and add 1 to extendedLives
-if it turns 97, subtract 1 from extendedLives if it's greater than zero and set it to 98. If extendedLives is 0, do nothing and just let it count down
-change the hud so that it displays vanilla lives + extendedLives. You can do this by either using Capture Buffer or by drawing a completely new HUD. Replacement of singular HUD parts is planned for the future.
Oh god... that sounds really smart, but I have absolutely zero experience with LUA, so I have no idea how to make it work! Besides, I don't even know how to make a LunaLUA/LunaWorld file (Do you make a text file and then rename it to .lua or something) and I also don't know how to make a custom hud nor how to use the Capture Buffer! Could you possibly provide a Lua code along with a custom hud that makes it work or something (Sorry if I sound kinda lazy)?
Also, could you maybe answer this?
Snessy the duck wrote:Also, would it be possible to apply the code to an already existing episode with a save file without breaking said save file?
|
|
|
|
|
|
|
|
|
-
Super Mario Channel
- Tweeter

- Posts: 147
- Joined: Sun Dec 06, 2015 8:08 am
Postby Super Mario Channel » Sat Oct 15, 2016 7:46 am
SMBX 1.4.2 had the cap at 999. I think there is a file somewhere that had the code in it...
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat Oct 15, 2016 7:53 am
Super Mario Channel wrote:SMBX 1.4.2 had the cap at 999. I think there is a file somewhere that had the code in it...
But that would be in Teascript, not LunaLua.
Also Snessy the duck, yes you can for the most part add code to an episode without breaking the save file
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9891
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Sat Oct 15, 2016 8:09 am
Snessy the duck wrote:Enjl wrote:Supershroom wrote:
And I know that Lua makes the impossible possible but I'd be quite surprised if this was possible as well.
It's pretty simple. You make a data class variable, call it "extendedLives" or whatever, keep the internal lives counter at 98 once it goes there and...
-if it turns 99, set it to 98 and add 1 to extendedLives
-if it turns 97, subtract 1 from extendedLives if it's greater than zero and set it to 98. If extendedLives is 0, do nothing and just let it count down
-change the hud so that it displays vanilla lives + extendedLives. You can do this by either using Capture Buffer or by drawing a completely new HUD. Replacement of singular HUD parts is planned for the future.
Oh god... that sounds really smart, but I have absolutely zero experience with LUA, so I have no idea how to make it work! Besides, I don't even know how to make a LunaLUA/LunaWorld file (Do you make a text file and then rename it to .lua or something) and I also don't know how to make a custom hud nor how to use the Capture Buffer! Could you possibly provide a Lua code along with a custom hud that makes it work or something (Sorry if I sound kinda lazy)?
Also, could you maybe answer this?
Snessy the duck wrote:Also, would it be possible to apply the code to an already existing episode with a save file without breaking said save file?
As for save file... the data class variables are saved in their own .txt files.
|
|
|
|
|
|
|
|
|
-
Super Mario Channel
- Tweeter

- Posts: 147
- Joined: Sun Dec 06, 2015 8:08 am
Postby Super Mario Channel » Sat Oct 15, 2016 12:32 pm
PixelPest wrote:Super Mario Channel wrote:SMBX 1.4.2 had the cap at 999. I think there is a file somewhere that had the code in it...
But that would be in Teascript, not LunaLua.
Oh, sorry, my bad. But, isn't there a way to convert the code/files?
|
|
|
|
|
|
|
|
|
-
loop
- Ninji

- Posts: 984
- Joined: Sun Apr 17, 2016 5:56 pm
- Flair: i may be dumb but im not stupid!
- Pronouns: he/him/they
Postby loop » Sat Oct 15, 2016 12:41 pm
The file should be called lunadll.lua. Change the file type by replacing the file extension with .lua.
For the entire episode, the filename will be lunaworld.lua. For SMBX itself, lunaglobal.lua.
|
|
|
|
|
|
|
|
|
-
Snessy the duck
- Mouser

- Posts: 2699
- Joined: Sat Sep 20, 2014 6:04 am
Postby Snessy the duck » Sat Oct 15, 2016 12:53 pm
Jayce 777 wrote:The file should be called lunadll.lua. Change the file type by replacing the file extension with .lua.
For the entire episode, the filename will be lunaworld.lua. For SMBX itself, lunaglobal.lua.
Thanks for the tips Jayce!
|
|
|
|
|
|
|
|
|
-
MECHDRAGON777
- Pink Yoshi Egg

- Posts: 6422
- Joined: Fri Dec 20, 2013 6:40 pm
- Flair: Nuclear Queen of Reversion.
-
Contact:
Postby MECHDRAGON777 » Tue Oct 18, 2016 11:03 pm
Snessy the duck wrote:Supershroom wrote:Snessy the duck wrote:However, I'm currently at the 99 lives cap, and this makes me avoid going after dragon coins, extra lives and such, because it's pointless.
It's not pointless if you still go for scores. (I'm having a statistic of all scores tallied together on all episodes I played thus far).
And I know that Lua makes the impossible possible but I'd be quite surprised if this was possible as well.
I think scores are pointless! I only really think they're worth something in score based games and games that award high scores (Such as the japanese version of Sonic 1 which gives extra lives if the player gets a high score) but otherwise, I find them just as a leftover from the arcades! Besides, SMBX doesn't save your score, thus making it even more pointless!
I can try to make an API, but I am also making a score API that scares score for episodes. (That can also give lives based on score.
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 1 guest
|