Skip to content

fix: five defects from the VMCT review of develop (FIX-VMCT-REVIEW-FINDINGS, #322-#326) - #330

Merged
davidp57 merged 13 commits into
developfrom
fix/FIX-VMCT-REVIEW-FINDINGS
Nov 23, 2026
Merged

davidp57 merged 13 commits into
developfrom
fix/FIX-VMCT-REVIEW-FINDINGS

Conversation

@davidp57

@davidp57 davidp57 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Lot FIX-VMCT-REVIEW-FINDINGS: the five defects VMCT found reading develop at 1dfea2c (issues #322 to #326), plus the backlog housekeeping of ticket 07.

Closes #322, closes #323, closes #324, closes #325, closes #326.

What changes

Issue Ticket Fix
#322 01 parachuteTroops builds the group from the template's own units (CTLDObjectRegistry._db[key].units), resolving unitType for the group's coalition as spawnObject does for a landed unload. Same types and order as on the ground, componentTypes honoured, mortar servants included (landed 1 m beside their mortar). The JTAC slot mapping (_u<idx>) now skips the servants, so a JTAC behind a mortar still lases. "Soldier AK" only as a logged fallback for an unknown template.
#323 02 self.active = data.active ~= false in CTLDTroopZone:init and CTLDLogisticZone:init.
#324 03 The single-crate menu entry carries its weight; the request looks it up with findDescriptorByWeight, as the sets do. No catalogue change.
#325 04 AA group name <type>_CTLD_AA_<groupUid>, the uid its unit names already carried.
#326 05 New ctld.utils.getPlayerNameOrType (v1's rule: player name, else type name) in the four messages. Event payloads unchanged; the player doc line of unpackFOBCrates says it is the unit name.
— 07 27 lots merged before 2026-11-20 compacted into .backlog/archive/, their lines moved to the Archived lots table (the register the previous compaction, #259, used; the ticket's "Delivered" table is the program's bootstrap list). CHANGELOG: "to be confirmed on the live check" dropped from FIX-CREATE-BEFORE-DESTROY (passed 2026-11-09).

Decisions applied, and where the code led further

Checks

  • busted specs added first, red then green: parachute_spec (6), zone_manager_spec (5), crate_request_repair_spec (new, 5), aasystem_spec (3), player_name_messages_spec (new, 9). Two existing fakes gained getPlayerName / getTypeName (a DCS unit always has them).
  • Local run (Lua 5.1 runner): 2010 passed; the 33 failures are the runner's known limitations (is_near, is_not, truthy), identical before and after. CI busted is the gate.
  • lua51-compliance-reviewer: clean. legacy-parity-checker: CTLD 2: parachuted troop templates all land as "Soldier AK" #322 is a deliberate v2 behaviour aligned with v1 (v1 always lands the group's real types), CTLD 2: the FOB and SAM coalition messages name the transport unit, not the player #326 at parity.
  • Build merge_CTLD.ps1 OK, CTLD.lua parses under Lua 5.1.
  • Live check (ticket 06): scenario_vmct_review_findings.lua PASS 10/10 on Test_CTLDNEXT_01.miz (2026-11-23): parachuted Standard Group and Mortar Squad land with their template's types, HAWK Repair brought out through the real menu callback, two HAWKs spawned in the same second under two names. Nothing left in the mission afterwards. Details in ticket 06.

Review (pr-code-review, full)

  • Parachuted mortar servants were named <group>-<i>, so a field pickup counted them as troops (_isServantUnitName matches ^SVNT); JTACs lacked the ^JTAC prefix the pickup and death paths look for. Fixed: servants SVNT-…, JTACs JTAC-…, with a test on the names.
  • getPlayerNameOrType now also treats an empty player name as no player, as CTLDTroopManager:_callsign does (a small deviation from v1, which would print "").
  • CHANGELOG wording (parity of a field-re-embarked group, v1's global not provided, true in the zone active field now loads inactive), the parachute comment and OnTroopsParachuteLanded.positions doc (EN + FR) updated.

Follow-up, not in this lot

The smoke message (src/CTLD_crate.lua ~3469) is the same class as #326: it goes to the coalition with the unit name, and untranslated, where v1 used ctld.getPlayerNameOrType and i18n. Fixing it needs a new i18n key, which this lot's PRD rules out.

🤖 Generated with Claude Code

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…322)

parachuteTroops read template.units[1].type, a field troop templates do not
carry, so every parachuted group landed as 'Soldier AK'. Build the units from
the template's own list, resolving unitType for the group's coalition as
CTLDObjectRegistry.spawnObject does for a landed unload; mortar servants are
included and the JTAC slot mapping skips them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(data.active ~= nil) and data.active or true turned active = false into true,
so troopZones / wpZones entries marked "no" were active from load. Use
data.active ~= false in CTLDTroopZone:init and CTLDLogisticZone:init.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The single-crate menu path looked the crate up by unit type; the six
'... Repair' crates have a weight and no unit and answered 'Request failed'.
Pass the entry's weight and look it up with findDescriptorByWeight, as the
crate sets do. A spec walks every single crate of the default catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group was named <type>_CTLD_AA_<second>: two systems of the same type
spawned in the same second shared it and DCS replaced the first. Use the
groupUid already given to the unit names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
'%1 started building a FOB' and the three AA deployed/rearmed/repaired
messages showed the unit name. Add ctld.utils.getPlayerNameOrType (v1's
ctld.getPlayerNameOrType: player name, else type name) and use it in the
four messages. Event payloads are unchanged; the unpackFOBCrates doc now
says the player argument is the unit name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compact each lot of the Active lots table merged before 2026-11-20 into
.backlog/archive/<LOT-ID>.md (index description, ticket table, PRD) and move
its line to the Archived lots table. Ticket links of the compacted PRDs
become plain text; the Fat Cow spike scenario points to the archive file.
CHANGELOG: the FIX-CREATE-BEFORE-DESTROY live check passed on 2026-11-09.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-05 and 07 done

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… prefix (#322 review)

A field pickup recognises a servant by ^SVNT (_isServantUnitName) and a JTAC
by ^JTAC (BUG-03/05). Parachuted units were all named <group>-<i>, so once
the drop spawned real servants a pickup counted them as troops. Also treat
an empty player name as no player in getPlayerNameOrType, as _callsign does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing, live check pending)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t 06)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…W-FINDINGS

# Conflicts:
#	.backlog/FEAT-VMCT-V1-PARITY/PRD.md
#	.backlog/FEAT-VMCT-V1-PARITY/tickets/01-spawned-units-player-can-drive.md
#	.backlog/FEAT-VMCT-V1-PARITY/tickets/02-link-crates-and-groups-in-events.md
#	.backlog/FEAT-VMCT-V1-PARITY/tickets/03-live-check.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/PRD.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/01-parachuted-troops-keep-their-template.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/02-inactive-zones-stay-inactive.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/03-repair-crates-from-the-menu.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/04-unique-aa-group-name.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/05-player-name-in-coalition-messages.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/06-live-check.md
#	.backlog/FIX-VMCT-REVIEW-FINDINGS/tickets/07-backlog-housekeeping.md
#	.backlog/README.md
#	CHANGELOG.md
@davidp57
davidp57 merged commit 971a564 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