How to make a mod to change unit portraits

I want to try making a very small mod which simply change the portrait in the game and can be used in ranked game like this:


(It is just a WIP rough. What I want to do is simply let the skirmishers share the same pose.)

Is there a guide about which files should I replace and how to add mask so the portraits can show the player colors? Or is there an available mod which also change portraits only so I can quickly take it for a reference to directly know which files should I edit and how to edit them?

I downloaded Resource manager and tried to make a small mod to change the text in the game, and it works. So I basically know how to change the game files. But I have no idea how to changing the graphics and add mask so they can show the player colorā€¦

EDIT: scratch this whole reply. I didnā€™t even verify my own linkā€¦

~~I donā€™t know how things work for PNG files, but if you use DDT ā† ā†’ TGA, you can check out this tutorial. Just use the new Resource Manager instead of the old AOE3ED.

Happy modding!~~

1 Like

Oh I donā€™t know how create 3D model before. I only made some ROTK13 portraits with Photoshop beforeā€¦ I thought Itā€™s wonā€™t take much time just to modify some picture files. :disappointed_relieved:

Thank you for the information anyway. :pray:

You just need to find the portrait path of the original units (normally in \Data\wpfg\resources\art\units) and create the same folder hierarchy in your mod. Place your new portraits with the same name and it will replace those in the game.

Is there a guide about which files should I replace and how to add mask so the portraits can show the player colors?

You can see portraits in the game data how they work (you can open Data.bar with the resource manager). Normally you just have to leave an area transparent so that it takes the color of the player.

Edit: the portraits is in the UIResources1.bar, not in the Data.bar, but the path in your mod must be " \Data\wpfg\resources.ā€¦". You can see the correct path in the resource manager:

1 Like

Hey sorry, I put the wrong link. I had multiple tabs open, lol

  • If you donā€™t know about alpha channels, search ā€œphotoshop alpha channelā€ on YouTube.
  • If you know, convert your portrait to a .(n,n,n,n).tga file by doing the following:
    • If your portrait is a .png:
      1. Open it with photoshop.
      2. Go to File > Save as
      3. Find *.tga in the list and select it.
      4. Name your file as filename.(1,1,1,1).tga
        In reality, each one of these numbers have a meaning but you should be fine by using 1,1,1,1.
      5. Edit your portrait and add an alpha channel.
      6. Save your modifications.
      7. Use the Resource Manager to convert from TGA ā†’ DDT
      8. Put the ddt output into the game folders so you can use it.
    • If your portrait is a .ddt:
      1. Use the Resource Manager to convert from DDT ā†’ TGA
      2. Open the tga output with Photoshop.
      3. Edit your portrait and add an alpha channel.
      4. Save your modifications.
      5. Use the Resource Manager to convert from TGA ā†’ DDT
      6. Put the ddt output into the game folders so you can use it.

Put the ddt files in resources\art\. You can add subfolders.

You can probably use alpha channels with PNG filesā€¦ I donā€™t know, I havenā€™t tried (Iā€™m only an AI scripter so I donā€™t know much about art modding :sweat_smile:)

1 Like

Conversion to .tga and .ddt is not necessary for portraits and UI elements. Itā€™s only for 3D textures :slightly_smiling_face:

You can keep the .png format for this.

What I want to do is simply let the skirmishers share the same pose.

Nota: the highlander is not a skirmisher unit, itā€™s a musket infantry

infantry

2 Likes

I see. So it is possible to use alpha channels with PNG? Thanks, thatā€™s good to know (although Iā€™ll probably still not do art modding xD)

1 Like

It is great to know I donā€™t need to use 3D app to change the portrait! Thank you for the guides very much! :pray: I will try them as soon as possible.

===========
EDIT:

Yeah it works! :sob:

123

I just finished the paint and added layer mask on it. Then I directly saved it as PNG file, and somehow it worked.

Even I canā€™t see anything in the transparent area when I reopen the PNG file, the content which was masked out before still exists.

2 Likes

Yeah the process Alistair detailed is to mod the old version of the game. Fortunately DE is much more straightforward when it comes to unit portraits.

BTW, you aware the Highlander is a Heavy infantry musketeer unit, right?

No. I really thought it is light infantry. :sweat_smile:
This is why I want to change some of the unitsā€™ potraits.

This will take very long time to replace all the picturesā€¦ I have published the mod but I donā€™t think I can complete it. I use my free time to draw these pictures just for fun and for practice.

3 Likes

I like the idea of giving the same pose for units of the same type. Iā€™d love to see you complete this project : )

1 Like