Helper Functions

Helper functions provide reusable lookups and conversions for the PMC simulator mission.

Registered Functions

  • forge_pmc_fnc_getAllEnemyFactions returns available non-BLUFOR faction classnames.
  • forge_pmc_fnc_getEnemyFactionOptions scans the active modset for selectable OPFOR/Independent factions and applies CfgEnemyFactions filters/labels.
  • forge_pmc_fnc_resolveEnemyFactionParam converts a mission parameter value into a faction classname.
  • forge_pmc_fnc_getEnemyFactionSide resolves a faction classname to an Arma side.
  • forge_pmc_fnc_getEnemyFactionUnitPool builds the unit pool used by generated enemy spawns.
  • forge_pmc_fnc_getMissionSettingRange resolves generator ranges from applied mission settings with config fallbacks.
  • forge_pmc_fnc_getEnemyFactionListboxSelection and forge_pmc_fnc_populateEnemyFactionListbox support faction picker UI/listbox flows.

Notes

The mission setup UI is populated dynamically from loaded CfgFactionClasses and CfgVehicles. CfgEnemyFactions only controls allowed sides, denylisted factions, and friendly labels/order for known factions.

forge_pmc_fnc_getEnemyFactionUnitPool checks CfgFactionUnitMap first. Add a faction class there when the automatic CfgVehicles faction lookup is too broad, too sparse, or needs a curated unit pool.

These functions are registered under the forge_pmc tag, so their public names do not include the folder name. Moving a helper within this folder should not change callers as long as CfgFunctions.hpp remains updated.