zeeb Posted May 7, 2017 Share Posted May 7, 2017 (edited) 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 May 7, 2017 by zeeb Link to comment Share on other sites More sharing options...
Soul Filcher Posted May 7, 2017 Share Posted May 7, 2017 Try Base.PopBottleEmpty zeeb 1 Link to comment Share on other sites More sharing options...
zeeb Posted May 7, 2017 Author Share Posted May 7, 2017 (edited) 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 May 7, 2017 by zeeb Link to comment Share on other sites More sharing options...
Soul Filcher Posted May 7, 2017 Share Posted May 7, 2017 You have so define the module for most places where you point to an item. Different modules could have items with the same id. zeeb 1 Link to comment Share on other sites More sharing options...
thiosk Posted May 8, 2017 Share Posted May 8, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now