grimmsdottir Posted May 11, 2015 Share Posted May 11, 2015 I have a mod here, which is crashing the very moment I open the Tools crafting tab. I created a character mod, which has 4 characters in it. One of these 4 characters is able to, at the moment, craft a custom tool for themselves. According to the log, which says[00:01:49]: WARNING! Could not find region 'axepick.tex' from atlas 'images/inventoryimages.xml'. Is the region specified in the atlas?[00:01:49]: Looking for default texture '(null)' from atlas 'images/inventoryimages.xml'.[00:01:49]: 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(155,1) in function 'UpdateRecipes' ... scripts/widgets/crafttabs.lua(238,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(353,1) in function 'OnControl' scripts/frontend.lua(270,1) in function 'OnControl' scripts/input.lua(163,1) in function 'OnControl' scripts/input.lua(362,1)[00:01:49]: images/inventoryimages.xmlWhich is weird, as after a quick ctrl+shift+f search, I could not find "inventoryimages.xml" at all. What is also strange is that I can spawn the item, and look at it on my inventory tab, and there is no crashing, so the inventory image itself appears to be fine. Can anybody help me with my problem? TLDR: Game crash when trying to craft item. Item works fine when spawned. Here is the mod, the forum does not allow me to upload it to it.log.txt Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/ Share on other sites More sharing options...
DarkXero Posted May 11, 2015 Share Posted May 11, 2015 (edited) In the axepick prefab, under inst:AddComponent("inventoryimage"), you are missinginst.components.inventoryitem.atlasname = "images/inventoryimages/axepick.xml" Edited May 11, 2015 by DarkXero Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/#findComment-636395 Share on other sites More sharing options...
grimmsdottir Posted May 11, 2015 Author Share Posted May 11, 2015 In the axepick prefab, under inst:AddComponent("inventoryimage"), you are missinginst.components.inventoryitem.atlasname = "images/inventoryimages/axepick.xml" Erm, I checked, I do have that line there, in scripts/prefabs/axepick.lua . In the axepick prefab, under inst:AddComponent("inventoryimage"), you are missinginst.components.inventoryitem.atlasname = "images/inventoryimages/axepick.xml" Erm, I checked, I do have that line there, in scripts/prefabs/axepick.lua . Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/#findComment-636417 Share on other sites More sharing options...
DarkXero Posted May 11, 2015 Share Posted May 11, 2015 Removeinst.components.inventoryitem.imagename = "axepick"or put "axepick.tex" instead of "axepick". Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/#findComment-636420 Share on other sites More sharing options...
grimmsdottir Posted May 11, 2015 Author Share Posted May 11, 2015 Removeinst.components.inventoryitem.imagename = "axepick"or put "axepick.tex" instead of "axepick". Removing that line did not resolve the issue, same error as before. placing "axepick" with "axepick.tex" causes a different crash. This crash occurs when the character with the custom recipe is chosen and loaded into the world. Other characters do not crash on startup or looking into the crafting menu. The crash log has this error.[00:00:24]: WARNING! Could not find region 'FROMNUM' from atlas 'FROMNUM'. Is the region specified in the atlas?[00:00:24]: Looking for default texture '(null)' from atlas 'FROMNUM'.[00:00:24]: 2539604253LUA 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/itemtile.lua(45,1) in function '_ctor' scripts/class.lua(181,1) in function 'ItemTile' scripts/widgets/inventorybar.lua(178,1) in function 'Rebuild' scripts/widgets/inventorybar.lua(281,1) in function 'OnUpdate' scripts/frontend.lua(599,1) in function 'Update' scripts/update.lua(93,1)[00:00:24]: 2539604253LUA 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/itemtile.lua(45,1) in function '_ctor' scripts/class.lua(181,1) in function 'ItemTile' scripts/widgets/inventorybar.lua(178,1) in function 'Rebuild' scripts/widgets/inventorybar.lua(281,1) in function 'OnUpdate' scripts/frontend.lua(599,1) in function 'Update' scripts/update.lua(93,1)log.txt Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/#findComment-636429 Share on other sites More sharing options...
DarkXero Posted May 11, 2015 Share Posted May 11, 2015 Now I found it for real.In modmain, your AddRecipe("omnitool" is the one crashing. Replace it for AddRecipe("omnitool", {GLOBAL.Ingredient("axepick", 1, "images/inventoryimages/axepick.xml"), GLOBAL.Ingredient("hamvel", 1, "images/inventoryimages/hamvel.xml"), GLOBAL.Ingredient("rope", 2)}, GLOBAL.RECIPETABS.TOOLS, GLOBAL.TECH.SCIENCE_ONE, nil, nil, nil, nil, "kerbalengineeringsufficiency", "images/inventoryimages/omnitool.xml", "omnitool.tex" )Also, I recommend you look at hammer.lua in prefabs to see how a tool prefab file should look like. Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/#findComment-636435 Share on other sites More sharing options...
grimmsdottir Posted May 11, 2015 Author Share Posted May 11, 2015 Ah, thanks, so the cause of the problem was trying to craft an item, which requires other custom crafted items. Thanks for your help and patience! Link to comment https://forums.kleientertainment.com/forums/topic/53803-crash-when-attempting-to-craft-a-custom-item/#findComment-636438 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