Raxxo Posted December 21, 2017 Share Posted December 21, 2017 (edited) I'm trying to make a mod for an item that can be created with a crockpot. I've successfully made it work and even made it appear in a crockpot after cooking in the game, but only when its recipe doesn't conflict with existing ones. For instance, it always turns into meatballs instead of my item if any meat/fish is involved. I've tried increasing its priority value to something ridiculously high (99999) to always favor my item, yet it still favors meatballs with a value of -1! Below is the code: local Action = GLOBAL.Action local ActionHandler = GLOBAL.ActionHandler PrefabFiles = {"myfood",} local myfood = { name = "myfood", test = function(cooker, names, tags) return names.berries and names.carrot and names.butter and tags.fish end, priority = 99999, weight = 1, foodtype = "GENERIC", temperature = TUNING.HOT_FOOD_BONUS_TEMP, temperatureduration = TUNING.FOOD_TEMP_AVERAGE, cooktime = 1, tags = {"myfood"}, } AddCookerRecipe("cookpot", myfood) Is it possible to solve this? Edited December 21, 2017 by Raxxo Link to comment https://forums.kleientertainment.com/forums/topic/85683-how-do-i-give-a-custom-crockpot-recipe-priority/ Share on other sites More sharing options...
Ricoom Posted December 28, 2017 Share Posted December 28, 2017 have you tried giving it priority of -2? Link to comment https://forums.kleientertainment.com/forums/topic/85683-how-do-i-give-a-custom-crockpot-recipe-priority/#findComment-988022 Share on other sites More sharing options...
MidrealmDM Posted December 29, 2017 Share Posted December 29, 2017 Instead of AddCookerRecipe("cookpot", myfood) use this for k,v in pairs(myfood) do v.name = k v.weight = v.weight or 1 v.priority = v.priority or 0 end for k,recipe in pairs(myfood) do AddCookerRecipe("cookpot", recipe) end =-=- That's what I have in my mod and it works fine. Link to comment https://forums.kleientertainment.com/forums/topic/85683-how-do-i-give-a-custom-crockpot-recipe-priority/#findComment-988256 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