Jump to content

[SOLVED] ReplaceOnUse not working


zeeb

Recommended Posts

Encountered another problem that I can't seem to solve this time around.
I've made a custom drink and when drunk the bottle disappears even though I am using "ReplaceOnUse".
 

item ModdedDrink
{
HungerChange =  -12,
Weight = 0.8,
Type = Food,
UnhappyChange = -10,
ThirstChange = -85,
DisplayName = Modded Drink,
ReplaceOnUse = WaterBottleEmpty,
Icon = Custom,
CustomContextMenu = Drink,
CustomEatSound = PZ_DrinkingFromBottle,
Carbohydrates = 104,
Proteins = 10,
Lipids = 2,
Calories = 400,
Packaged = TRUE,
CantBeFrozen = TRUE,
}

Everything seems to be working, except "ReplaceOnUse".
My custom icon shows up, the name works, the stats shows up and I can craft it.
I've tried using "PopBottleEmpty" aswell, but to no result.

Is "ReplaceOnUse" obsolete?
If so, could anyone point me in the direction on where I can find the current working functions?
I've done some searches but can't seem to find much on this.

Thank you in advance!
/Z

Edited by zeeb
Link to comment
Share on other sites

It worked.
I guess it is because it then allows the mod to use the Base module from the standard assets provided by the game?

Thanks so much man! :)

Edited by zeeb
Link to comment
Share on other sites

On this topic, is there any way to do a replaceonuse (self) without having to specify the precise module.itemid every time? 

 

I've recently added 500 items to the game and its going to be a hassle adding the replaceonuse ( item id ) to all of them

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...