Jump to content

Understanding Crock Pot Recipes


Recommended Posts

I'm working on a mod to create more special crock pot recipes for Warly. I only started modding DS a few days ago so all of this is really new to me. However, crock pot recipes are a really deep rabbit hole that seem like they go against a lot of the tutorials I've read. After about a day, I manage to track down where normal crock pot food is defined in preparedfoods.lua and where the oneat events are called in components/eater.lua and components/edible.lua and figure out how the copied versions of that code in warly.lua worked.

For the hell of it, I copied a new crock pot recipe, tweaked it's values and loaded the mod not thinking anything of it. When I tried to make it, IT WORKED! Granted it had no sprite in the crock pot or my inventory and the tooltip didn't work either. But eating it did work as I defined it. I even went back and after several hours, I managed to get the invisible crop pot recipe to cure poison and give poison immunity for a short time! But then I started asking my self, why did this work? There wasn't a prefab lua file defining the item like meatballs.lua or baconandeggs.lua .... oh wait THOSE FILE DON'T EXIST EITHER! So help me understand crock pot stuff and answer some questions for me:

1. Is preparedfoods.lua (and warly.lua) somehow creating these items by itself in place of using lua files in /prefabs? Where is getting the rest of the information about the item that is normally needed in the lua file? For example, where is the in game NAME for crockpot food defined?

2. Why doesn't tooltip work when I mouse over the item? I can eat it and even examine it but I can't see those actions in tooltip form.

3. "anim/cook_pot_food.zip" seems to be the place where all the sprites for crock pot food live. Making sprites is it's own rabbit hole but I want to know this: Considering how many crock pot foods there are, how does the game know which sprite and food go together?

4. Is it possible to make a recipe for an existing item without completely redefining? Like, if I wanted to make a 4 Twig crock pot recipe that made Log Armor, is there a way to just make the recipe point at armor_wood.lua and have it created an item exactly like normal Log Armor?

Link to comment
Share on other sites

You pretty much have to copy and paste the MakePreparedFood function from prefabs/preparedfoods.lua. You'll have to change the function to use your own "animation bank" since the one that function uses is just a giant image of every food cobbled together, and by "every food" I mean their foods, not your foods. Otherwise, it's just the same as creating any other prefab.

Oh, and cook_pot_food.zip should contain an .xml file that lists the offsets within its paired .tex texture file for every food, by name. I can't edit or create .tex files though, so I couldn't tell you for sure.

Link to comment
Share on other sites

On 3/14/2018 at 1:24 PM, kertinker said:

You pretty much have to copy and paste the MakePreparedFood function from prefabs/preparedfoods.lua. You'll have to change the function to use your own "animation bank" since the one that function uses is just a giant image of every food cobbled together, and by "every food" I mean their foods, not your foods. Otherwise, it's just the same as creating any other prefab.

Oh, and cook_pot_food.zip should contain an .xml file that lists the offsets within its paired .tex texture file for every food, by name. I can't edit or create .tex files though, so I couldn't tell you for sure.

I'm not sure I can use a different animation bank since the normal crock pot food will still need their normal animations. I think I need to edit the existing files. I read some tutorial on making art but they are old and leave out a bunch of stuff. None of them are from crock pot stuff.

cock_pot_food.zip does not contain an .xml file. It has anim.bin, atlas-0.tex (which is the image file with all the crock pot food), and build.bin. Where is this xml file located?

Another question I have is about the anim.bin file. I have looked all over and found nothing related to the creation, modification, or use of this file. No tutorial talks about it and if you extract it from the zip file, you cannot re-zip it. Windows Compress tool states that it can't find the file or it is empty. I can create .tex files, rename build.bin, and override files in a copy of a zip archive but trying to add an item I made to my inventory crashes Don't Starve. I don't mean it throws an error, I mean it stops working and I have to close the entire program. I'm about to give up, I have no idea how to troubleshoot this problem.

Edited by Tigermouth25
New question
Link to comment
Share on other sites

Yes you can, and must, use a different animation bank. You must not change the animation bank used by the normal foods, but for your own foods, you need one of your own, that has their animations in it.

