Jump to content

How to make inventory as a fridge?

Recommended Posts

I'm new to modding and I want to create a character which she has her inventory function like a fridge, makes food spoil slower in inventory.

I tried to add the tag "fridge" to the character but that doesn't seem to work and will crash the game.

pls help thanks!

Link to comment
Share on other sites

I'm not sure why the fridge tag would be crashing you, it doesn't look like its called in anything that would be upset with it not technically being a container.

Regardless, the actual way you'll want to do this is quite simple, just taking from WX who has something similar with one of his upgrade modules.

--In your master_postinit function
inst.components.preserver:SetPerishRateMultiplier(.5) -- .5 can be whatever you want as long as its above 0, anything above 1 will make things perish faster

And then you're done!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...