Intergrating custom unit icon

CrazyNonGenius

Chieftain
Joined
Feb 21, 2018
Messages
1
Hello CivFanatics,

I am currently working on a mod changing the warfare aspect of the game, reading and watching various tutorials on this forum, searching through original game files and learning by other mods I could already create more than I would have aspected, new units from parts of other units, changed animations, added unit layers et cetera.
Just one thing absolutely does not work. I created a custom icon for a new unit, and even after days of trying I was not able to get it displayed ingame. The new unit is always using the icon from the original game with the same index-numer.


What i did:

1) Using ModBuddy I created a (starter unit) mod with a ModArt and three more XML-files.


2) I created the icon using paint.net and saved the needed sizes (22x22, 32x32 etc.) as a A8B8G8R.

bild7-jpg.489050



3) Then I used the Asset Editor to import them into my mod. The .tex and .dds-files were created in the textures folder and there is a .xlp in the XLP one.

bild1-jpg.489052


4) In the ModBuddy the ModArt was expanded by an entry for the icon-XLP (UITexture).

The NewUnit_Gameplay.xml and NewUnit_Text.xml create the standard-peon which is working ingame.


unbenannt-jpg.489067



5) In the NewUnit_Icon.xml I created the ICON_ATLAS_NEW_UNITS using the .dds imported with the AssetEditor.
Then I set the ICON_UNIT_PEON as Index 0 in the Icon Definitions.

bild4-jpg.489057



To my knowledge, this should work, but the peon is always using the settler icon. I spent hours trying to solve this thing, everything is typed correctly, I read a number of tutorials in which this works, and I downloaded some other mods and searched for anything I may have missed, but I couldn't find any difference between working mods intergrating custom icons and my own work.

Please help me, I'm going absolutely crazy! :crazyeye: Adding 2D assets should be the easiest part of modding, but in my case it is the opposite... :shifty:
 

Attachments

  • Bild7.jpg
    Bild7.jpg
    42.2 KB · Views: 541
  • Bild1.jpg
    Bild1.jpg
    39.4 KB · Views: 449
  • Bild4.jpg
    Bild4.jpg
    138.3 KB · Views: 481
  • Unbenannt.jpg
    Unbenannt.jpg
    90.7 KB · Views: 497
Back
Top Bottom