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 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 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 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 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 Share on other sites More sharing options...
ThatGourmand Posted April 17, 2020 Share Posted April 17, 2020 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 Link to comment 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 Share on other sites More sharing options...
ThatGourmand Posted April 17, 2020 Share Posted April 17, 2020 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 Link to comment Share on other sites More sharing options...
corryalpha Posted April 17, 2020 Author Share Posted April 17, 2020 im gonna try your file. Link to comment 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 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.