LeafyFly Posted April 12, 2024 Share Posted April 12, 2024 Which is the definition of AnimState.OverrideSymbol? 1.AnimState:OverrideSymbol(symbol, build, overridesymbolname) -- prefabs/cookpot.lua 2.AnimState:OverrideSymbol(symbol, atlasname, imagename) -- prefabs/minisign.lua When I used it to show a non-mod image, it worked: cookpot.AnimState:OverrideSymbol("swap_cooked", "images/inventoryimages2.xml", "spear.tex") But when I used it to show a mod image, it did not work: cookpot.AnimState:OverrideSymbol("swap_cooked", "mods/mymodfolder/images/inventoryimages/mymoditem.xml", "mymoditem.tex") I drew my mod item on a mini sign, but it was not shown. Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/ Share on other sites More sharing options...
Rickzzs Posted April 12, 2024 Share Posted April 12, 2024 Add this. Asset('ATLAS_BUILD',xml,256) Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710073 Share on other sites More sharing options...
LeafyFly Posted April 12, 2024 Author Share Posted April 12, 2024 6 hours ago, Rickzzs said: Add this. Asset('ATLAS_BUILD',xml,256) Maybe I didn't understand it correctly. It still did not work. Now if my atlas file is "images/inventoryimages/mymoditem.xml", and image file is "images/inventoryimages/mymoditem.tex", what should I do? Like this? Asset("ATLAS_BUILD", "images/inventoryimages/mymoditem.xml", 256) Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710088 Share on other sites More sharing options...
Rickzzs Posted April 13, 2024 Share Posted April 13, 2024 (edited) You need to add this asset into your mod'a Assets table in order to tell the Animation Manager to convert the xml into a build. Then minisign will show it. But I don't know how the minisign does so. It is typically like Assets = { Asset("ATLAS_BUILD", "images/xxx_inventoryimages.xml", 256), Asset("ATLAS", "images/xxxp_inventoryimages.xml"), Edited April 13, 2024 by Rickzzs Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710138 Share on other sites More sharing options...
LeafyFly Posted April 13, 2024 Author Share Posted April 13, 2024 1 hour ago, Rickzzs said: You need to add this asset into your mod'a Assets table in order to tell the Animation Manager to convert the xml into a build. Then minisign will show it. But I don't know how the minisign does so. It is typically like Do I have to put it in the Assets table of modmain.lua? I put it in the assets table of a Prefab, but it was not shown by minisign. Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710144 Share on other sites More sharing options...
Rickzzs Posted April 14, 2024 Share Posted April 14, 2024 Did you specify any of them? 1.inst.drawimageoverride 2.inst.components.inventoryitem.imagename and inst.components.inventoryitem.atlasname 3.Register it via RegisterInventoryItemAtlas(atlas,tex) and RegisterInventoryItemAtlas(atlas,hash(tex)) Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710276 Share on other sites More sharing options...
LeafyFly Posted April 14, 2024 Author Share Posted April 14, 2024 33 minutes ago, Rickzzs said: 2.inst.components.inventoryitem.imagename and inst.components.inventoryitem.atlasname Only this. My items can be shown in the inventory bar. By the way, in what case is the 3 used? Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710280 Share on other sites More sharing options...
Rickzzs Posted April 14, 2024 Share Posted April 14, 2024 If so, that's weird why minisign didn't show the icons, I might say I cannot know the cause then. 3 is a substitute for 2, so that you can register image and atlas in modmain.lua. Official icons all use that. Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710284 Share on other sites More sharing options...
LeafyFly Posted April 14, 2024 Author Share Posted April 14, 2024 3 hours ago, Rickzzs said: If so, that's weird why minisign didn't show the icons, I might say I cannot know the cause then. Thank you very much. I already know why. Neither component drawable nor prefab minisign use resolvefilepath to resolve atlas. Minisign cannot show mod images if we do not modify them. Link to comment https://forums.kleientertainment.com/forums/topic/155580-how-to-use-animstateoverridesymbol-to-show-mod-images/#findComment-1710294 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