Jump to content

Character Recipe Help?


Recommended Posts

Hey, so i am making Drok the Caveman for don't starve together.

 

I get problems with recipes when i open a recipe tab in game. The recipes are meant to be only available for Drok.

This is the code i have inside the modmain lua:

 

PrefabFiles = {	"drok",	"wigstanstone",	"wigstan",	"wigstanfull",	"javelin",	"redpaint",	"beefalo_hide",}Assets = {    Asset( "IMAGE", "images/saveslot_portraits/drok.tex" ),    Asset( "ATLAS", "images/saveslot_portraits/drok.xml" ),    Asset( "IMAGE", "images/selectscreen_portraits/drok.tex" ),    Asset( "ATLAS", "images/selectscreen_portraits/drok.xml" ),    Asset( "IMAGE", "bigportraits/drok.tex" ),    Asset( "ATLAS", "bigportraits/drok.xml" ),		Asset( "IMAGE", "images/map_icons/drok.tex" ),	Asset( "ATLAS", "images/map_icons/drok.xml" ),		Asset( "IMAGE", "images/avatars/avatar_drok.tex" ),    Asset( "ATLAS", "images/avatars/avatar_drok.xml" ),		Asset( "IMAGE", "images/avatars/avatar_ghost_drok.tex" ),    Asset( "ATLAS", "images/avatars/avatar_ghost_drok.xml" ),    Asset("SOUNDPACKAGE", "sound/drok.fev"),    Asset("SOUND", "sound/drok.fsb"),    --Asset( "IMAGE", "images/inventoryimages/redpaint.tex"),    Asset( "ATLAS", "images/inventoryimages/redpaint.xml" ),    --Asset( "IMAGE", "images/inventoryimages/wigstan.tex"),    Asset( "ATLAS", "images/inventoryimages/wigstan.xml" ),    --Asset( "IMAGE", "images/inventoryimages/wigstanfull.tex"),    Asset( "ATLAS", "images/inventoryimages/wigstanfull.xml" ),    --Asset( "IMAGE", "images/inventoryimages/beefalo_hide.tex"),    Asset( "ATLAS", "images/inventoryimages/beefalo_hide.xml" ),    --Asset( "IMAGE", "images/inventoryimages/javelin.tex"),    Asset( "ATLAS", "images/inventoryimages/javelin.xml" ),}RemapSoundEvent( "dontstarve/characters/drok/death_voice", "drok/sound/death_voice" )RemapSoundEvent( "dontstarve/characters/drok/hurt", "drok/sound/hurt" )RemapSoundEvent( "dontstarve/characters/drok/talk_LP", "drok/sound/talk_LP" )local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal OldIsRecipeValid = GLOBAL.IsRecipeValidlocal function IsRecipeValid(recipe)	return OldIsRecipeValid(recipe) and		((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) or not recipe.tagneeded)endGLOBAL.IsRecipeValid = IsRecipeValidlocal Recipe = GLOBAL.Recipelocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal recipes = {	Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),	Recipe("wigstan", {Ingredient("wigstanstone", 1), Ingredient("redpaint", 2)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),	Recipe("wigstanfull", {Ingredient("wigstan", 1), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),		--local paintedrock = GLOBAL.Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 3, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer", nil, nil, nil, 1)	Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),	Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),	}STRINGS.CHARACTER_TITLES.drok = "The Caveman"STRINGS.CHARACTER_NAMES.drok = "Drok"STRINGS.CHARACTER_DESCRIPTIONS.drok = "*Is dumb\n*Grows hair that keeps him warm\n*Is strong but needs food"STRINGS.CHARACTER_QUOTES.drok = "\"Oog!\""STRINGS.CHARACTERS.DROK = require "speech_drok"STRINGS.NAMES.DROK = "Drok"STRINGS.CHARACTERS.GENERIC.DESCRIBE.DROK = {	GENERIC = "It's Drok!",	ATTACKER = "That Drok looks shifty...",	MURDERER = "Murderer!",	REVIVER = "Drok, friend of ghosts.",	GHOST = "Drok could use a heart.",}table.insert(GLOBAL.CHARACTER_GENDERS.MALE, "drok")AddMinimapAtlas("images/map_icons/drok.xml")AddModCharacter("drok")

 

I'm really not sure what went wrong, the log file says something about a tex, but im not sure anymore.

Here is the log file:

[...]WARNING! Could not find region 'redpaint.tex' from atlas 'images/inventoryimages.xml'. Is the region specified in the atlas?Looking for default texture '(null)' from atlas 'images/inventoryimages.xml'.images/inventoryimages.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(124,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'        scripts/widgets/crafting.lua(152,1) in function 'ScrollUp'        scripts/widgets/crafting.lua(29,1) in function 'onclick'        scripts/widgets/imagebutton.lua(90,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)images/inventoryimages.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(124,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'        scripts/widgets/crafting.lua(152,1) in function 'ScrollUp'        scripts/widgets/crafting.lua(29,1) in function 'onclick'        scripts/widgets/imagebutton.lua(90,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)SCRIPT ERROR! Showing error screen	QueryServerComplete no callbackQueryServerComplete no callbackForce aborting...

 

Anyone has an idea? Thanks

Edited by QuickShot010
Link to comment
Share on other sites

@QuickShot010, It doesn't look like the recipes are your problem, there. You need to be setting the atlasname for the redpaint prefab, because otherwise it looks in the game's inventoryimages.tex. Something like this:

		inst.components.inventoryitem.atlasname = "images/inventoryimages/redpaint.xml"

You might be setting that in the wrong place in your prefab.

Link to comment
Share on other sites

@QuickShot010, It doesn't look like the recipes are your problem, there. You need to be setting the atlasname for the redpaint prefab, because otherwise it looks in the game's inventoryimages.tex. Something like this:

		inst.components.inventoryitem.atlasname = "images/inventoryimages/redpaint.xml"

You might be setting that in the wrong place in your prefab.

 

So, i need to put that code inside the prefab lua instead of the modmain? because the recipes are inside the modmain.

 

Thank you for your reply

Link to comment
Share on other sites

So, i need to put that code inside the prefab lua instead of the modmain?
 Yes. I think the error is not with the recipe, but with the prefab-- when you open up the recipe tab, it goes to load that prefab's inventory item image, which it looks for in inventoryimages.xml instead of your own redpaint.xml, and then crashes.
Link to comment
Share on other sites

 Yes. I think the error is not with the recipe, but with the prefab-- when you open up the recipe tab, it goes to load that prefab's inventory item image, which it looks for in inventoryimages.xml instead of your own redpaint.xml, and then crashes.

 

Hmmm, i looked inside the prefab files and i already added that line. This is the prefab lua from the red dye:

local Assets ={	Asset("ANIM", "anim/redpaint.zip"),    Asset("ATLAS", "images/inventoryimages/redpaint.xml"),}local function fn(Sim)	local inst = CreateEntity()	inst.entity:AddTransform()	inst.entity:AddAnimState()    MakeInventoryPhysics(inst)     inst.AnimState:SetBank("redpaint")    inst.AnimState:SetBuild("redpaint")    inst.AnimState:PlayAnimation("idle", true)        inst:AddComponent("stackable")    inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM    inst:AddComponent("inventoryitem")	inst.components.inventoryitem.atlasname = "images/inventoryimages/redpaint.xml"    inst.components.inventoryitem.imagename = "redpaint"    inst:AddComponent("inspectable")        return instendSTRINGS.NAMES.REDPAINT = "Red Dye"STRINGS.CHARACTERS.DROK.DESCRIBE.REDPAINT = "Drok use to paint!"STRINGS.CHARACTERS.GENERIC.DESCRIBE.REDPAINT = "It looks primitive."return Prefab( "common/inventory/redpaint", fn, Assets)

So... that isnt the problem... Any ideas?

Thanks for your help!

Edited by QuickShot010
Link to comment
Share on other sites

@QuickShot010, Looks like scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe' refers to recipe.atlas, which appears to only get populated with inventoryimages.xml. So I think if you change you recipe section to this, it should do the trick (I also added the tagneeded part that you missed-- without it the recipes will be buildable by anyone; make sure you're also adding the redpaint_builder, wigstan_builder, etc tags to Drok):

local recipes = {    Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstan", {Ingredient("wigstanstone", 1), Ingredient("redpaint", 2)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstanfull", {Ingredient("wigstan", 1), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),        --local paintedrock = GLOBAL.Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 3, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer", nil, nil, nil, 1)    Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),    Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),    }for k,v in pairs(recipes) do    v.tagneeded = true    v.atlas = "images/inventoryimages/" .. v.name .. ".xml"end
Link to comment
Share on other sites

 

@QuickShot010, Looks like scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe' refers to recipe.atlas, which appears to only get populated with inventoryimages.xml. So I think if you change you recipe section to this, it should do the trick (I also added the tagneeded part that you missed-- without it the recipes will be buildable by anyone; make sure you're also adding the redpaint_builder, wigstan_builder, etc tags to Drok):

local recipes = {    Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstan", {Ingredient("wigstanstone", 1), Ingredient("redpaint", 2)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstanfull", {Ingredient("wigstan", 1), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),        --local paintedrock = GLOBAL.Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 3, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer", nil, nil, nil, 1)    Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),    Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),    }for k,v in pairs(recipes) do    v.tagneeded = true    v.atlas = "images/inventoryimages/" .. v.name .. ".xml"end

 

Nope, still getting the crash :(

 

Here is my updated modmain:

PrefabFiles = {	"drok",	"wigstanstone",	"wigstan",	"wigstanfull",	"javelin",	"redpaint",	"beefalo_hide",}Assets = {    Asset( "IMAGE", "images/saveslot_portraits/drok.tex" ),    Asset( "ATLAS", "images/saveslot_portraits/drok.xml" ),    Asset( "IMAGE", "images/selectscreen_portraits/drok.tex" ),    Asset( "ATLAS", "images/selectscreen_portraits/drok.xml" ),    Asset( "IMAGE", "bigportraits/drok.tex" ),    Asset( "ATLAS", "bigportraits/drok.xml" ),		Asset( "IMAGE", "images/map_icons/drok.tex" ),	Asset( "ATLAS", "images/map_icons/drok.xml" ),		Asset( "IMAGE", "images/avatars/avatar_drok.tex" ),    Asset( "ATLAS", "images/avatars/avatar_drok.xml" ),		Asset( "IMAGE", "images/avatars/avatar_ghost_drok.tex" ),    Asset( "ATLAS", "images/avatars/avatar_ghost_drok.xml" ),    Asset("SOUNDPACKAGE", "sound/drok.fev"),    Asset("SOUND", "sound/drok.fsb"),    --Asset( "IMAGE", "images/inventoryimages/redpaint.tex"),    --Asset( "ATLAS", "images/inventoryimages/redpaint.xml" ),    --Asset( "IMAGE", "images/inventoryimages/wigstan.tex"),    --Asset( "ATLAS", "images/inventoryimages/wigstan.xml" ),    --Asset( "IMAGE", "images/inventoryimages/wigstanfull.tex"),    --Asset( "ATLAS", "images/inventoryimages/wigstanfull.xml" ),    --Asset( "IMAGE", "images/inventoryimages/beefalo_hide.tex"),    --Asset( "ATLAS", "images/inventoryimages/beefalo_hide.xml" ),    --Asset( "IMAGE", "images/inventoryimages/javelin.tex"),    --Asset( "ATLAS", "images/inventoryimages/javelin.xml" ),}RemapSoundEvent( "dontstarve/characters/drok/death_voice", "drok/sound/death_voice" )RemapSoundEvent( "dontstarve/characters/drok/hurt", "drok/sound/hurt" )RemapSoundEvent( "dontstarve/characters/drok/talk_LP", "drok/sound/talk_LP" )local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal OldIsRecipeValid = GLOBAL.IsRecipeValidlocal function IsRecipeValid(recipe)	return OldIsRecipeValid(recipe) and		((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) or not recipe.tagneeded)endGLOBAL.IsRecipeValid = IsRecipeValidlocal Recipe = GLOBAL.Recipelocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal recipes = {	Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),	Recipe("wigstan", {Ingredient("wigstanstone", 1), Ingredient("redpaint", 2)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),	Recipe("wigstanfull", {Ingredient("wigstan", 1), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),		--local paintedrock = GLOBAL.Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 3, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer", nil, nil, nil, 1)	Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),	Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),	}for k,v in pairs(recipes) do    v.tagneeded = true    v.atlas = "images/inventoryimages/" .. v.name .. ".xml"endSTRINGS.CHARACTER_TITLES.drok = "The Caveman"STRINGS.CHARACTER_NAMES.drok = "Drok"STRINGS.CHARACTER_DESCRIPTIONS.drok = "*Is dumb\n*Grows hair that keeps him warm\n*Is strong but needs food"STRINGS.CHARACTER_QUOTES.drok = "\"Oog!\""STRINGS.CHARACTERS.DROK = require "speech_drok"STRINGS.NAMES.DROK = "Drok"STRINGS.CHARACTERS.GENERIC.DESCRIBE.DROK = {	GENERIC = "It's Drok!",	ATTACKER = "That Drok looks shifty...",	MURDERER = "Murderer!",	REVIVER = "Drok, friend of ghosts.",	GHOST = "Drok could use a heart.",}table.insert(GLOBAL.CHARACTER_GENDERS.MALE, "drok") 

 

And here is the crash log:

 

WARNING! Could not find region 'wigstanstone.tex' from atlas 'images/inventoryimages.xml'. Is the region specified in the atlas?Looking for default texture '(null)' from atlas 'images/inventoryimages.xml'.images/inventoryimages.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/image.lua(11,1) in function '_ctor'        scripts/class.lua(181,1) in function 'Image'        scripts/widgets/ingredientui.lua(28,1) in function '_ctor'        scripts/class.lua(181,1) in function 'IngredientUI'        scripts/widgets/recipepopup.lua(280,1) in function 'Refresh'        scripts/widgets/recipepopup.lua(290,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(160,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'	...        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)images/inventoryimages.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/image.lua(11,1) in function '_ctor'        scripts/class.lua(181,1) in function 'Image'        scripts/widgets/ingredientui.lua(28,1) in function '_ctor'        scripts/class.lua(181,1) in function 'IngredientUI'        scripts/widgets/recipepopup.lua(280,1) in function 'Refresh'        scripts/widgets/recipepopup.lua(290,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(160,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'	...        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)SCRIPT ERROR! Showing error screen	WARNING! Could not find region 'redpaint.tex' from atlas 'images/inventoryimages.xml'. Is the region specified in the atlas?Looking for default texture '(null)' from atlas 'images/inventoryimages.xml'.images/inventoryimages.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/image.lua(11,1) in function '_ctor'        scripts/class.lua(181,1) in function 'Image'        scripts/widgets/ingredientui.lua(28,1) in function '_ctor'        scripts/class.lua(181,1) in function 'IngredientUI'        scripts/widgets/recipepopup.lua(280,1) in function 'Refresh'        scripts/widgets/recipepopup.lua(290,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(160,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'	...        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)QueryServerComplete no callbackQueryServerComplete no callbackForce aborting... 

 

Thank you for your help

 

Edit: It looks like the javelin atlas works just fine, but when i open the refine tab it crashes, (javelin is inside the war tab) maybe we can track down the problem this way!

Edited by QuickShot010
Link to comment
Share on other sites

@QuickShot010, Well, it fixed the crash that you were first reporting, now we just need to do the same for the ingredients. But c'mon man, read your stack traces and look at the lines of code that are throwing them. You can do this all yourself. All I did was this

  • The last thing before the image in the stack trace was the ingredientui, look at that
  • ingredientui gets the atlas from recipepopup, so look at that.
  • recipepopup gets the atlas from the ingredient, so look at the Ingredient class
  • Find-in-files to find the ingredient class, it's located in scripts/recipe.lua
  • Looks like atlas is an argument for ingredient
  • So just add it to each of the ingredients that are items being added by the mod
local recipes = {    Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstan", {Ingredient("wigstanstone", 1, "images/inventoryimages/wigstanstone.xml"), Ingredient("redpaint", 2, "images/inventoryimages/redpaint.xml")}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstanfull", {Ingredient("wigstan", 1, "images/inventoryimages/wigstan.xml"), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),        --local paintedrock = GLOBAL.Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 3, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer", nil, nil, nil, 1)    Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),    Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),    } for k,v in pairs(recipes) do    v.tagneeded = true    v.atlas = "images/inventoryimages/" .. v.name .. ".xml"end
Edited by rezecib
Link to comment
Share on other sites

@QuickShot010, Well, it fixed the crash that you were first reporting, now we just need to do the same for the ingredients. But c'mon man, read your stack traces and look at the lines of code that are throwing them. You can do this all yourself. All I did was this

  • The last thing before the image in the stack trace was the ingredientui, look at that
  • ingredientui gets the atlas from recipepopup, so look at that.
  • recipepopup gets the atlas from the ingredient, so look at the Ingredient class
  • Find-in-files to find the ingredient class, it's located in scripts/recipe.lua
  • Looks like atlas is an argument for ingredient
  • So just add it to each of the ingredients that are items being added by the mod
local recipes = {    Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstan", {Ingredient("wigstanstone", 1, "images/inventoryimages/wigstanstone.xml"), Ingredient("redpaint", 2, "images/inventoryimages/redpaint.xml")}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),    Recipe("wigstanfull", {Ingredient("wigstan", 1, "images/inventoryimages/wigstan.xml"), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),        --local paintedrock = GLOBAL.Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 3, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer", nil, nil, nil, 1)    Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),    Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),    } for k,v in pairs(recipes) do    v.tagneeded = true    v.atlas = "images/inventoryimages/" .. v.name .. ".xml"end

Ahh yes, i have the atlas setup inside the recipe like that in the single player dont starve Drok. I removed it because i originally thought that was the source of the whole problem. I thank you sir, i will try this tomorrow. :D

Link to comment
Share on other sites

@rezecib Hey, this is really weird. All the recipes are working except the recently activated Cave Paintings. There shouldn't be any problems as far as i know but it still crashes...Do you understand this?

 

Here is the modmain:

PrefabFiles = {	"drok",	"wigstanstone",	"wigstan",	"wigstanfull",	"javelin",	"redpaint",	"beefalo_hide",	"paintedrock",}Assets = {    Asset( "IMAGE", "images/saveslot_portraits/drok.tex" ),    Asset( "ATLAS", "images/saveslot_portraits/drok.xml" ),    Asset( "IMAGE", "images/selectscreen_portraits/drok.tex" ),    Asset( "ATLAS", "images/selectscreen_portraits/drok.xml" ),    Asset( "IMAGE", "bigportraits/drok.tex" ),    Asset( "ATLAS", "bigportraits/drok.xml" ),		Asset( "IMAGE", "images/map_icons/drok.tex" ),	Asset( "ATLAS", "images/map_icons/drok.xml" ),		Asset( "IMAGE", "images/avatars/avatar_drok.tex" ),    Asset( "ATLAS", "images/avatars/avatar_drok.xml" ),		Asset( "IMAGE", "images/avatars/avatar_ghost_drok.tex" ),    Asset( "ATLAS", "images/avatars/avatar_ghost_drok.xml" ),    Asset("SOUNDPACKAGE", "sound/drok.fev"),    Asset("SOUND", "sound/drok.fsb"),}RemapSoundEvent( "dontstarve/characters/drok/death_voice", "drok/characters/drok/death_voice" )RemapSoundEvent( "dontstarve/characters/drok/hurt", "drok/characters/drok/hurt" )RemapSoundEvent( "dontstarve/characters/drok/talk_LP", "drok/characters/drok/talk_LP" )RemapSoundEvent( "dontstarve/characters/drok/emote", "drok/characters/drok/emote" )local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal OldIsRecipeValid = GLOBAL.IsRecipeValidlocal function IsRecipeValid(recipe)	return OldIsRecipeValid(recipe) and		((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) or not recipe.tagneeded)endGLOBAL.IsRecipeValid = IsRecipeValidlocal Recipe = GLOBAL.Recipelocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal recipes = {	Recipe("redpaint", {Ingredient("ash", 2), Ingredient("rocks", 1), Ingredient("berries_cooked", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),	Recipe("wigstan", {Ingredient("wigstanstone", 1, "images/inventoryimages/wigstanstone.xml"), Ingredient("redpaint", 2, "images/inventoryimages/redpaint.xml")}, RECIPETABS.REFINE, TECH.SCIENCE_ONE),	Recipe("wigstanfull", {Ingredient("wigstan", 1, "images/inventoryimages/wigstan.xml"), Ingredient("beefalowool", 5), Ingredient("rope", 3)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO),		Recipe("beefalo_hide", {Ingredient("beefalowool", 6), Ingredient("houndstooth", 1), Ingredient("silk", 6)}, RECIPETABS.DRESS, TECH.SCIENCE_TWO),	Recipe("javelin", {Ingredient("twigs", 2), Ingredient("rope", 1), Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE),	Recipe("paintedrock", {Ingredient("rocks", 3), Ingredient("redpaint", 2, "images/inventoryimages/redpaint.xml")}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "paintedrock_placer"),	}for k,v in pairs(recipes) do    v.tagneeded = true    v.atlas = "images/inventoryimages/" .. v.name .. ".xml"endSTRINGS.CHARACTER_TITLES.drok = "The Caveman"STRINGS.CHARACTER_NAMES.drok = "Drok"STRINGS.CHARACTER_DESCRIPTIONS.drok = "*Is dumb\n*Grows hair that keeps him warm\n*Is strong but needs food"STRINGS.CHARACTER_QUOTES.drok = "\"Oog!\""STRINGS.CHARACTERS.DROK = require "speech_drok"STRINGS.NAMES.DROK = "Drok"STRINGS.CHARACTERS.GENERIC.DESCRIBE.DROK = {	GENERIC = "It's Drok!",	ATTACKER = "That Drok looks shifty...",	MURDERER = "Murderer!",	REVIVER = "Drok, friend of ghosts.",	GHOST = "Drok could use a heart.",}STRINGS.RECIPE_DESC.WIGSTAN = "Make a new friend."STRINGS.RECIPE_DESC.WIGSTANFULL = "Make a better hairy friend."STRINGS.RECIPE_DESC.REDPAINT = "Some red paint."STRINGS.RECIPE_DESC.PAINTEDROCK = "Show your dominance by painting on rocks."STRINGS.RECIPE_DESC.BEEFALO_HIDE = "Keeps warm and protects."STRINGS.RECIPE_DESC.JAVELIN = "Throw to hunt and kill."table.insert(GLOBAL.CHARACTER_GENDERS.MALE, "drok")AddMinimapAtlas("images/map_icons/drok.xml")AddModCharacter("drok") 

Here is the crash log:

Reset() returningConsole_CreateRoom: roomName Drok the Caveman, in the making created for id 109775241747187906SendHandShakeServerListingAttempting to send resume requestReceiveResumeRequestReceived request to resume from: session/01200001CA096123/KU_9EaJLRTdOnResumeRequestLoadComplete - UserID KU_9EaJLRTd[Load] SPAWNING PLAYER AT: (99.85, 0.00, -69.53)	Deserialize local session session/01200001CA096123/KU_9EaJLRTdOnLoadMinimapCompleteDeserializing cached icon data: 23Deserializing tile data (425 x 425)WARNING! Invalid resource handle for atlas '../mods/Drok DST/images/inventoryimages/paintedrock.xml', did you remember to load the asset?Looking for default texture '(null)' from atlas '../mods/Drok DST/images/inventoryimages/paintedrock.xml'.../mods/Drok DST/images/inventoryimages/paintedrock.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(124,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'        scripts/widgets/crafting.lua(152,1) in function 'ScrollUp'        scripts/widgets/crafting.lua(29,1) in function 'onclick'        scripts/widgets/imagebutton.lua(90,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)../mods/Drok DST/images/inventoryimages/paintedrock.xmlLUA ERROR stack traceback:        scripts/widgets/image.lua(30,1) in function 'SetTexture'        scripts/widgets/recipetile.lua(25,1) in function 'SetRecipe'        scripts/widgets/craftslot.lua(124,1) in function 'Refresh'        scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'        scripts/widgets/crafting.lua(129,1) in function 'UpdateRecipes'        scripts/widgets/crafting.lua(152,1) in function 'ScrollUp'        scripts/widgets/crafting.lua(29,1) in function 'onclick'        scripts/widgets/imagebutton.lua(90,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/widgets/widget.lua(115,1) in function 'OnControl'        scripts/screens/playerhud.lua(328,1) in function 'OnControl'        scripts/frontend.lua(241,1) in function 'OnControl'        scripts/input.lua(165,1) in function 'OnControl'        scripts/input.lua(340,1)SCRIPT ERROR! Showing error screen	QueryServerComplete no callbackQueryServerComplete no callbackForce aborting... 

 

I don't understand why it gives that error again since i have to code that should solve this....

Thanks for your help again.

Edited by QuickShot010
Link to comment
Share on other sites

@QuickShot010


WARNING! Invalid resource handle for atlas '../mods/Drok DST/images/inventoryimages/paintedrock.xml', did you remember to load the asset?

... So, did you remember to load the asset in paintedrock? Asset("ATLAS", "images/inventoryimages/paintedrock.xml"). Also, make sure that inventoryitem.imagename and inventoryitem.atlasname correspond to the rock texture.

Edited by Ryuushu
Link to comment
Share on other sites

@QuickShot010

WARNING! Invalid resource handle for atlas '../mods/Drok DST/images/inventoryimages/paintedrock.xml', did you remember to load the asset?

... So, did you remember to load the asset in paintedrock? Asset("ATLAS", "images/inventoryimages/paintedrock.xml"). Also, make sure that inventoryitem.imagename and inventoryitem.atlasname correspond to the rock texture.

 

This is the beginning of the paintedrock lua:

local Assets ={	Asset("ANIM", "anim/paintedrock.zip"),    Asset("ATLAS", "images/inventoryimages/paintedrock.xml"),    Asset("IMAGE", "images/inventoryimages/paintedrock.tex"),}[...] 

 

So yes, i did load it. I really have no idea why i get this error... :(

 

EDIT: ok, i loaded the Asset in the modmain instead of the prefab lua, it seems to be working now. The only problem i have now is that it doesnt activate the paintedrock placer

Edited by QuickShot010
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...