Jump to content

Recommended Posts

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.

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

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"?

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.

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 by ThatGourmand
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

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 by ThatGourmand
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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...