diff --git a/DCS_Kola/Operation_Polar_Shield/F99th-Operation_Polar_Shield_1.1.9.miz b/DCS_Kola/Operation_Polar_Shield/F99th-Operation_Polar_Shield_1.1.9.miz index 6975eea..7bb2f8b 100644 Binary files a/DCS_Kola/Operation_Polar_Shield/F99th-Operation_Polar_Shield_1.1.9.miz and b/DCS_Kola/Operation_Polar_Shield/F99th-Operation_Polar_Shield_1.1.9.miz differ diff --git a/Moose_CTLD_Pure/Moose_CTLD.lua b/Moose_CTLD_Pure/Moose_CTLD.lua index 00d8275..d3009f5 100644 --- a/Moose_CTLD_Pure/Moose_CTLD.lua +++ b/Moose_CTLD_Pure/Moose_CTLD.lua @@ -340,46 +340,9 @@ CTLD.Config = { Troops = { -- Default troop type to use when no specific type is chosen DefaultType = 'AS', - -- Team definitions: label (menu text), size (number spawned), and unit pools per coalition - -- NOTE: Unit type names are DCS database strings. The provided defaults are conservative and - -- use generic infantry to maximize compatibility. You can customize per mission/era. - TroopTypes = { - -- Assault squad: general-purpose rifles/MG - AS = { - label = 'Assault Squad', - size = 8, - -- Fallback pools; adjust for era/faction if you want richer mixes - unitsBlue = { 'Infantry M4', 'Infantry M249' }, - unitsRed = { 'Infantry AK', 'Infantry AK' }, - -- If specific Blue/Red not available, this generic pool is used - units = { 'Infantry AK' }, - }, - -- Anti-air team: MANPADS element - AA = { - label = 'MANPADS Team', - size = 4, - -- These names vary by mod/DB; defaults fall back to generic infantry if unavailable - unitsBlue = { 'Infantry manpad Stinger', 'Infantry M4' }, - unitsRed = { 'Infantry manpad Igla', 'Infantry AK' }, - units = { 'Infantry AK' }, - }, - -- Anti-tank team: RPG/AT4 element - AT = { - label = 'AT Team', - size = 4, - unitsBlue = { 'Soldier M136', 'Infantry M4' }, - unitsRed = { 'Soldier RPG', 'Infantry AK' }, - units = { 'Infantry AK' }, - }, - -- Indirect fire: mortar detachment - AR = { - label = 'Mortar Team', - size = 4, - unitsBlue = { 'Mortar M252' }, - unitsRed = { '2B11 mortar' }, - units = { 'Infantry AK' }, - }, - }, + -- Team definitions: loaded from catalog via _CTLD_TROOP_TYPES global + -- If no catalog is loaded, empty table is used (and fallback logic applies) + TroopTypes = {}, }, } -- #endregion Config @@ -1440,6 +1403,16 @@ function CTLD:New(cfg) end end end + + -- Load troop types from catalog if available + do + local troopTypes = rawget(_G, '_CTLD_TROOP_TYPES') + if type(troopTypes) == 'table' then + o.Config.Troops.TroopTypes = troopTypes + if o.Config.Debug then env.info('[Moose_CTLD] Loaded troop types from _CTLD_TROOP_TYPES') end + end + end + o:InitZones() -- Validate configured zones and warn if missing o:ValidateZones() diff --git a/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua b/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua index f1bebc8..e64abde 100644 --- a/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua +++ b/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua @@ -250,6 +250,52 @@ end } cat['BLUE_MOBILE_MASH'] = { menuCategory='Support', menu='Mobile MASH - All', description='Blue Mobile MASH Unit', isMobileMASH=true, dcsCargoType='container_cargo', requires={ MOBILE_MASH_SMALL=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M113') } cat['RED_MOBILE_MASH'] = { menuCategory='Support', menu='Mobile MASH - All', description='Red Mobile MASH Unit', isMobileMASH=true, dcsCargoType='container_cargo', requires={ MOBILE_MASH_SMALL=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR-D') } +-- ========================= +-- Troop Type Definitions +-- ========================= +-- These define the composition of troop squads for Load/Unload Troops (NOT crates) +-- Structure: { label, size, unitsBlue, unitsRed, units (fallback) } +local troops = {} + +-- Assault Squad: general-purpose rifles/MG +troops['AS'] = { + label = 'Assault Squad', + size = 8, + unitsBlue = { 'Soldier M4', 'Infantry M249' }, + unitsRed = { 'Infantry AK', 'Infantry AK' }, + units = { 'Infantry AK' }, +} + +-- MANPADS Team: Anti-air element +troops['AA'] = { + label = 'MANPADS Team', + size = 4, + unitsBlue = { 'Soldier stinger', 'Soldier M4' }, + unitsRed = { 'SA-18 Igla-S manpad', 'Infantry AK' }, + units = { 'Infantry AK' }, +} + +-- AT Team: Anti-tank element +troops['AT'] = { + label = 'AT Team', + size = 4, + unitsBlue = { 'Soldier M136', 'Soldier M4' }, + unitsRed = { 'Soldier RPG', 'Infantry AK' }, + units = { 'Infantry AK' }, +} + +-- Mortar Team: Indirect fire element +troops['AR'] = { + label = 'Mortar Team', + size = 4, + unitsBlue = { 'Mortar M252' }, + unitsRed = { '2B11 mortar' }, + units = { 'Infantry AK' }, +} + +-- Export troop types +_CTLD_TROOP_TYPES = troops + -- Also export as a global for mission setups that load via DO SCRIPT FILE (no return capture) _CTLD_EXTRACTED_CATALOG = cat return cat