Jump to content

Need help with making custom food mod


Recommended Posts

Hello. I'm really sorry for being such a noob at this but I'm trying to make a mod that adds a muffin using the crockpot. The coding part isn't exactly what I need help with (right now), but instead, just implementing a new item into the game. 

 

I'm following the "creating a handslot-equippable-item from scratch" guide by Malacath,  and I'm guessing since I'm making a edible item instead of an equippable item, I'm having some issues of how it should be done. If someone has the time I'll of course go into more specifics of my issue. Thank you in advance.

Link to comment
Share on other sites

@MintClock Hmm. I don't think that's the guide you need to follow. How bout a simple prefab template instead?

Also, these examples demonstrate how to do cool things with your mod, including crockpot stuff.

(copied portion for reference)

------------------------------------- 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)-- TODO: Allow custom food items to be visible within the cookpot.

 

Edit: If you just need help with the animation/art stuff etc, then.. ignore this.

Link to comment
Share on other sites

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.

×
  • Create New...