I don't know why there is no xml file in cook_pot_food.zip. AFAIK anim.bin and build.bin are in a secret binary format known only to Klei, but I don't think those files are required for you to make your own. Look at textures in other mods for example .xml files. I can't even create .tex files myself, so I don't know how much I can help you.

You probably should just give up. :?

Link to comment
Share on other sites

In your prefabs you need to make a unpacker and a seperate lua file in your script folder that contains a table of all your custom crockpot foods.

I will use a shipwreckedfoods to demonstrate it as an example to demonstrate it.

The following code needs to be made in a .lua file in your scripts folder NOT your prefab folder, this is a table that has all your recipes, remember this is an example. You may need other aspects to make sure it works properly.

Spoiler

local foods=
{
	bananapop = 
	{
		test = function(cooker, names, tags) return names.cave_banana and tags.frozen and names.twigs  and not (tags.meat or tags.fish) end,
		priority = 20,
		foodtype = "FRUIT",
		health = TUNING.HEALING_MED,
		hunger = TUNING.CALORIES_SMALL,
		perishtime = TUNING.PERISH_SUPERFAST,
		sanity = TUNING.SANITY_LARGE,
		temperature = TUNING.COLD_FOOD_BONUS_TEMP,
		temperatureduration = TUNING.FOOD_TEMP_AVERAGE,
		cooktime = 0.5,
	},
	-- bisque = 
	-- {
		-- test = function(cooker, names, tags) return names.limpets and names.limpets == 3 and tags.frozen end,
		-- priority = 30,
		-- foodtype = "MEAT",
		-- health = TUNING.HEALING_HUGE,
		-- hunger = TUNING.CALORIES_MEDSMALL,
		-- perishtime = TUNING.PERISH_MED,
		-- sanity = TUNING.SANITY_TINY,
		-- cooktime = 1,
	-- },
	californiaroll = 
	{
		test = function(cooker, names, tags) return (names.cutlichen and names.cutlichen == 2) and (tags.fish and tags.fish >= 1) end,
		priority = 30,
		foodtype = "MEAT",
		health = TUNING.HEALING_MED,
		hunger = TUNING.CALORIES_LARGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_SMALL,
		cooktime = .5,
	},
	-- caviar =
	-- {
		-- test = function(cooker, names, tags) return (names.roe or names.roe_cooked == 3) and tags.veggie end,
		-- priority = 20,
		-- foodtype = "MEAT",
		-- health = TUNING.HEALING_SMALL,
		-- hunger = TUNING.CALORIES_SMALL,
		-- perishtime = TUNING.PERISH_MED,
		-- sanity = TUNING.SANITY_LARGE,
		-- cooktime = 2,
	-- },	
	ceviche = 
	{
		test = function(cooker, names, tags) return tags.fish and tags.fish >= 2 and tags.frozen end,
		priority = 20,
		foodtype = "MEAT",
		health = TUNING.HEALING_MED,
		hunger = TUNING.CALORIES_MED,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_TINY,
		temperature = TUNING.COLD_FOOD_BONUS_TEMP,
		temperatureduration = TUNING.FOOD_TEMP_AVERAGE,
		cooktime = 0.5,
	},
	coffee = 
	{
		test = function(cooker, names, tags) return names.coffeebeans_cooked and (names.coffeebeans_cooked == 4 or (names.coffeebeans_cooked == 3 and (tags.dairy or tags.sweetener)))	end,
		priority = 30,
		foodtype = "VEGGIE",
		health = TUNING.HEALING_SMALL,
		hunger = TUNING.CALORIES_TINY,
		perishtime = TUNING.PERISH_MED,
		sanity = -TUNING.SANITY_TINY,
		caffeine = TUNING.CAFFEINE.LARGE,
		cooktime = 0.5,
	},
	freshfruitcrepes =
	{
		test = function(cooker, names, tags) return tags.fruit and tags.fruit >= 1.5 and names.butter and names.honey end,
		priority = 30,
		foodtype = "FRUIT",
		health = TUNING.HEALING_HUGE,
		hunger = TUNING.CALORIES_SUPERHUGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_MED,
		cooktime = 2,
	},
	-- jellyopop = 
	-- {
		-- test = function(cooker, names, tags) return tags.jellyfish and tags.frozen and tags.inedible end,
		-- priority = 20,
		-- foodtype = "MEAT",
		-- health = TUNING.HEALING_MED,
		-- hunger = TUNING.CALORIES_SMALL,
		-- perishtime = TUNING.PERISH_SUPERFAST,
		-- sanity = 0,
		-- temperature = TUNING.COLD_FOOD_BONUS_TEMP,
		-- temperatureduration = TUNING.FOOD_TEMP_AVERAGE,
		-- cooktime = 0.5,
	-- },
	-- lobsterbisque = 
	-- {
		-- test = function(cooker, names, tags) return names.lobster and tags.frozen end,
		-- priority = 30,
		-- foodtype = "MEAT",
		-- health = TUNING.HEALING_HUGE,
		-- hunger = TUNING.CALORIES_MED,
		-- perishtime = TUNING.PERISH_MED,
		-- sanity = TUNING.SANITY_SMALL,
		-- cooktime = 0.5,
	-- },
	-- lobsterdinner = 
	-- {
		-- test = function(cooker, names, tags) return names.lobster and names.butter and not tags.meat and not tags.frozen end,
		-- priority = 25,
		-- foodtype = "MEAT",
		-- health = TUNING.HEALING_HUGE,
		-- hunger = TUNING.CALORIES_LARGE,
		-- perishtime = TUNING.PERISH_SLOW,
		-- sanity = TUNING.SANITY_HUGE,
		-- cooktime = 1,
	-- },
	monstertartare =
	{
		test = function(cooker, names, tags) return tags.monster and tags.monster >= 2 and tags.egg and tags.veggie end,
		priority = 30,
		foodtype = "MEAT",
		health = TUNING.HEALING_SMALL,
		hunger = TUNING.CALORIES_LARGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_SMALL,
		cooktime = 2,
	},
	-- musselbouillabaise =
	-- {
		-- test = function(cooker, names, tags) return (names.mussel and names.mussel == 2) and tags.veggie and tags.veggie >= 2 end,
		-- priority = 30,
		-- foodtype = "MEAT",
		-- health = TUNING.HEALING_MED,
		-- hunger = TUNING.CALORIES_LARGE,
		-- perishtime = TUNING.PERISH_MED,
		-- sanity = TUNING.SANITY_MED,
		-- cooktime = 2,
	-- },
	seafoodgumbo = 
	{
		test = function(cooker, names, tags) return tags.fish and tags.fish > 2 end,
		priority = 10,
		foodtype = "MEAT",
		health = TUNING.HEALING_LARGE,
		hunger = TUNING.CALORIES_LARGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_MEDLARGE,
		cooktime = 1,
	},
	sharkfinsoup = 
	{
		test = function(cooker, names, tags) return names.shark_fin end,
		priority = 20,
		foodtype = "MEAT",
		health = TUNING.HEALING_LARGE,
		hunger = TUNING.CALORIES_SMALL,
		perishtime = TUNING.PERISH_MED,
		sanity = -TUNING.SANITY_SMALL,
		naughtiness = 10,
		cooktime = 1,
	},
	surfnturf = 
	{
		test = function(cooker, names, tags) return tags.meat and tags.meat >= 2.5 and tags.fish and tags.fish >= 1.5 and not tags.frozen end,
		priority = 30,
		foodtype = "MEAT",
		health = TUNING.HEALING_HUGE,
		hunger = TUNING.CALORIES_LARGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_LARGE,
		cooktime = 1,
	},
	sweetpotatosouffle =
	{
		test = function(cooker, names, tags) return ((names.sweet_potato or names.sweet_potato_cooked) == 2 or
		(names.sweet_potato and names.sweet_potato_cooked)) and	tags.egg and tags.egg >= 2 end,
		priority = 30,
		foodtype = "VEGGIE",
		health = TUNING.HEALING_MED,
		hunger = TUNING.CALORIES_LARGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_MED,
		cooktime = 2,
	},
	tropicalbouillabaisse =
	{
		test = function(cooker, names, tags) return (names.fish3 or names.fish3_cooked) and (names.fish4 or names.fish4_cooked) and (names.fish5 or names.fish5_cooked) and tags.veggie end,
		priority = 35,
		foodtype = "MEAT",
		health = TUNING.HEALING_MED,
		hunger = TUNING.CALORIES_LARGE,
		perishtime = TUNING.PERISH_MED,
		sanity = TUNING.SANITY_MED,
		cooktime = 2,
		oneatenfn = function(inst, eater)
			if not (eater.components.health ~= nil and eater.components.health:IsDead() and not eater:HasTag("playerghost"))
				and eater.components.locomotor then
				eater.components.locomotor:SetExternalSpeedMultiplier(eater, "tropicalbouillabaisse", 1.25)
				if(eater.tropicalbouillabaissebuff)then eater.tropicalbouillabaissebuff:Cancel() end
				eater.tropicalbouillabaissebuff = eater:DoTaskInTime(30, function(inst) 
					eater.components.locomotor:RemoveExternalSpeedMultiplier(inst, "tropicalbouillabaisse") end)
			end
		end,
	},
}
for k,v in pairs(foods) do
	v.name = k
	v.weight = v.weight or 1
	v.priority = v.priority or 0
