BMac Posted July 25, 2018 Posted July 25, 2018 You should be familiar with the Modding Basic Concepts tutorial before following this one. In this tutorial, I'm going to show you how to add a new icon for a custom ability or item in Pillars of Eternity II: Deadfire. You must have Deadfire version 2.0.0 or later to use this functionality. I've already created game data objects for two custom items, and I've created two PNG icons for each: a small 42x42 icon, which will be used to show the item in an inventory slot, and a large 100x100 icon, which will be used to show the item when it's being dragged, and in the detailed inspection window. Items require both icons, but abilities only need the small 42x42 icon. To allow the game to load my large icon, all I have to do is put it in my mod folder at "/gui/icons/items". I can then reference it in the IconTextureLarge property of my item's game data. Small icons work a little differently. They need to be packed into an atlas, which is a single image file that has multiple images in it. The free tool SpriteSheetPacker can build an atlas for you from your collection of small icon images. Download SpriteSheetPacker and run it. Select "Add Images" and find all the small icon images you want to include in your mod. Click the "..." next to "Output Image". Browse to your mod folder. Create a new folder in it called "atlases". In this folder, save the image as "ItemIcons.png". If you were adding abilities, the icons for those would need to be in a separate atlas, also in this folder, called "SpellAbilityIcons.png". Ensure "Generate Map?" is enabled. Now click "Build Sprite Sheet". This will create the atlas image, and also a file called "ItemIcons.txt", which tells the game about each separate icon in the atlas. Finally, I can add a reference to the small icon in the IconTextureSmall property of my item's game data. Because the icon is in an atlas, this only needs the name of the sprite. It doesn't need any directory information. That's it. My new item now has custom icons to use in-game. If you need some great-looking, stylistically-matching icon images for your items and abilities, you can use the ones from the first Pillars of Eternity: PoE 1 Icon Resource at Pillars of Eternity 2: Deadfire Nexus - Mods and Community PoE 1 Item Sketches at Pillars of Eternity 2: Deadfire Nexus - Mods and Community 9
kilay Posted August 2, 2018 Posted August 2, 2018 Really thnks Random Reader'Plinio il Vecchio asseriva che un rimedio alla sbronza fosse quello di mangiare uova crude di gufo' I° secolo D.C. My Mods on Nexus Nexus Mods Translated to Italian Italian Localization Fix PATCH More Custom AI Conditions Enhanced UI - Afflictions and Inspirations Extended Spell TT1 Unique Items More Priest Subclasses_Ondra Hylea Abydon Channeler Cipher Subclass Are you looking for a group of modders ?Request an invite to our Slack group Do you need a mod? Fill this mod request
Armakoir Posted August 2, 2018 Posted August 2, 2018 All hail the Penguin Sword of Red X Removal! o7 My PoE2 Mods: The Class Project | Thrown Weaponry Kits | Informative Proficiency Descriptions
Kexby Posted August 2, 2018 Posted August 2, 2018 Yes! More tutorials. This is what we need. Thank you BMac .
peardox Posted August 2, 2018 Posted August 2, 2018 Sticky this one OK Fair warning has been applied I'm gonna move the domain to https://perspak.com early Feb but will keep all content There are reasons behind this move which basically boil down to unifying my release schedule My friends are welcome to play (I'll set you up your own areas if you desire them) Please note that this process is messy so may take a few weeks
peardox Posted August 2, 2018 Posted August 2, 2018 If I read this correctly I can build a spritesheet and animate it? This is inferred so lets imagine I've got a 256x256 cell spritesheet with 32 frames Would this animate? Don't imagine - I've got exactly that sheet I can't upload as its licensed art I'll give it a go when 2.0 drops then find a freebie to sheet OK Fair warning has been applied I'm gonna move the domain to https://perspak.com early Feb but will keep all content There are reasons behind this move which basically boil down to unifying my release schedule My friends are welcome to play (I'll set you up your own areas if you desire them) Please note that this process is messy so may take a few weeks
zilbest Posted August 2, 2018 Posted August 2, 2018 Thank you so much for the tutorial! Hoping more tutorials to come...
tonpix Posted August 2, 2018 Posted August 2, 2018 @Bmac, is 4k required? If yes, would you consider allowing us to use smaller resolutions to avoid wasting empty space/memory? Also, important question for me - is it possible to create atlas that can be used by multiple mods, separated in folders? Could be a matter of folder structure, for example /override -> tonpix mods -> single icon atlas + folders for different mods, separated in folders?
Armakoir Posted August 2, 2018 Posted August 2, 2018 (edited) The atlas I created with 6 icons truncated down in size and was 6kb. Also, I put the atlas in the folder of mod-one and called them from mod-two and they worked. Seems like you can share an atlas. Edited August 2, 2018 by Armakoir 1 My PoE2 Mods: The Class Project | Thrown Weaponry Kits | Informative Proficiency Descriptions
tonpix Posted August 2, 2018 Posted August 2, 2018 The atlas I created with 6 icons truncated down in size and was 6kb. Also, I put the atlas in the folder of mod-one and called them from mod-two and they worked. Seems like you can share an atlas. Ah, you told me on slack, sorry I forgot about it. Truncated means what?
Armakoir Posted August 2, 2018 Posted August 2, 2018 The atlas was only as big as the six icons I added and the total size was 160x80 (or something). There was no extra blank space. 1 My PoE2 Mods: The Class Project | Thrown Weaponry Kits | Informative Proficiency Descriptions
BMac Posted August 2, 2018 Author Posted August 2, 2018 Sticky this one I've linked it in the Useful Information sticky - just trying (perhaps overzealously) to avoid a ballooning sticky section If I read this correctly I can build a spritesheet and animate it? This is inferred so lets imagine I've got a 256x256 cell spritesheet with 32 frames Would this animate? No, we don't support animating these icons. We'll only use the single image specified in IconTextureSmall. @Bmac, is 4k required? If yes, would you consider allowing us to use smaller resolutions to avoid wasting empty space/memory? The 4k value is a maximum. The atlas that's produced by SpriteSheetPacker will only be as big as it needs to be, as noted by Armakoir. Also, important question for me - is it possible to create atlas that can be used by multiple mods, separated in folders? Could be a matter of folder structure, for example Yes, you can use icons from other mod folders. You'll have to make sure the user installs both mods, of course. 2
Spherical Posted August 3, 2018 Posted August 3, 2018 (edited) Using the technique described in #1 is it possible to create icons that can be referenced in .stringtable files using the <sprite> element or is it limited to item/ability icons for now? Edit: Using the Inline atlas (found in the game files) as a template didn't work - i.e. naming the new atlas Inline.png/Inline.txt - so I'm guessing it's not supported at the moment. Edited August 3, 2018 by Spherical 1 Editor and DesignerEnhanced User InterfaceNexus Mods | Steam Workshop
BMac Posted August 3, 2018 Author Posted August 3, 2018 Using the technique described in #1 is it possible to create icons that can be referenced in .stringtable files using the element or is it limited to item/ability icons for now? Edit: Using the Inline atlas (found in the game files) as a template didn't work - i.e. naming the new atlas Inline.png/Inline.txt - so I'm guessing it's not supported at the moment. Right, unfortunately the inline atlas needs to be packed via a different system (TextMesh Pro) that doesn't support dynamic loading at the moment.
Spherical Posted August 3, 2018 Posted August 3, 2018 (edited) ...at the moment. https://youtu.be/nFTRwD85AQ4?t=21 Thanks for the quick reply BMac! I'll keep my fingers crossed it might be possible to add new icons in the future Edited August 3, 2018 by Spherical 2 Editor and DesignerEnhanced User InterfaceNexus Mods | Steam Workshop
peardox Posted August 3, 2018 Posted August 3, 2018 This needs a sticky! 1 OK Fair warning has been applied I'm gonna move the domain to https://perspak.com early Feb but will keep all content There are reasons behind this move which basically boil down to unifying my release schedule My friends are welcome to play (I'll set you up your own areas if you desire them) Please note that this process is messy so may take a few weeks
Spherical Posted August 7, 2018 Posted August 7, 2018 This need a sticky, please. Editor and DesignerEnhanced User InterfaceNexus Mods | Steam Workshop
Spherical Posted August 7, 2018 Posted August 7, 2018 Right, unfortunately the inline atlas needs to be packed via a different system (TextMesh Pro) that doesn't support dynamic loading at the moment. A follow up question: would it maybe possible to add a few new icons then? Simple shapes would be nice but just having all available icons in black and white would go a long way. It shouldn't take too long to do, right? Editor and DesignerEnhanced User InterfaceNexus Mods | Steam Workshop
peardox Posted August 11, 2018 Posted August 11, 2018 (edited) Sprite Sheets (they're dead easy) OK - explaining this is NOT easy Just tried...Right See https://apuzzle.net/ This shows a dynamic sheet - it's something I have in alpha. This WON'T work on mobile - you need a mouse as it's Drag + Drop Solve the jigsaw! All puzzles involve one big image I split into portions - switch difficultly to make it hard (anything above Easy is hard actually) Note that this is an Alpha - i.e. buggy. That's a SpriteSheet in action... I will do a spite sheet tutorial once I've finished my current obligations Don't worry - I'll make it easy. You won't be able to do what I do with dynamic (complex math) but you'll understand how things workSomeone remind me... Edited August 11, 2018 by peardox OK Fair warning has been applied I'm gonna move the domain to https://perspak.com early Feb but will keep all content There are reasons behind this move which basically boil down to unifying my release schedule My friends are welcome to play (I'll set you up your own areas if you desire them) Please note that this process is messy so may take a few weeks
Guest Posted August 21, 2018 Posted August 21, 2018 Can one replace existing game icons by placing them in the override folder (with the correct name, of course)?
house2fly Posted August 21, 2018 Posted August 21, 2018 You can for items. I think so for abilities as well, other things like skill and culture icons I'm not sure
kilay Posted August 21, 2018 Posted August 21, 2018 Can one replace existing game icons by placing them in the override folder (with the correct name, of course)? check also OP , cuz they also required atlases not only a raw png Random Reader'Plinio il Vecchio asseriva che un rimedio alla sbronza fosse quello di mangiare uova crude di gufo' I° secolo D.C. My Mods on Nexus Nexus Mods Translated to Italian Italian Localization Fix PATCH More Custom AI Conditions Enhanced UI - Afflictions and Inspirations Extended Spell TT1 Unique Items More Priest Subclasses_Ondra Hylea Abydon Channeler Cipher Subclass Are you looking for a group of modders ?Request an invite to our Slack group Do you need a mod? Fill this mod request
mammasaura Posted August 27, 2018 Posted August 27, 2018 Hi, I have a problem with the icon for the proficiency, it seems it's not exposed to be used with the atlas. When leveling and I reach the proficiency panel it results in a X. I also tried putting the image in mod/gui/icons/items/mypng.png, 42x42, but still X. The other ability, the one with the bonuses it works in the other panels.
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