Jump to content

[Tutorial] Adding New Icons (v2.0.0+)

Recommended Posts

  • 1 month later...

I tried following this for crew icons on the ship management screen. The only folder under gui in my game data is portraits, so I made the atlas and labelled it "CrewIcons.png" because I wasn't sure what to label it. All the images are 42x42. The images are saved as "crew_male_aumaua_e_s.png" for example. I want Ponamu to have a different picture instead of "crew_male_aumaua_d_s.png" so I change "d" to "e" under "IconTextureSmall" and it doesn't work. I tried it with the directory in the code, then without as above, still red x. Atlas is under override/gui/icons/items/crew/atlases. What am I doing wrong?

Link to comment
Share on other sites

  • 2 weeks later...
On 8/5/2019 at 6:10 PM, Grape_You_In_The_Mouth said:

What is the directory for ability icons when we install as Bmac says?  None of the mods use any atlases so maybe it's impossible?


The obvious answer works: 



but can there be only one atlas?  Still don't know.

i had mixed results with a folder in my override/my_mod/gui/icons/abilities/my_icon_L.jpg and my_icon_S.jpg
i was using a grimoire as my test and while being dragged between slots, the large icon loads normally.

While accessing the spellbook section, in the upper left corner of the spellbook, the circle image also displays a small version of the icon.


HOWEVER, when the grimoire is either slotted on Aloth (or any other wizard) or stuck in inventory (personal or group) the icon reverts to a big red X on white square.


This partial success/failure confounds me, though I admit I skipped the Atlas step in this version.


my previous attempts with the Atlas method of 2 icons, large and small, were met with no icon at all. I feel as if the fact that at least some of my icons showed up some of the time, means there's more going on than I understand.

  • Like 1
Link to comment
Share on other sites

  • 5 months later...
On 7/25/2018 at 8:31 PM, BMac said:

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.

JSON data showing the ItemTextureLarge property filled in.

Image showing the proper file location for large icons files.

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.

Screenshot of the SpriteSheetPacker interface.

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.

JSON data showing the ItemTextureSmall property filled in.

That's it.  My new item now has custom icons to use in-game.

In-game screenshot showing that I have successfully stacked a penguin on top of a sword for some reason.

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:






Thank you very much for this. I've no idea what that Sprite Packer does that's special, but it fixed my problem :) WoohoO!

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...