corryalpha Posted April 17, 2020 Share Posted April 17, 2020 I'm trying to create a new food item that can be cooked with the crockpot. I am trying to build it off of the "Sample Prefab" but I am unsure how to make it into an item. I know Lua scripting, but I am not the best. TL;DR I'm too dumb to figure out how to make the "Sample Prefab" or anything that i made in Spriter cookable with the crockpot. Any help would be appreciated. Thanks. Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/ Share on other sites More sharing options...
ThatGourmand Posted April 17, 2020 Share Posted April 17, 2020 If you would like to make a food item cookable you need to specify it in the prefab that you're making inst:AddComponent("cookable") inst.components.cookable.product = [REFERENCE TO PREFAB THAT IS THE RESULT OF COOKING] Dunno if this helps, if you need some more info feel free to ask Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325391 Share on other sites More sharing options...
corryalpha Posted April 17, 2020 Author Share Posted April 17, 2020 1 minute ago, ThatGourmand said: If you would like to make a food item cookable you need to specify it in the prefab that you're making inst:AddComponent("cookable") inst.components.cookable.product = [REFERENCE TO PREFAB THAT IS THE RESULT OF COOKING] Dunno if this helps, if you need some more info feel free to ask What does "inst" mean, and does prefab mean "item"? Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325392 Share on other sites More sharing options...
ThatGourmand Posted April 17, 2020 Share Posted April 17, 2020 "inst" is the instancte of the entity that you created to make your food item, and prefab is short for "prefabricated object" in which case is the mentioned food item Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325396 Share on other sites More sharing options...
corryalpha Posted April 17, 2020 Author Share Posted April 17, 2020 Just now, ThatGourmand said: "inst" is the instancte of the entity that you created to make your food item, and prefab is short for "prefabricated object" in which case is the mentioned food item Oh, okay. How do I make a prefab? I tried using the "sampleprefab" template but it errors on start. Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325399 Share on other sites More sharing options...
ThatGourmand Posted April 17, 2020 Share Posted April 17, 2020 (edited) Can you show me what you have so far, cause if you already made a food-item and you only want to make that item insertable into the crockpot you should add this line to your modmain.lua AddIngredientValues({"custom_item_name",}, {tag1=1, tag2=2}) with your own item name (prefab name) and the tags you want your item to have Edited April 17, 2020 by ThatGourmand Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325404 Share on other sites More sharing options...
corryalpha Posted April 17, 2020 Author Share Posted April 17, 2020 Just now, ThatGourmand said: Can you show me what you have so far, cause if you already made a food-item and you only want to make that item insertable into the crockpot you should add this line to your modmain.lua AddIngredientValues({"custom_item_name",}, {tag1=1, tag2=2}) I attached all i have right now. Please note that i did not create it. chocolate.zip Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325406 Share on other sites More sharing options...
ThatGourmand Posted April 17, 2020 Share Posted April 17, 2020 (edited) I noticed that the chocolate.scml file doesn't realy display the chocolate img, so you kinda have to fix that still chocolate.zip If some stuff seems unclear or you got other questions, ask away Edit: I forgot to clearify that the zip that I send contains the code that you need ;p Edited April 17, 2020 by ThatGourmand Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325432 Share on other sites More sharing options...
corryalpha Posted April 17, 2020 Author Share Posted April 17, 2020 (edited) im gonna try your file. Edited April 17, 2020 by corryalpha Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325435 Share on other sites More sharing options...
corryalpha Posted April 17, 2020 Author Share Posted April 17, 2020 1 hour ago, ThatGourmand said: I noticed that the chocolate.scml file doesn't realy display the chocolate img, so you kinda have to fix that still chocolate.zip 25.26 kB · 0 downloads If some stuff seems unclear or you got other questions, ask away Edit: I forgot to clearify that the zip that I send contains the code that you need ;p i dont know what to do from this point on. how can i make this a recipe in the crockpot now? Link to comment https://forums.kleientertainment.com/forums/topic/117380-i-need-help-creating-a-new-food-item/#findComment-1325465 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