forge/arma/forge_pmc_simulator.Tanoa/CfgFactionUnitMap.hpp
Jacob Schmidt 8582e6c5e5 Discover enemy factions dynamically from loaded mods
- Scan CfgFactionClasses/CfgVehicles at runtime for selectable enemy factions
- Add CfgFactionUnitMap overrides and keep legacy params as fallback
2026-05-23 01:23:14 -05:00

35 lines
1.3 KiB
C++

/*
* Optional faction-to-unit override map.
*
* Current behavior:
* - forge_pmc_fnc_getEnemyFactionOptions treats a mapped faction as selectable
* when at least one mapped vehicle exists.
* - forge_pmc_fnc_getEnemyFactionUnitPool checks this map first.
* - If a selected faction has a class here, the listed Units are used as the
* deterministic spawn pool for generated mission enemies.
* - If no class exists here, the helper falls back to CfgVehicles traversal for
* units whose faction and side match the selected faction.
*
* Most mod factions do not need an entry here. Add a class only when a faction
* needs a curated or corrected spawn pool.
*/
class CfgFactionUnitMap {
/*
* Mapping key should match the selected faction classname from
* CfgFactionClasses, such as "IND_G_F".
*/
class IND_G_F {
/*
* Unit template fields:
* - vehicle: unit classname to spawn.
* - rank: Arma rank string applied after spawn.
* - position[]: base local offset from the generated mission position.
*
* Generators may add small random jitter to the position offset.
*/
class Units {
class Unit0 { vehicle = "Ind_G_Unit1_F"; rank = "SERGEANT"; position[] = {0,0,0}; };
};
};
};