Page 1 of 1

Is there any way to increase the lives cap from 99 to 999?

Posted: Fri Oct 14, 2016 2:32 pm
by Snessy the duck
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?

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Fri Oct 14, 2016 2:54 pm
by Cedur
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.

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Fri Oct 14, 2016 2:59 pm
by Snessy the duck
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!

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Fri Oct 14, 2016 3:23 pm
by Cedur
I've actually said that because SMBX doesn't save scores, I'm making a manual statistic. The rest is your opinion.

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Fri Oct 14, 2016 3:47 pm
by Emral
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.

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 7:32 am
by Snessy the duck
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?

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 7:46 am
by Super Mario Channel
SMBX 1.4.2 had the cap at 999. I think there is a file somewhere that had the code in it...

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 7:53 am
by PixelPest
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

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 8:09 am
by Emral
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.

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 12:32 pm
by Super Mario Channel
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?

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 12:41 pm
by loop
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.

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Sat Oct 15, 2016 12:53 pm
by Snessy the duck
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!

Re: Is there any way to increase the lives cap from 99 to 999?

Posted: Tue Oct 18, 2016 11:03 pm
by MECHDRAGON777
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.