QuickShot010 Posted December 29, 2014 Share Posted December 29, 2014 (edited) 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 December 29, 2014 by QuickShot010 Link to comment Share on other sites More sharing options...
rezecib Posted December 29, 2014 Share Posted December 29, 2014 @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 More sharing options...
QuickShot010 Posted December 29, 2014 Author Share Posted December 29, 2014 @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 More sharing options...
rezecib Posted December 29, 2014 Share Posted December 29, 2014 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 More sharing options...
QuickShot010 Posted December 29, 2014 Author Share Posted December 29, 2014 (edited) 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 December 29, 2014 by QuickShot010 Link to comment Share on other sites More sharing options...
rezecib Posted December 29, 2014 Share Posted December 29, 2014 @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 More sharing options...
QuickShot010 Posted December 29, 2014 Author Share Posted December 29, 2014 (edited) @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 December 29, 2014 by QuickShot010 Link to comment Share on other sites More sharing options...
rezecib Posted December 29, 2014 Share Posted December 29, 2014 (edited) @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 thisThe last thing before the image in the stack trace was the ingredientui, look at thatingredientui gets the atlas from recipepopup, so look at that.recipepopup gets the atlas from the ingredient, so look at the Ingredient classFind-in-files to find the ingredient class, it's located in scripts/recipe.luaLooks like atlas is an argument for ingredientSo just add it to each of the ingredients that are items being added by the modlocal 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 December 29, 2014 by rezecib Link to comment Share on other sites More sharing options...
QuickShot010 Posted December 29, 2014 Author Share Posted December 29, 2014 @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 thisThe last thing before the image in the stack trace was the ingredientui, look at thatingredientui gets the atlas from recipepopup, so look at that.recipepopup gets the atlas from the ingredient, so look at the Ingredient classFind-in-files to find the ingredient class, it's located in scripts/recipe.luaLooks like atlas is an argument for ingredientSo just add it to each of the ingredients that are items being added by the modlocal 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"endAhh 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. Link to comment Share on other sites More sharing options...
QuickShot010 Posted January 4, 2015 Author Share Posted January 4, 2015 (edited) @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 January 4, 2015 by QuickShot010 Link to comment Share on other sites More sharing options...
Ryuushu Posted January 4, 2015 Share Posted January 4, 2015 (edited) @QuickShot010WARNING! 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 January 4, 2015 by Ryuushu Link to comment Share on other sites More sharing options...
QuickShot010 Posted January 5, 2015 Author Share Posted January 5, 2015 (edited) @QuickShot010WARNING! 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 January 5, 2015 by QuickShot010 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now