end
return foods

 

In order to unpack your little database of custom crockpot foods, you'll need to make a prefab in your prefabs folder.

Spoiler

local function MakePreparedFood(data)
    local foodprefabs = prefabs
    if data.prefabs ~= nil then
        foodprefabs = deepcopy(prefabs)
        for i, v in ipairs(data.prefabs) do
            if not table.contains(foodprefabs, v) then
                table.insert(foodprefabs, v)
            end
        end
    end
	local assets = -- these are the assets for your individual prefabs
	{
		Asset("ANIM", "anim/"..data.name..".zip"),
		Asset("ATLAS", "images/inventoryimages/"..data.name..".xml"),
		Asset("IMAGE", "images/inventoryimages/"..data.name..".tex"),
	}
	local prefabs = 
	{
		"spoiled_food",
	}
    local function fn()
        local inst = CreateEntity()

        inst.entity:AddTransform()
        inst.entity:AddAnimState()
        inst.entity:AddNetwork()

        MakeInventoryPhysics(inst)

        inst.AnimState:SetBuild(data.name) --"foodprefab"
        inst.AnimState:SetBank(data.name) --"foodprefab"
        inst.AnimState:PlayAnimation(data.name, false)

        inst:AddTag("preparedfood")
		--inst:AddTag("shipwreckedfood") you can add a tag to make them special if desired.
        if data.tags then
            for i,v in pairs(data.tags) do
                inst:AddTag(v)
            end
        end

        inst.entity:SetPristine()

        if not TheWorld.ismastersim then
            return inst
        end
        inst:AddComponent("edible")
        inst.components.edible.healthvalue = data.health
        inst.components.edible.hungervalue = data.hunger
        inst.components.edible.foodtype = data.foodtype or FOODTYPE.GENERIC
        inst.components.edible.sanityvalue = data.sanity or 0
		inst.components.edible.caffeinevalue = data.caffeine or 0 --caffeine doesn't do anything unless you make additional modifications in your mod.
        inst.components.edible.temperaturedelta = data.temperature or 0
        inst.components.edible.temperatureduration = data.temperatureduration or 0
        inst.components.edible:SetOnEatenFn(data.oneatenfn)

        inst:AddComponent("inspectable")
        inst.wet_prefix = data.wet_prefix
        
        inst:AddComponent("inventoryitem")
		inst.components.inventoryitem.atlasname = "images/inventoryimages/"..data.name..".xml"

        inst:AddComponent("stackable")
        inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

		if data.perishtime ~= nil and data.perishtime > 0 then
			inst:AddComponent("perishable")
			inst.components.perishable:SetPerishTime(data.perishtime)
			inst.components.perishable:StartPerishing()
			inst.components.perishable.onperishreplacement = "spoiled_food"
		end
		
        MakeSmallBurnable(inst)
        MakeSmallPropagator(inst)
        MakeHauntableLaunchAndPerish(inst)
        AddHauntableCustomReaction(inst, function(inst, haunter)
            --#HAUNTFIX
            --if math.random() <= TUNING.HAUNT_CHANCE_SUPERRARE then
                --if inst.components.burnable and not inst.components.burnable:IsBurning() then
                    --inst.components.burnable:Ignite()
                    --inst.components.hauntable.hauntvalue = TUNING.HAUNT_MEDIUM
                    --inst.components.hauntable.cooldown_on_successful_haunt = false
                    --return true
                --end
            --end
            return false
        end, true, false, true)
        ---------------------        
        inst:AddComponent("bait")
        ------------------------------------------------
        inst:AddComponent("tradable")    
        ------------------------------------------------  
        return inst
    end
    return Prefab(data.name, fn, assets, foodprefabs)
