Implementing Custom Icons ? Solution: "atlas" or "interface"?

I’m working on a Tower Defense map and my idea was, that I could use custom icons for the different waves in the objective messages. As it turns out, this basic idea is quite difficult to implement… I mean, does it really matter? No, but it drives me nuts, because I really believe there should be a reasonable way to do it.

1) Approach: XS Scripting
The easiest way would be to implement custom icons over xs scripting. The problem is, the constant “cAttrSetIcon” uses an ID and not a path to a specific file…

2) Approach: Icon Mod
The method with “icon mod” is just too extreme for a map. Changing “materials.json” and “icons.json” may be fine for an icon mod, but for a custom map? It only works after a restart, and it stays after the map was played…

3) Approach: Atlas*
So, now I’m at the whole “Atlas” thing. How does it work exactly? I’m not a programmer, but my guess is, that “build_atlas” builds from materials and icons the whole subfolders in textures/atlas for the resolutions HD, SD and UHD. The game in turn uses those for the game itself, and not the individual icons (dds) in the folder “ingame”. Therefore, in the end the only change with the “icon mod” is, that you actually change those folders??? So, now comes the big question. What if you would pre-render (pre-atlas) an atlas and put it into a mod structure. Would the game then use this atlas for the icons of a map? So far, I can’t make it to work. Can’t even open UHD because of the error “Unsupported DXGI format (98)”. But couldn’t this be a path to the solution?

Yeah, I’ve found nothing about this on the internet. Everything I found was the “Icon Mod” approach. Does anybody have a clue if this could be the right approach? I mean, if this is the way, one could even render those new icons in a new folder. Not to units or building, but something like folder “custom_map_x”. One has to implement a different class for this folder, but that should be possible with AGE, I guess? However, the combination of those two would actually be the right solution. It only loads with a data mod (new class) and therefore this icon mod wouldn’t affect players outside a map (no class and new folder). But yeah, it’s a lot for just changing some icons… :rofl:

Another idea would be to solve it with a custom materials.json and icon.json which both load the original ones into it and then add to it in the sense of not “precache” but just “cache”? But as I said, I’m not a programmer and my problem with this idea is really basic. The game uses the materials.json in the mod folder, if there is one, and only this one → How can you tell this json where the original materials.json is, that it should load? The same goes for the icon.json. IDK…

But as I said, it just drives me nuts. Something so basic, and it just doesn’t work in AoE2 DE. My guess is, really, that the game uses the stuff in the “atlas” folder structure and one would have to “pre-atlas” those. But even if this is true, the Devs could fix this issue. Implement a new class for the editor (units, buildings, heroes, others, +customs) and some basic tool with which a modder could execute an atlas_build for a custom folder. Maybe not even a tool, just load and restart the game? But in the lobby, the same data transfer for this new atlas mus apply as with the data mods. At the same time, when an icon.json is found in the mod structure, it doesn’t just use this (problem if something gets changed), but it just loads those IDs for a game. It loads the original first and only afterwads the one in the mod structure… Easy fix… Maybe not the most elegant solution, but as long as it works, nobody cares. I mean, if my theory is actually true… :smile:

Yeah, does anybody have some inputs or even solutions for this whole custom icons problem? It’s just a shame that an awesome game like AoE2 DE can’t have it.



Interface Theory doesn’t seem to work

Browsed in the folder structure of AoE2 a bit and found something interesting…

- 50706.slp = building icons
- 50729.slp = tech icons
- 50730.slp = units (and heroes)

*Unlike my atlas theory those files are in the drs folder… I recall, that the Devs said somewhere that drs files are privileged in the mod structure (or something like that). I don’t have time right now, but this could be it… *

Change those files and the game has the icons, the icon class and the ID of a icon? Because inside of those slp’s is every icon with the ID. Those files are also in the drs folder, therefore they should apply to a data mod… At least in theory…

*Is it really this ??? *

Could it be ???

No need for the atlas thing and it was really possible all along? :scream:

What do you mean about interface theory?
I’ve got the altas’ to work but only if i change the game atlas’. can’t get the mod atlas to work.

Did you have to restart the game to make it work?

The icons appear also in the drs folder. This is so strange and redundant…

They’re in:

  • AoE2DE\widgetui\textures\ingame
  • AoE2DE\widgetui\textures\atlas
  • AoE2DE\resources_common\drs\interface

So the “ingame” is the base for the “atlas”… but what are the files in interface? A result of the atlas or a backup? But those slp files are like the files in graphics (like the animations). Each icon is a seperate frame… So i was not sure if the game even uses the atlas directly, or if it transforms the atlas to those slp’s in the folder interface… My quick test didn’t work. Tried to replace the units with the techs but nothing happend…

Sorry, using different account now.
I changed the atlas image in the main game folders. The
I used nvidia texture app to export as png, changed one of the icons and referenced that icon in my new unit entry in AGE. @Juggernaut8704 let me know about how we cannot have a custom icon sheet image in our mod atm. Have to change the game folder.
Hope that makes sense. I’m new to modding!

Yeah i always restart the game.

Check out this thread?

And this one where i was talking to juggernaut

Hope that gets you started and i am sure there is more experienced users on the forums.