Jacob Schmidt e688d9426b Add CAD mission task generation flow
- Wire dispatcher UI events into a new generated task request path
- Add bridge/server handling for generated mission task requests
- Update mission generators and dispatcher UI for task metadata
2026-05-23 02:10:34 -05:00
..
2026-05-23 02:10:34 -05:00

Mission Manager Functions

Mission manager functions coordinate dynamic mission generation for forge_pmc_simulator.Tanoa.

Registered Functions

  • forge_pmc_fnc_missionManager is postInit and starts the dynamic mission manager after setup settings are applied.
  • forge_pmc_fnc_persistentCadMissionManager starts the persistent CAD-oriented mission dispatcher.
  • forge_pmc_fnc_requestMissionTask lets CAD dispatchers request a specific generator type on demand.
  • forge_pmc_fnc_updateEnemyCountFromActivePlayers updates the active-player scaling multiplier used by enemy spawns.

Helper Scripts

  • adminActivatePersistentCad.sqf is an admin/server-console helper that calls forge_pmc_fnc_persistentCadMissionManager.

Runtime Notes

forge_pmc_fnc_missionManager waits for forge_pmc_missionSettingsApplied before it creates generator objects. If no UI settings are submitted within the fallback window, it applies mission param defaults and starts generation.

Generated tasks are registered through forge_server_task_fnc_startTask with source mission_manager, so they appear in the normal Forge task/CAD lifecycle.

Dispatcher-requested tasks use the same generator objects and active mission registry as timer-generated tasks. The request path respects the configured mission cap and updates the generation timestamp so the timer does not immediately create another task after a manual request.

The current CAD integration intentionally calls the mission-directory function forge_pmc_fnc_requestMissionTask. That keeps simulator-specific generators and settings owned by forge_pmc_simulator.Tanoa while the framework path is still being proven out. If this becomes a reusable framework feature, the server CAD/task layer should grow a framework-owned request interface and delegate to mission-provided generator registrations instead of calling this mission function by name.