end
local prefs = {}
local foods = require("shipwreckedfood") --change this to your custom database of crockpot foods, lua name.
for k,v in pairs(foods) do
    table.insert(prefs, MakePreparedFood(v))
end
return unpack(prefs)

This prefab file will import the custom database for my example is called shipwreckedfood and make individual prefabs for each of them.

In order to add these recipes to your crockpots, you'll need to addcookerecipe in your modmain.lua

Spoiler

--CROCKPOT
local foods = require("shipwreckedfood")
for k,recipe in pairs (foods) do
	AddCookerRecipe("cookpot", recipe)
	--AddCookerRecipe("portablecookpot", recipe)
end

 

Again this is just an example using shipwrecked assets to demonstrate.

Finally you'll need to make individual animations and inventory images for each of the respective prefabs.

Attached below is a folder example for one of the foods, in its raw spriter file, and a raw .png for the bananapop inventoryimage.

If you have made any generic inventoryitems previously this should be familiar.

bananapop.zip

bananapop.png

Link to comment
Share on other sites

On 18/03/2018 at 1:29 AM, Tigermouth25 said:

Another question I have is about the anim.bin file. I have looked all over and found nothing related to the creation, modification, or use of this file. No tutorial talks about it and if you extract it from the zip file, you cannot re-zip it. Windows Compress tool states that it can't find the file or it is empty. I can create .tex files, rename build.bin, and override files in a copy of a zip archive but trying to add an item I made to my inventory crashes Don't Starve. I don't mean it throws an error, I mean it stops working and I have to close the entire program. I'm about to give up, I have no idea how to troubleshoot this problem.

