Cyde042 Posted December 5, 2015 Share Posted December 5, 2015 I made it so you can craft bottles out of sand, but I can't seem to get the icon working, it instead displays a purple gem and I double checked my inventory image, it's in the right directory. Maybe it is a bug? This is the whole file.local STRINGS = GLOBAL.STRINGSlocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal require = GLOBAL.requireSTRINGS.RECIPE_DESC.MESSAGEBOTTLEEMPTY = "Bottle."--------------------------Bottle--------------------------local Bottle_Recipe = Recipe("messagebottleempty", {Ingredient("sand", 5)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE)Bottle_Recipe.atlas = "images/inventoryimages/bottle.xml" Link to comment https://forums.kleientertainment.com/forums/topic/60084-shipwreckednew-recipe-displays-wrong-icon/ Share on other sites More sharing options...
Arkathorn Posted December 5, 2015 Share Posted December 5, 2015 In Shipwrecked, the 'Recipe' constructor is slightly changed. There is a new argument between 'level' and 'placer', 'game_type'. Use the recipes that are already in the game for reference. Link to comment https://forums.kleientertainment.com/forums/topic/60084-shipwreckednew-recipe-displays-wrong-icon/#findComment-692765 Share on other sites More sharing options...
Cyde042 Posted December 5, 2015 Author Share Posted December 5, 2015 (edited) In Shipwrecked, the 'Recipe' constructor is slightly changed. There is a new argument between 'level' and 'placer', 'game_type'. Use the recipes that are already in the game for reference. Didn't help, I still get the purple amulet icon in the crafting menu. Edit: I understood what's going on, the icon is set to that of the last recipe in the last recipe tab you accessed.local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal RECIPE_GAME_TYPE = GLOBAL.RECIPE_GAME_TYPErequire "recipe"STRINGS.RECIPE_DESC.MESSAGEBOTTLEEMPTY = "Bottle."--------------------------Bottle--------------------------local Bottle_Recipe = Recipe("messagebottleempty", {Ingredient("sand", 5)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE, RECIPE_GAME_TYPE.SHIPWRECKED)Bottle_Recipe.atlas = GLOBAL.resolvefilepath("images/inventoryimages/bottle.xml") Edited December 5, 2015 by Cyde042 Link to comment https://forums.kleientertainment.com/forums/topic/60084-shipwreckednew-recipe-displays-wrong-icon/#findComment-692780 Share on other sites More sharing options...
Arkathorn Posted December 5, 2015 Share Posted December 5, 2015 Didn't help, I still get the purple amulet icon in the crafting menu.Yeah, that's because you're changing the atlas. The empty bottle image is already in 'inventoryimages.tex', so you don't need to change the atlas from the default ('inventoryimages.tex'). Link to comment https://forums.kleientertainment.com/forums/topic/60084-shipwreckednew-recipe-displays-wrong-icon/#findComment-692783 Share on other sites More sharing options...
Cyde042 Posted December 5, 2015 Author Share Posted December 5, 2015 Yeah, that's because you're changing the atlas. The empty bottle image is already in 'inventoryimages.tex', so you don't need to change the atlas from the default ('inventoryimages.tex'). Removing the atlas bit makes it work. I did think about that but didn't know there was no need to specify the location in the tex file. Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/60084-shipwreckednew-recipe-displays-wrong-icon/#findComment-692785 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