Pages

AI profiles

A mod's root ai.toml overrides the AEX AI's defaults and per-profile economy policy.

A mod can include AI configuration in its root ai.toml. Use it when your mod's units or economy need the AEX AI to play differently from its built-in defaults.

The worked example

examples/public/creator/ai-profiles/ai.toml sets shared economy defaults and overrides the lobby's Medium / Balanced profile:

# Shared defaults for this mod's AI players.
[economy]
first_factory_min_metal_income = 2.5
first_factory_min_energy_income = 25
metal_income_per_factory = 6
progression_build_horizon_sec = 180
progression_income_share = 0.5

# The lobby's Medium / Balanced selection uses these overrides.
[profiles.medium_balanced]
decision_period_ticks = 90
commands_per_pass = 4
attack_commit_ratio = 1.2
retreat_fraction = 0.4

[profiles.medium_balanced.economy]
first_factory_power_count = 2
first_factory_min_energy_income = 50

What it does

Profiles override built-in defaults and can set their own economy policy. This works for legacy TA mods as well as mods with manifests. Every field, level and play style is in Mod AI configuration.

What goes wrong

AEX refuses an ai.toml it cannot read. The message starts invalid ai.toml and lists each problem on its own line. A director named inside ai.toml is one of them:

[director] is not an ai.toml table: name the director in mod.toml as [ai] director

Next