Order captions and cargo stances
The order-captions profile that names a mod's D-gun buttons and maps AEX's cargo stance onto script-driven transports.
An order-captions profile covers order buttons whose job a mod's scripts change. Use it when a mod's D-gun button does something else, or when its transports load and unload by their fire order.
The worked example
The bundled Escalation profile in assets/compatibility/mod-mappings.toml
(evidence text left out here):
[[profile]]
id = "taesc-order-captions-v1"
revision = 2
priority = 0
matcher = "verified-module-order-captions-v1"
cargo_stance_fire_orders = ["auto_load=0", "auto_unload=1", "manual=2"]
command_fire_captions = ["LAB_DIR=DIRECT"]
mod = "escalation"
The fields
Matcher "verified-module-order-captions-v1" covers order buttons whose job a
mod's scripts change. It applies only when the mounted mod
has the profile's identity (Mod identity), and it picks
units by data traits only, never by unit name. It has two fields, and a
profile needs at least one of them:
-
command_fire_captions = ["WEAPON=CAPTION"]names the D-gun button of a unit carrying that weapon. This field is presentation only: it adds nothing to the compatibility plan, the rules, checkpoints, the sim hash or the wire. -
cargo_stance_fire_orders = ["auto_load=N", "auto_unload=N", "manual=N"]maps AEX's cargo stance onto the fire order (0, 1 or 2, a different one for each stance). The game uses it for transports whose own script loads and unloads units by its fire order. It finds those transports by scanning each unit's script once at load for a script that readsSTANDING_FIRE_ORDERSand attaches units. For such a transport:- the HUD shows a cargo stance button in place of the fire-order button (Auto-load, Auto-unload, Manual) that sets the mapped fire order;
- AEX's Load order takes the transport beside the unit and its Unload order takes it to the point. The transport stops there, and the order holds the fire order in the mapped Auto-load or Auto-unload mode until the script has the unit aboard, or has finished its unload. While the transport travels, the order holds Manual. When the order ends, the stance comes back.
This mapping changes what orders do, so it is a simulation rule. The selection joins the compatibility plan, checkpoints and the sim hash, and it applies in both rule presets.
The Escalation profile
The bundled taesc-order-captions-v1, revision 2, recognizes the Escalation
pair. Its transports map Auto-load to fire order 0, Auto-unload to 1 and
Manual to 2, which are the script's Load, Unload and No Orders modes.
The script's own unload sets the whole load down at a stop, so an Unload
order empties an Escalation transport rather than setting down one unit as
a TA transport does. Its
factories' LAB_DIR button reads DIRECT, as the mod's own button art does.
Revision 1 captioned the fire-order button LOAD / UNLOAD / NO ORDERS instead.
That fire_order_cargo_mode field is gone, and a profile that uses it is
refused. Without a profile the buttons keep TA's captions, and these
transports have no cargo stance. AEX's own rules caption a command-fire
weapon that is not a D-gun SPECIAL.
What goes wrong
A profile that applies logs two lines, one per field:
order captions compatibility: profile taesc-order-captions-v1@2 selected; evidence: <evidence>
script cargo compatibility: profile taesc-order-captions-v1@2 selected cargo stance fire orders auto_load=0 auto_unload=1 manual=2; evidence: <evidence>
A mapping that names a fire order twice or leaves a stance out, a profile with neither field, or the retired field refuses the library:
mod compatibility: mod-mappings.toml: profile[0].cargo_stance_fire_orders: fire order 1 named twice
mod compatibility: mod-mappings.toml: profile[0].cargo_stance_fire_orders: stance 'manual' missing
mod compatibility: mod-mappings.toml: profile[0]: an order-captions profile must caption a button or map the cargo stances
mod compatibility: mod-mappings.toml: profile[0].fire_order_cargo_mode: unknown field