Native weapon abilities
The native abilities and policies a mod can select, and the docs that describe each one.
AEX gives mods native abilities and policies that TA mods used to get from executable patches or script tricks. Use this page to find the one you need: a weapon ability, a legacy compatibility profile or one of the native policies.
The worked example
A mod can bind an existing TA weapon definition to a native ability with
root weapon-abilities.toml. This file, at the
mod's root, gives the TA weapon ASPID_STOMP the native stomp ability:
version = 1
[[weapon]]
name = "ASPID_STOMP"
ability = "stomp"
The optional mapping selects behavior; the weapon's TA data continues to own its combat stats.
The abilities and policies
- The mod compatibility library maps recognized legacy content conventions to those same native abilities through versioned profiles.
- Map objects also support native feature obstruction, including a compatibility mapping for explicitly nonblocking legacy heaps.
- The native script-reference policy configures scoped reference reuse directly; verified legacy executable/module pairs can select the same capability through the compatibility library.
- The native weapon-claim policy decides which weapon slots attack and build orders take from auto-targeting; a verified legacy executable selects it through the compatibility library.
- The native projectile rules decide what an
expiring artillery shell does, which fire routine a
turret+vlaunchweapon gets and two details of how explosions look; a verified legacy executable selects them through the compatibility library. - Native session opening configures an optional multiplayer startup hold through native controls and configuration.
- Unit scripts can ask another unit's type with the
COB unit-type query (
get UNIT_TYPE(unit), compared with BOSUNITTYPE("NAME")), an AEX extension stock TA does not have.
What goes wrong
AEX writes the result of reading weapon-abilities.toml to its log,
aex.log. A good load reads:
weapon-abilities.toml: bound 1 native weapon abilities
A problem is logged as an error line naming the entry, for example:
weapon-abilities.toml: weapon[0].name: unknown weapon 'ASPID_STOMP'
weapon-abilities.toml: weapon[0].ability: unsupported ability 'smash' (expected 'stomp' or 'none')
Next
- Themes and interface design, the next creator topic.
- Native weapon abilities, the full reference for
weapon-abilities.toml. - AEX creator docs, the start page.