missions.create_flight_plans can make CMO show the player a modal "cannot launch" dialog #28

Closed
opened 2026-10-13 22:46:18 -04:00 by vinny · 0 comments
Owner

Live run of 2026-10-14 (docs/verification/library/library-writes-2026-10-14.json, flightplans phase). The strike mission was inactive, with StrikeFlightSize and StrikeMinAircraftReq at 1, and two F-24As of one base and loadout assigned. missions.create_flight_plans (the tester's Lua calls mission:createFlightPlans({})) made CMO show a modal dialog in the operator's game: "Mission CMOnet LIB Flight Plan, aircraft type F-24A Hellcat II ... with loadout A/A: AIM-174B Gunslinger, Internal Long-Range based on Miami AB cannot launch! Reason: No contacts can be engaged by the available weapons 370 USG Drop Tank (not suitable)." No flight formed, and the read-back correctly refused the write.

So createFlightPlans checks launchability itself, active mission or not. Refusing active missions (operator 2026-10-13) is not enough: the General can still interrupt the player through this tool by assigning aircraft whose loadout can't hit the mission's targets.

The harness is fixed (fabc229): it pairs only aircraft whose loadout has a weapon with LandRangeMax/SurfaceRangeMax > 0 for the target's domain (DataLoadoutWeapons -> DataWeaponRecord -> DataWeapon).

Proposal for the product: before sending missions.create_flight_plans, refuse unless every assigned aircraft's loadout can reach at least one of the mission's targets' domains, by the uploaded CMO database (library/cmo_db.py); without an uploaded database, refuse and say to upload it. Two places it could live:

  • CMOnet's library preflight (execution/runtime_port.py _library_preflight): it reads the mission's aircraft and targets fresh, then checks them against the catalog.
  • The tester's Lua, if CMO's Lua can tell a loadout's target domains without the database.

Until then, the General should only call it when its own planning picked land- or ship-attack loadouts.

Live run of 2026-10-14 (`docs/verification/library/library-writes-2026-10-14.json`, flightplans phase). The strike mission was inactive, with StrikeFlightSize and StrikeMinAircraftReq at 1, and two F-24As of one base and loadout assigned. `missions.create_flight_plans` (the tester's Lua calls `mission:createFlightPlans({})`) made CMO show a modal dialog in the operator's game: "Mission CMOnet LIB Flight Plan, aircraft type F-24A Hellcat II ... with loadout A/A: AIM-174B Gunslinger, Internal Long-Range based on Miami AB cannot launch! Reason: No contacts can be engaged by the available weapons 370 USG Drop Tank (not suitable)." No flight formed, and the read-back correctly refused the write. So `createFlightPlans` checks launchability itself, active mission or not. Refusing active missions (operator 2026-10-13) is not enough: the General can still interrupt the player through this tool by assigning aircraft whose loadout can't hit the mission's targets. The harness is fixed (fabc229): it pairs only aircraft whose loadout has a weapon with `LandRangeMax`/`SurfaceRangeMax` > 0 for the target's domain (DataLoadoutWeapons -> DataWeaponRecord -> DataWeapon). Proposal for the product: before sending `missions.create_flight_plans`, refuse unless every assigned aircraft's loadout can reach at least one of the mission's targets' domains, by the uploaded CMO database (`library/cmo_db.py`); without an uploaded database, refuse and say to upload it. Two places it could live: - CMOnet's library preflight (`execution/runtime_port.py` `_library_preflight`): it reads the mission's aircraft and targets fresh, then checks them against the catalog. - The tester's Lua, if CMO's Lua can tell a loadout's target domains without the database. Until then, the General should only call it when its own planning picked land- or ship-attack loadouts.
vinny closed this issue 2026-10-13 22:59:30 -04:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
vinny/CMOnet#28
No description provided.