Page 2 of 2

Re: reserveItems.lua - Item box for heart-based characters! [v1.3]

Posted: Thu Sep 29, 2022 10:25 am
by AppleTheTomato
Marioman2007 wrote:
Thu Sep 29, 2022 12:44 am
AppleTheTomato wrote:
Wed Sep 28, 2022 9:52 am
Found another interesting issue. The SMB2 'duplicate mushrooms' don't work anymore lol. Not sure how you'd fix that, but I figured I'd mention it.
Thanks, I will fix all the bugs after I am done with SmgLifeSystem.
This script will only be perfectly usable with a custom health library.

I plan to give mushrooms a special behavior, they'll go to the reserve box if health is full but not if health is not full
other powerups are not gonna give health.
So wait, you will HAVE to have a custom health library in order for this to work?

Also, the powerup idea seems solid. Will actually give mushrooms a function lol

Re: reserveItems.lua - Item box for heart-based characters! [v1.3]

Posted: Thu Sep 29, 2022 10:40 am
by Marioman2007
AppleTheTomato wrote:
Thu Sep 29, 2022 10:25 am
So wait, you will HAVE to have a custom health library in order for this to work?
Not, if you want to live with powerups restoring health and getting infinite health by alternating between powerups.

Re: reserveItems.lua - Item box for heart-based characters! [v1.3]

Posted: Thu Sep 29, 2022 5:47 pm
by AppleTheTomato
Marioman2007 wrote:
Thu Sep 29, 2022 12:44 am
AppleTheTomato wrote:
Wed Sep 28, 2022 9:52 am
Found another interesting issue. The SMB2 'duplicate mushrooms' don't work anymore lol. Not sure how you'd fix that, but I figured I'd mention it.
Thanks, I will fix all the bugs after I am done with SmgLifeSystem.
This script will only be perfectly usable with a custom health library.

I plan to give mushrooms a special behavior, they'll go to the reserve box if health is full but not if health is not full
other powerups are not gonna give health.
Wait, I just thought of something else: you said that the health will have to be full for a mushroom to go into it. That prompts a few questions:
1. How will you check for full health?
2. Can't this then be applied to other powerups?
3. Depending on the answer to Q1, why would a custom health library be needed? And if one is needed, how is that gonna work? Will reserveItems account for that, or will the custom health library have to account for reserveItems?

Re: reserveItems.lua - Item box for heart-based characters! [v1.3]

Posted: Thu Sep 29, 2022 10:14 pm
by Marioman2007
AppleTheTomato wrote:
Thu Sep 29, 2022 5:47 pm
Wait, I just thought of something else: you said that the health will have to be full for a mushroom to go into it. That prompts a few questions:
1. How will you check for full health?
2. Can't this then be applied to other powerups?
3. Depending on the answer to Q1, why would a custom health library be needed? And if one is needed, how is that gonna work? Will reserveItems account for that, or will the custom health library have to account for reserveItems?
1. Per-Player health data in the custom health lib
2. yeah this could be, I just thought of it now lol
3.1: hearts system is kinda wonky, I tried to check some things but my calculations took place after the game finished it's health calculation
3.2: Not sure

Re: reserveItems.lua - Item box for heart-based characters! [v1.3]

Posted: Thu Sep 29, 2022 10:49 pm
by AppleTheTomato
Marioman2007 wrote:
Thu Sep 29, 2022 10:14 pm
AppleTheTomato wrote:
Thu Sep 29, 2022 5:47 pm
Wait, I just thought of something else: you said that the health will have to be full for a mushroom to go into it. That prompts a few questions:
1. How will you check for full health?
2. Can't this then be applied to other powerups?
3. Depending on the answer to Q1, why would a custom health library be needed? And if one is needed, how is that gonna work? Will reserveItems account for that, or will the custom health library have to account for reserveItems?
1. Per-Player health data in the custom health lib
2. yeah this could be, I just thought of it now lol
3.1: hearts system is kinda wonky, I tried to check some things but my calculations took place after the game finished it's health calculation
3.2: Not sure
Fair enough. Also, another random thing to possibly deal with: the reserve blocks introduced in X2. The ones that instantly put an item into your inventory. Not sure how that road can be crossed, but you may want / need to.

Re: reserveItems.lua - Item box for heart-based characters! [v1.3]

Posted: Sun Oct 02, 2022 8:05 pm
by AppleTheTomato
Another thing I found. This needs to be added somewhere in onPostNPCKill, otherwise anytime a powerup despawns, the 'got item' sound gets played:

Code: Select all

if v.despawnTimer > 0 then
Edit: Uh, maybe not. Could just be something screwy on my end, playing around with that.
Edit 2: Yeah, just a problem on my end lol. Got trolled by Klonoa xD