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…
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…
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.