Inutile Vie Posted August 30, 2019 Share Posted August 30, 2019 (edited) Hello! I've been trying to find my mistake for days but without success. Game doesnt close and evetyrhing works well, but my custom tab on character just doesnt work. There's no problem of texture or something like this, i think. Maybe i used old code? Theres modmain, whre "lier" - character, "star" - tab icon and "pack" - item from this tab. Quote Assets = { Asset( "IMAGE", "images/saveslot_portraits/lier.tex" ), Asset( "ATLAS", "images/saveslot_portraits/lier.xml" ), Asset( "IMAGE", "images/selectscreen_portraits/lier.tex" ), Asset( "ATLAS", "images/selectscreen_portraits/lier.xml" ), Asset( "IMAGE", "images/selectscreen_portraits/lier_silho.tex" ), Asset( "ATLAS", "images/selectscreen_portraits/lier_silho.xml" ), Asset( "IMAGE", "bigportraits/lier.tex" ), Asset( "ATLAS", "bigportraits/lier.xml" ), Asset( "IMAGE", "images/map_icons/lier.tex" ), Asset( "ATLAS", "images/map_icons/lier.xml" ), Asset( "IMAGE", "images/avatars/avatar_lier.tex" ), Asset( "ATLAS", "images/avatars/avatar_lier.xml" ), Asset( "IMAGE", "images/avatars/avatar_ghost_lier.tex" ), Asset( "ATLAS", "images/avatars/avatar_ghost_lier.xml" ), Asset( "IMAGE", "images/avatars/self_inspect_lier.tex" ), Asset( "ATLAS", "images/avatars/self_inspect_lier.xml" ), Asset( "IMAGE", "images/names_lier.tex" ), Asset( "ATLAS", "images/names_lier.xml" ), Asset( "IMAGE", "images/names_gold_lier.tex" ), Asset( "ATLAS", "images/names_gold_lier.xml" ), Asset( "IMAGE", "bigportraits/lier_none.tex" ), Asset( "ATLAS", "bigportraits/lier_none.xml" ), Asset( "IMAGE", "images/hud/star.xml", "star.tex" ), Asset( "ATLAS", "images/hud/star.xml", "star.xml" ), Asset("ATLAS", "images/inventoryimages/pack.xml"), Asset("IMAGE", "images/inventoryimages/pack.tex"), Asset("ANIM", "anim/swap_pack.zip"), } local TECH = GLOBAL.TECH local RECIPETABS = GLOBAL.RECIPETABS local Ingredient = GLOBAL.Ingredient local ACTIONS = GLOBAL.ACTIONS local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS local Recipe = GLOBAL.Recipe local startab = AddRecipeTab("Thief's stuff", 68, "images/hud/star.xml", "star.tex", "startab") AddRecipe("PACK", {Ingredient("silk",4),Ingredient("flint", 2),Ingredient("twigs", 2)}, startab, TECH.NONE, nil, nil, true, nil, "lier", "images/inventoryimages/pack.xml", "pack.tex") I will be glad of any help~ Edited August 30, 2019 by Inutile Vie Link to comment Share on other sites More sharing options...
Ultroman Posted August 30, 2019 Share Posted August 30, 2019 First thing I noticed was this error: Asset( "IMAGE", "images/hud/star.xml", "star.tex" ), <== should be "images/hud/star.tex" Asset( "ATLAS", "images/hud/star.xml", "star.xml" ), The rest looks good. It'll probably explode while creating the tab if the texture you're referencing can't be found. Link to comment Share on other sites More sharing options...
Inutile Vie Posted August 30, 2019 Author Share Posted August 30, 2019 (edited) 22 minutes ago, Ultroman said: First thing I noticed was this error: Asset( "IMAGE", "images/hud/star.xml", "star.tex" ), <== should be "images/hud/star.tex" Asset( "ATLAS", "images/hud/star.xml", "star.xml" ), The rest looks good. It'll probably explode while creating the tab if the texture you're referencing can't be found. Change image .xml to .tex but still nothing. Dont think that this is problem with textures. Oh, there star.xml in case! Quote <Atlas><Texture filename="star.tex" /><Elements><Element name="star.tex" u1="0.0078125" u2="0.7734375" v1="0.2265625" v2="0.9921875" /></Elements></Atlas> Edited August 30, 2019 by Inutile Vie Link to comment Share on other sites More sharing options...
Inutile Vie Posted August 30, 2019 Author Share Posted August 30, 2019 OH! OOOH! Okay, i found problem and write this for.. descendant .DD Well, i decide to add builder tag on tab in modmain.lua: Quote local startab = AddRecipeTab("Thief's stuff", 68, "images/hud/star.xml", "star.tex", "lier_builder") And, respectively, set tag to my character on lier.lua: Quote local common_postinit = function(inst) -- Minimap icon inst:AddTag("lier_builder") inst.MiniMapEntity:SetIcon( "lier.tex" ) end And here we are. Thanks anyway for answers! 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