No log even in the log files ?

Here you can see where the log files are located.

 

You can find here how to solve the invisible food on crockpot problem :

 

I hope this can help.

 

Link to comment
Share on other sites

 

16 hours ago, kertinker said:

Yes you can, and must, use a different animation bank. You must not change the animation bank used by the normal foods, but for your own foods, you need one of your own, that has their animations in it.

I don't know why there is no xml file in cook_pot_food.zip. AFAIK anim.bin and build.bin are in a secret binary format known only to Klei, but I don't think those files are required for you to make your own. Look at textures in other mods for example .xml files. I can't even create .tex files myself, so I don't know how much I can help you.

You probably should just give up. :?

Well, I'm pretty much about to at this point. In my defense, I've gone through a lot of the anim/ .zip files for every version of DS and all of them have anim.bin, atlas-0.tex, and build.bin. I have yet to see any .zip directory in anim/ that have .xml file. Certain mods have .xml in /image/inventoryimages/ but that's in addition to the normal .zip file. I cannot find any sort of tutorial that explains how to make anim.bin files or why I get an error when I try to add one to a zip file after I extract it.

I'm kinda of amazed how hard this is. I've had to use 4 different tools to make and convert images, and using GIMP isn't newbie friendly. Unless every file is 100% correct and everything is in the right location, it will fail with no explanation why. I really wish this was easier or at least would tell me what I did wrong.


