ColeenMcCleod Posted September 16, 2013 Share Posted September 16, 2013 So I'm working on adding new recipes to the crockpot.. and I'd like to be able to use bat wings and the vegetable meat, but the crockpot refuses to recognize them. How would I go about making it accept these ingredients? Cheers, Coleen Link to comment Share on other sites More sharing options...
CJB Posted September 16, 2013 Share Posted September 16, 2013 So I'm working on adding new recipes to the crockpot.. and I'd like to be able to use bat wings and the vegetable meat, but the crockpot refuses to recognize them. How would I go about making it accept these ingredients? Cheers, Coleen Take a look at the preparedfoods.lua file, that should get you somewhere Link to comment Share on other sites More sharing options...
ColeenMcCleod Posted September 16, 2013 Author Share Posted September 16, 2013 Tried that It's recognizing the other ingredients for the recipe, but I can't even place the batwings in the crockpot container in game. My character just says she can't put them in the pot. Link to comment Share on other sites More sharing options...
Seyph Posted September 16, 2013 Share Posted September 16, 2013 Try this, maybe? I found it in some API examples I downloaded a while back.-- Cookpot recipes---- AddIngredientValues({"item"}, {"tag"=value})-- Lets the game know the "worth" of an item. You can supply a list of-- items in the first parameter if they will all have the same values.---- Each tag is a particular "kind" of thing that a recipe might require-- (i.e. meat, veggie) and the value is how much of that kind your item is-- worth.---- See cooking.lua for examples. ---- AddCookerRecipe("cooker", recipe)-- Adds the recipe for that kind of cooker. In the base game the only-- cooker is "cookpot".---- See preparedfoods.lua for recipe examples.--------------------------------------- Give flowers some cooking value. We made up a new "kind" of food, called flower.AddIngredientValues({"petals", "petals_evil"}, {flower=1})-- Add a new recipe which requires flowers as an ingredient.-- NOTE!!! No prefabs for this recipe exist, so you won\'t actually be able to-- cook it. This is just a code sample.local flowercake = { name = "flowercake", test = function(cooker, names, tags) return tags.flower >= 2 and names.butter end, priority = 1, weight = 1, foodtype="VEGGIE", health = TUNING.HEALING_TINY, hunger = TUNING.CALORIES_LARGE, sanity = TUNING.SANITY_TINY, perishtime = TUNING.PERISH_MED, cooktime = 0.75,}AddCookerRecipe("cookpot", flowercake) Link to comment Share on other sites More sharing options...
ColeenMcCleod Posted September 16, 2013 Author Share Posted September 16, 2013 Blast, no, still not working. Thanks though! Link to comment Share on other sites More sharing options...
ColeenMcCleod Posted September 16, 2013 Author Share Posted September 16, 2013 Ah! I found the API examples you posted, Sukoushi, and was able to get the crockpot to recognize the bat wings as a viable ingredient. However, when I add more than one recipe to the modmain.lua, neither of them work. What am I missing here? Here's what I have so far: AddIngredientValues({"batwing", "batwing_cooked"}, {batmeat=1})AddIngredientValues({"cave_banana"}, {banana=1})local batbites = { name = "batbites", test = function(cooker, names, tags) return tags.batmeat >=2 end, priority = 1, weight = 1, foodtype="MEAT", health = TUNING.HEALING_TINY, hunger = TUNING.CALORIES_LARGE, sanity = TUNING.SANITY_TINY, perishtime = TUNING.PERISH_MED, cooktime = 0.75,}AddCookerRecipe("cookpot", batbites)local bannanacreme = { name = "bannanacreme", test = function(cooker, names, tags) return tags.banana >=2 end, priority = 1, weight = 1, foodtype = "VEGGIE", health = TUNING.HEALING_SMALL, hunger = TUNING.CALORIES_LARGE, sanity = TUNING.SANITY_TINY, perishtime = TUNING.PERISH_MED, cooktime = 0.75,}AddCookerRecipe ("cookpot", bannanacreme) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.