AEX content packs
AEX-native units, weapons, armor categories, maps and theme records as TOML files under a mod's content/ folder.
A mod with a mod.toml may also carry AEX-native content as TOML files
under content/. Use a content pack when you author units and weapons in
AEX's own format instead of TA's FBI and TDF files.
<mod-root>/
├── mod.toml
└── content/
├── armor_categories.toml
├── units/<any-name>.toml
├── weapons/<any-name>.toml
├── maps/<any-name>.toml
└── themes/<any-name>.toml
The worked example
examples/public/creator/unit-pack/ (mod id unit-pack) holds a unit that
fires a weapon from the same pack. content/weapons/light-laser.toml:
id = "light-laser"
name = "Light Laser"
description = "A minimal example weapon used by the unit-pack example."
range = 150.0
reload_seconds = 1.5
delivery_type = "beam"
[damage_profile]
default = 10
[damage_profile.overrides]
armored = 5
light = 12
content/units/greeter.toml names it by its full id, unit-pack.light-laser:
id = "greeter"
name = "Greeter"
description = "A minimal example unit used by the unit-pack example."
side = "example"
category = "kbot"
max_health = 100
sight_distance = 200.0
weapons = ["unit-pack.light-laser"]
[footprint]
x = 2
z = 2
[cost]
metal = 50
energy = 100
build_time = 3000
[capabilities]
can_attack = true
can_move = true
is_builder = false
The armored and light override keys are declared in the pack's
content/armor_categories.toml as [[categories]] entries.
What the loader does
What works today: aex::creator::loadContentPack (src/aex/creator/ContentLoader.h)
reads and validates a pack against the schemas below, resolves its
references (unit to weapon, builder to built unit, damage override to armor
category) and reports every problem with its file and field. A pack with any
error prevents native runtime loading. Legacy TA mods keep their existing
input path. A pack that is a whole game, with no TA data under it, is a
native standalone game.
The creator TOML owner also serializes its supported table/value subset for native authoring. Studio updates parsed definitions through that serializer, preserving fields it does not expose, then validates the complete content pack before recording an edit in project history.
Loader behaviour shared by every content file:
- Every
.tomlin a content folder is read, in file-name order; the file name is free, theidinside identifies the item. - Each item is keyed
<mod-id>.<id>(schemas/IDENTIFIER_RULES.md). A second item of the same kind with the same id is ignored. - Fields the schema does not name are ignored, except the reserved names a schema lists, which are errors.
- A pack is self-contained: a reference to another mod's content is an error.
Schemas
- Identifier Rules: every
id. - Mod Manifest:
mod.toml. - Unit Schema:
content/units/. - Weapon Schema:
content/weapons/. - Production Schema: the
[production]section of a unit. - Armor / Target Category Schema:
content/armor_categories.toml. - Map Schema:
content/maps/.
Theme records
A file in content/themes/ holds id and name (required), and
description, accent_color (#RRGGBB), button_style and font_family.
The loader validates it; it does not change how AEX looks. AEX's themes:
docs/modding.md.
What goes wrong
Each problem is reported with its file and a message from the loader, for example:
mod.toml not found at pack root
weapons entry 'unit-pack.light-lazer' does not resolve to any weapon in this pack
weapons entry 'other-mod.light-laser' references a cross-mod weapon; this pack is self-contained
damage_profile.overrides key 'heavy' does not match any declared armor category
accent_color='7a5cff' must match #RRGGBB
Next
- Native standalone games, the next creator topic.
- Examples, every example pack.
- AI profiles, the previous topic.