Page 2 of 2

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Thu May 22, 2025 10:50 pm
by RadMetalMarioSMIX
How would I remove Power-Ups I don't want in the inventory system? Like the Ice Flower for Example?

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Thu May 22, 2025 10:56 pm
by mariobrigade2018
The ice flower is a basegame powerups, so I don’t think you can get rid of it.

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Fri May 23, 2025 12:24 am
by Lurrae
RadMetalMarioSMIX wrote:
Thu May 22, 2025 10:50 pm
How would I remove Power-Ups I don't want in the inventory system? Like the Ice Flower for Example?
I'm pretty sure you should just be able to put this code in a luna.lua file:

Code: Select all

local inventory = require("simpleInventory.lua")

inventory.removeSlot("iceflower")
Obviously it only removes the inventory slot for the Ice Flower, it doesn't actually delete the Ice Flower from the game as a whole, but this should work for your use case hopefully!

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Sat May 24, 2025 3:45 am
by RadMetalMarioSMIX
Lurrae wrote:
Fri May 23, 2025 12:24 am
RadMetalMarioSMIX wrote:
Thu May 22, 2025 10:50 pm
How would I remove Power-Ups I don't want in the inventory system? Like the Ice Flower for Example?
I'm pretty sure you should just be able to put this code in a luna.lua file:

Code: Select all

local inventory = require("simpleInventory.lua")

inventory.removeSlot("iceflower")
Obviously it only removes the inventory slot for the Ice Flower, it doesn't actually delete the Ice Flower from the game as a whole, but this should work for your use case hopefully!
Well yeah, I would guess it doesn't get rid of it completely. but the Ice Flower isn't in the episode so I didn't want it's slot glaring at the player. Thank you very much! Also is there a way to make it so you have an unlimited amount of the power-ups in each slot?

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Sun May 25, 2025 1:34 am
by Lurrae
RadMetalMarioSMIX wrote:
Sat May 24, 2025 3:45 am
Also is there a way to make it so you have an unlimited amount of the power-ups in each slot?
Yep- you can use the "creativemode" cheat! It gives you an infinite supply of all powerups until you type the cheat again, which reverts your inventory back to the state it was in before typing the cheat (so if you had 5 Super Mushrooms before enabling creativemode, those 5 Super Mushrooms will come back when you type creativemode again)

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Sun May 25, 2025 1:38 am
by RadMetalMarioSMIX
Lurrae wrote:
Sun May 25, 2025 1:34 am
RadMetalMarioSMIX wrote:
Sat May 24, 2025 3:45 am
Also is there a way to make it so you have an unlimited amount of the power-ups in each slot?
Yep- you can use the "creativemode" cheat! It gives you an infinite supply of all powerups until you type the cheat again, which reverts your inventory back to the state it was in before typing the cheat (so if you had 5 Super Mushrooms before enabling creativemode, those 5 Super Mushrooms will come back when you type creativemode again)
Well, I'm working on a Metroid Episode and I need it to only give infinite power-ups for the ones the player collects throughout the whole episode. Is there a way I can do that?

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Sun May 25, 2025 7:17 pm
by Lurrae
RadMetalMarioSMIX wrote:
Sun May 25, 2025 1:38 am
Well, I'm working on a Metroid Episode and I need it to only give infinite power-ups for the ones the player collects throughout the whole episode. Is there a way I can do that?
Oh, I see! There’s not currently a good way to do that, but there is an event that triggers when an item is collected. You could set the number of items in the slot to 99 when that happens as a temporary workaround? I’ll look into adding something more official in the next update!
The code for the event would look something like this:

Code: Select all

local inventory = require("simpleInventory")

function onInventoryItemAdded(eventObj, slot, quantity)
	local idx = inventory.getSlot(slot)
	SaveData.inventory[idx].quantity = 99
end

Re: simpleInventory.lua [v1.0] - Yet another Bowser's Fury-inspired inventory!

Posted: Mon May 26, 2025 6:43 am
by RadMetalMarioSMIX
0h ok. Thank you! :)