This wiki is archived from 2021-09-05

Custom Strategic Icons

From Planetary Annihilation: TITANS and Classic PA Wiki
Revision as of 18:57, 17 May 2017 by Wondible (talk | contribs) (Created page with "Category:Modding = 50px Adding Custom Strategic Icons = == 50px Unit Icon Selection == Units have a default icon nam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

File:Titans-icon.png Adding Custom Strategic Icons

File:Gold-rank-icon.png Unit Icon Selection

Units have a default icon name based on the unit json name, so assault_bot.json would have icon name of assault_bot.

Units can override the strategic icon name by including the si_name property. For example, each commander has a different json name, but the base commander includes "si_name": "commander", so they all use the generic commander icon.

File:Gold-rank-icon.png Icon Files

The path to strategic icons is constructed by the icon atlas, so generally they are in:

/ui/main/atlas/icon_atlas/img/strategic_icons/icon_si_icon1.png

Where icon1 is the icon name.

File:Gold-rank-icon.png Registering Icons

If you just need to add a small number of icons and are not concerned about multiple mods cumulatively exceeding max icons, all you need is an icon_atlas mod with:

model.strategicIcons.push('icon1', 'icon2', 'icon3')

For larger deployments, HodgePodge includes max icon protection and fallback aliasing.