@Lumina I wasn't aware it had a error log in a different folder. The error can be summed up as "can't find anim bank". That isn't surprising since I just modified and existing .zip file with a new build.bin and .tex file and hoped. Your guide was helpful but I still couldn't get it appear in the crock pot. I even tried to make a chocolate crock pot recipe and used your chocolate example to get it to appear but still nothing. Is appearing in the crock pot independent of the rest of the prefab's animation and inventory images or will not having those cause it to break? I also wanted to know about the .zip file inside your main chocolate folder. Where did this chocolate.zip come from? Did Spriter or the game generate it or do I have to make my own by hand? Does it go in anim/?

 

Could you look at the directory I made with your guide and tell me what I did wrong?

 

honeymuffin.zip

Link to comment
Share on other sites

24 minutes ago, Tigermouth25 said:

The error can be summed up as "can't find anim bank".

One explanation possible is : if you modified an existing file, changed the .tex file and renamed the build, you don't create a bank. So, for example, let say you take "carrot" as a template. You rename the build "parsnip", you change the .tex. And in your game, what you need to have is :

Quote


    inst.AnimState:SetBank("carrot")
    inst.AnimState:SetBuild("parsnip")
    inst.AnimState:PlayAnimation("idle")

Because when you change files in the .zip, you don't change the bank name, you use the original bank name.

 

When you create an item with spriter, THEN you create a bank (for example, the bank and build name of your honey muffin done in sprinter will be "honeymuffin".)

 

24 minutes ago, Tigermouth25 said:

Where did this chocolate.zip come from? Did Spriter or the game generate it or do I have to make my own by hand? Does it go in anim/?

I put it in the "exported" folder, and the game compiled it. It will automatically put the anim.zip in the anim folder.

 

31 minutes ago, Tigermouth25 said:

Could you look at the directory I made with your guide and tell me what I did wrong?

At first sight, the structure looks right. Did you put it in the "exported" folder ?

Link to comment
Share on other sites

Ah, so the anim.zip is made by the game from the stuff in the exported folder. I wondered what you mean by compiled.

I put both mine and your example in the exported folder and nothing seems to happen when I launch the game. Mod works (doesn't crash) when I enable it but nothing gets added to my mod's anim folder. Your folder has the .zip while mine doesn't but it doesn't look like that made any difference. Anything special I need to do to force the compiling? Do I need to add something to modmain.lua to get it to see these files?

 

Link to comment
Share on other sites

4 hours ago, Lumina said:

I put it in the "exported" folder, and the game compiled it. It will automatically put the anim.zip in the anim folder.

Oh, so the game itself will create those mysterious .bin files, from some sort of source texture thing? I don't know what Spriter is, so I can't really benefit from your link. In any case, it's probably written for Microsoft .NET, and I can't use that, so information on the file format would be much more useful to me than a tutorial on how to use Spriter.

Link to comment
Share on other sites

14 hours ago, Tigermouth25 said:

I put both mine and your example in the exported folder and nothing seems to happen when I launch the game. Mod works (doesn't crash) when I enable it but nothing gets added to my mod's anim folder. Your folder has the .zip while mine doesn't but it doesn't look like that made any difference. Anything special I need to do to force the compiling? Do I need to add something to modmain.lua to get it to see these files?

Can you attach your entire mod ? At this point it would probably be easier for me to find why it's not working. ( Zip your entire mod folder, then use the attach option here in the forum)

13 hours ago, kertinker said:

Oh, so the game itself will create those mysterious .bin files, from some sort of source texture thing? I don't know what Spriter is, so I can't really benefit from your link. In any case, it's probably written for Microsoft .NET, and I can't use that, so information on the file format would be much more useful to me than a tutorial on how to use Spriter.

The game compile spriter file ( .scml file + .png files) into the anim.zip file (anim.bin file, build.bin file, texture.tex file). I don't know exactly what kind of information about the file format you need, but if you can't use spriter, the best way to proceed would probably be to use existing anim and change the .tex and build.bin file (as i said, in this case, you still use the original bank of the item). It limits your option, of course...

Edited by Lumina
Link to comment
Share on other sites

26 minutes ago, Tigermouth25 said:

Here you go. I'd love to know what I'm doing wrong.

I don't know what was wrong, honestly. I tried to compile files and it seems to work. I can't test because your mod seems to be for DS and we are on the DST section of the forum, so i didn't notice it wasn't for DST at first.

Imp Warly With New Foods.zip

Anyway, here is the (hopefully) compiled version, the structure of file should be the same for DS and DST so it should work properly on DS, but i let you test it and see if everything is working fine. If you still encounter trouble, i'll try to help but can't promise anything.

Also i have no clues about why the autocompiler did nothing on your side, i didn't touch anything, just copied the file in my mod folder, started the game and the compiling started fine.

Link to comment
Share on other sites

I tried running it in DST and I get the error below. Funny thing is, if I run it in DS and remove the anim zip file I ALSO get the same missing assert error.

scripts/mods.lua(296,1) Mod: Imp Warly With New Foods (Improved Warly with New Food)	Registering prefabs	
scripts/mods.lua(302,1) Mod: Imp Warly With New Foods (Improved Warly with New Food)	  Registering prefab file: prefabs/monster_kabobs	
scripts/mods.lua(306,1) Mod: Imp Warly With New Foods (Improved Warly with New Food)	    monster_kabobs	
scripts/mods.lua(302,1) Mod: Imp Warly With New Foods (Improved Warly with New Food)	  Registering prefab file: prefabs/honeymuffin	
scripts/mods.lua(44,1) error calling LoadPrefabFile in mod Imp Warly With New Foods (Improved Warly with New Food): 
...m/steamapps/common/dont_starve/data/scripts/util.lua:333: Could not find an asset matching anim/honeymuffin.zip in any of the search paths.
LUA ERROR stack traceback:
        =[C] in function 'assert'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(333,1) in function 'resolvefilepath'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(53,1) in function 'RegisterPrefabs'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(81,1)
        =(tail call) ?
        =[C] in function 'xpcall'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(42,1)
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(303,1) in function 'RegisterPrefabs'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(138,1) in function 'LoadAssets'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1418,1) in function 'DoResetAction'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1433,1) in function 'complete_callback'
	...
        =[C] in function 'GetPersistentString'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/saveindex.lua(111,1) in function 'Load'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1454,1) in function 'callback'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(602,1) in function 'Set'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(486,1)
        =[C] in function 'GetPersistentString'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(484,1) in function 'Load'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1453,1) in main chunk
        =[C] in function 'require'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(666,1)	
