Skip to content

feat: drivable spawned units and crate/group link in events (FEAT-VMCT-V1-PARITY, #327 #328) - #329

Merged
davidp57 merged 8 commits into
developfrom
feat/FEAT-VMCT-V1-PARITY
Nov 23, 2026
Merged

davidp57 merged 8 commits into
developfrom
feat/FEAT-VMCT-V1-PARITY

Conversation

@davidp57

Copy link
Copy Markdown
Member

Lot FEAT-VMCT-V1-PARITY — closes #327, closes #328. Two v1 behaviours VMCT works around today.

#327 — spawned units can be driven again (spawnedUnitsPlayerCanDrive)

New setting spawnedUnitsPlayerCanDrive, default true (v1: ctld.createUnit set playerCanDrive = true). One helper, ctld.utils.spawnedUnitsPlayerCanDrive(), read at every ground spawn of a gesture:

Gesture Site
Troops / JTAC team dropped from a template CTLDObjectRegistry.spawnObject
Parachuted troops CTLDTroopManager:parachuteTroops
Vehicle spawned for a transport, vehicle unloaded CTLDVehicleSpawner:spawnVehicleForTransport, :unloadVehicle
Vehicle landed by parachute / delivered by an AI transport CTLDVehicleSpawner:_spawnGroundUnit
Unpacked crate (ground) ctld.utils.buildGroupUnitDef
AA system (assembly, rearm, repair, AI delivery) CTLDCrateAssemblyManager:_spawnGroup

Deviation from the PRD, on purpose: the PRD listed five sites; the code had two more gesture spawns (parachuted troops, and _spawnGroundUnit for the parachuted / AI-delivered vehicle). Both created non-drivable units (direct coalition.addGroup, DCS default false), and v1 created them drivable, so they read the setting too.

Open point settled — the hard-coded false of src/core/CTLD_objectRegistry.lua:203-278 are template intentions, kept. They are Fuel_Truck, repare_Truck, CS_FARP_Guards, FARP_Security_Guard: the support vehicles and guards of the FARP scenes, CTLD 2-only (v1 built no FARP; the parity checker confirmed it), declared again with the same false in src/scenes/CTLD_farpAlphaScene.lua, CTLD_countrysideFarpScene.lua (and CTLD_fatCowScene.lua). A player who drives the fuel truck away takes the FARP's service with it. So spawnObject lets a template's own playerCanDrive win, and the setting decides only when the template says nothing (every troop template).

Catalogue configVersion 2.4.0 → 2.5.0, tests/ci/data/catalogue_shapes/2.5.0.json and the oracle regenerated with ctld-tools; a 2.4.0 snapshot gets true (tested). Schema label + description EN/FR, mission maker settings table EN/FR, CHANGELOG Changed.

#328 — events link crates and groups

  • OnCrateUnpacked.groupName: the group the unpack created (one event per consumed crate, all with the same group; absent for a scene). _spawnUnpacked now also returns the group name, unpackCrate takes it.
  • OnAASystemDeployed.crateNames (crate assembly only; the AI delivery has none), OnAASystemRearmed.crateNames, OnAASystemRepaired.crateNames: list of the consumed crates.

Additive only. docs/developer/events.md EN/FR, CHANGELOG Added.

Checks

  • Lua specs (local Lua 5.1 runner): 2002 passed; the 36 failures are the same set as on develop (runner limitations), +23 new tests. CI busted is the gate.
  • ctld-tools: 373 passed (catalogue-shape test included).
  • Build OK, CTLD.lua loads under Lua 5.1. Lua 5.1 review of the diff: clean. Legacy parity check: every v1 gesture spawn is drivable again; v1 had no non-drivable gesture unit.
  • Live check (ticket 03): scenario tests/dcs/noPlayer/scenario_vmct_v1_parity.lua — result to be recorded after the DCS run.

🤖 Generated with Claude Code

davidp57 and others added 8 commits November 23, 2026 10:01
…#322-#328)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ayerCanDrive (#327)

CTLD v1 created the units of a gesture drivable by a Combined Arms player
or a game master; CTLD 2 created them with playerCanDrive = false. The new
setting spawnedUnitsPlayerCanDrive (default true, the v1 behaviour) is read
by every ground spawn of a gesture: troops from a template, parachuted
troops, the transported vehicle (spawn and unload), a vehicle landed by
parachute or delivered by an AI transport, the unpacked crate and the AA
system. A registry template that sets playerCanDrive = false keeps it (the
FARP support trucks and guards). Catalogue 2.5.0 with its shape and oracle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… CHANGELOG (#327)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ents (#328)

OnCrateUnpacked carries groupName, the group the unpack created (absent
for a scene); OnAASystemDeployed (crate assembly), OnAASystemRearmed and
OnAASystemRepaired carry crateNames, the crates consumed. An AI-delivered
AA system has no crate and no crateNames. Additive only. Event reference
EN+FR and CHANGELOG updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…up link (#327, #328)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e crateNames on FAIL, test templates cleaned up

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidp57
davidp57 merged commit 87ac87a into develop Nov 23, 2026
10 checks passed
@davidp57 davidp57 mentioned this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant