Page 4 of 4

Re: customPowerups.lua - One more powerup framework! [v1.1]

Posted: Mon Jul 08, 2024 12:21 pm
by Cat king
King Mario wrote:
Mon Jul 08, 2024 11:27 am
I was testing some more and I realized two things:

1. Bubble Flower cannot be used while invincible with Starman. This is a really minor issue though, maybe it's meant to be that way.

2. The More Important Thing: Whenever Bosses (the default ones) get captured by bubbles, they get killed instantly. I was thinking that maybe I could take all of the current Boss NPCs and put them in a blacklist so that the Bubble doesn't instantly kill bosses in one hit. How would I blacklist a set of NPCs though? A little help would be nice.
I don't know much about Luna lua, but from what I can tell the star issue seems to be a silly mistake in the code where it can die from a star. Not sure how to fix that, but maybe make the bubble friendly by default. As for the second issue the only way I could imagine fixing that would be to modify the code. Perhaps you could use the iselectric or health config settings (as there is only like one NPC that actually uses iselectric in the game anyways) to define which ones it can harm and which ones it can't. Again I have little to no experience with Luna lua, so I'm probably missing something.

Re: customPowerups.lua - One more powerup framework! [v1.1]

Posted: Wed Jul 10, 2024 2:21 am
by Marioman2007
King Mario wrote:
Mon Jul 08, 2024 11:27 am
I was testing some more and I realized two things:

1. Bubble Flower cannot be used while invincible with Starman. This is a really minor issue though, maybe it's meant to be that way.

2. The More Important Thing: Whenever Bosses (the default ones) get captured by bubbles, they get killed instantly. I was thinking that maybe I could take all of the current Boss NPCs and put them in a blacklist so that the Bubble doesn't instantly kill bosses in one hit. How would I blacklist a set of NPCs though? A little help would be nice.

1. Oops, that's a mistake on my part.

2. There are blacklist and whitelist functions, you can use them like this:

Code: Select all

local bubble = require("AI/smbw_bubble")
bubble.whitelist(id)
bubble.blacklist(id)

Re: customPowerups.lua - One more powerup framework! [v1.1]

Posted: Wed Jul 10, 2024 7:58 am
by King Mario
Marioman2007 wrote:
Wed Jul 10, 2024 2:21 am
King Mario wrote:
Mon Jul 08, 2024 11:27 am
I was testing some more and I realized two things:

1. Bubble Flower cannot be used while invincible with Starman. This is a really minor issue though, maybe it's meant to be that way.

2. The More Important Thing: Whenever Bosses (the default ones) get captured by bubbles, they get killed instantly. I was thinking that maybe I could take all of the current Boss NPCs and put them in a blacklist so that the Bubble doesn't instantly kill bosses in one hit. How would I blacklist a set of NPCs though? A little help would be nice.

1. Oops, that's a mistake on my part.

2. There are blacklist and whitelist functions, you can use them like this:

Code: Select all

local bubble = require("AI/smbw_bubble")
bubble.whitelist(id)
bubble.blacklist(id)
Thanks for the help! Truth to tell, I actually figured out the solution a little while ago. What I did was a little different. I took this code

Code: Select all

local blacklist = {}
and changed it to this

Code: Select all

local blacklist = table.map{15, 39, 86, 200, 201, 351, 209, 262, 267, 268, 280, 281, 413, 608}
and it works! Now the Bubble Flower no longer insta-kills Bosses! Regardless, thanks for your help and Cat King's, I really appreciate it.

Re: customPowerups.lua - One more powerup framework! [v1.2]

Posted: Mon Aug 19, 2024 6:49 am
by Marioman2007
Update to Version 1.2!!

This is a major update which adds a lot of new features and major bugfixes.
- Costume support
- Cheats
- Forced state effects
- Support for respawnRooms and customReserve
- Now the code checks if the player is in mega state before doing stuff
- setting to prevent the powerup from going into the reserve box
- Bubble flower now works properly if the starman effect is active

Re: customPowerups.lua - One more powerup framework! [v1.2]

Posted: Fri Aug 30, 2024 9:10 pm
by WinterSweater
I tried to edit the mini mushroom so you can run up and down the walls and on the ceiling
Image

Re: customPowerups.lua - One more powerup framework! [v1.2]

Posted: Sun Sep 01, 2024 3:04 pm
by DrMekar
Image
For some reason I got this error when the Tank squashed the Spiny Egg.

If it helps, the Custom Powerups I'm using are:
Cape Feather, Superball Flower, Jumping Lui, Gold Flower, Swooper Suit and Chuck Suit.