Factions
How [factions.<side>] gives each of the game's sides a display name and an emblem.
A faction is one of the game's sides (gamedata/sidedata.tdf, two or more;
a standalone game's content/game.toml). [factions.<side>] gives one its
display name and icon; <side> is the side's name (letter case ignored).
The worked example
[factions.ARM]
name = "Arm Federation"
[factions.GOK]
name = "Gok Horde"
icon = "ui/factions/gok.png"
ui/factions/gok.png must exist in the mod folder.
The keys
| Key | Type | Description |
|---|---|---|
name |
string | What the menus call the faction. Absent: the side's name. |
icon |
string | A .png inside the mod folder (relative, no ..): the faction's emblem, a square white or grayscale mask on transparency (512x512 recommended), drawn in the player's colour. Absent: the theme's FactionIcon<side>, else a bundled emblem by the side's place, else the name's initial (modding.md). |
- Write each faction as its own
[factions.<side>]section. AEX 0.2.38 and earlier ignore thefactionstable, so a mod may carry it for any AEX. A one-line inline table (GOK = { name = "Gok Horde" }under[factions]) reads the same. - A value that is not a table, a
nameoriconthat is empty or not a string, or an unknown key warns and is ignored; the faction keeps its side's name or its fallback icon. - An
iconthat is absolute, leaves the folder, is not.png, or does not exist is dropped with a warning. - Two sections naming one side (
ARMandarm): the first in byte order is kept and the other warns.
What goes wrong
The faction keeps its side's name or fallback icon, and aex.log has the
reason:
[mods] <mod folder>: factions.GOK.icon 'ui/factions/gok.png' does not exist; the faction shows its fallback icon
[mods] <mod folder>: field 'factions.GOK.icon' must be a .png picture; the faction shows its fallback icon
[mods] <mod folder>: field 'factions.GOK.name' must be a non-empty string; ignored
[mods] <mod folder>: unknown field 'factions.GOK.colour'; ignored
[mods] <mod folder>: 'factions.arm' names no side or the same side as another entry (sides ignore letter case); ignored
Next
- Adjacency.
- Faction icons in modding.md.