scripts/mods.lua(253,1) Disabling Imp Warly With New Foods (Improved Warly with New Food) because it had an error.	
scripts/frontend.lua(723,1) SCRIPT ERROR! Showing error screen	

To compound problems, If I run the version you put in your post and try to add "honeymuffin" to my inventory with c_give will crash the game and nothing appears in the error log.

Clearly something wrong on a bigger scale. I got no idea what would disable the auto compiler either.

Just to make sure I'm not crazy, the auto compiler isn't some sort of separate tool I need to download right? It comes with the game by default and isn't part of some special suite of modding tools I should have had before I started, right?

Edited by Tigermouth25
typo
Link to comment
Share on other sites

Yes, the autocompiler should be in the game by default, as far as i know. Maybe it is also in steam tools ? Worth to look just to verify.

10 hours ago, Tigermouth25 said:

To compound problems, If I run the version you put in your post and try to add "honeymuffin" to my inventory with c_give will crash the game and nothing appears in the error log.

So if you run my version, you don't have the "could not find asset anim/honeymuffin.zip" error ? But your game crash when you try to give you the item ? I would suggest to use an existing anim for your item and test it so you can exclude/verify one reason for the crash and narrow it down as much as possible.

Edited by Lumina
Link to comment
Share on other sites

Yep, if I run your version with no changes it will load the game but will instantly crash if I try to create the item. It swapped it for another item's animations and it does work. That's nice, but gives me no insight as to why mine fails. It also doesn't like my inventoryimage/ files. I have to comment them out to get it run or it crashes like before. But once again, no info is in the log.txt file on what caused the crash.

This is some serious trial and error programming here.

 

EDIT: I think my problem has evolved from just being a crock pot recipe issue into something bigger. I'll make a new topic about the auto compiler. Topic link below.

Auto compilier topic link

Edited by Tigermouth25
New topic link
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...