SephVII Posted April 29, 2017 Share Posted April 29, 2017 (edited) Hello DST community again, Today i coming to search help for my own Custom charackter, so far everything works but im now on the point where i do want a new crockpot recipe with 1 modded Ingredient and 3 vanilla ones. I tried to copy the code from Waiter 101 mod and modify it but welp im a bit lost i can load ingame but it doesnt have any effeckt also i had once CTD crash and i checked the vanilla files + google but wasnt able to find any clear answers. So i hope someone here could lend a hand and helping me out with this . -. . Best Regards Edited May 1, 2017 by Deathlord Avon Link to comment Share on other sites More sharing options...
Serpens Posted April 29, 2017 Share Posted April 29, 2017 so what is your relevant code? what exactly is not working? When you have a crash or any error, check logfiles for "error", see here were to find logfiles: Link to comment Share on other sites More sharing options...
SephVII Posted April 29, 2017 Author Share Posted April 29, 2017 (edited) 28 minutes ago, Serpens said: so what is your relevant code? what exactly is not working? When you have a crash or any error, check logfiles for "error", see here were to find logfiles: CTD = Crash to Desktop means no errors or crashlog just closing. And basicly i dont have any code currently after i tryd to copy and editing Waiters 101 code i scratched it since it didnt worked. Then i searched the vanilla files and googel to maybe get the code i need for doing it. I could try recreating the code i tried to copy and post it here tho. Was just hoping someone have maybe some exampels or what i need for the code. Edit : The entire thing didnt worked wasnt able to put the Vanilla and modded Ingredient into the cookpot. Best Regards Edited April 29, 2017 by Deathlord Avon Link to comment Share on other sites More sharing options...
Lumina Posted April 30, 2017 Share Posted April 30, 2017 (edited) One quick example of how your recipe should be. Possible that waiter 101 use and outdated code, should not cause crash but could cause problems. local myprefab_recipe = { name = "myprefab", test = function(cooker, names, tags) return tags.myingredient and tags.myingredient >= 2 and not tags.inedible end, priority = 5, weight = 1, foodtype = "VEGGIE", health = TUNING.HEALING_MED, hunger = TUNING.CALORIES_SMALL, perishtime = TUNING.PERISH_MED, sanity = -TUNING.SANITY_TINY, cooktime = .5, } AddCookerRecipe("cookpot", myprefab_recipe) You need usually to specify tags for your ingredient. AddIngredientValues({"myingredient"}, {dairy=1}) You could create custom tags. For example, i have an ingredients with the following tags : AddIngredientValues({"hot_leaf"}, {veggie=.5, spices=1, hot=1, light=1}, true, true) Spices is for compatibility with waiter 101. Hot is a custom tag, i use it for some recipe giving a bonus increasing temperature. Light is a custom tag i use for some ingredients that shouldn't give a good recipe when used alone in a crockpot (to avoid abuse and for balance purpose mostly) So for example, one recipe could be : local very_hot_chili_recipe = { name = "very_hot_chili", test = function(cooker, names, tags) return tags.meat and tags.veggie and tags.meat >= 1.5 and tags.veggie >= 1.5 and (tags.spices or tags.hot) and not tags.frozen end, priority = 10, weight = 1, foodtype = "MEAT", health = TUNING.HEALING_MED, hunger = TUNING.CALORIES_LARGE, perishtime = TUNING.PERISH_MED, sanity = TUNING.SANITY_SMALL, temperature = TUNING.HOT_FOOD_BONUS_TEMP*1.5, temperatureduration = TUNING.FOOD_TEMP_LONG, cooktime = .5, } AddCookerRecipe("cookpot", very_hot_chili_recipe) This is an improved version of the spicy chili. Note that you can specify a value for each tag, usually .5 or 1. This is useful for the tests, like you can see in the recipe of the very_hot_chili. You need at least a value of meat of 1.5, and a value of veggie of 1.5. Meaning that you can't obtain this recipe if you use, for example, 2 morsels (value of meat 0.5*2=1, so not enough) and 2 hot leaf (value of veggie 0.5*2=1, so not enough), so this way you can avoid an ingredient to be too good, or you can do a recipe asking for some specific values so it's harder to make but give better reward, for example. Oh and also, of course, you need to create a prefab of your recipe, if you don't it will not work. Edited April 30, 2017 by Lumina Link to comment Share on other sites More sharing options...
Lumina Posted April 30, 2017 Share Posted April 30, 2017 If you want to use existing items as ingredients, it's better to do it this way : local require = GLOBAL.require local cooking = require("cooking") local ingredients = cooking.ingredients ingredients.myprefab.tags.mytag = 1 Link to comment Share on other sites More sharing options...
SephVII Posted April 30, 2017 Author Share Posted April 30, 2017 (edited) @LuminaWorks flawless so far the only downside is i have mandrake in my recipe and it seems that i get mandrake soup mostly out. I guess i need to change the priority of my recipe over mandrake soup correct ? But what is the priority of mandrake soup . -. ? Edit : Nvm fixed it i just use cooked mandrake instead of Mandrake But ty for the big help Lumina i would probably sit days to figure out again . -. Best Regards Edited April 30, 2017 by Deathlord Avon 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