Pages

Build ghost and WreckSnap

Presentation profiles that choose which structures show a model in the placement ghost, how far a reclaim click snaps to a wreck, and a mod's reclaim voice, win sound and score screen.

Three presentation matchers change what a player sees, hears and clicks, never the simulation: which structures show their model while being placed, how far a reclaim or resurrect click reaches for a wreck, and a mod's reclaim voice, win sound and score screen. Use them when a mod changed one of these in its own interface.

The worked example

The bundled Escalation profiles in assets/compatibility/mod-mappings.toml (evidence text left out here):

[[profile]]
id = "taesc-build-ghost-v1"
revision = 1
priority = 0
matcher = "verified-module-build-ghost-v1"
build_ghost = "every-structure"
mod = "escalation"

[[profile]]
id = "taesc-wreck-snap-v1"
revision = 1
priority = 0
matcher = "verified-module-wreck-snap-v1"
wreck_snap_cells = 1
mod = "escalation"

Verified build ghost

Matcher "verified-module-build-ghost-v1" chooses which units the placement ghost draws as a nanoframe model. Its build_ghost field is "every-structure": every structure (FBI bmcode 0) shows its model, the preview keys only narrowing its pieces or turning it. It applies only when the mounted mod has the profile's identity (Mod identity); otherwise only a structure that authors a preview key shows its model, and stock data keeps the plate alone. A mobile unit never shows one. The bundled taesc-build-ghost-v1, revision 1, recognizes Escalation 10.2. The game resolves the scope once at load on each player's machine. The ghost is presentation only: the selection adds nothing to the compatibility plan, the rules, checkpoints, the sim hash or the wire. The unit field truths record the module's behavior.

Verified WreckSnap

Matcher "verified-module-wreck-snap-v1" sets the game's WreckSnap radius: how far a reclaim or resurrect click off any feature reaches for the nearest reclaimable one. Its wreck_snap_cells field is a whole number of map cells, as Escalation counts them; AEX reaches that many cells and a half (wreckSnapRadiusForCells), and 0 turns WreckSnap off. It applies only when the mounted mod has the profile's identity; otherwise the radius is AEX's 40 world units. The bundled taesc-wreck-snap-v1, revision 1, recognizes Escalation 10.2 and selects 1 cell, the limit that mod's Ctrl-F2 field allows. A player may pick their own radius in the options, and Alt overrides the snap (input bindings). The game resolves the radius once at load on each player's machine. WreckSnap is presentation only: the selection adds nothing to the compatibility plan, the rules, checkpoints, the sim hash or the wire.

Verified presentation

Matcher "verified-module-presentation-v1" takes three fields; a field left out keeps stock TA's choice, and a profile must change at least one:

Field Non-stock choice What a player notices
reclaim_working_voice "once-per-reclaim" A builder reclaiming a feature says its "working" line once per reclaim. Stock, "every-work-call", repeats it while it works.
match_win_sound true A skirmish or multiplayer win plays TA's Victory Condition sound once. Stock plays nothing.
score_keeps_left_players true The score screen keeps a row and statistics for a player who left or was removed. Stock leaves them out.

It applies only when the mounted mod has the profile's identity. Two bundled profiles use it, in assets/compatibility/mod-mappings.toml:

[[profile]]
id = "taesc-presentation-v1"
revision = 2
priority = 0
matcher = "verified-module-presentation-v1"
reclaim_working_voice = "once-per-reclaim"
match_win_sound = true
score_keeps_left_players = true
mod = "escalation"

[[profile]]
id = "tamayhem-presentation-v1"
revision = 1
priority = 0
matcher = "verified-module-presentation-v1"
reclaim_working_voice = "once-per-reclaim"
score_keeps_left_players = true
mod = "mayhem"

Escalation 10.2 gets all three; Total Mayhem 11.3 gets the reclaim voice and the score screen, not the win sound, which is Escalation's DLL. The match's own rules can turn on the same choices for any mod. The game resolves the profile once at load on each player's machine. Like the ghost and WreckSnap, the selection adds nothing to the compatibility plan, the rules, checkpoints, the sim hash or the wire.

What goes wrong

Profiles that apply log:

build ghost compatibility: profile taesc-build-ghost-v1@1 selected; evidence: <evidence>
wreck snap compatibility: profile taesc-wreck-snap-v1@1 selected 1 cells; evidence: <evidence>
presentation compatibility: profile taesc-presentation-v1@2 selected reclaim_working_voice once-per-reclaim, match_win_sound true, score_keeps_left_players true; evidence: <evidence>

A value the matcher does not take refuses the library:

mod compatibility: mod-mappings.toml: profile[0].build_ghost: unsupported selection 'all'
mod compatibility: mod-mappings.toml: profile[0].wreck_snap_cells: required non-negative integer
mod compatibility: mod-mappings.toml: profile[0].reclaim_working_voice: expected "once-per-reclaim" or "every-work-call"
mod compatibility: mod-mappings.toml: profile[0]: a presentation profile must select a non-stock choice

Next