Jump to content

Recommended Posts

Hey there,

first, it's my first mod so please don't blame me for a mistake, which is pretty easy to fix.

Also, english is not my native language and I'm sorry for my mistakes.

Well, here's my problem: I wanted to create my own recipe for "jam". The ingredients should be 3 berries or berries_cooked and 1 pomegranate or pomegranate_cooked.

Attache is my code for the modmain.lua.

It already crashes when i enable the mod.

I will also attach my log.txt, which doesnt help me at all, but maybe will help you.

 

Thanks in advance,

kusa

PrefabFiles = {		"jam",}STRINGS = GLOBAL.STRINGSRECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeIngredient = GLOBAL.IngredientTECH = GLOBAL.TECH--GLOBAL.STRINGS.NAMES.JAM = "Jam"	local harvestspice = GLOBAL.Recipe("harvestspice", { Ingredient("seeds", 1)}, RECIPETABS.REFINE, TECH.NONE)	harvestspice.atlas = "images/inventoryimages/harvestspice.xml"	AddIngredientValues({"pomegranate"}, {pomegranate=1})	local jam = 	{		name = "jam",		test = function(cooker, names, tags) return		(names.berries or names.berries_cooked) and names.pomegranate and not tags.meat end,		priority = 5,		weight = 1,		foodtype="VEGGIE",		health = TUNING.HEALING_MED,		hunger = TUNING.CALORIES_MED,		sanity = TUNING.SANITY_MED,		perishtime = TUNING.PERISH_SUPERSLOW,		cooktime = 2,	}	AddCookerRecipe("cookpot",jam)		local wetgoop =	{		name = "wetgoop",		test = function(cooker, names, tags) return true end,		priority = -2,		weight = 1,		health=0,		hunger=0,		perishtime = TUNING.PERISH_FAST,		sanity = 0,		cooktime = .25,	}	 

log.txt

I looked into it some more today and finally did it, i believe.

I can cook something with my ingredients but there's no pic, maybe because i used the pics and code of Camp Cuisine: A Thankful Harvest, which i have disabled :/

It still crashes when i try to spawn it using DebugSpawn ("jam")...

 

Hope you can help me,

kusa

Changed a bit stuff here and there, but it still crashes now with another error in the log.txt:

lua_gc took 0.01 seconds~SimLuaProxy()lua_close took 0.01 secondsReleaseAllReleaseAll FinishedcGame::StartPlayingLOADING LUADoLuaFile scripts/main.luaDoLuaFile loading buffer scripts/main.luascripts/main.lua(151,1) running main.lua	scripts/modindex.lua(257,1) loaded modindex	scripts/modindex.lua(57,1) ModIndex: Beginning normal load sequence.	scripts/mods.lua(141,1) Loading mod: modleo-1 (Jam) (Old API! (mod: 3 game: 4) )	scripts/mods.lua(165,1) Mod: modleo-1 (Jam)	Loading modworldgenmain.lua	scripts/mods.lua(173,1) Mod: modleo-1 (Jam)	  Mod had no modworldgenmain.lua. Skipping.	scripts/mods.lua(165,1) Mod: modleo-1 (Jam)	Loading modmain.lua	scripts/mods.lua(255,1) Mod: modleo-1 (Jam)	Registering prefabs	scripts/mods.lua(261,1) Mod: modleo-1 (Jam)	  Registering prefab file: prefabs/jam	scripts/mods.lua(265,1) Mod: modleo-1 (Jam)	    jam	scripts/mods.lua(278,1) Mod: modleo-1 (Jam)	  Registering default mod prefab	Could not load texture ../mods/modleo-1/images/inventoryimages/challa.texBreak at: c:\jenkins\workspace\jobs\DontStarve_Release_Make_Steam_Package\workspace\source\util/resourcemanager.h(142) :

It says old API, even though i set the API in the modinfo.lua = 4...

and for the "Could not load texture ../mods/modleo-1/images/inventoryimages/challa.tex", as i said already i'm using the A Thankful Harvest mod to get started (there were some crockpotrecipes in the mod).

 

I don't even know where the challa.tex file is being needed, since i already changed every challa with a jam and renamed the challa.tex to jam.tex. In the jam.xml i changed the challa.tex to jam.tex...

 

 

Thanks for helping me! :D

It finally doesn't crash anymore, didnt know what went wrong...

But it say To be enabled in the mod page and when i start a game to try out the recipe I always get wet goop... here is my modmain.lua:

PrefabFiles = {		"jam",}STRINGS = GLOBAL.STRINGSRECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeIngredient = GLOBAL.IngredientTECH = GLOBAL.TECH--GLOBAL.STRINGS.NAMES.JAM = "jam"AddIngredientValues({"pomegranate"}, {pomegranate=1})AddIngredientValues({"pomegranate_cooked"}, {pomegranate=1})	local jam = 	{		name = "jam",		test = function(cooker, names, tags) return (names.berries or names.berries_cooked) and (names.pomegranate or names.pomegranate_cooked) and tags.sweetener and names.twigs and not tags.meat end,		priority = 10,		weight = 1,		foodtype="VEGGIE",		health = TUNING.HEALING_MED,		hunger = TUNING.CALORIES_MED,		sanity = TUNING.SANITY_MED,		perishtime = TUNING.PERISH_SUPERSLOW,		cooktime = 1,	}	AddCookerRecipe("cookpot",jam)

first time i've had a chance to browse this thread.  was the solution changing the 'priority = 10' to something higher than wet goops priority?  I havent messed with any recipes yet but would be useful to know solution in case i run into same problem in future

Edited by seronis

first time i've had a chance to browse this thread.  was the solution changing the 'priority = 10' to something higher than wet goops priority?  I havent messed with any recipes yet but would be useful to know solution in case i run into same problem in future

I was a little confused to what the hell the harvest spice thing was, that might have been the problem

first time i've had a chance to browse this thread.  was the solution changing the 'priority = 10' to something higher than wet goops priority?  I havent messed with any recipes yet but would be useful to know solution in case i run into same problem in future

No that wasn't it, I will explain it later i g2g now :/

 

I was a little confused to what the hell the harvest spice thing was, that might have been the problem

Yeah as i said i used the A Thankful Harvest mod, and messed a bit around. i failed to delete all the stuff i didn't need. That was only one part of my problem :D

I also missed some stuff in the modinfo.lua, modmain.lua and the jam.xml...

first time i've had a chance to browse this thread.  was the solution changing the 'priority = 10' to something higher than wet goops priority?  I havent messed with any recipes yet but would be useful to know solution in case i run into same problem in future

I can upload my files if you want to have a look into them :D My mod is working fine, except for when i drop my jam, i can't see it D: I can still pick it up using the spacebar. I also added an inventoryimage for it :3

Yeah i know that, but I don't know how i creat the .bin files and the atlas-0.tex file and so on :/

The don't starve mod tools autocompiler will automatically create the anim.zips for you provided with a 

exported 

               -> jam

                          -> jam

                                   -> jam.png, jam.scml

once you get the spriter file working just use the autocompiler and it will make the anims and place them in the right folder for you, if you'd like some help with that, supply me with a download of the mod and ill do it for you

Edited by Blazingice26

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...