diff --git a/A3A/addons/core/Templates/Templates.hpp b/A3A/addons/core/Templates/Templates.hpp index 0c009f363f..6e631e4210 100644 --- a/A3A/addons/core/Templates/Templates.hpp +++ b/A3A/addons/core/Templates/Templates.hpp @@ -489,4 +489,40 @@ class Templates Nodes[] = {"CUP_Logistics_Nodes.sqf"}; }; -}; \ No newline at end of file + + class UNS + { + priorityOcc = 7; + priorityInv = 7; + priorityReb = 7; + priorityCiv = 7; + + requiredAddons[] = { + "uns_weap_w" + }; + path = QPATHTOFOLDER(Templates\Templates\UNS); + + class AI + { + class NVA {}; + class US {}; + }; + class Reb + { + class VC {}; + }; + + class Civ {}; + + class worldDefaults + { + class Default { + Occ = "NVA"; + Inv = "US"; + Reb = "VC"; + }; + }; + + Nodes[] = {"UNS_Logistics_Nodes.sqf"}; + }; +}; diff --git a/A3A/addons/core/Templates/Templates/UNS/UNS_AI_NVA.sqf b/A3A/addons/core/Templates/Templates/UNS/UNS_AI_NVA.sqf new file mode 100644 index 0000000000..e2128d1d0b --- /dev/null +++ b/A3A/addons/core/Templates/Templates/UNS/UNS_AI_NVA.sqf @@ -0,0 +1,855 @@ +////////////////////////// +// Side Information // +////////////////////////// + +["name", "NVA"] call _fnc_saveToTemplate; +["spawnMarkerName", "NVA Reinforcements"] call _fnc_saveToTemplate; + +["flag", "uns_FlagCarrierNVA"] call _fnc_saveToTemplate; +["flagTexture", "\uns_flags\flag_pavn_co.paa"] call _fnc_saveToTemplate; +["flagMarkerType", "Faction_UNS_NVA"] call _fnc_saveToTemplate; + +////////////////////////// +// Vehicles // +////////////////////////// + +["ammobox", "B_supplyCrate_F"] call _fnc_saveToTemplate; +["surrenderCrate", "Box_IND_Wps_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type +["equipmentBox", "Box_NATO_Equip_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type + +["vehiclesBasic", ["uns_willys"]] call _fnc_saveToTemplate; +["vehiclesLightUnarmed", ["uns_Type55"]] call _fnc_saveToTemplate; +["vehiclesLightArmed",["uns_Type55_LMG", "uns_Type55_MG", "uns_Type55_patrol", "uns_Type55_twinMG", "uns_Type55_RR57", "uns_Type55_RR73", "uns_Type55_M40", "uns_nvatruck_mg"]] call _fnc_saveToTemplate; +["vehiclesTrucks", ["uns_nvatruck_open", "uns_zil157", "uns_nvatruck_camo", "uns_nvatruck"]] call _fnc_saveToTemplate; +["vehiclesCargoTrucks", ["uns_nvatruck_open", "uns_zil157"]] call _fnc_saveToTemplate; +["vehiclesAmmoTrucks", ["uns_nvatruck_reammo"]] call _fnc_saveToTemplate; +["vehiclesRepairTrucks", ["uns_nvatruck_repair", "uns_zil157_repair"]] call _fnc_saveToTemplate; +["vehiclesFuelTrucks", ["uns_nvatruck_refuel", "uns_Zil157_refuel"]] call _fnc_saveToTemplate; +["vehiclesMedical", ["uns_Type63_amb"]] call _fnc_saveToTemplate; +["vehiclesAPCs", ["uns_BTR152_DSHK", "uns_Type63_mg", "uns_pt76", "uns_ot34_85_nva"]] call _fnc_saveToTemplate; +["vehiclesTanks", ["uns_t54_nva", "uns_t55_nva", "uns_to55_nva"]] call _fnc_saveToTemplate; +["vehiclesAA", ["uns_ZSU23_NVA", "uns_ZSU57_NVA", "uns_Type55_ZU", "uns_nvatruck_zpu", "uns_nvatruck_zu23", "uns_nvatruck_s60"]] call _fnc_saveToTemplate; + +["vehiclesTransportBoats", ["UNS_Zodiac_NVA"]] call _fnc_saveToTemplate; +["vehiclesGunBoats", ["UNS_PATROL_BOAT_NVA", "UNS_ASSAULT_BOAT_NVA"]] call _fnc_saveToTemplate; +["vehiclesAmphibious", ["uns_Type63_mg", "uns_pt76"]] call _fnc_saveToTemplate; + +["vehiclesPlanesCAS", ["uns_Mig21_CAS"]] call _fnc_saveToTemplate; +["vehiclesPlanesAA", ["uns_Mig21_CAP"]] call _fnc_saveToTemplate; +["vehiclesPlanesTransport", ["uns_an2_transport"]] call _fnc_saveToTemplate; + +["vehiclesHelisLight", ["uns_Mi8T_VPAF"]] call _fnc_saveToTemplate; +["vehiclesHelisTransport", ["uns_Mi8TV_VPAF_MG"]] call _fnc_saveToTemplate; +["vehiclesHelisAttack", []] call _fnc_saveToTemplate; + +["vehiclesArtillery", ["uns_m110sp", "Uns_D20_artillery", "Uns_D30_artillery"]] call _fnc_saveToTemplate; +["magazines", createHashMapFromArray [ + ["uns_m110sp",["uns_30Rnd_203mmHE"]], + ["Uns_D20_artillery",["uns_30Rnd_155mmHE"]], + ["Uns_D30_artillery",["uns_30Rnd_122mmHE"]] +]] call _fnc_saveToTemplate; //element format: [Vehicle class, [Magazines]] + +["uavsAttack", []] call _fnc_saveToTemplate; +["uavsPortable", []] call _fnc_saveToTemplate; + +//Config special vehicles +["vehiclesMilitiaLightArmed", ["uns_Type55_LMG"]] call _fnc_saveToTemplate; +["vehiclesMilitiaTrucks", ["uns_zil157"]] call _fnc_saveToTemplate; +["vehiclesMilitiaCars", ["uns_willys"]] call _fnc_saveToTemplate; + +["vehiclesPolice", ["uns_willys_2_usmp"]] call _fnc_saveToTemplate; + +["staticMGs", ["uns_dshk_high_NVA"]] call _fnc_saveToTemplate; +["staticAT", ["uns_SPG9_73mm_NVA"]] call _fnc_saveToTemplate; +["staticAA", ["uns_ZPU4_NVA"]] call _fnc_saveToTemplate; +["staticMortars", ["uns_m1941_82mm_mortarNVA"]] call _fnc_saveToTemplate; + +["mortarMagazineHE", "uns_8Rnd_82mmHE_M1941"] call _fnc_saveToTemplate; +["mortarMagazineSmoke", "uns_8Rnd_82mmSMOKE_M1941"] call _fnc_saveToTemplate; + +//Minefield definition +//Not Magazine type would be: ["APERSBoundingMine", "APERSMine", "ATMine"] +["minefieldAT", ["uns_mine_t59"]] call _fnc_saveToTemplate; +["minefieldAPERS", ["uns_mine_md82"]] call _fnc_saveToTemplate; + +///////////////////// +/// Identities /// +///////////////////// + +["voices", ["Male01CHI", "Male02CHI", "Male03CHI"]] call _fnc_saveToTemplate; +["faces", ["AsianHead_A3_01", "AsianHead_A3_01_cfaces_vccamo01", "AsianHead_A3_01_cfaces_vccamo02", "AsianHead_A3_02", +"AsianHead_A3_03", "AsianHead_A3_03_cfaces_vccamo01", "AsianHead_A3_03_cfaces_vccamo02", +"AsianHead_A3_04", "AsianHead_A3_04_cfaces_vccamo01", "AsianHead_A3_05", "AsianHead_A3_05_cfaces_vccamo02", +"AsianHead_A3_06", "AsianHead_A3_07", "AsianHead_A3_07_cfaces_vccamo01", "AsianHead_A3_07_cfaces_vccamo02"]] call _fnc_saveToTemplate; + +////////////////////////// +// Loadouts // +////////////////////////// + +private _loadoutData = call _fnc_createLoadoutData; +_loadoutData set ["rifles", []]; +_loadoutData set ["carbines", []]; +_loadoutData set ["grenadeLaunchers", []]; +_loadoutData set ["SMGs", []]; +_loadoutData set ["machineGuns", []]; +_loadoutData set ["marksmanRifles", []]; +_loadoutData set ["sniperRifles", []]; + +_loadoutData set ["lightATLaunchers", [ +["uns_rpg2", "", "", "", ["uns_rpg2grenade"], [], ""], +["uns_B40", "", "", "", ["uns_B40grenade"], [], ""] +]]; +_loadoutData set ["ATLaunchers", [["uns_rpg7", "", "", "", ["uns_rpg7grenade"], [], ""]]]; +_loadoutData set ["AALaunchers", [["uns_sa7b", "", "", "", ["uns_sa7bmag"], [], ""]]]; +_loadoutData set ["sidearms", []]; + +_loadoutData set ["ATMines", ["uns_mine_AT_mag"]]; +_loadoutData set ["APMines", ["uns_mine_AP_mag"]]; +_loadoutData set ["lightExplosives", ["uns_M118_mag_remote"]]; +_loadoutData set ["heavyExplosives", ["DemoCharge_Remote_Mag"]]; + +_loadoutData set ["antiTankGrenades", ["uns_molotov_mag", "uns_rkg3gren"]]; +_loadoutData set ["antiInfantryGrenades", ["uns_f1gren", "uns_rg42gren", "uns_rgd33gren", "uns_rgd5gren"]]; +_loadoutData set ["smokeGrenades", ["uns_rdg2"]]; + + +//Basic equipment. Shouldn't need touching most of the time. +//Mods might override this, or certain mods might want items removed (No GPSs in WW2, for example) +_loadoutData set ["maps", ["ItemMap"]]; +_loadoutData set ["watches", ["ItemWatch"]]; +_loadoutData set ["compasses", ["ItemCompass"]]; +_loadoutData set ["radios", ["UNS_ItemRadio_T884_TFAR"]]; +_loadoutData set ["binoculars", ["Binocular"]]; +_loadoutData set ["rangefinder", ["uns_ANPVS2"]]; + +_loadoutData set ["uniforms", []]; +_loadoutData set ["vests", []]; +_loadoutData set ["backpacks", []]; +_loadoutData set ["medBackpacks", ["UNS_NVA_MED"]]; +_loadoutData set ["slBackpacks", ["UNS_NVA_RTO"]]; +_loadoutData set ["helmets", []]; +_loadoutData set ["sniHats", ["UNS_PAVN_HC"]]; +_loadoutData set ["slHat", []]; + +//Item *set* definitions. These are added in their entirety to unit loadouts. No randomisation is applied. +_loadoutData set ["items_medical_basic", ["BASIC"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_medical_standard", ["STANDARD"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_medical_medic", ["MEDIC"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_miscEssentials", [] call A3A_fnc_itemset_miscEssentials]; + +//Unit type specific item sets. Add or remove these, depending on the unit types in use. + +private _eeItems = ["ToolKit", "UNS_TrapKit"]; +private _mmItems = []; + +if (A3A_hasACE) then { + _eeItems append ["ACE_Clacker", "ACE_DefusalKit"]; + _mmItems append ["ACE_RangeCard"]; +}; + +_loadoutData set ["items_squadLeader_extras", []]; +_loadoutData set ["items_rifleman_extras", []]; +_loadoutData set ["items_medic_extras", []]; +_loadoutData set ["items_grenadier_extras", []]; +_loadoutData set ["items_explosivesExpert_extras", _eeItems]; +_loadoutData set ["items_engineer_extras", _eeItems]; +_loadoutData set ["items_lat_extras", []]; +_loadoutData set ["items_at_extras", []]; +_loadoutData set ["items_aa_extras", []]; +_loadoutData set ["items_machineGunner_extras", []]; +_loadoutData set ["items_marksman_extras", _mmItems]; +_loadoutData set ["items_sniper_extras", _mmItems]; +_loadoutData set ["items_police_extras", []]; +_loadoutData set ["items_crew_extras", []]; +_loadoutData set ["items_unarmed_extras", []]; + +//TODO - ACE overrides for misc essentials, medical and engineer gear + +/////////////////////////////////////// +// Special Forces Loadout Data // +/////////////////////////////////////// + +private _sfLoadoutData = _loadoutData call _fnc_copyLoadoutData; +_sfLoadoutData set ["uniforms", ["UNS_NVA_CC"]]; +_sfLoadoutData set ["vests", ["uns_Simc_Barbelt", "uns_Simc_Barbelt_M56", "uns_Simc_Barbelt_M56_zusp"]]; +_sfLoadoutData set ["backpacks", ["uns_simc_ARVN_ruck_1", "uns_simc_ARVN_ruck_2", "uns_simc_ARVN_ruck_3"]]; +_sfLoadoutData set ["helmets", ["UNS_M1_1V1", "UNS_M1_1V2", "UNS_M1_1V1N"]]; +_sfLoadoutData set ["slHat", ["H_Beret_blk"]]; +_sfLoadoutData set ["binoculars", ["uns_ANPVS2"]]; +//["Weapon", "Muzzle", "Rail", "Sight", [], [], "Bipod"]; + +_sfLoadoutData set ["rifles", [["uns_sa58p", "", "", "", ["uns_sa58mag"], [], ""], + ["uns_sa58p", "", "", "", ["uns_sa58mag"], [], ""]]]; +_sfLoadoutData set ["carbines", [["uns_sa58v", "", "", "", ["uns_sa58mag"], [], ""], + ["uns_sa58vf", "", "", "", ["uns_sa58mag"], [], ""]]]; +_sfLoadoutData set ["grenadeLaunchers", [["uns_ex41", "", "", "", ["uns_ex41mag"], ["uns_1Rnd_Smoke_40mm"], ""]]]; +_sfLoadoutData set ["SMGs", [["uns_type50", "", "", "", ["uns_ppshmag_NT"], [], ""], + ["uns_ppsh41", "", "", "", ["uns_ppshmag_NT"], [], ""], + ["uns_m2carbine_shorty", "", "", "", ["uns_m2carbinemag_NT"], [], ""]]]; +_sfLoadoutData set ["machineGuns", [["uns_rpd", "", "", "", ["uns_rpdmag"], [], ""], + ["uns_RPK_drum", "", "", "", ["uns_75Rnd_akdr"], [], ""], + ["uns_PK", "", "", "", ["uns_100Rnd_762x54_PK"], [], ""], + ["uns_RPK_40", "", "", "", ["uns_rpkmag"], [], ""]]]; +_sfLoadoutData set ["marksmanRifles", [["uns_SVD_CAMO_base", "", "", "uns_o_PSO1_camo", ["uns_svdmag"], [], ""]]]; +_sfLoadoutData set ["sniperRifles", [["uns_SVD_CAMO_base", "", "", "uns_o_PSO1_camo", ["uns_svdmag"], [], ""]]]; +_sfLoadoutData set ["sidearms", [["uns_sa61_p", "", "", "", ["uns_20Rnd_sa61_pa"], [], ""], + ["uns_p64", "", "", "", ["uns_6Rnd_czak"], [], ""], + ["uns_p64", "", "", "", ["uns_6Rnd_czak"], [], ""], + ["uns_sw_m10", "", "", "", ["uns_38specmag"], [], ""], + ["uns_Tt33", "", "", "", ["uns_tokarevmag"], [], ""], + ["uns_tt30", "", "", "", ["uns_tokarevmag"], [], ""], + ["uns_pm63p", "", "", "", ["uns_25Rnd_pm_pa"], [], ""]]]; + +///////////////////////////////// +// Military Loadout Data // +///////////////////////////////// + +private _militaryLoadoutData = _loadoutData call _fnc_copyLoadoutData; +_militaryLoadoutData set ["uniforms", ["UNS_NVA_GS", "UNS_NVA_G", "uns_U_Simc_nva_1", "uns_U_Simc_nva_1_trop", "uns_U_Simc_nva_2", "uns_U_Simc_nva_2_trop"]]; +_militaryLoadoutData set ["vests", ["uns_Simc_Barbelt", "uns_Simc_Barbelt_M56", "uns_Simc_Barbelt_M56_zusp"]]; +_militaryLoadoutData set ["backpacks", ["uns_simc_ARVN_ruck_1", "uns_simc_ARVN_ruck_2", "uns_simc_ARVN_ruck_3"]]; +_militaryLoadoutData set ["helmets", ["UNS_NVA_SSH60", "UNS_NVA_SSH40", "uns_nva_m56", "UNS_NVA_HGG", "UNS_NVA_HG", "UNS_PAVN_HG"]]; +_militaryLoadoutData set ["slHat", ["uns_khmer_cap_star"]]; +_militaryLoadoutData set ["binoculars", ["Binocular"]]; + +_militaryLoadoutData set ["rifles", [ + ["uns_type56", "", "", "", [], [], ""], + ["uns_ak47", "", "", "", [], [], ""], + ["uns_aks47", "", "", "", [], [], ""], + ["uns_akm", "", "", "", [], [], ""], + ["uns_akm_drum", "", "", "", [], [], ""], + ["uns_akms", "", "", "", [], [], ""], + ["uns_akms_drum", "", "", "", [], [], ""], + ["uns_akmsf", "", "", "", [], [], ""], + ["uns_akmsf_drum", "", "", "", [], [], ""], + ["uns_ak47_52", "", "", "", [], [], ""], + ["uns_ak47_49", "", "", "", [], [], ""]]]; +_militaryLoadoutData set ["carbines", [ + ["uns_sks", "", "", "", ["uns_sksmag"], [], ""], + ["uns_type56", "", "", "", [], [], ""], + ["uns_ak47", "", "", "", [], [], ""], + ["uns_aks47", "", "", "", [], [], ""], + ["uns_akm", "", "", "", [], [], ""], + ["uns_akms", "", "", "", [], [], ""], + ["uns_akmsf", "", "", "", [], [], ""], + ["uns_sks", "", "", "", ["uns_sksmag_NT"], [], ""]]]; +_militaryLoadoutData set ["grenadeLaunchers", [ + ["uns_ex41", "", "", "", ["uns_ex41mag"], ["uns_1Rnd_Smoke_40mm"], ""], + ["uns_mas4956_gl", "", "", "", ["uns_mas4956mag"], ["Uns_1Rnd_22mm_AT", "Uns_1Rnd_22mm_smoke", "Uns_1Rnd_22mm_WP"], ""]]]; +_militaryLoadoutData set ["SMGs", [ + ["uns_sa61", "", "", "", ["uns_20Rnd_sa61"], [], ""], + ["uns_pm63", "", "", "", ["uns_25Rnd_pm"], [], ""], + ["uns_mat49", "", "", "", ["uns_mat49mag"], [], ""], + ["uns_mac10", "", "", "", ["uns_mac10mag"], [], ""], + ["uns_m50", "", "", "", ["uns_m50mag"], [], ""], + ["uns_m50f", "", "", "", ["uns_m50mag"], [], ""], + ["uns_f1_smg", "", "", "", ["uns_f1_smg_mag"], [], ""], + ["uns_type50", "", "", "", ["uns_ppshmag"], [], ""], + ["uns_uzi", "", "", "", ["uns_32Rnd_uzi"], [], ""], + ["uns_m45", "", "", "", ["uns_m45mag"], [], ""], + ["uns_m45f", "", "", "", ["uns_m45mag"], [], ""]]]; +_militaryLoadoutData set ["machineGuns", [["uns_rpd", "", "", "", ["uns_rpdmag"], [], ""], + ["uns_RPK_drum", "", "", "", ["uns_75Rnd_akdr"], [], ""], + ["uns_PK", "", "", "", ["uns_100Rnd_762x54_PK"], [], ""], + ["uns_RPK_40", "", "", "", ["uns_rpkmag"], [], ""]]]; +_militaryLoadoutData set ["marksmanRifles", [["uns_svd_base", "", "", "uns_o_PSO1", ["uns_svdmag_T"], [], ""], + ["uns_mas4956", "", "", "uns_o_APXSOM", ["uns_mas4956mag"], [], ""]]]; +_militaryLoadoutData set ["sniperRifles", [ + ["uns_mosin", "", "", "uns_o_PU", ["uns_mosinmag_T"], [], ""], + ["uns_kar98k", "", "", "uns_o_zf41", ["uns_kar98kmag"], [], ""], + ["uns_type99", "", "", "uns_o_Akatihi4x", ["uns_type99mag"], [], ""], + ["uns_m1903", "", "", "uns_o_Unertl8x", ["uns_springfieldmag"], [], ""]]]; +_militaryLoadoutData set ["sidearms", [ + ["uns_sa61_p", "", "", "", ["uns_20Rnd_sa61_pa"], [], ""], + ["uns_p64", "", "", "", ["uns_6Rnd_czak"], [], ""], + ["uns_p64", "", "", "", ["uns_6Rnd_czak"], [], ""], + ["uns_sw_m10", "", "", "", ["uns_38specmag"], [], ""], + ["uns_Tt33", "", "", "", ["uns_tokarevmag"], [], ""], + ["uns_tt30", "", "", "", ["uns_tokarevmag"], [], ""], + ["uns_pm63p", "", "", "", ["uns_25Rnd_pm_pa"], [], ""] +]]; + +/////////////////////////////// +// Police Loadout Data // +/////////////////////////////// + +private _policeLoadoutData = _loadoutData call _fnc_copyLoadoutData; + +_policeLoadoutData set ["uniforms", ["UNS_NVA_KS"]]; +_policeLoadoutData set ["vests", ["UNS_NVA_S2"]]; +_policeLoadoutData set ["helmets", ["UNS_NVA_HK"]]; + +_policeLoadoutData set ["SMGs", [["uns_PPS43", "", "", "", ["uns_k50mag"], [], ""], + ["uns_PPS43f", "", "", "", ["uns_k50mag"], [], ""], + ["uns_ppsh41", "", "", "", ["uns_k50mag"], [], ""], + ["uns_mp40", "", "", "", ["uns_mp40mag"], [], ""], + ["uns_type100", "", "", "", ["uns_type100mag"], [], ""], + ["uns_sten", "", "", "", ["uns_stenmag"], [], ""], + ["uns_owen", "", "", "", ["uns_owenmag"], [], ""], + ["uns_PPS52", "", "", "", ["uns_k50mag"], [], ""]]]; +_policeLoadoutData set ["sidearms", [["uns_Tt33", "", "", "", ["uns_tokarevmag"], [], ""], + ["uns_tt30", "", "", "", ["uns_tokarevmag"], [], ""]]]; + +//////////////////////////////// +// Militia Loadout Data // +//////////////////////////////// + +private _militiaLoadoutData = _loadoutData call _fnc_copyLoadoutData; +_militiaLoadoutData set ["uniforms", ["UNS_NVA_K"]]; +_militiaLoadoutData set ["vests", ["uns_Simc_garlan", "uns_Simc_garlan_M56", "uns_Simc_garlan_M56_zusp"]]; +_militiaLoadoutData set ["backpacks", ["UNS_NVA_R1", "UNS_NVA_R3"]]; +_militiaLoadoutData set ["helmets", ["UNS_NVA_HK", "UNS_NVA_HKG", "UNS_PAVN_HN"]]; + +_militiaLoadoutData set ["rifles", [["uns_type99", "", "", "", ["uns_type99mag"], [], ""], + ["uns_smle", "", "", "", ["uns_smlemag"], [], ""], + ["uns_m1903", "", "", "", ["uns_springfieldmag"], [], ""], + ["uns_mas36", "", "", "", ["uns_mas36mag"], [], ""], + ["uns_kar98k", "", "", "", ["uns_kar98kmag"], [], ""], + ["uns_mosin", "", "", "", ["uns_mosinmag"], [], ""]]]; +_militiaLoadoutData set ["carbines", [["uns_sks", "", "", "", ["uns_sksmag"], [], ""], + ["uns_sks", "", "", "", ["uns_sksmag_NT"], [], ""], + ["uns_svt", "", "", "", ["uns_svtmag"], [], ""], + ["uns_STG_44", "", "", "", ["uns_30Rnd_kurtz_stg"], [], ""], + ["uns_mas36short", "", "", "", ["uns_mas36mag"], [], ""], + ["uns_mas4956", "", "", "", ["uns_mas4956mag"], [], ""]]]; +_militiaLoadoutData set ["grenadeLaunchers", [["uns_type99_gl", "", "", "", ["uns_type99mag"], ["Uns_1Rnd_30mm_FRAG"], ""], + ["uns_mas36_gl", "", "", "", ["uns_mas36mag"], ["Uns_1Rnd_22mm_AT", "Uns_1Rnd_22mm_smoke", "Uns_1Rnd_22mm_WP"], ""], + ["uns_mas36short_gl", "", "", "", ["uns_mas36mag"], ["Uns_1Rnd_22mm_AT", "Uns_1Rnd_22mm_smoke", "Uns_1Rnd_22mm_WP"], ""]]]; +_militiaLoadoutData set ["SMGs", [["uns_PPS43", "", "", "", ["uns_k50mag"], [], ""], + ["uns_PPS43f", "", "", "", ["uns_k50mag"], [], ""], + ["uns_ppsh41", "", "", "", ["uns_k50mag"], [], ""], + ["uns_ppsh41", "", "", "", ["uns_ppshmag"], [], ""], + ["uns_mp40", "", "", "", ["uns_mp40mag"], [], ""], + ["uns_type100", "", "", "", ["uns_type100mag"], [], ""], + ["uns_sten", "", "", "", ["uns_stenmag"], [], ""], + ["uns_owen", "", "", "", ["uns_owenmag"], [], ""], + ["uns_PPS52", "", "", "", ["uns_k50mag"], [], ""]]]; +_militiaLoadoutData set ["machineGuns", [["uns_MG42", "", "", "", ["uns_50Rnd_792x57_Mg42"], [], ""], + ["uns_mg42_bakelite", "", "", "", ["uns_50Rnd_792x57_Mg42"], [], ""], + ["uns_m1919a6", "", "", "", ["uns_100Rnd_m1919"], [], ""]]]; +_militiaLoadoutData set ["marksmanRifles", [["uns_kar98k", "", "", "uns_o_zf41", ["uns_kar98kmag"], [], ""], + ["uns_type99", "", "", "uns_o_Akatihi4x", ["uns_type99mag"], [], ""], + ["uns_m1903", "", "", "uns_o_Unertl8x", ["uns_springfieldmag"], [], ""]]]; +_militiaLoadoutData set ["sidearms", [["uns_Tt33", "", "", "", ["uns_tokarevmag"], [], ""], + ["uns_sw_m10", "", "", "", ["uns_38specmag"], [], ""], + ["uns_tt30", "", "", "", ["uns_tokarevmag"], [], ""]]]; + +////////////////////////// +// Misc Loadouts // +////////////////////////// + +private _crewLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; +_crewLoadoutData set ["uniforms", ["UNS_NVA_G"]]; +_crewLoadoutData set ["vests", ["UNS_NVA_S2"]]; +_crewLoadoutData set ["helmets", ["UNS_NVA_CH", "UNS_NVA_CHB", "UNS_NVA_CHG", "UNS_NVA_CHBG"]]; + +private _pilotLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; +_pilotLoadoutData set ["uniforms", ["UNS_NVA_CG", "UNS_NVA_CK", "UNS_NVA_CP"]]; +_pilotLoadoutData set ["vests", ["uns_Simc_garlan_M56"]]; +_pilotLoadoutData set ["helmets", ["UNS_NVA_PL", "UNS_NVA_PLC"]]; + + +///////////////////////////////// +// Unit Type Definitions // +///////////////////////////////// +//These define the loadouts for different unit types. +//For example, rifleman, grenadier, squad leader, etc. +//In 95% of situations, you *should not need to edit these*. +//Almost all factions can be set up just by modifying the loadout data above. +//However, these exist in case you really do want to do a lot of custom alterations. + +private _squadLeaderTemplate = { + [["slHat", "helmets"] call _fnc_fallback] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [["slBackpacks", "backpacks"] call _fnc_fallback] call _fnc_setBackpack; + + [selectRandom ["grenadeLaunchers", "rifles"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + ["primary", 4] call _fnc_addAdditionalMuzzleMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_squadLeader_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 2] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + ["signalsmokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["gpses"] call _fnc_addGPS; + ["binoculars"] call _fnc_addBinoculars; + ["NVGs"] call _fnc_addNVGs; +}; + +private _riflemanTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_rifleman_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 2] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _medicTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_medic"] call _fnc_addItemSet; + ["items_medic_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _grenadierTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + ["grenadeLaunchers"] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + ["primary", 10] call _fnc_addAdditionalMuzzleMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_grenadier_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 4] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _explosivesExpertTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_explosivesExpert_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + ["lightExplosives", 2] call _fnc_addItem; + if (random 1 > 0.5) then {["heavyExplosives", 1] call _fnc_addItem;}; + if (random 1 > 0.5) then {["atMines", 1] call _fnc_addItem;}; + if (random 1 > 0.5) then {["apMines", 1] call _fnc_addItem;}; + + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _engineerTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_engineer_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + if (random 1 > 0.5) then {["lightExplosives", 1] call _fnc_addItem;}; + + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _latTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["lightATLaunchers"] call _fnc_setLauncher; + //TODO - Add a check if it's disposable. + ["launcher", 1] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_lat_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _atTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["ATLaunchers"] call _fnc_setLauncher; + //TODO - Add a check if it's disposable. + ["launcher", 2] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_at_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _aaTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["AALaunchers"] call _fnc_setLauncher; + //TODO - Add a check if it's disposable. + ["launcher", 2] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_aa_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _machineGunnerTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + ["machineGuns"] call _fnc_setPrimary; + ["primary", 4] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_machineGunner_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _marksmanTemplate = { + ["sniHats"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + ["marksmanRifles"] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_marksman_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["rangefinders"] call _fnc_addBinoculars; + ["NVGs"] call _fnc_addNVGs; +}; + +private _sniperTemplate = { + ["sniHats"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [["sniperRifles", "marksmanRifles"] call _fnc_fallback] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_sniper_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["rangefinders"] call _fnc_addBinoculars; + ["NVGs"] call _fnc_addNVGs; +}; + +private _policeTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + ["SMGs"] call _fnc_setPrimary; + ["primary", 3] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_police_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; +}; + +private _crewTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; + ["primary", 3] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_basic"] call _fnc_addItemSet; + ["items_crew_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["gpses"] call _fnc_addGPS; + ["NVGs"] call _fnc_addNVGs; +}; + +private _unarmedTemplate = { + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + ["items_medical_basic"] call _fnc_addItemSet; + ["items_unarmed_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; +}; + +private _traitorTemplate = { + call _unarmedTemplate; + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; +}; + +//////////////////////////////////////////////////////////////////////////////////////// +// You shouldn't touch below this line unless you really really know what you're doing. +// Things below here can and will break the gamemode if improperly changed. +//////////////////////////////////////////////////////////////////////////////////////// + +///////////////////////////// +// Special Forces Units // +///////////////////////////// +private _prefix = "SF"; +private _unitTypes = [ + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["Medic", _medicTemplate, [["medic", true]]], + ["Engineer", _engineerTemplate, [["engineer", true]]], + ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _grenadierTemplate], + ["LAT", _latTemplate], + ["AT", _atTemplate], + ["AA", _aaTemplate], + ["MachineGunner", _machineGunnerTemplate], + ["Marksman", _marksmanTemplate], + ["Sniper", _sniperTemplate] +]; + +[_prefix, _unitTypes, _sfLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +/*{ + params ["_name", "_loadoutTemplate"]; + private _loadouts = [_sfLoadoutData, _loadoutTemplate] call _fnc_buildLoadouts; + private _finalName = _prefix + _name; + [_finalName, _loadouts] call _fnc_saveToTemplate; +} forEach _unitTypes; +*/ + +/////////////////////// +// Military Units // +/////////////////////// +private _prefix = "military"; +private _unitTypes = [ + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["Medic", _medicTemplate, [["medic", true]]], + ["Engineer", _engineerTemplate, [["engineer", true]]], + ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _grenadierTemplate], + ["LAT", _latTemplate], + ["AT", _atTemplate], + ["AA", _aaTemplate], + ["MachineGunner", _machineGunnerTemplate], + ["Marksman", _marksmanTemplate], + ["Sniper", _sniperTemplate] +]; + +[_prefix, _unitTypes, _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +//////////////////////// +// Police Units // +//////////////////////// +private _prefix = "police"; +private _unitTypes = [ + ["SquadLeader", _policeTemplate], + ["Standard", _policeTemplate] +]; + +[_prefix, _unitTypes, _policeLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +//////////////////////// +// Militia Units // +//////////////////////// +private _prefix = "militia"; +private _unitTypes = [ + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["Medic", _medicTemplate, [["medic", true]]], + ["Engineer", _engineerTemplate, [["engineer", true]]], + ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _grenadierTemplate], + ["LAT", _latTemplate], + ["AT", _atTemplate], + ["AA", _aaTemplate], + ["MachineGunner", _machineGunnerTemplate], + ["Marksman", _marksmanTemplate], + ["Sniper", _sniperTemplate] +]; + +[_prefix, _unitTypes, _militiaLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +////////////////////// +// Misc Units // +////////////////////// + +//The following lines are determining the loadout of vehicle crew +["other", [["Crew", _crewTemplate]], _crewLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout of the pilots +["other", [["Pilot", _crewTemplate]], _pilotLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout for the unit used in the "kill the official" mission +["other", [["Official", _SquadLeaderTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout for the AI used in the "kill the traitor" mission +["other", [["Traitor", _traitorTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout for the AI used in the "Invader Punishment" mission +["other", [["Unarmed", _UnarmedTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; diff --git a/A3A/addons/core/Templates/Templates/UNS/UNS_AI_US.sqf b/A3A/addons/core/Templates/Templates/UNS/UNS_AI_US.sqf new file mode 100644 index 0000000000..3ac07a0257 --- /dev/null +++ b/A3A/addons/core/Templates/Templates/UNS/UNS_AI_US.sqf @@ -0,0 +1,800 @@ +////////////////////////// +// Side Information // +////////////////////////// + +["name", "US Army"] call _fnc_saveToTemplate; +["spawnMarkerName", "US Reinforcements"] call _fnc_saveToTemplate; + +["flag", "uns_FlagCarrierUS"] call _fnc_saveToTemplate; +["flagTexture", "a3\data_f\flags\flag_us_co.paa"] call _fnc_saveToTemplate; +["flagMarkerType", "Faction_UNS_USA"] call _fnc_saveToTemplate; + +////////////////////////// +// Vehicles // +////////////////////////// + +["ammobox", "B_supplyCrate_F"] call _fnc_saveToTemplate; +["surrenderCrate", "Box_IND_Wps_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type +["equipmentBox", "Box_NATO_Equip_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type + +["vehiclesBasic", ["uns_willys_2_usmc"]] call _fnc_saveToTemplate; +["vehiclesLightUnarmed", ["uns_m37b1", "uns_m274"]] call _fnc_saveToTemplate; +["vehiclesLightArmed",["uns_willysmg50", "uns_willysmg", "uns_willysm40", "uns_m37b1_m1919", "uns_m274_m40", "uns_m274_m60"]] call _fnc_saveToTemplate; +["vehiclesTrucks", ["uns_M35A2_Open", "uns_M35A2"]] call _fnc_saveToTemplate; +["vehiclesCargoTrucks", ["uns_M35A2_Open"]] call _fnc_saveToTemplate; +["vehiclesAmmoTrucks", ["uns_M35A2_ammo"]] call _fnc_saveToTemplate; +["vehiclesRepairTrucks", ["uns_M35A2_repair"]] call _fnc_saveToTemplate; +["vehiclesFuelTrucks", ["uns_M35A2_fueltanker", "uns_M35A2_fuel"]] call _fnc_saveToTemplate; +["vehiclesMedical", ["uns_M577_amb"]] call _fnc_saveToTemplate; +["vehiclesAPCs", ["uns_xm706e2", "uns_xm706e1", "uns_M113_XM182", "uns_M113_M60", "uns_M113_M134", "uns_M113A1_M2", "uns_M113_30cal", "uns_M113_transport"]] call _fnc_saveToTemplate; +["vehiclesTanks", ["uns_m48a3", "uns_m551", "uns_M67A"]] call _fnc_saveToTemplate; +["vehiclesAA", ["uns_m163"]] call _fnc_saveToTemplate; + +["vehiclesTransportBoats", ["UNS_Zodiac_W"]] call _fnc_saveToTemplate; +["vehiclesGunBoats", ["uns_pbr_mk18", "uns_pbr", "uns_PBR_M10"]] call _fnc_saveToTemplate; +["vehiclesAmphibious", ["uns_M113_XM182", "uns_M113_M60", "uns_M113_M134", "uns_M113A1_M2", "uns_M113_30cal", "uns_M113_transport", "uns_M577_amb", "uns_m163"]] call _fnc_saveToTemplate; + +["vehiclesPlanesCAS", ["uns_A1J_CAS", "uns_A7_CAS"]] call _fnc_saveToTemplate; +["vehiclesPlanesAA", ["uns_F4E_CAP", "uns_f100b_CAP"]] call _fnc_saveToTemplate; +["vehiclesPlanesTransport", ["uns_c1a5cargo", "uns_C130_H"]] call _fnc_saveToTemplate; + +["vehiclesHelisLight", ["uns_H13_transport_Army", "uns_H13_gunship_Army", "uns_oh6_transport", "uns_oh6_m27"]] call _fnc_saveToTemplate; +["vehiclesHelisTransport", ["uns_UH1D_m60", "uns_UH1D_m60_light", "uns_UH1H_m60", "uns_UH1H_m60_light", "uns_h21c_mg", "uns_ch47_m60_army", "uns_hh53b_m134_usaf"]] call _fnc_saveToTemplate; +["vehiclesHelisAttack", ["UNS_AH1G_SUU11", "UNS_AH1G_M195", "UNS_AH1G_M200", "UNS_AH1G", "uns_UH1C_M21_M200", "uns_UH1C_M21_M158", "UNS_UH1C_M3_ARA", "UNS_UH1B_TOW", "uns_UH1C_M6_M200_1AC"]] call _fnc_saveToTemplate; + +["vehiclesArtillery", ["uns_m110sp", "uns_m107sp", "uns_M113_M30"]] call _fnc_saveToTemplate; +["magazines", createHashMapFromArray [ + ["uns_m110sp",["uns_30Rnd_203mmHE"]], + ["uns_m107sp",["uns_30Rnd_175mmHE"]], + ["uns_M113_M30",["uns_8Rnd_107mmHE"]] +]] call _fnc_saveToTemplate; //element format: [Vehicle class, [Magazines]] + +["uavsAttack", []] call _fnc_saveToTemplate; +["uavsPortable", []] call _fnc_saveToTemplate; + +//Config special vehicles +["vehiclesMilitiaLightArmed", ["uns_m274_m60"]] call _fnc_saveToTemplate; +["vehiclesMilitiaTrucks", ["uns_m37b1"]] call _fnc_saveToTemplate; +["vehiclesMilitiaCars", ["uns_m274"]] call _fnc_saveToTemplate; + +["vehiclesPolice", ["uns_willys_2_usmp"]] call _fnc_saveToTemplate; + +["staticMGs", ["uns_m2_high"]] call _fnc_saveToTemplate; +["staticAT", ["uns_M40_106mm_US"]] call _fnc_saveToTemplate; +["staticAA", ["Uns_M55_Quad"]] call _fnc_saveToTemplate; +["staticMortars", ["uns_M2_60mm_mortar"]] call _fnc_saveToTemplate; + +["mortarMagazineHE", "uns_8Rnd_60mmHE_M2"] call _fnc_saveToTemplate; +["mortarMagazineSmoke", "uns_8Rnd_60mmSMOKE_M2"] call _fnc_saveToTemplate; + +//Minefield definition +//Not Magazine type would be: ["APERSBoundingMine", "APERSMine", "ATMine"] +["minefieldAT", ["uns_mine_tm57"]] call _fnc_saveToTemplate; +["minefieldAPERS", ["uns_mine_m16"]] call _fnc_saveToTemplate; + +///////////////////// +/// Identities /// +///////////////////// + +["voices", ["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG", "Male07ENG", "Male08ENG", "Male09ENG", "Male10ENG", "Male11ENG", "Male12ENG"]] call _fnc_saveToTemplate; +["faces", ["AfricanHead_01", "AfricanHead_01_cfaces_lrrpcamo08", "Barklem", "GreekHead_A3_05", "GreekHead_A3_06", +"GreekHead_A3_08", "GreekHead_A3_09", "Sturrock", "WhiteHead_01", "WhiteHead_02", "WhiteHead_03", +"WhiteHead_03_cfaces_lrrpcamo12", "WhiteHead_04", "WhiteHead_05", "WhiteHead_05_cfaces_lrrpcamo13", +"WhiteHead_06", "WhiteHead_06_cfaces_lrrpcamo16", "WhiteHead_07", "WhiteHead_08", "WhiteHead_10", +"WhiteHead_11", "WhiteHead_13", "WhiteHead_14", "WhiteHead_15", "WhiteHead_16", "WhiteHead_17", +"WhiteHead_19_cfaces_lrrpcamo13", "WhiteHead_21", "WhiteHead_21_cfaces_lrrpcamo10"]] call _fnc_saveToTemplate; + +////////////////////////// +// Loadouts // +////////////////////////// + +private _loadoutData = call _fnc_createLoadoutData; +_loadoutData set ["rifles", []]; +_loadoutData set ["carbines", []]; +_loadoutData set ["grenadeLaunchers", []]; +_loadoutData set ["SMGs", []]; +_loadoutData set ["machineGuns", []]; +_loadoutData set ["marksmanRifles", []]; +_loadoutData set ["sniperRifles", []]; + +_loadoutData set ["lightATLaunchers", [["uns_m72", "", "", "", ["uns_m72rocket"], [], ""]]]; +_loadoutData set ["ATLaunchers", [["uns_m20_bazooka", "", "", "", ["uns_M28A2_mag"], [], ""]]]; +_loadoutData set ["AALaunchers", [["uns_sa7", "", "", "", ["uns_sa7mag"], [], ""]]]; +_loadoutData set ["sidearms", []]; + +_loadoutData set ["ATMines", ["uns_mine_AV_mag"]]; +_loadoutData set ["APMines", ["uns_traps_mine_mag"]]; +_loadoutData set ["lightExplosives", ["uns_M118_mag_remote"]]; +_loadoutData set ["heavyExplosives", ["DemoCharge_Remote_Mag"]]; + +_loadoutData set ["antiTankGrenades", ["uns_m14gren", "uns_m34gren"]]; +_loadoutData set ["antiInfantryGrenades", ["uns_m67gren", "uns_m61gren", "uns_mk2gren"]]; +_loadoutData set ["smokeGrenades", ["uns_m18white"]]; + + +//Basic equipment. Shouldn't need touching most of the time. +//Mods might override this, or certain mods might want items removed (No GPSs in WW2, for example) +_loadoutData set ["maps", ["ItemMap"]]; +_loadoutData set ["watches", ["ItemWatch"]]; +_loadoutData set ["compasses", ["ItemCompass"]]; +_loadoutData set ["radios", ["UNS_ItemRadio_PRC_90_TFAR"]]; +_loadoutData set ["gpses", []]; +_loadoutData set ["NVGs", []]; +_loadoutData set ["binoculars", ["uns_binocular_navy"]]; +_loadoutData set ["rangefinder", ["uns_binocular_army"]]; + +_loadoutData set ["uniforms", []]; +_loadoutData set ["vests", []]; +_loadoutData set ["glVests", []]; +_loadoutData set ["backpacks", []]; +_loadoutData set ["medBackpacks", ["UNS_USMC_MED", "UNS_ARMY_MED"]]; +_loadoutData set ["slBackpacks", ["UNS_ARMY_RTO"]]; +_loadoutData set ["helmets", []]; +_loadoutData set ["sniHats", ["UNS_Boonie_ODF", "UNS_Boonie_6"]]; +_loadoutData set ["slHat", ["H_Beret_blk"]]; + +//Item *set* definitions. These are added in their entirety to unit loadouts. No randomisation is applied. +_loadoutData set ["items_medical_basic", ["BASIC"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_medical_standard", ["STANDARD"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_medical_medic", ["MEDIC"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_miscEssentials", [] call A3A_fnc_itemset_miscEssentials]; + +//Unit type specific item sets. Add or remove these, depending on the unit types in use. + +private _eeItems = ["ToolKit", "UNS_TrapKit"]; +private _mmItems = []; + +if (A3A_hasACE) then { + _eeItems append ["ACE_Clacker", "ACE_DefusalKit"]; + _mmItems append ["ACE_RangeCard"]; +}; + +_loadoutData set ["items_squadLeader_extras", []]; +_loadoutData set ["items_rifleman_extras", []]; +_loadoutData set ["items_medic_extras", []]; +_loadoutData set ["items_grenadier_extras", []]; +_loadoutData set ["items_explosivesExpert_extras", _eeItems]; +_loadoutData set ["items_engineer_extras", _eeItems]; +_loadoutData set ["items_lat_extras", []]; +_loadoutData set ["items_at_extras", []]; +_loadoutData set ["items_aa_extras", []]; +_loadoutData set ["items_machineGunner_extras", []]; +_loadoutData set ["items_marksman_extras", _mmItems]; +_loadoutData set ["items_sniper_extras", _mmItems]; +_loadoutData set ["items_police_extras", []]; +_loadoutData set ["items_crew_extras", []]; +_loadoutData set ["items_unarmed_extras", []]; + +//TODO - ACE overrides for misc essentials, medical and engineer gear + +/////////////////////////////////////// +// Special Forces Loadout Data // +/////////////////////////////////////// + +private _sfLoadoutData = _loadoutData call _fnc_copyLoadoutData; +_sfLoadoutData set ["uniforms", ["UNS_SAS_BDU_E"]]; +_sfLoadoutData set ["vests", ["uns_sas_web_3", "uns_sas_web_1", "uns_sas_web_2"]]; +_sfLoadoutData set ["glVests", ["uns_sas_web_1_gl", "uns_sas_web_2_gl", "uns_sas_web_3_ugl"]]; +_sfLoadoutData set ["backpacks", ["uns_sas_alicepack_1", "uns_sas_alicepack_2", "uns_sas_alicepack_3"]]; +_sfLoadoutData set ["slBackpacks", ["uns_sas_alicepack_RTO"]]; +_sfLoadoutData set ["helmets", ["uns_sas_bandana_erdl", "uns_sas_headband_erdl", "uns_sas_headband_green"]]; +_sfLoadoutData set ["sniHats", ["uns_sas_booniehat_erdl", "uns_sas_booniehat_erdl2"]]; +_sfLoadoutData set ["slHat", ["UNS_BERET_22nd"]]; +_sfLoadoutData set ["binoculars", ["uns_binocular_army"]]; +//["Weapon", "Muzzle", "Rail", "Sight", [], [], "Bipod"]; + +_sfLoadoutData set ["rifles", [ + ["uns_l1a1", "", "", "", ["uns_l1a1mag"], [], ""], + ["uns_l2a1_shorty", "", "", "", ["uns_l1a1mag"], [], ""] +]]; +_sfLoadoutData set ["carbines", [ + ["uns_m3carbine", "", "", "", ["uns_m2carbinemag"], [], ""], + ["uns_xm177e2_stock", "", "", "uns_o_colt4x", ["uns_30Rnd_556x45_Stanag"], [], ""] +]]; +_sfLoadoutData set ["grenadeLaunchers", [ + ["uns_l1a1gl", "", "", "", ["uns_l1a1mag"], ["Uns_1Rnd_HE_M381", "uns_1Rnd_Smoke_40mm"], ""], + ["uns_m16_xm148_camo", "", "", "", ["uns_30Rnd_556x45_Stanag"], ["uns_m406vest", "uns_1Rnd_Smoke_40mm"], ""] +]]; +_sfLoadoutData set ["SMGs", [ + ["uns_SterlingSD", "", "", "", ["uns_mk4mag"], [], ""], + ["uns_Sterling", "", "", "", ["uns_mk4mag"], [], ""] +]]; +_sfLoadoutData set ["machineGuns", [["uns_m60", "", "", "", ["uns_m60mag"], [], ""], + ["uns_ukvz59", "", "", "", ["uns_100Rnd_762x54_ukvz59"], [], ""]]]; +_sfLoadoutData set ["marksmanRifles", [ + ["uns_m16_camo", "", "", "uns_o_LeatherwoodART_m16", ["uns_20Rnd_556x45_Stanag"], [], ""], + ["uns_m14", "", "", "uns_o_LeatherwoodART_m14", ["uns_m14mag"], [], ""] +]]; +_sfLoadoutData set ["sniperRifles", [["uns_smle_sniper", "", "", "", ["uns_smlemag"], [], ""]]]; +_sfLoadoutData set ["sidearms", [ + ["uns_MX991_m1911SD_base", "uns_s_M1911", "uns_BA30", "", ["uns_m1911mag"], [], ""], + ["uns_bhp", "", "", "", ["uns_13Rnd_hp"], [], ""] +]]; + +///////////////////////////////// +// Military Loadout Data // +///////////////////////////////// + +private _militaryLoadoutData = _loadoutData call _fnc_copyLoadoutData; +_militaryLoadoutData set ["uniforms", ["UNS_USMC_BDU_65"]]; +_militaryLoadoutData set ["vests", ["uns_simc_flak_55", "uns_simc_flak_55_M61_79_belt", "uns_simc_flak_55_bandoleer", "uns_Simc_flak_55_M61_med", "uns_simc_flak_55_M61", "uns_simc_flak_55_mk2_belt_open", "uns_simc_flak_55_mk2_bandoleer_belt"]]; +_militaryLoadoutData set ["backpacks", ["UNS_Alice_F1", "UNS_Alice_FR", "UNS_USMC_MED", "UNS_USMC_R1", "uns_simc_MC_packboard_flak_3"]]; +_militaryLoadoutData set ["helmets", ["UNS_M1_2", "uns_simc_m1_bitch_op"]]; +_militaryLoadoutData set ["binoculars", ["uns_binocular_army"]]; + +_militaryLoadoutData set ["rifles", [["uns_M16A1", "", "", "", ["uns_30Rnd_556x45_Stanag"], [], ""]]]; +_militaryLoadoutData set ["carbines", [["uns_m2carbine", "", "", "", ["uns_m1carbinemag"], [], ""], + ["uns_xm177e2_stock", "", "", "", ["uns_30Rnd_556x45_Stanag"], [], ""]]]; +_militaryLoadoutData set ["grenadeLaunchers", [["uns_m16a1_m203", "", "", "", ["uns_20Rnd_556x45_Stanag"], ["Uns_1Rnd_HE_M381", "uns_1Rnd_Smoke_40mm"], ""]]]; +_militaryLoadoutData set ["SMGs", [["uns_thompson", "", "", "", ["uns_thompsonmag_30"], [], ""], + ["uns_m3a1", "", "", "", ["uns_m3a1mag"], [], ""]]]; +_militaryLoadoutData set ["machineGuns", [["uns_m60", "", "", "", ["uns_m60mag"], [], ""], + ["uns_M63a_LMG", "", "", "", ["uns_m63abox"], [], ""]]]; +_militaryLoadoutData set ["marksmanRifles", [["uns_m16_camo", "", "", "uns_o_LeatherwoodART_m16", ["uns_20Rnd_556x45_Stanag"], [], ""], + ["uns_m14", "", "", "uns_o_LeatherwoodART_m14", ["uns_m14mag"], [], ""]]]; +_militaryLoadoutData set ["sniperRifles", [["uns_model70_iron", "", "", "uns_o_RedfieldART_m70", ["uns_model70mag_T"], [], ""], + ["uns_M40_base", "", "", "uns_o_RedfieldART", ["uns_m40mag_T"], [], ""]]]; +_militaryLoadoutData set ["sidearms", [["uns_m1911", "", "", "", ["uns_m1911mag"], [], ""]]]; + +/////////////////////////////// +// Police Loadout Data // +/////////////////////////////// + +private _policeLoadoutData = _loadoutData call _fnc_copyLoadoutData; + +_policeLoadoutData set ["uniforms", ["UNS_ARMY_BDU_716thMPBnpv1"]]; +_policeLoadoutData set ["vests", ["uns_simc_56_ligt"]]; +_policeLoadoutData set ["helmets", ["UNS_M1_MP"]]; + +_policeLoadoutData set ["SMGs", [["uns_m870_mk1", "", "", "", ["uns_m870mag"], [], ""], + ["uns_m3a1", "", "", "", ["uns_m3a1mag"], [], ""]]]; +_policeLoadoutData set ["sidearms", [ + ["uns_m1911", "", "", "", ["uns_m1911mag"], [], ""] +]]; + +//////////////////////////////// +// Militia Loadout Data // +//////////////////////////////// + +private _militiaLoadoutData = _loadoutData call _fnc_copyLoadoutData; +_militiaLoadoutData set ["uniforms", ["UNS_ARMY_BDU_65"]]; +_militiaLoadoutData set ["vests", ["uns_simc_56", "uns_simc_56_bandoleer", "uns_simc_56_frag", "uns_simc_56_M43", "uns_v_simc_67_ass", "uns_v_simc_67_frag_ass", "uns_v_simc_67_45", "uns_Simc_56_med"]]; +_militiaLoadoutData set ["backpacks", ["uns_simc_pack_trop_1_alt", "uns_simc_pack_trop_4_alt", "uns_simc_pack_med_m5_flak", "uns_simc_packboard_MG_2", "uns_simc_packboard_mortar_1"]]; +_militiaLoadoutData set ["helmets", ["UNS_M1_1", "uns_simc_m1_bitch_op"]]; + +_militiaLoadoutData set ["rifles", [["uns_m16", "", "", "", ["uns_20Rnd_556x45_Stanag"], [], ""], + ["uns_m14", "", "", "", ["uns_m14mag"], [], ""]]]; +_militiaLoadoutData set ["carbines", [["uns_m1carbine_pouch", "", "", "", ["uns_m1carbinemag"], [], ""], + ["uns_m1carbine", "", "", "", ["uns_m1carbinemag"], [], ""]]]; +_militiaLoadoutData set ["grenadeLaunchers", [["uns_m79", "", "", "", ["Uns_1Rnd_HE_M381"], ["uns_1Rnd_Smoke_40mm"], ""], + ["uns_m1garand_gl", "", "", "", ["uns_m1garandmag"], ["Uns_1Rnd_22mm_M1a2_FRAG", "Uns_1Rnd_22mm_HEAT"], ""]]]; +_militiaLoadoutData set ["SMGs", [["uns_thompson", "", "", "", ["uns_thompsonmag_30"], [], ""], + ["uns_m3a1", "", "", "", ["uns_m3a1mag"], [], ""]]]; +_militiaLoadoutData set ["machineGuns", [["uns_bar", "", "", "", ["uns_barmag"], [], ""], + ["uns_m1919a6", "", "", "", ["uns_100Rnd_m1919"], [], ""]]]; +_militiaLoadoutData set ["marksmanRifles", [["uns_m1garand", "", "", "uns_o_M84", ["uns_m1garandmag"], [], ""], + ["uns_m1garand", "", "", "", ["uns_m1garandmag"], [], ""]]]; +_militiaLoadoutData set ["sniperRifles", [["uns_m1903", "", "", "", ["uns_springfieldmag_T"], [], ""], + ["uns_m1903", "", "", "uns_o_Unertl8x", ["uns_springfieldmag_T"], [], ""]]]; +_militiaLoadoutData set ["sidearms", [["uns_m1911", "", "", "", ["uns_m1911mag"], [], ""]]]; + +////////////////////////// +// Misc Loadouts // +////////////////////////// + +private _crewLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; +_crewLoadoutData set ["uniforms", ["UNS_ARMY_BDU_S", "UNS_ARMY_BDU_F"]]; +_crewLoadoutData set ["vests", ["uns_simc_56_45_ligt_zusp"]]; +_crewLoadoutData set ["helmets", ["UNS_TC_1", "UNS_TC_2"]]; + +private _pilotLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; +_pilotLoadoutData set ["uniforms", ["UNS_JPilot_BDU", "UNS_Pilot_BDU"]]; +_pilotLoadoutData set ["vests", ["UNS_JP_Vest"]]; +_pilotLoadoutData set ["helmets", ["UNS_JP_Helmet_352TFS", "UNS_JP_Helmet_366TFW", "UNS_JP_Helmet_389TFS", "UNS_HP_Helmet_R33", "UNS_HP_Helmet_R8", "UNS_HP_Helmet_USA"]]; + + +///////////////////////////////// +// Unit Type Definitions // +///////////////////////////////// +//These define the loadouts for different unit types. +//For example, rifleman, grenadier, squad leader, etc. +//In 95% of situations, you *should not need to edit these*. +//Almost all factions can be set up just by modifying the loadout data above. +//However, these exist in case you really do want to do a lot of custom alterations. + +private _squadLeaderTemplate = { + ["slHat"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [["slBackpacks", "backpacks"] call _fnc_fallback] call _fnc_setBackpack; + + [selectRandom ["grenadeLaunchers", "rifles"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + ["primary", 4] call _fnc_addAdditionalMuzzleMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_squadLeader_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 2] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + ["signalsmokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["gpses"] call _fnc_addGPS; + ["binoculars"] call _fnc_addBinoculars; + ["NVGs"] call _fnc_addNVGs; +}; + +private _riflemanTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_rifleman_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 2] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _medicTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_medic"] call _fnc_addItemSet; + ["items_medic_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _grenadierTemplate = { + ["helmets"] call _fnc_setHelmet; + [["glVests", "vests"] call _fnc_fallback] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + ["grenadeLaunchers"] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + ["primary", 10] call _fnc_addAdditionalMuzzleMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_grenadier_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 4] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _explosivesExpertTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_explosivesExpert_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + ["lightExplosives", 2] call _fnc_addItem; + if (random 1 > 0.5) then {["heavyExplosives", 1] call _fnc_addItem;}; + if (random 1 > 0.5) then {["atMines", 1] call _fnc_addItem;}; + if (random 1 > 0.5) then {["apMines", 1] call _fnc_addItem;}; + + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _engineerTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_engineer_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + if (random 1 > 0.5) then {["lightExplosives", 1] call _fnc_addItem;}; + + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _latTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["lightATLaunchers"] call _fnc_setLauncher; + //TODO - Add a check if it's disposable. + ["launcher", 1] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_lat_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _atTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + [["ATLaunchers"]] call _fnc_setLauncher; + //TODO - Add a check if it's disposable. + ["launcher", 2] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_at_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _aaTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["AALaunchers"] call _fnc_setLauncher; + //TODO - Add a check if it's disposable. + ["launcher", 3] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_aa_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _machineGunnerTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + ["backpacks"] call _fnc_setBackpack; + + ["machineGuns"] call _fnc_setPrimary; + ["primary", 4] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_machineGunner_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["NVGs"] call _fnc_addNVGs; +}; + +private _marksmanTemplate = { + ["sniHats"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + ["marksmanRifles"] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_marksman_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["rangefinders"] call _fnc_addBinoculars; + ["NVGs"] call _fnc_addNVGs; +}; + +private _sniperTemplate = { + ["sniHats"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + [["sniperRifles", "marksmanRifles"] call _fnc_fallback] call _fnc_setPrimary; + ["primary", 5] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_sniper_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["antiInfantryGrenades", 1] call _fnc_addItem; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["rangefinders"] call _fnc_addBinoculars; + ["NVGs"] call _fnc_addNVGs; +}; + +private _policeTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + + ["SMGs"] call _fnc_setPrimary; + ["primary", 3] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_police_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["smokeGrenades", 1] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; +}; + +private _crewTemplate = { + ["helmets"] call _fnc_setHelmet; + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; + ["primary", 3] call _fnc_addMagazines; + + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; + + ["items_medical_basic"] call _fnc_addItemSet; + ["items_crew_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + ["smokeGrenades", 2] call _fnc_addItem; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; + ["gpses"] call _fnc_addGPS; + ["NVGs"] call _fnc_addNVGs; +}; + +private _unarmedTemplate = { + ["vests"] call _fnc_setVest; + ["uniforms"] call _fnc_setUniform; + + ["items_medical_basic"] call _fnc_addItemSet; + ["items_unarmed_extras"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["radios"] call _fnc_addRadio; +}; + +private _traitorTemplate = { + call _unarmedTemplate; + ["sidearms"] call _fnc_setHandgun; + ["handgun", 2] call _fnc_addMagazines; +}; + +//////////////////////////////////////////////////////////////////////////////////////// +// You shouldn't touch below this line unless you really really know what you're doing. +// Things below here can and will break the gamemode if improperly changed. +//////////////////////////////////////////////////////////////////////////////////////// + +///////////////////////////// +// Special Forces Units // +///////////////////////////// +private _prefix = "SF"; +private _unitTypes = [ + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["Medic", _medicTemplate, [["medic", true]]], + ["Engineer", _engineerTemplate, [["engineer", true]]], + ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _grenadierTemplate], + ["LAT", _latTemplate], + ["AT", _atTemplate], + ["AA", _aaTemplate], + ["MachineGunner", _machineGunnerTemplate], + ["Marksman", _marksmanTemplate], + ["Sniper", _sniperTemplate] +]; + +[_prefix, _unitTypes, _sfLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +/*{ + params ["_name", "_loadoutTemplate"]; + private _loadouts = [_sfLoadoutData, _loadoutTemplate] call _fnc_buildLoadouts; + private _finalName = _prefix + _name; + [_finalName, _loadouts] call _fnc_saveToTemplate; +} forEach _unitTypes; +*/ + +/////////////////////// +// Military Units // +/////////////////////// +private _prefix = "military"; +private _unitTypes = [ + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["Medic", _medicTemplate, [["medic", true]]], + ["Engineer", _engineerTemplate, [["engineer", true]]], + ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _grenadierTemplate], + ["LAT", _latTemplate], + ["AT", _atTemplate], + ["AA", _aaTemplate], + ["MachineGunner", _machineGunnerTemplate], + ["Marksman", _marksmanTemplate], + ["Sniper", _sniperTemplate] +]; + +[_prefix, _unitTypes, _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +//////////////////////// +// Police Units // +//////////////////////// +private _prefix = "police"; +private _unitTypes = [ + ["SquadLeader", _policeTemplate], + ["Standard", _policeTemplate] +]; + +[_prefix, _unitTypes, _policeLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +//////////////////////// +// Militia Units // +//////////////////////// +private _prefix = "militia"; +private _unitTypes = [ + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["Medic", _medicTemplate, [["medic", true]]], + ["Engineer", _engineerTemplate, [["engineer", true]]], + ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _grenadierTemplate], + ["LAT", _latTemplate], + ["AT", _atTemplate], + ["AA", _aaTemplate], + ["MachineGunner", _machineGunnerTemplate], + ["Marksman", _marksmanTemplate], + ["Sniper", _sniperTemplate] +]; + +[_prefix, _unitTypes, _militiaLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; + +////////////////////// +// Misc Units // +////////////////////// + +//The following lines are determining the loadout of vehicle crew +["other", [["Crew", _crewTemplate]], _crewLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout of the pilots +["other", [["Pilot", _crewTemplate]], _pilotLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout for the unit used in the "kill the official" mission +["other", [["Official", _SquadLeaderTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout for the AI used in the "kill the traitor" mission +["other", [["Traitor", _traitorTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; +//The following lines are determining the loadout for the AI used in the "Invader Punishment" mission +["other", [["Unarmed", _UnarmedTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; diff --git a/A3A/addons/core/Templates/Templates/UNS/UNS_Civ.sqf b/A3A/addons/core/Templates/Templates/UNS/UNS_Civ.sqf new file mode 100644 index 0000000000..31044ba584 --- /dev/null +++ b/A3A/addons/core/Templates/Templates/UNS/UNS_Civ.sqf @@ -0,0 +1,115 @@ +////////////////////////////// +// Civilian Information // +////////////////////////////// + +////////////////////////// +// Vehicles // +////////////////////////// + +["vehiclesCivCar", [ + "uns_willys", 1 + ,"uns_zil157", 0.3]] call _fnc_saveToTemplate; + +["vehiclesCivIndustrial", [ + "uns_zil157", 0.5]] call _fnc_saveToTemplate; + +["vehiclesCivBoat", [ + "UNS_skiff2_C", 0.4 + ,"UNS_skiff_C", 0.4 + ,"UNS_skiff2_cargo_C", 0.5 + ,"UNS_skiff_cargo_C", 0.5 + ,"UNS_sampan_cargo", 0.6 + ,"UNS_sampan_fish1", 0.5 + ,"UNS_sampan_large", 0.3 + ,"UNS_sampan_supply", 0.4 + ,"UNS_Sampan_Transport", 0.2 + ,"UNS_sampan_village", 0.3]] call _fnc_saveToTemplate; + +["vehiclesCivRepair", []] call _fnc_saveToTemplate; + +["vehiclesCivMedical", []] call _fnc_saveToTemplate; + +["vehiclesCivFuel", []] call _fnc_saveToTemplate; + +///////////////////// +/// Identities /// +///////////////////// + +["voices", ["Male01CHI", "Male02CHI", "Male03CHI"]] call _fnc_saveToTemplate; +["faces", ["AsianHead_A3_01", "AsianHead_A3_02", "AsianHead_A3_04", "AsianHead_A3_05", "AsianHead_A3_06", "AsianHead_A3_07"]] call _fnc_saveToTemplate; + +////////////////////////// +// Loadouts // +////////////////////////// + +private _civUniforms = [ + "UNS_CIV_U", + "UNS_CIV_B" +]; + +private _pressUniforms = [ + "U_Marshal" + ]; + +["uniforms", _civUniforms + _pressUniforms] call _fnc_saveToTemplate; + +private _civhats = [ + "uns_H_Simc_nasi", + "UNS_Conehat_VC", + "UNS_Headband_BK", + "UNS_Boonie_VC", + "uns_sas_booniehat_vc_tan", + "UNS_Boonie3_VC" +]; + +["headgear", _civHats] call _fnc_saveToTemplate; + +private _loadoutData = call _fnc_createLoadoutData; + +_loadoutData set ["uniforms", _civUniforms]; +_loadoutData set ["pressUniforms", _pressUniforms]; +_loadoutData set ["workerHelmets", ["vn_c_conehat_02"]]; +_loadoutData set ["helmets", _civHats]; + +_loadoutData set ["maps", ["ItemMap"]]; +_loadoutData set ["watches", ["ItemWatch"]]; +_loadoutData set ["compasses", ["ItemCompass"]]; + + +private _manTemplate = { + ["helmets"] call _fnc_setHelmet; + ["uniforms"] call _fnc_setUniform; + + ["items_medical_standard"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; +}; +private _workerTemplate = { + ["workerHelmets"] call _fnc_setHelmet; + ["uniforms"] call _fnc_setUniform; + + ["items_medical_standard"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; +}; +private _pressTemplate = { + ["pressUniforms"] call _fnc_setUniform; + + ["items_medical_standard"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; +}; +private _prefix = "militia"; +private _unitTypes = [ + ["Press", _pressTemplate], + ["Worker", _workerTemplate], + ["Man", _manTemplate] +]; + +[_prefix, _unitTypes, _loadoutData] call _fnc_generateAndSaveUnitsToTemplate; \ No newline at end of file diff --git a/A3A/addons/core/Templates/Templates/UNS/UNS_Logistics_Nodes.sqf b/A3A/addons/core/Templates/Templates/UNS/UNS_Logistics_Nodes.sqf new file mode 100644 index 0000000000..1884e7b0d3 --- /dev/null +++ b/A3A/addons/core/Templates/Templates/UNS/UNS_Logistics_Nodes.sqf @@ -0,0 +1,128 @@ +A3A_logistics_vehicleHardpoints append [ + //Cars + ["\uns_m274\uns_m274.p3d",[ + [1, [0.13,-0.4,-0.71], [0,1,2]] + ]], + + //Small Trucks + ["\uns_wheeled_w\m37b\uns_m37b1.p3d",[ + [1, [0,-1.25,-0.82], [1,2,6]], + [1, [0,-2.05,-0.82], [3,4,5]] + ]], + + //Trucks + ["uns_m35\uns_M35A2",[ + [1, [0,-0.4,-0.5], [3,4]], + [1, [0,-1.2,-0.5], [5,6,7,8]], + [1, [0,-2,-0.5], [9,10]], + [1, [0,-2.8,-0.5], [1,2]] + ]], + + ["\uns_wheeled_e\ural\uns_ural.p3d",[ + [1, [0,-0.6,0.1], [2,3]], + [1, [0,-1.4,0.1], [4,5,6,7]], + [1, [0,-2.2,0.1], [8,9]], + [1, [0,-3,0.1], [10,11]] + ]], + + ["uns_wheeled_e\zil157\uns_zil157.p3d",[ + [1, [0,0.3,1.4], [2,11,12]], + [1, [0,-0.5,1.4], [1,3,4]], + [1, [0,-1.3,1.4], [5,6]], + [1, [0,-2.1,1.4], [7,8]] + ]], + + //Boats + ["uns_boats\skiff\uns_skiff_1",[ + [1, [0,0.6,-0.675], [0,1]] + ]], + + ["\UNS_sampan\UNS_sampan_fish1.P3D",[ + [1, [0.15,3.6,-0.445], []], + [1, [0.15,2.8,-0.445], []], + [1, [0.15,2,-0.445], []], + [1, [0.15,1.2,-0.445], [1]], + [1, [0.15,0.4,-0.445], []], + [1, [0.15,-0.4,-0.445], []] + ]], + + ["\UNS_sampan\UNS_sampan_Transport.P3D",[ + [1, [0,3.35,-0.7], [0]], + [1, [0,2.55,-0.7], []], + [1, [0,1.75,-0.7], [5]], + [1, [0,0.95,-0.7], []], + [1, [0,0.15,-0.7], []] + ]], + + ["\UNS_sampan\UNS_sampan_large.P3D",[ + [1, [0,2.3,-1.2], []], + [1, [0,1.5,-1.2], []], + [1, [0,0.7,-1.2], []], + [1, [0,-0.1,-1.2], []] + ]], + + //Helicopters + ["\uns_ch47a\uns_ch47a.p3d",[ + [1, [0.01,3.6,-2.71], []], + [1, [0.01,2.8,-2.71], [0,1,23]], + [1, [0.01,2,-2.71], [2,3,22]], + [1, [0.01,1.2,-2.71], [4,19,21]], + [1, [0.01,0.4,-2.71], [5,18]], + [1, [0.01,-0.4,-2.71], [6,17]], + [1, [0.01,-1.2,-2.71], [7,8,16]], + [1, [0.01,-2,-2.71], [9,14,15]], + [1, [0.01,-2.8,-2.71], [10,13]], + [1, [0.01,-3.6,-2.71], [11,12,20]] + ]], + + ["\uns_mi8\uns_Mi8_MT",[ + [1, [0.01,3.6,-2.29], [2,3,4,5]], + [1, [0.01,2.8,-2.29], [6,7]], + [1, [0.01,2,-2.29], [8,9]], + [1, [0.01,1.2,-2.29], [10,11]], + [1, [0.01,0.4,-2.29], [12,13]] + ]], + + ["\uns_mi8\uns_Mi8_MTV",[ + [1, [0.01,3.6,-2.29], [1,2,3,4]], + [1, [0.01,2.8,-2.29], [5,6]], + [1, [0.01,2,-2.29], [7,8]], + [1, [0.01,1.2,-2.29], [9,10]], + [1, [0.01,0.4,-2.29], [11,12]] + ]] +]; + +//Offsets for adding new statics/boxes to the JNL script. +A3A_logistics_attachmentOffset append [ + //weapons //location //rotation //size //recoil //description + ["uns_dshk_high_VC" call A3A_fnc_classNameToModel, [0.25, -0.5, 1.64], [0, 1, 0], 4, 100], + ["uns_m2_high" call A3A_fnc_classNameToModel, [0.04, 0.13, 0], [0, 1, 0], 4, 100], + ["uns_pk_high_VC" call A3A_fnc_classNameToModel, [0.04, 0, 0], [0, 1, 0], 4, 100], + ["uns_m1941_82mm_mortarVC" call A3A_fnc_classNameToModel, [0,-0.52,0.74], [0, 1, 0], 3, 2000], + ["uns_M1_81mm_mortar" call A3A_fnc_classNameToModel, [0.02,-0.39,0.70], [0, 1, 0], 3, 2000], + ["uns_M2_60mm_mortar" call A3A_fnc_classNameToModel, [-0.02,-0.39,0.74], [0, 1, 0], 3, 1500], + ["uns_M30_107mm_mortar" call A3A_fnc_classNameToModel, [0.02,-0.6,1.05], [0, 1, 0], 3, 3000] +]; + +//all vehicles with jnl loading nodes where the nodes are not located in the open, this can be because its inside the vehicle or it has a cover over the loading plane. +A3A_logistics_coveredVehicles append [ + "uns_Mi8T_VPAF" call A3A_fnc_classNameToModel + , "uns_Mi8TV_VPAF_MG" call A3A_fnc_classNameToModel + , "uns_M35A2" + , "uns_nvatruck" + , "UNS_sampan_large" call A3A_fnc_classNameToModel + , "UNS_Sampan_Transport" call A3A_fnc_classNameToModel + , "uns_ch47_m60_army" call A3A_fnc_classNameToModel +]; + +//if you want a weapon to be loadable you need to add it to this as a array of [model, [blacklist specific vehicles]], +//if the vehicle is in the coveredVehicles array dont add it to the blacklist in this array. +A3A_logistics_weapons append [ + ["uns_pk_high_VC" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck"]], + ["uns_dshk_high_VC" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck"]], + ["uns_m1941_82mm_mortarVC" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck", "B_Boat_Transport_01_F" call A3A_fnc_classNameToModel, "UNS_sampan_fish1" call A3A_fnc_classNameToModel]], + ["uns_m2_high" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck"]], + ["uns_M2_60mm_mortar" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck", "B_Boat_Transport_01_F" call A3A_fnc_classNameToModel, "UNS_sampan_fish1" call A3A_fnc_classNameToModel]], + ["uns_M30_107mm_mortar" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck", "B_Boat_Transport_01_F" call A3A_fnc_classNameToModel, "UNS_sampan_fish1" call A3A_fnc_classNameToModel]], + ["uns_M1_81mm_mortar" call A3A_fnc_classNameToModel,["uns_M35A2", "uns_nvatruck", "B_Boat_Transport_01_F" call A3A_fnc_classNameToModel, "UNS_sampan_fish1" call A3A_fnc_classNameToModel]] +]; \ No newline at end of file diff --git a/A3A/addons/core/Templates/Templates/UNS/UNS_Reb_VC.sqf b/A3A/addons/core/Templates/Templates/UNS/UNS_Reb_VC.sqf new file mode 100644 index 0000000000..3dbba68b63 --- /dev/null +++ b/A3A/addons/core/Templates/Templates/UNS/UNS_Reb_VC.sqf @@ -0,0 +1,167 @@ +/////////////////////////// +// Rebel Information // +/////////////////////////// + +["name", "VC"] call _fnc_saveToTemplate; + +["flag", "uns_FlagCarrierVC"] call _fnc_saveToTemplate; +["flagTexture", "\uns_flags\flag_vc_co.paa"] call _fnc_saveToTemplate; +["flagMarkerType", "Faction_UNS_VC"] call _fnc_saveToTemplate; + +["vehicleBasic", "uns_m274"] call _fnc_saveToTemplate; +["vehicleLightUnarmed", "uns_Type55"] call _fnc_saveToTemplate; +["vehicleLightArmed", "uns_Type55_LMG"] call _fnc_saveToTemplate; +["vehicleTruck", "uns_nvatruck_open"] call _fnc_saveToTemplate; +["vehicleAT", "uns_Type55_RR57"] call _fnc_saveToTemplate; +["vehicleAA", "uns_nvatruck_zpu"] call _fnc_saveToTemplate; + +["vehicleBoat", "UNS_VC_Sampan_Transport"] call _fnc_saveToTemplate; +["vehicleRepair", "uns_zil157_repair"] call _fnc_saveToTemplate; + +["vehiclePlane", "uns_an2"] call _fnc_saveToTemplate; + +["vehicleCivCar", "uns_willys"] call _fnc_saveToTemplate; +["vehicleCivTruck", "uns_zil157"] call _fnc_saveToTemplate; +["vehicleCivHeli", ""] call _fnc_saveToTemplate; +["vehicleCivBoat", "UNS_skiff2_C"] call _fnc_saveToTemplate; + +["staticMG", "uns_pk_high_VC"] call _fnc_saveToTemplate; +["staticAT", "uns_Type36_57mm_VC"] call _fnc_saveToTemplate; +["staticAA", "uns_ZPU2_VC"] call _fnc_saveToTemplate; +["staticMortar", "uns_m1941_82mm_mortarVC"] call _fnc_saveToTemplate; +["staticMortarMagHE", "uns_8Rnd_82mmHE_M1941"] call _fnc_saveToTemplate; +["staticMortarMagSmoke", "uns_8Rnd_82mmSMOKE_M1941"] call _fnc_saveToTemplate; + +["mineAT", "uns_mine_AT_mag"] call _fnc_saveToTemplate; +["mineAPERS", "uns_mine_AP_mag"] call _fnc_saveToTemplate; + +["breachingExplosivesAPC", [["uns_M118_mag_remote", 1],["PipeBomb", 1]]] call _fnc_saveToTemplate; +["breachingExplosivesTank", [["PipeBomb", 2],["uns_M118_mag_remote", 2],["uns_mine_TM_mag", 1]]] call _fnc_saveToTemplate; + +/////////////////////////// +// Rebel Starting Gear // +/////////////////////////// + +private _initialRebelEquipment = [ +"uns_baikal", "uns_mosin", "uns_kar98k", "uns_mas36", "uns_type99", "uns_nagant_m1895", "uns_m127a1_flare", "uns_1Rnd_M127_mag", +"uns_12gaugemag_2", "uns_mosinmag", "uns_kar98kmag", "uns_mas36mag", "uns_type99mag", "uns_nagant_m1895mag", "uns_f1gren", "uns_molotov_mag", "uns_rdg2", +"uns_men_NVA_65_AS3_Bag", "uns_simc_ARVN_ruck_1", "uns_simc_ARVN_ruck_2", "UNS_VC_R1", +"uns_vc_chestrig", "UNS_VC_A2", +"Binocular"]; + +if (A3A_hasTFAR) then {_initialRebelEquipment append ["tf_microdagr", "UNS_ItemRadio_PRC_90_TFAR"]}; +if (A3A_hasTFAR && startWithLongRangeRadio) then {_initialRebelEquipment pushBack "UNS_USMC_RTO"}; +if (A3A_hasTFARBeta) then {_initialRebelEquipment append ["TFAR_microdagr", "UNS_ItemRadio_PRC_90_TFAR"]}; +if (A3A_hasTFARBeta && startWithLongRangeRadio) then {_initialRebelEquipment pushBack "UNS_USMC_RTO"}; + +["initialRebelEquipment", _initialRebelEquipment] call _fnc_saveToTemplate; + +private _rebUniforms = [ + "UNS_VC_U", + "UNS_VC_S", + "UNS_VC_K", + "UNS_VC_B", + "UNS_VC_G", + "uns_U_Simc_vc_black_1", + "uns_U_Simc_vc_black_1_trop", + "uns_U_Simc_vc_black_2", + "uns_U_Simc_vc_black_2_trop", + "uns_U_Simc_vc_blau_1_trop", + "uns_U_Simc_vc_blau_2", + "uns_U_Simc_vc_blau_2_trop", + "uns_U_Simc_vc_blau_1", + "uns_U_Simc_vc_grun_1", + "uns_U_Simc_vc_grun_1_trop", + "uns_U_Simc_vc_grun_2", + "uns_U_Simc_vc_grun_2_trop" +]; + +["uniforms", _rebUniforms] call _fnc_saveToTemplate; + +["headgear", [ + "UNS_Boonie_VC", + "UNS_Headband_VC", + "UNS_Conehat_VC", + "uns_vc_headband_blue", + "UNS_Boonie2_VC", + "UNS_Boonie3_VC", + "UNS_Boonie4_VC", + "uns_sas_booniehat_vc_tan", + "uns_sas_booniehat_vc", + "uns_H_Simc_nasi" +]] call _fnc_saveToTemplate; + +///////////////////// +/// Identities /// +///////////////////// + +["voices", ["Male01CHI", "Male02CHI", "Male03CHI"]] call _fnc_saveToTemplate; +["faces", ["AsianHead_A3_01", "AsianHead_A3_01_cfaces_vccamo01", "AsianHead_A3_01_cfaces_vccamo02", "AsianHead_A3_02", +"AsianHead_A3_03", "AsianHead_A3_03_cfaces_vccamo01", "AsianHead_A3_03_cfaces_vccamo02", +"AsianHead_A3_04", "AsianHead_A3_04_cfaces_vccamo01", "AsianHead_A3_05", "AsianHead_A3_05_cfaces_vccamo02", +"AsianHead_A3_06", "AsianHead_A3_07", "AsianHead_A3_07_cfaces_vccamo01", "AsianHead_A3_07_cfaces_vccamo02"]] call _fnc_saveToTemplate; + +////////////////////////// +// Loadouts // +////////////////////////// + +private _loadoutData = call _fnc_createLoadoutData; +_loadoutData set ["maps", ["ItemMap"]]; +_loadoutData set ["watches", ["ItemWatch"]]; +_loadoutData set ["compasses", ["ItemCompass"]]; +_loadoutData set ["binoculars", ["Binocular"]]; + +_loadoutData set ["uniforms", _rebUniforms]; + +_loadoutData set ["items_medical_basic", ["BASIC"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_medical_standard", ["STANDARD"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_medical_medic", ["MEDIC"] call A3A_fnc_itemset_medicalSupplies]; +_loadoutData set ["items_miscEssentials", [] call A3A_fnc_itemset_miscEssentials]; + +//////////////////////// +// Rebel Unit Types // +///////////////////////. + +private _squadLeaderTemplate = { + ["uniforms"] call _fnc_setUniform; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; + ["binoculars"] call _fnc_addBinoculars; +}; + +private _riflemanTemplate = { + ["uniforms"] call _fnc_setUniform; + + ["items_medical_standard"] call _fnc_addItemSet; + ["items_miscEssentials"] call _fnc_addItemSet; + + ["maps"] call _fnc_addMap; + ["watches"] call _fnc_addWatch; + ["compasses"] call _fnc_addCompass; +}; + +private _prefix = "militia"; +private _unitTypes = [ + ["Petros", _squadLeaderTemplate], + ["SquadLeader", _squadLeaderTemplate], + ["Rifleman", _riflemanTemplate], + ["staticCrew", _riflemanTemplate], + ["Medic", _riflemanTemplate, [["medic", true]]], + ["Engineer", _riflemanTemplate, [["engineer", true]]], + ["ExplosivesExpert", _riflemanTemplate, [["explosiveSpecialist", true]]], + ["Grenadier", _riflemanTemplate], + ["LAT", _riflemanTemplate], + ["AT", _riflemanTemplate], + ["AA", _riflemanTemplate], + ["MachineGunner", _riflemanTemplate], + ["Marksman", _riflemanTemplate], + ["Sniper", _riflemanTemplate], + ["Unarmed", _riflemanTemplate] +]; + +[_prefix, _unitTypes, _loadoutData] call _fnc_generateAndSaveUnitsToTemplate; diff --git a/A3A/addons/core/Templates/Templates/UNSUNG/Unsung_AI_NVA_Tropical.sqf b/A3A/addons/core/Templates/Templates/UNSUNG/Unsung_AI_NVA_Tropical.sqf deleted file mode 100644 index 1eba3880c2..0000000000 --- a/A3A/addons/core/Templates/Templates/UNSUNG/Unsung_AI_NVA_Tropical.sqf +++ /dev/null @@ -1,733 +0,0 @@ -////////////////////////// -// Side Information // -////////////////////////// - -["name", ""] call _fnc_saveToTemplate; -["spawnMarkerName", ""] call _fnc_saveToTemplate; - -["flag", ""] call _fnc_saveToTemplate; -["flagTexture", ""] call _fnc_saveToTemplate; -["flagMarkerType", ""] call _fnc_saveToTemplate; - -////////////////////////// -// Vehicles // -////////////////////////// - -["ammobox", "B_supplyCrate_F"] call _fnc_saveToTemplate; -["surrenderCrate", "Box_IND_Wps_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type -["equipmentBox", "Box_NATO_Equip_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type - -["vehiclesBasic", []] call _fnc_saveToTemplate; -["vehiclesLightUnarmed", []] call _fnc_saveToTemplate; -["vehiclesLightArmed",[]] call _fnc_saveToTemplate; -["vehiclesTrucks", []] call _fnc_saveToTemplate; -["vehiclesCargoTrucks", []] call _fnc_saveToTemplate; -["vehiclesAmmoTrucks", []] call _fnc_saveToTemplate; -["vehiclesRepairTrucks", []] call _fnc_saveToTemplate; -["vehiclesFuelTrucks", []] call _fnc_saveToTemplate; -["vehiclesMedical", []] call _fnc_saveToTemplate; -["vehiclesAPCs", []] call _fnc_saveToTemplate; -["vehiclesTanks", []] call _fnc_saveToTemplate; -["vehiclesAA", []] call _fnc_saveToTemplate; -["vehiclesLightAPCs", []] call _fnc_saveToTemplate; //this line determines light APCs -["vehiclesIFVs", []] call _fnc_saveToTemplate; //this line determines IFVs - - -["vehiclesTransportBoats", []] call _fnc_saveToTemplate; -["vehiclesGunBoats", []] call _fnc_saveToTemplate; -["vehiclesAmphibious", []] call _fnc_saveToTemplate; - -["vehiclesPlanesCAS", []] call _fnc_saveToTemplate; -["vehiclesPlanesAA", []] call _fnc_saveToTemplate; -["vehiclesPlanesTransport", []] call _fnc_saveToTemplate; - -["vehiclesHelisLight", []] call _fnc_saveToTemplate; -["vehiclesHelisTransport", []] call _fnc_saveToTemplate; -["vehiclesHelisAttack", []] call _fnc_saveToTemplate; - -["vehiclesArtillery", []] call _fnc_saveToTemplate; -["magazines", createHashMapFromArray []] call _fnc_saveToTemplate; //element format: [Vehicle class, [Magazines]] - -["uavsAttack", []] call _fnc_saveToTemplate; -["uavsPortable", []] call _fnc_saveToTemplate; - -//Config special vehicles -["vehiclesMilitiaLightArmed", []] call _fnc_saveToTemplate; -["vehiclesMilitiaTrucks", []] call _fnc_saveToTemplate; -["vehiclesMilitiaCars", []] call _fnc_saveToTemplate; - -["vehiclesPolice", []] call _fnc_saveToTemplate; - -["staticMGs", []] call _fnc_saveToTemplate; -["staticAT", []] call _fnc_saveToTemplate; -["staticAA", []] call _fnc_saveToTemplate; -["staticMortars", []] call _fnc_saveToTemplate; - -["mortarMagazineHE", ""] call _fnc_saveToTemplate; -["mortarMagazineSmoke", ""] call _fnc_saveToTemplate; - -//Minefield definition -//Not Magazine type would be: ["APERSBoundingMine", "APERSMine", "ATMine"] -["minefieldAT", []] call _fnc_saveToTemplate; -["minefieldAPERS", []] call _fnc_saveToTemplate; - -////////////////////////// -// Loadouts // -////////////////////////// -private _loadoutData = call _fnc_createLoadoutData; -_loadoutData set ["rifles", []]; -_loadoutData set ["carbines", []]; -_loadoutData set ["grenadeLaunchers", []]; -_loadoutData set ["SMGs", []]; -_loadoutData set ["machineGuns", []]; -_loadoutData set ["marksmanRifles", []]; -_loadoutData set ["sniperRifles", []]; - -_loadoutData set ["lightATLaunchers", []]; -_loadoutData set ["ATLaunchers", []]; -_loadoutData set ["missileATLaunchers", []]; -_loadoutData set ["AALaunchers", []]; -_loadoutData set ["sidearms", []]; - -_loadoutData set ["ATMines", []]; -_loadoutData set ["APMines", []]; -_loadoutData set ["lightExplosives", []]; -_loadoutData set ["heavyExplosives", []]; - -_loadoutData set ["antiTankGrenades", []]; -_loadoutData set ["antiInfantryGrenades", []]; -_loadoutData set ["smokeGrenades", []]; - - -//Basic equipment. Shouldn't need touching most of the time. -//Mods might override this, or certain mods might want items removed (No GPSs in WW2, for example) -_loadoutData set ["maps", ["ItemMap"]]; -_loadoutData set ["watches", ["ItemWatch"]]; -_loadoutData set ["compasses", ["ItemCompass"]]; -_loadoutData set ["radios", ["ItemRadio"]]; -_loadoutData set ["gpses", ["ItemGPS"]]; -_loadoutData set ["NVGs", ["NVGoggles_INDEP"]]; -_loadoutData set ["binoculars", ["Binocular"]]; -_loadoutData set ["Rangefinder", ["Rangefinder"]]; - -_loadoutData set ["uniforms", []]; -_loadoutData set ["vests", []]; -_loadoutData set ["backpacks", []]; -_loadoutData set ["longRangeRadios", []]; -_loadoutData set ["helmets", []]; - -//Item *set* definitions. These are added in their entirety to unit loadouts. No randomisation is applied. -_loadoutData set ["items_medical_basic", ["BASIC"] call A3A_fnc_itemset_medicalSupplies]; -_loadoutData set ["items_medical_standard", ["STANDARD"] call A3A_fnc_itemset_medicalSupplies]; -_loadoutData set ["items_medical_medic", ["MEDIC"] call A3A_fnc_itemset_medicalSupplies]; -_loadoutData set ["items_miscEssentials", [] call A3A_fnc_itemset_miscEssentials]; - -//Unit type specific item sets. Add or remove these, depending on the unit types in use. -_loadoutData set ["items_squadleader_extras", []]; -_loadoutData set ["items_rifleman_extras", []]; -_loadoutData set ["items_medic_extras", []]; -_loadoutData set ["items_grenadier_extras", []]; -_loadoutData set ["items_explosivesExpert_extras", ["ToolKit", "MineDetector"]]; -_loadoutData set ["items_engineer_extras", ["ToolKit", "MineDetector"]]; -_loadoutData set ["items_lat_extras", []]; -_loadoutData set ["items_at_extras", []]; -_loadoutData set ["items_aa_extras", []]; -_loadoutData set ["items_machineGunner_extras", []]; -_loadoutData set ["items_marksman_extras", []]; -_loadoutData set ["items_sniper_extras", []]; -_loadoutData set ["items_police_extras", []]; -_loadoutData set ["items_crew_extras", []]; -_loadoutData set ["items_unarmed_extras", []]; - -//TODO - ACE overrides for misc essentials, medical and engineer gear - -/////////////////////////////////////// -// Special Forces Loadout Data // -/////////////////////////////////////// - -private _sfLoadoutData = _loadoutData call _fnc_copyLoadoutData; -_sfLoadoutData set ["uniforms", []]; -_sfLoadoutData set ["vests", []]; -_sfLoadoutData set ["backpacks", []]; -_sfLoadoutData set ["helmets", []]; -_sfLoadoutData set ["binoculars", []]; -//["Weapon", "Muzzle", "Rail", "Sight", [], [], "Bipod"]; - -_sfLoadoutData set ["rifles", []]; -_sfLoadoutData set ["carbines", []]; -_sfLoadoutData set ["grenadeLaunchers", []]; -_sfLoadoutData set ["SMGs", []]; -_sfLoadoutData set ["machineGuns", []]; -_sfLoadoutData set ["marksmanRifles", []]; -_sfLoadoutData set ["sniperRifles", []]; -_sfLoadoutData set ["sidearms", []]; -///////////////////////////////// -// Military Loadout Data // -///////////////////////////////// - -private _militaryLoadoutData = _loadoutData call _fnc_copyLoadoutData; -_militaryLoadoutData set ["uniforms", []]; -_militaryLoadoutData set ["vests", []]; -_militaryLoadoutData set ["backpacks", []]; -_militaryLoadoutData set ["helmets", []]; -_militaryLoadoutData set ["binoculars", []]; - -_militaryLoadoutData set ["rifles", []]; -_militaryLoadoutData set ["carbines", []]; -_militaryLoadoutData set ["grenadeLaunchers", []]; -_militaryLoadoutData set ["SMGs", []]; -_militaryLoadoutData set ["machineGuns", []]; -_militaryLoadoutData set ["marksmanRifles", []]; -_militaryLoadoutData set ["sniperRifles", []]; -_militaryLoadoutData set ["sidearms", []]; - -/////////////////////////////// -// Police Loadout Data // -/////////////////////////////// - -private _policeLoadoutData = _loadoutData call _fnc_copyLoadoutData; - -_policeLoadoutData set ["uniforms", []]; -_policeLoadoutData set ["vests", []]; -_policeLoadoutData set ["helmets", []]; - -_policeLoadoutData set ["SMGs", []]; -_policeLoadoutData set ["sidearms", []]; - -//////////////////////////////// -// Militia Loadout Data // -//////////////////////////////// - -private _militiaLoadoutData = _loadoutData call _fnc_copyLoadoutData; -_militiaLoadoutData set ["uniforms", []]; -_militiaLoadoutData set ["vests", []]; -_militiaLoadoutData set ["backpacks", []]; -_militiaLoadoutData set ["helmets", []]; - -_militiaLoadoutData set ["rifles", []]; -_militiaLoadoutData set ["carbines", []]; -_militiaLoadoutData set ["grenadeLaunchers", []]; -_militiaLoadoutData set ["SMGs", []]; -_militiaLoadoutData set ["machineGuns", []]; -_militiaLoadoutData set ["marksmanRifles", []]; -_militiaLoadoutData set ["sidearms", []]; - -////////////////////////// -// Misc Loadouts // -////////////////////////// - -private _crewLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; -_crewLoadoutData set ["uniforms", []]; -_crewLoadoutData set ["vests", []]; -_crewLoadoutData set ["helmets", []]; - -private _pilotLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; -_pilotLoadoutData set ["uniforms", []]; -_pilotLoadoutData set ["vests", []]; -_pilotLoadoutData set ["helmets", []]; - - -///////////////////////////////// -// Unit Type Definitions // -///////////////////////////////// -//These define the loadouts for different unit types. -//For example, rifleman, grenadier, squad leader, etc. -//In 95% of situations, you *should not need to edit these*. -//Almost all factions can be set up just by modifying the loadout data above. -//However, these exist in case you really do want to do a lot of custom alterations. - -private _squadLeaderTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["grenadeLaunchers", "rifles"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - ["primary", 4] call _fnc_addAdditionalMuzzleMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_squadLeader_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 2] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["gpses"] call _fnc_addGPS; - ["binoculars"] call _fnc_addBinoculars; - ["NVGs"] call _fnc_addNVGs; -}; - -private _riflemanTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_rifleman_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 2] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _medicTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_medic"] call _fnc_addItemSet; - ["items_medic_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _grenadierTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["grenadeLaunchers"] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - ["primary", 10] call _fnc_addAdditionalMuzzleMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_grenadier_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 4] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _explosivesExpertTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_grenadier_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - - ["lightExplosives", 2] call _fnc_addItem; - if (random 1 > 0.5) then {["heavyExplosives", 1] call _fnc_addItem;}; - if (random 1 > 0.5) then {["atMines", 1] call _fnc_addItem;}; - if (random 1 > 0.5) then {["apMines", 1] call _fnc_addItem;}; - - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _engineerTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_engineer_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - - if (random 1 > 0.5) then {["lightExplosives", 1] call _fnc_addItem;}; - - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _latTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - [["lightATLaunchers", "ATLaunchers"] call _fnc_fallback] call _fnc_setLauncher; - //TODO - Add a check if it's disposable. - ["launcher", 1] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_lat_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _atTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - [selectRandom ["ATLaunchers", "missileATLaunchers"]] call _fnc_setLauncher; - //TODO - Add a check if it's disposable. - ["launcher", 2] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_at_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _aaTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["AALaunchers"] call _fnc_setLauncher; - //TODO - Add a check if it's disposable. - ["launcher", 2] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_aa_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _machineGunnerTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["machineGuns"] call _fnc_setPrimary; - ["primary", 4] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_machineGunner_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _marksmanTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["marksmanRifles"] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_marksman_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["Rangefinder"] call _fnc_addBinoculars; - ["NVGs"] call _fnc_addNVGs; -}; - -private _sniperTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["sniperRifles"] call _fnc_setPrimary; - ["primary", 7] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_sniper_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["Rangefinder"] call _fnc_addBinoculars; - ["NVGs"] call _fnc_addNVGs; -}; - -private _policeTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["SMGs"] call _fnc_setPrimary; - ["primary", 3] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_police_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; -}; - -private _crewTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - - [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; - ["primary", 3] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_basic"] call _fnc_addItemSet; - ["items_crew_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["gpses"] call _fnc_addGPS; - ["NVGs"] call _fnc_addNVGs; -}; - -private _unarmedTemplate = { - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - - ["items_medical_basic"] call _fnc_addItemSet; - ["items_unarmed_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; -}; - -private _traitorTemplate = { - call _unarmedTemplate; - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; -}; - -//////////////////////////////////////////////////////////////////////////////////////// -// You shouldn't touch below this line unless you really really know what you're doing. -// Things below here can and will break the gamemode if improperly changed. -//////////////////////////////////////////////////////////////////////////////////////// - -///////////////////////////// -// Special Forces Units // -///////////////////////////// -private _prefix = "SF"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Rifleman", _riflemanTemplate], - ["Medic", _medicTemplate, [["medic", true]]], - ["Engineer", _engineerTemplate, [["engineer", true]]], - ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], - ["Grenadier", _grenadierTemplate], - ["LAT", _latTemplate], - ["AT", _atTemplate], - ["AA", _aaTemplate], - ["MachineGunner", _machineGunnerTemplate], - ["Marksman", _marksmanTemplate], - ["Sniper", _sniperTemplate] -]; - -[_prefix, _unitTypes, _sfLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -/*{ - params ["_name", "_loadoutTemplate"]; - private _loadouts = [_sfLoadoutData, _loadoutTemplate] call _fnc_buildLoadouts; - private _finalName = _prefix + _name; - [_finalName, _loadouts] call _fnc_saveToTemplate; -} forEach _unitTypes; -*/ - -/////////////////////// -// Military Units // -/////////////////////// -private _prefix = "military"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Rifleman", _riflemanTemplate], - ["Medic", _medicTemplate, [["medic", true]]], - ["Engineer", _engineerTemplate, [["engineer", true]]], - ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], - ["Grenadier", _grenadierTemplate], - ["LAT", _latTemplate], - ["AT", _atTemplate], - ["AA", _aaTemplate], - ["MachineGunner", _machineGunnerTemplate], - ["Marksman", _marksmanTemplate], - ["Sniper", _sniperTemplate] -]; - -[_prefix, _unitTypes, _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -//////////////////////// -// Police Units // -//////////////////////// -private _prefix = "police"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Standard", _policeTemplate] -]; - -[_prefix, _unitTypes, _policeLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -//////////////////////// -// Militia Units // -//////////////////////// -private _prefix = "militia"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Rifleman", _riflemanTemplate], - ["Medic", _medicTemplate, [["medic", true]]], - ["Engineer", _engineerTemplate, [["engineer", true]]], - ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], - ["Grenadier", _grenadierTemplate], - ["LAT", _latTemplate], - ["AT", _atTemplate], - ["AA", _aaTemplate], - ["MachineGunner", _machineGunnerTemplate], - ["Marksman", _marksmanTemplate], - ["Sniper", _sniperTemplate] -]; - -[_prefix, _unitTypes, _militiaLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -////////////////////// -// Misc Units // -////////////////////// - -//The following lines are determining the loadout of vehicle crew -["other", [["Crew", _crewTemplate]], _crewLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; -//The following lines are determining the loadout of the pilots -["other", [["Pilot", _crewTemplate]], _pilotLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; -//The following lines are determining the loadout for the unit used in the "kill the official" mission -["other", [["Official", _policeTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; -//The following lines are determining the loadout for the AI used in the "kill the traitor" mission -["other", [["Traitor", _traitorTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; diff --git a/A3A/addons/core/Templates/Templates/UNSUNG/Unsung_AI_US_Tropical.sqf b/A3A/addons/core/Templates/Templates/UNSUNG/Unsung_AI_US_Tropical.sqf deleted file mode 100644 index 1eba3880c2..0000000000 --- a/A3A/addons/core/Templates/Templates/UNSUNG/Unsung_AI_US_Tropical.sqf +++ /dev/null @@ -1,733 +0,0 @@ -////////////////////////// -// Side Information // -////////////////////////// - -["name", ""] call _fnc_saveToTemplate; -["spawnMarkerName", ""] call _fnc_saveToTemplate; - -["flag", ""] call _fnc_saveToTemplate; -["flagTexture", ""] call _fnc_saveToTemplate; -["flagMarkerType", ""] call _fnc_saveToTemplate; - -////////////////////////// -// Vehicles // -////////////////////////// - -["ammobox", "B_supplyCrate_F"] call _fnc_saveToTemplate; -["surrenderCrate", "Box_IND_Wps_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type -["equipmentBox", "Box_NATO_Equip_F"] call _fnc_saveToTemplate; //Changeing this from default will require you to define logistics attachement offset for the box type - -["vehiclesBasic", []] call _fnc_saveToTemplate; -["vehiclesLightUnarmed", []] call _fnc_saveToTemplate; -["vehiclesLightArmed",[]] call _fnc_saveToTemplate; -["vehiclesTrucks", []] call _fnc_saveToTemplate; -["vehiclesCargoTrucks", []] call _fnc_saveToTemplate; -["vehiclesAmmoTrucks", []] call _fnc_saveToTemplate; -["vehiclesRepairTrucks", []] call _fnc_saveToTemplate; -["vehiclesFuelTrucks", []] call _fnc_saveToTemplate; -["vehiclesMedical", []] call _fnc_saveToTemplate; -["vehiclesAPCs", []] call _fnc_saveToTemplate; -["vehiclesTanks", []] call _fnc_saveToTemplate; -["vehiclesAA", []] call _fnc_saveToTemplate; -["vehiclesLightAPCs", []] call _fnc_saveToTemplate; //this line determines light APCs -["vehiclesIFVs", []] call _fnc_saveToTemplate; //this line determines IFVs - - -["vehiclesTransportBoats", []] call _fnc_saveToTemplate; -["vehiclesGunBoats", []] call _fnc_saveToTemplate; -["vehiclesAmphibious", []] call _fnc_saveToTemplate; - -["vehiclesPlanesCAS", []] call _fnc_saveToTemplate; -["vehiclesPlanesAA", []] call _fnc_saveToTemplate; -["vehiclesPlanesTransport", []] call _fnc_saveToTemplate; - -["vehiclesHelisLight", []] call _fnc_saveToTemplate; -["vehiclesHelisTransport", []] call _fnc_saveToTemplate; -["vehiclesHelisAttack", []] call _fnc_saveToTemplate; - -["vehiclesArtillery", []] call _fnc_saveToTemplate; -["magazines", createHashMapFromArray []] call _fnc_saveToTemplate; //element format: [Vehicle class, [Magazines]] - -["uavsAttack", []] call _fnc_saveToTemplate; -["uavsPortable", []] call _fnc_saveToTemplate; - -//Config special vehicles -["vehiclesMilitiaLightArmed", []] call _fnc_saveToTemplate; -["vehiclesMilitiaTrucks", []] call _fnc_saveToTemplate; -["vehiclesMilitiaCars", []] call _fnc_saveToTemplate; - -["vehiclesPolice", []] call _fnc_saveToTemplate; - -["staticMGs", []] call _fnc_saveToTemplate; -["staticAT", []] call _fnc_saveToTemplate; -["staticAA", []] call _fnc_saveToTemplate; -["staticMortars", []] call _fnc_saveToTemplate; - -["mortarMagazineHE", ""] call _fnc_saveToTemplate; -["mortarMagazineSmoke", ""] call _fnc_saveToTemplate; - -//Minefield definition -//Not Magazine type would be: ["APERSBoundingMine", "APERSMine", "ATMine"] -["minefieldAT", []] call _fnc_saveToTemplate; -["minefieldAPERS", []] call _fnc_saveToTemplate; - -////////////////////////// -// Loadouts // -////////////////////////// -private _loadoutData = call _fnc_createLoadoutData; -_loadoutData set ["rifles", []]; -_loadoutData set ["carbines", []]; -_loadoutData set ["grenadeLaunchers", []]; -_loadoutData set ["SMGs", []]; -_loadoutData set ["machineGuns", []]; -_loadoutData set ["marksmanRifles", []]; -_loadoutData set ["sniperRifles", []]; - -_loadoutData set ["lightATLaunchers", []]; -_loadoutData set ["ATLaunchers", []]; -_loadoutData set ["missileATLaunchers", []]; -_loadoutData set ["AALaunchers", []]; -_loadoutData set ["sidearms", []]; - -_loadoutData set ["ATMines", []]; -_loadoutData set ["APMines", []]; -_loadoutData set ["lightExplosives", []]; -_loadoutData set ["heavyExplosives", []]; - -_loadoutData set ["antiTankGrenades", []]; -_loadoutData set ["antiInfantryGrenades", []]; -_loadoutData set ["smokeGrenades", []]; - - -//Basic equipment. Shouldn't need touching most of the time. -//Mods might override this, or certain mods might want items removed (No GPSs in WW2, for example) -_loadoutData set ["maps", ["ItemMap"]]; -_loadoutData set ["watches", ["ItemWatch"]]; -_loadoutData set ["compasses", ["ItemCompass"]]; -_loadoutData set ["radios", ["ItemRadio"]]; -_loadoutData set ["gpses", ["ItemGPS"]]; -_loadoutData set ["NVGs", ["NVGoggles_INDEP"]]; -_loadoutData set ["binoculars", ["Binocular"]]; -_loadoutData set ["Rangefinder", ["Rangefinder"]]; - -_loadoutData set ["uniforms", []]; -_loadoutData set ["vests", []]; -_loadoutData set ["backpacks", []]; -_loadoutData set ["longRangeRadios", []]; -_loadoutData set ["helmets", []]; - -//Item *set* definitions. These are added in their entirety to unit loadouts. No randomisation is applied. -_loadoutData set ["items_medical_basic", ["BASIC"] call A3A_fnc_itemset_medicalSupplies]; -_loadoutData set ["items_medical_standard", ["STANDARD"] call A3A_fnc_itemset_medicalSupplies]; -_loadoutData set ["items_medical_medic", ["MEDIC"] call A3A_fnc_itemset_medicalSupplies]; -_loadoutData set ["items_miscEssentials", [] call A3A_fnc_itemset_miscEssentials]; - -//Unit type specific item sets. Add or remove these, depending on the unit types in use. -_loadoutData set ["items_squadleader_extras", []]; -_loadoutData set ["items_rifleman_extras", []]; -_loadoutData set ["items_medic_extras", []]; -_loadoutData set ["items_grenadier_extras", []]; -_loadoutData set ["items_explosivesExpert_extras", ["ToolKit", "MineDetector"]]; -_loadoutData set ["items_engineer_extras", ["ToolKit", "MineDetector"]]; -_loadoutData set ["items_lat_extras", []]; -_loadoutData set ["items_at_extras", []]; -_loadoutData set ["items_aa_extras", []]; -_loadoutData set ["items_machineGunner_extras", []]; -_loadoutData set ["items_marksman_extras", []]; -_loadoutData set ["items_sniper_extras", []]; -_loadoutData set ["items_police_extras", []]; -_loadoutData set ["items_crew_extras", []]; -_loadoutData set ["items_unarmed_extras", []]; - -//TODO - ACE overrides for misc essentials, medical and engineer gear - -/////////////////////////////////////// -// Special Forces Loadout Data // -/////////////////////////////////////// - -private _sfLoadoutData = _loadoutData call _fnc_copyLoadoutData; -_sfLoadoutData set ["uniforms", []]; -_sfLoadoutData set ["vests", []]; -_sfLoadoutData set ["backpacks", []]; -_sfLoadoutData set ["helmets", []]; -_sfLoadoutData set ["binoculars", []]; -//["Weapon", "Muzzle", "Rail", "Sight", [], [], "Bipod"]; - -_sfLoadoutData set ["rifles", []]; -_sfLoadoutData set ["carbines", []]; -_sfLoadoutData set ["grenadeLaunchers", []]; -_sfLoadoutData set ["SMGs", []]; -_sfLoadoutData set ["machineGuns", []]; -_sfLoadoutData set ["marksmanRifles", []]; -_sfLoadoutData set ["sniperRifles", []]; -_sfLoadoutData set ["sidearms", []]; -///////////////////////////////// -// Military Loadout Data // -///////////////////////////////// - -private _militaryLoadoutData = _loadoutData call _fnc_copyLoadoutData; -_militaryLoadoutData set ["uniforms", []]; -_militaryLoadoutData set ["vests", []]; -_militaryLoadoutData set ["backpacks", []]; -_militaryLoadoutData set ["helmets", []]; -_militaryLoadoutData set ["binoculars", []]; - -_militaryLoadoutData set ["rifles", []]; -_militaryLoadoutData set ["carbines", []]; -_militaryLoadoutData set ["grenadeLaunchers", []]; -_militaryLoadoutData set ["SMGs", []]; -_militaryLoadoutData set ["machineGuns", []]; -_militaryLoadoutData set ["marksmanRifles", []]; -_militaryLoadoutData set ["sniperRifles", []]; -_militaryLoadoutData set ["sidearms", []]; - -/////////////////////////////// -// Police Loadout Data // -/////////////////////////////// - -private _policeLoadoutData = _loadoutData call _fnc_copyLoadoutData; - -_policeLoadoutData set ["uniforms", []]; -_policeLoadoutData set ["vests", []]; -_policeLoadoutData set ["helmets", []]; - -_policeLoadoutData set ["SMGs", []]; -_policeLoadoutData set ["sidearms", []]; - -//////////////////////////////// -// Militia Loadout Data // -//////////////////////////////// - -private _militiaLoadoutData = _loadoutData call _fnc_copyLoadoutData; -_militiaLoadoutData set ["uniforms", []]; -_militiaLoadoutData set ["vests", []]; -_militiaLoadoutData set ["backpacks", []]; -_militiaLoadoutData set ["helmets", []]; - -_militiaLoadoutData set ["rifles", []]; -_militiaLoadoutData set ["carbines", []]; -_militiaLoadoutData set ["grenadeLaunchers", []]; -_militiaLoadoutData set ["SMGs", []]; -_militiaLoadoutData set ["machineGuns", []]; -_militiaLoadoutData set ["marksmanRifles", []]; -_militiaLoadoutData set ["sidearms", []]; - -////////////////////////// -// Misc Loadouts // -////////////////////////// - -private _crewLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; -_crewLoadoutData set ["uniforms", []]; -_crewLoadoutData set ["vests", []]; -_crewLoadoutData set ["helmets", []]; - -private _pilotLoadoutData = _militaryLoadoutData call _fnc_copyLoadoutData; -_pilotLoadoutData set ["uniforms", []]; -_pilotLoadoutData set ["vests", []]; -_pilotLoadoutData set ["helmets", []]; - - -///////////////////////////////// -// Unit Type Definitions // -///////////////////////////////// -//These define the loadouts for different unit types. -//For example, rifleman, grenadier, squad leader, etc. -//In 95% of situations, you *should not need to edit these*. -//Almost all factions can be set up just by modifying the loadout data above. -//However, these exist in case you really do want to do a lot of custom alterations. - -private _squadLeaderTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["grenadeLaunchers", "rifles"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - ["primary", 4] call _fnc_addAdditionalMuzzleMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_squadLeader_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 2] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["gpses"] call _fnc_addGPS; - ["binoculars"] call _fnc_addBinoculars; - ["NVGs"] call _fnc_addNVGs; -}; - -private _riflemanTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_rifleman_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 2] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _medicTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_medic"] call _fnc_addItemSet; - ["items_medic_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _grenadierTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["grenadeLaunchers"] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - ["primary", 10] call _fnc_addAdditionalMuzzleMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_grenadier_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 4] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _explosivesExpertTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_grenadier_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - - ["lightExplosives", 2] call _fnc_addItem; - if (random 1 > 0.5) then {["heavyExplosives", 1] call _fnc_addItem;}; - if (random 1 > 0.5) then {["atMines", 1] call _fnc_addItem;}; - if (random 1 > 0.5) then {["apMines", 1] call _fnc_addItem;}; - - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _engineerTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_engineer_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - - if (random 1 > 0.5) then {["lightExplosives", 1] call _fnc_addItem;}; - - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _latTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - [["lightATLaunchers", "ATLaunchers"] call _fnc_fallback] call _fnc_setLauncher; - //TODO - Add a check if it's disposable. - ["launcher", 1] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_lat_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _atTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - [selectRandom ["ATLaunchers", "missileATLaunchers"]] call _fnc_setLauncher; - //TODO - Add a check if it's disposable. - ["launcher", 2] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_at_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _aaTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - [selectRandom ["rifles", "carbines"]] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["AALaunchers"] call _fnc_setLauncher; - //TODO - Add a check if it's disposable. - ["launcher", 2] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_aa_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _machineGunnerTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["machineGuns"] call _fnc_setPrimary; - ["primary", 4] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_machineGunner_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["NVGs"] call _fnc_addNVGs; -}; - -private _marksmanTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["marksmanRifles"] call _fnc_setPrimary; - ["primary", 5] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_marksman_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["Rangefinder"] call _fnc_addBinoculars; - ["NVGs"] call _fnc_addNVGs; -}; - -private _sniperTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["sniperRifles"] call _fnc_setPrimary; - ["primary", 7] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_sniper_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["antiInfantryGrenades", 1] call _fnc_addItem; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["Rangefinder"] call _fnc_addBinoculars; - ["NVGs"] call _fnc_addNVGs; -}; - -private _policeTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - ["backpacks"] call _fnc_setBackpack; - - ["SMGs"] call _fnc_setPrimary; - ["primary", 3] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_standard"] call _fnc_addItemSet; - ["items_police_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["smokeGrenades", 1] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; -}; - -private _crewTemplate = { - ["helmets"] call _fnc_setHelmet; - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - - [selectRandom ["carbines", "SMGs"]] call _fnc_setPrimary; - ["primary", 3] call _fnc_addMagazines; - - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; - - ["items_medical_basic"] call _fnc_addItemSet; - ["items_crew_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - ["smokeGrenades", 2] call _fnc_addItem; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; - ["gpses"] call _fnc_addGPS; - ["NVGs"] call _fnc_addNVGs; -}; - -private _unarmedTemplate = { - ["vests"] call _fnc_setVest; - ["uniforms"] call _fnc_setUniform; - - ["items_medical_basic"] call _fnc_addItemSet; - ["items_unarmed_extras"] call _fnc_addItemSet; - ["items_miscEssentials"] call _fnc_addItemSet; - - ["maps"] call _fnc_addMap; - ["watches"] call _fnc_addWatch; - ["compasses"] call _fnc_addCompass; - ["radios"] call _fnc_addRadio; -}; - -private _traitorTemplate = { - call _unarmedTemplate; - ["sidearms"] call _fnc_setHandgun; - ["handgun", 2] call _fnc_addMagazines; -}; - -//////////////////////////////////////////////////////////////////////////////////////// -// You shouldn't touch below this line unless you really really know what you're doing. -// Things below here can and will break the gamemode if improperly changed. -//////////////////////////////////////////////////////////////////////////////////////// - -///////////////////////////// -// Special Forces Units // -///////////////////////////// -private _prefix = "SF"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Rifleman", _riflemanTemplate], - ["Medic", _medicTemplate, [["medic", true]]], - ["Engineer", _engineerTemplate, [["engineer", true]]], - ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], - ["Grenadier", _grenadierTemplate], - ["LAT", _latTemplate], - ["AT", _atTemplate], - ["AA", _aaTemplate], - ["MachineGunner", _machineGunnerTemplate], - ["Marksman", _marksmanTemplate], - ["Sniper", _sniperTemplate] -]; - -[_prefix, _unitTypes, _sfLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -/*{ - params ["_name", "_loadoutTemplate"]; - private _loadouts = [_sfLoadoutData, _loadoutTemplate] call _fnc_buildLoadouts; - private _finalName = _prefix + _name; - [_finalName, _loadouts] call _fnc_saveToTemplate; -} forEach _unitTypes; -*/ - -/////////////////////// -// Military Units // -/////////////////////// -private _prefix = "military"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Rifleman", _riflemanTemplate], - ["Medic", _medicTemplate, [["medic", true]]], - ["Engineer", _engineerTemplate, [["engineer", true]]], - ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], - ["Grenadier", _grenadierTemplate], - ["LAT", _latTemplate], - ["AT", _atTemplate], - ["AA", _aaTemplate], - ["MachineGunner", _machineGunnerTemplate], - ["Marksman", _marksmanTemplate], - ["Sniper", _sniperTemplate] -]; - -[_prefix, _unitTypes, _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -//////////////////////// -// Police Units // -//////////////////////// -private _prefix = "police"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Standard", _policeTemplate] -]; - -[_prefix, _unitTypes, _policeLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -//////////////////////// -// Militia Units // -//////////////////////// -private _prefix = "militia"; -private _unitTypes = [ - ["SquadLeader", _squadLeaderTemplate], - ["Rifleman", _riflemanTemplate], - ["Medic", _medicTemplate, [["medic", true]]], - ["Engineer", _engineerTemplate, [["engineer", true]]], - ["ExplosivesExpert", _explosivesExpertTemplate, [["explosiveSpecialist", true]]], - ["Grenadier", _grenadierTemplate], - ["LAT", _latTemplate], - ["AT", _atTemplate], - ["AA", _aaTemplate], - ["MachineGunner", _machineGunnerTemplate], - ["Marksman", _marksmanTemplate], - ["Sniper", _sniperTemplate] -]; - -[_prefix, _unitTypes, _militiaLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; - -////////////////////// -// Misc Units // -////////////////////// - -//The following lines are determining the loadout of vehicle crew -["other", [["Crew", _crewTemplate]], _crewLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; -//The following lines are determining the loadout of the pilots -["other", [["Pilot", _crewTemplate]], _pilotLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; -//The following lines are determining the loadout for the unit used in the "kill the official" mission -["other", [["Official", _policeTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; -//The following lines are determining the loadout for the AI used in the "kill the traitor" mission -["other", [["Traitor", _traitorTemplate]], _militaryLoadoutData] call _fnc_generateAndSaveUnitsToTemplate; diff --git a/A3A/addons/core/Templates/fn_detector.sqf b/A3A/addons/core/Templates/fn_detector.sqf index 95e95d063e..f511c554ac 100644 --- a/A3A/addons/core/Templates/fn_detector.sqf +++ b/A3A/addons/core/Templates/fn_detector.sqf @@ -24,6 +24,7 @@ A3A_hasD3S = false; A3A_hasRDS = false; A3A_hasKAT = false; A3A_hasCUP = false; +A3A_hasUNS = false; //Actual Detection //IFA Detection @@ -35,6 +36,9 @@ if (isClass (configFile >> "CfgPatches" >> "LIB_Core")) then { ["modUnautorized",false,1,false,false] call BIS_fnc_endMission; }; +//Unsung Detection +if (isClass (configfile >> "CfgFactionClasses" >> "UNSUNG_W")) then {A3A_hasUNS = true; Info("Unsung Detected.") }; + //RHS Detection if (isClass (configFile >> "CfgFactionClasses" >> "rhs_faction_vdv") && isClass (configFile >> "CfgFactionClasses" >> "rhs_faction_usarmy") && isClass (configFile >> "CfgFactionClasses" >> "rhsgref_faction_tla")) then { A3A_hasRHS = true; @@ -85,5 +89,5 @@ if (isClass (configfile >> "CfgVehicles" >> "d3s_baumaschinen")) then {A3A_hasD3 if (isClass (configfile >> "CfgPatches" >> "rds_A2_Civilians")) then {A3A_hasRDS = true; Info("RDS Cars Detected.") }; //No Mods found logging -if (!A3A_hasRHS && !A3A_hasFFAA && !A3A_hasIFA && !A3A_has3CBBAF) then { Info("No Side Replacement Mods Detected.") }; +if (!A3A_hasRHS && !A3A_hasFFAA && !A3A_hasIFA && !A3A_has3CBBAF && !A3A_hasUNS) then { Info("No Side Replacement Mods Detected.") }; if (!A3A_hasIvory && !A3A_hasTCGM && !A3A_hasADV && !A3A_hasKAT) then { Info("No Addon Mods Detected.") }; diff --git a/A3A/addons/core/functions/Ammunition/fn_categoryOverrides.sqf b/A3A/addons/core/functions/Ammunition/fn_categoryOverrides.sqf index dc8ffae099..710f5401fc 100644 --- a/A3A/addons/core/functions/Ammunition/fn_categoryOverrides.sqf +++ b/A3A/addons/core/functions/Ammunition/fn_categoryOverrides.sqf @@ -203,6 +203,68 @@ private _categoryOverrideTable = [ ["vn_l2a1_01", ["MachineGuns","Weapons"]], ["vn_f1_smg", ["SMGs","Weapons"]], +//Unsung +["Uns_HMG", ["Unknown","Weapons"]], +["uns_m127a1_flare", ["Unknown","Weapons"]], // flare launcher secondary +["uns_ithaca37", ["Shotguns","Weapons"]], +["uns_ithaca37_grip", ["Shotguns","Weapons"]], +["uns_m1897", ["Shotguns","Weapons"]], +["uns_m1897riot", ["Shotguns","Weapons"]], +["uns_model12", ["Shotguns","Weapons"]], +["uns_baikal", ["Shotguns","Weapons"]], +["uns_baikal_sawnoff", ["Shotguns","Weapons"]], +["uns_m870", ["Shotguns","Weapons"]], +["uns_m870_mk1", ["Shotguns","Weapons"]], +["uns_M16A1_HBAR", ["MachineGuns","Weapons"]], +["uns_M63a_drum", ["MachineGuns","Weapons"]], +["uns_M63a_LMG", ["MachineGuns","Weapons"]], +["uns_m63asupport", ["MachineGuns","Weapons"]], +["uns_akms_drum", ["MachineGuns","Weapons"]], +["uns_akmsf_drum", ["MachineGuns","Weapons"]], +["uns_akm_drum", ["MachineGuns","Weapons"]], +["uns_m79", ["GrenadeLaunchers","Weapons"]], +["uns_ex41", ["GrenadeLaunchers","Weapons"]], +["uns_STG_44", ["Rifles","Weapons"]], +["uns_akmsf", ["Rifles","Weapons"]], +["uns_akms", ["Rifles","Weapons"]], +["uns_akm", ["Rifles","Weapons"]], +["uns_ak47_52", ["Rifles","Weapons"]], +["uns_ak47_49", ["Rifles","Weapons"]], +["uns_sa58vf", ["Rifles","Weapons"]], +["uns_sa58v", ["Rifles","Weapons"]], +["uns_sa58p_camo", ["Rifles","Weapons"]], +["uns_sa58p", ["Rifles","Weapons"]], +["uns_type56", ["Rifles","Weapons"]], +["uns_aks47f", ["Rifles","Weapons"]], +["uns_aks47", ["Rifles","Weapons"]], +["uns_ak47", ["Rifles","Weapons"]], +["uns_m1carbine", ["Rifles","Weapons"]], +["uns_m1carbine_pouch", ["Rifles","Weapons"]], +["uns_m1carbine_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_m1carbine_pouch_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_m2carbine", ["Rifles","Weapons"]], +["uns_m2carbine_shorty", ["Rifles","Weapons"]], +["uns_m2carbine_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_m3carbine", ["Rifles","Weapons"]], +["uns_m1garand", ["Rifles","Weapons"]], +["uns_m1garand_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_m14", ["Rifles","Weapons"]], +["uns_l1a1", ["Rifles","Weapons"]], +["uns_l1a1_enfield", ["Rifles","Weapons"]], +["uns_l1a1_blk", ["Rifles","Weapons"]], +["uns_l2a1", ["Rifles","Weapons"]], +["uns_l2a1_shorty", ["Rifles","Weapons"]], +["uns_l1a1gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_sks", ["Rifles","Weapons"]], +["uns_mas36", ["Rifles","Weapons"]], +["uns_mas36_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_mas36short", ["Rifles","Weapons"]], +["uns_mas36short_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_type99", ["Rifles","Weapons"]], +["uns_type99_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_mas4956", ["Rifles","Weapons"]], +["uns_mas4956_gl", ["Rifles","Weapons","GrenadeLaunchers"]], +["uns_m72used", ["Unknown","Weapons"]], //ACRE Radios //Using Gadgets instead of Radios to prevent future issues as they don't use the Radio Slot ["ACRE_PRC148", ["Gadgets","items"]], diff --git a/A3A/addons/core/functions/Ammunition/fn_equipmentIsValidForCurrentModset.sqf b/A3A/addons/core/functions/Ammunition/fn_equipmentIsValidForCurrentModset.sqf index adc28a58e4..c50517fe40 100644 --- a/A3A/addons/core/functions/Ammunition/fn_equipmentIsValidForCurrentModset.sqf +++ b/A3A/addons/core/functions/Ammunition/fn_equipmentIsValidForCurrentModset.sqf @@ -107,7 +107,32 @@ if (A3A_hasVN && {(_itemIsVanilla || _itemMod in _acemods || _itemMod in _TFARmo default { true }; }; }; - +if (A3A_hasUNS && {(_itemIsVanilla || _itemMod in _acemods || _itemMod in _TFARmods)}) exitWith { + switch (_categories select 0) do { + case "Item": { + switch (_categories select 1) do { + case "AccessoryMuzzle"; + case "AccessoryPointer"; + case "AccessorySights"; + case "AccessoryBipod"; + case "Binocular"; + case "GPS"; + case "LaserDesignator"; + case "MineDetector"; + case "NVGoggles"; + case "Radio"; + case "UAVTerminal"; + case "Unknown": { false }; + default { true }; + }; + }; + case "Weapon"; + case "Equipment"; + case "Magazine"; + case "Mine": { false }; + default { true }; + }; +}; //no other CDLC content when using VN if (A3A_hasVN && {toLower _itemMod isNotEqualTo "vn"} && {toLower _itemMod in (allCDLC apply {toLower (_x#1)})}) exitWith {false}; diff --git a/A3A/addons/core/functions/Ammunition/fn_equipmentSort.sqf b/A3A/addons/core/functions/Ammunition/fn_equipmentSort.sqf index 993f7a7509..715036fc6d 100644 --- a/A3A/addons/core/functions/Ammunition/fn_equipmentSort.sqf +++ b/A3A/addons/core/functions/Ammunition/fn_equipmentSort.sqf @@ -101,6 +101,9 @@ If (A3A_hasTFAR || A3A_hasTFARBeta) then { } forEach allBackpacksEmpty; { allBackpacksEmpty deleteAt _x } forEach _backpacksToDelete; // Removes Radios from allBackpacksEmpty }; +//Autodetection fails on Unsung Radio Backpacks +if (A3A_hasUNS) then {allBackpacksRadio = ["UNS_NVA_RTO", "UNS_ARMY_RTO", "UNS_ARMY_RTO2", "UNS_SF_RTO", "UNS_SF_RTO2", "uns_sas_alicepack_RTO", "uns_sas_alicepack_RTO", "UNS_Alice_FR", "UNS_USMC_RTO", "UNS_USMC_RTO2"]}; + ///////////////// // UAVTerminal // ///////////////// diff --git a/A3A/addons/core/functions/Base/fn_setPlaneLoadout.sqf b/A3A/addons/core/functions/Base/fn_setPlaneLoadout.sqf index 8580d4d803..70276e104a 100644 --- a/A3A/addons/core/functions/Base/fn_setPlaneLoadout.sqf +++ b/A3A/addons/core/functions/Base/fn_setPlaneLoadout.sqf @@ -158,6 +158,38 @@ if (_type == "CAS") then _plane setVariable ["rocketLauncher", ["CUP_Vmlauncher_CRV7_veh"]]; _plane setVariable ["missileLauncher", ["CUP_Vmlauncher_AGM65pod_veh"]]; }; + //Unsung + case "uns_Mig21_CAS": + { + _loadout = ["","","uns_pylonRack_32Rnd_Rocket_57_HE","uns_pylonRack_32Rnd_Rocket_57_HE","uns_pylonRack_1Rnd_Bomb_kab500","uns_pylonRack_1Rnd_Bomb_kab500","uns_pylonRack_96Rnd_Rocket_57_HE"]; + _plane setVariable ["mainGun", "uns_NR30"]; + _plane setVariable ["rocketLauncher", ["uns_57mmLauncher_dl"]]; + }; + case "uns_A1J_CAS": + { + _loadout = ["uns_pylonRack_1Rnd_Rocket_HVAR_AT","uns_pylonRack_1Rnd_Rocket_HVAR_AT","uns_pylonRack_1Rnd_Rocket_HVAR_AT","uns_pylonRack_1Rnd_Rocket_HVAR_AT","uns_pylonRack_1Rnd_Rocket_HVAR_AT","uns_pylonRack_1Rnd_Rocket_HVAR_AT","uns_pylonRack_1Rnd_Bomb_MK82","uns_pylonRack_1Rnd_Bomb_MK82","uns_pylonRack_1Rnd_Bomb_MK82","uns_pylonRack_1Rnd_Bomb_MK82","uns_pylonRack_19Rnd_Rocket_FFAR_HEAT","uns_pylonRack_19Rnd_Rocket_FFAR_HEAT","uns_pylonRack_19Rnd_Rocket_FFAR_HEAT","uns_pylonRack_19Rnd_Rocket_FFAR_HEAT","uns_pylonRack_1Rnd_fuel_A1"]; + _plane setVariable ["mainGun", "uns_Uns_M2_4x20mmNR30"]; + _plane setVariable ["rocketLauncher", ["Uns_FFAR_HEAT_Launcher_dl", "Uns_HVARLauncher_dl"]]; + }; + case "uns_A7_CAS": + { + _loadout = ["uns_pylonRack_19Rnd_Rocket_FFAR_WP","uns_pylonRack_19Rnd_Rocket_FFAR_WP","uns_pylonRack_1Rnd_AGM12","uns_pylonRack_1Rnd_AGM12","uns_pylonRack_19Rnd_Rocket_FFAR_HEAT","uns_pylonRack_19Rnd_Rocket_FFAR_HEAT","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E"]; + _plane setVariable ["mainGun", "uns_M61A1"]; + _plane setVariable ["rocketLauncher", ["Uns_FFAR_WP_Launcher_dl", "Uns_FFAR_HEAT_Launcher_dl"]]; + _plane setVariable ["missileLauncher", ["uns_AGM12_Launcher_dl"]]; + }; + case "uns_A6_Intruder_CAS": + { + _loadout = ["uns_pylonRack_12Rnd_Rocket_Zuni_AT","uns_pylonRack_12Rnd_Rocket_Zuni_AT","uns_pylonRack_1Rnd_AGM12","uns_pylonRack_1Rnd_AGM12","uns_pylonRack_1Rnd_AGM12"]; + _plane setVariable ["rocketLauncher", ["Uns_ZuniLauncher_dl", "Uns_HVARLauncher_dl"]]; + _plane setVariable ["missileLauncher", ["uns_AGM12_Launcher_dl"]]; + }; + case "uns_F4J_CAS": + { + _loadout = ["uns_pylonRack_1Rnd_AGM12","uns_pylonRack_1Rnd_AGM12","uns_pylonRack_f4_38Rnd_Rocket_FFAR_HEAT","uns_pylonRack_f4_38Rnd_Rocket_FFAR_HEAT","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AGM12"]; + _plane setVariable ["rocketLauncher", ["Uns_FFAR_HEAT_Launcher_dl"]]; + _plane setVariable ["missileLauncher", ["uns_AGM12_Launcher_dl"]]; + }; default { Error_1("Plane type %1 currently not supported for CAS, please add the case!", typeOf _plane); @@ -271,6 +303,20 @@ if (_type == "AA") then { _loadout = ["CUP_PylonPod_1Rnd_AIM_9L_LAU_Sidewinder_M","CUP_PylonPod_1Rnd_AIM_9L_LAU_Sidewinder_M","CUP_PylonPod_1Rnd_AIM_120_AMRAAM_M","CUP_PylonPod_1Rnd_AIM_120_AMRAAM_M","CUP_PylonPod_2Rnd_AIM_120_AMRAAM_M","CUP_PylonPod_2Rnd_AIM_120_AMRAAM_M"]; }; + //Unsung + case "uns_f100b_CAP": + { + _loadout = ["uns_pylonRack_1Rnd_AIM9D","uns_pylonRack_1Rnd_AIM9D","uns_pylonRack_1Rnd_fuel_f100","uns_pylonRack_1Rnd_fuel_f100","uns_pylonRack_1Rnd_AIM9D","uns_pylonRack_1Rnd_AIM9D","uns_pylonRack_1Rnd_fuel_f100"]; + }; + case "uns_F4E_CAP": + { + _loadout = ["uns_pylonRack_1Rnd_fuel_f4","uns_pylonRack_1Rnd_fuel_f4","","","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM9E","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_AIM7","uns_pylonRack_1Rnd_fuel_f4"]; + }; + case "uns_Mig21_CAP": + { + _loadout = ["uns_pylonRack_1Rnd_K13","uns_pylonRack_1Rnd_K13","uns_pylonRack_1Rnd_K13","uns_pylonRack_1Rnd_K13","uns_pylonRack_1rnd_fuel_mig21","uns_pylonRack_1rnd_fuel_mig21","uns_pylonRack_1rnd_fuel_mig21"]; + + }; default { Error_1("Plane type %1 currently not supported for AA, please add the case!", typeOf _plane); diff --git a/A3A/addons/core/functions/Logistics/functions/fn_logistics_tryLoad.sqf b/A3A/addons/core/functions/Logistics/functions/fn_logistics_tryLoad.sqf index 60cf5e67a2..c5ebd04bf5 100644 --- a/A3A/addons/core/functions/Logistics/functions/fn_logistics_tryLoad.sqf +++ b/A3A/addons/core/functions/Logistics/functions/fn_logistics_tryLoad.sqf @@ -23,7 +23,7 @@ params ["_cargo"]; #include "..\..\..\script_component.hpp" FIX_LINE_NUMBERS() -private _vehicles = (nearestObjects [_cargo,["Car","Ship","Tank"], 10]) - [_cargo]; +private _vehicles = (nearestObjects [_cargo,["Car","Ship","Tank","Helicopter"], 10]) - [_cargo]; private _vehicle = _vehicles#0; if (isNil "_vehicle") exitWith {["Logistics", "No vehicle is close enough."] remoteExec ["A3A_fnc_customHint", remoteExecutedOwner]};