JohnWatson Posted January 8, 2018 Share Posted January 8, 2018 AddPrefabPostInit("minisign",function(inst) if inst.qyt_customimagefix~=true and inst.components.drawable~=nil then local _OnDrawn_Old = inst.components.drawable.OnDrawn or (function() return end) inst.components.drawable.OnDrawn = function(self,imagename,imagesource, ...) _OnDrawn_Old(self,imagename,imagesource, ...) if imagesource~=nil and imagesource.components.inventoryitem~=nil and imagesource.components.inventoryitem.atlasname~=nil then inst.AnimState:OverrideSymbol("SWAP_SIGN",GLOBAL.resolvefilepath(imagesource.components.inventoryitem.atlasname),(imagesource.components.inventoryitem.imagename or imagesource.prefab)..".tex") end end end end) place in modmain.lua The script above lets you draw custom inventory images on minisigns. By default, the minisigns will just appear empty because the drawable component doesn't check if the item has a custom atlas. Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/ Share on other sites More sharing options...
Eranthis Posted March 4, 2018 Share Posted March 4, 2018 Do you replace the ... with the item name? Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1011062 Share on other sites More sharing options...
JohnWatson Posted March 8, 2018 Author Share Posted March 8, 2018 no, you just put this in modmain.lua Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1012397 Share on other sites More sharing options...
justjasper Posted March 8, 2018 Share Posted March 8, 2018 Really useful, thanks! Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1012438 Share on other sites More sharing options...
Eranthis Posted March 10, 2018 Share Posted March 10, 2018 On 3/8/2018 at 6:04 AM, JohnWatson said: no, you just put this in modmain.lua Are you sure there's nothing else that needs to be defined? Testing it out, my custom item is still blank. Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1013532 Share on other sites More sharing options...
Eranthis Posted March 12, 2018 Share Posted March 12, 2018 I would still like for this to be utilized. Custom items are still appearing blank on the minisigns. Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1014313 Share on other sites More sharing options...
JohnWatson Posted March 16, 2018 Author Share Posted March 16, 2018 make sure that the 'inventoryitem' component of your item has an 'atlasname' variable whose value is the path of an xml file Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1015797 Share on other sites More sharing options...
Eranthis Posted March 21, 2018 Share Posted March 21, 2018 On 3/16/2018 at 3:54 AM, JohnWatson said: make sure that the 'inventoryitem' component of your item has an 'atlasname' variable whose value is the path of an xml file If you're referring to "inst.components.inventoryitem.atlasname", my items have that in their scripts. Link to comment https://forums.kleientertainment.com/forums/topic/86259-being-able-to-draw-custom-inventory-images-on-minisigns/#findComment-1017957 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