From 9b1500ced7fa3f84b919815d22f37b5b94eecf8f Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 10:43:00 +0100 Subject: [PATCH 01/42] Faction colors and sides moved to preInit of init module --- .../modules/00_init/fnc/fn_init_preInit.sqf | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf index dd447bea5..2c788119a 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf @@ -4,7 +4,7 @@ File: fn_init_preInit.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-08-31 - Last Update: 2018-11-24 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -52,6 +52,18 @@ if (isServer) then { // Variable for ending the campaign KPLIB_campaignRunning = true; +// Enemy side color +KPLIB_colorEnemy = "ColorEAST"; +// Enemy side color (active) +KPLIB_colorEnemyAct = "ColorRed"; +// Friendly side color +KPLIB_colorPlayers = "ColorWEST"; +// Friendly side color (active) +KPLIB_colorPlayersAct = "ColorBlue"; +// Resistance side color +KPLIB_colorResistance = "ColorGUER"; +// Resistance side color (active) +KPLIB_colorResistanceAct = "ColorGreen"; // Respawn position shortcut KPLIB_eden_respawnPos = getMarkerPos "respawn"; // Squad names for the buildable squads @@ -93,6 +105,12 @@ KPLIB_sectors_military = []; KPLIB_sectors_spawn = []; // All radiotowers KPLIB_sectors_tower = []; +// Enemy side +KPLIB_sideEnemy = east; +// Player side +KPLIB_sidePlayer = west; +// Resistance side +KPLIB_sideResistance = resistance; // Zero position shortcut KPLIB_zeroPos = [0,0,0]; From 4526a3f392a5d0d4fda765d570e837a04f1ed487 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 12:54:23 +0100 Subject: [PATCH 02/42] Renamed preset macros Thanks to @zharf for the input. --- Missionframework/presets/armies/script_component.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Missionframework/presets/armies/script_component.hpp b/Missionframework/presets/armies/script_component.hpp index cf0a588a5..f2c7f0427 100644 --- a/Missionframework/presets/armies/script_component.hpp +++ b/Missionframework/presets/armies/script_component.hpp @@ -4,7 +4,7 @@ File: script_component.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-23 - Last Update: 2018-11-25 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -24,14 +24,14 @@ missionnamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] // Creates a KPLIB preset array -#define KPLIB_PRST_AR_CREATE(ARRAYNAME)\ +#define KPLIB_PRST_CAT_BEGIN(ARRAYNAME)\ missionnamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; // Adds a classname to a preset array with resource costs -#define KPLIB_PRST_AR_ADD(ARRAYNAME, UNITCLASS, RESSUPPLY, RESAMMO, RESFUEL)\ +#define KPLIB_PRST_CAT_ADD(ARRAYNAME, UNITCLASS, RESSUPPLY, RESAMMO, RESFUEL)\ (KPLIB_PRST_GETVAR(ARRAYNAME)) pushBack [UNITCLASS, RESSUPPLY, RESAMMO, RESFUEL] // Creates a plain classname array from a preset array with building costs -#define KPLIB_PRST_AR_PLAIN(ARRAYOLD, ARRAYNEW)\ - KPLIB_PRST_AR_CREATE(ARRAYNEW);\ - {(KPLIB_PRST_GETVAR(ARRAYNEW)) pushBack (_X select 0);} forEach (KPLIB_PRST_GETVAR(ARRAYOLD)) +#define KPLIB_PRST_CAT_END(ARRAYNAME)\ + KPLIB_PRST_CAT_BEGIN(ARRAYNAME + "Pl");\ + {(KPLIB_PRST_GETVAR(ARRAYNAME + "Pl")) pushBack (_X select 0);} forEach (KPLIB_PRST_GETVAR(ARRAYNAME)) From d2032c2900f2c90752b4e99e6a7856af84769737 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 14:29:14 +0100 Subject: [PATCH 03/42] Adjustments in macros and categories --- Missionframework/presets/armies/csat.sqf | 388 +++++++++-------- .../presets/armies/customEast.sqf | 388 +++++++++-------- .../presets/armies/customWest.sqf | 404 +++++++++--------- Missionframework/presets/armies/nato.sqf | 404 +++++++++--------- 4 files changed, 808 insertions(+), 776 deletions(-) diff --git a/Missionframework/presets/armies/csat.sqf b/Missionframework/presets/armies/csat.sqf index a64fb5e08..6c4f13a92 100644 --- a/Missionframework/presets/armies/csat.sqf +++ b/Missionframework/presets/armies/csat.sqf @@ -5,7 +5,7 @@ File: csat.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-17 - Last Update: 2018-12-02 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -17,25 +17,22 @@ Optional Mods: - None */ + params [ ["_isFriendly", false, [false]] ]; + /*------------------------------------------------------------ --- GENERAL SETTINGS --- General stuff like side and colors. ------------------------------------------------------------*/ -// Color for this side -KPLIB_PRST_SETVAR("color", "ColorEast"); -// Color for this side (active) -KPLIB_PRST_SETVAR("colorAct", "ColorRed"); // Name of the used/created army in this preset KPLIB_PRST_SETVAR("name", "CSAT"); -// Side for this preset -KPLIB_PRST_SETVAR("side", east); + // Military alphabet -KPLIB_PRST_AR_CREATE("alphabet"); +KPLIB_PRST_CAT_BEGIN("alphabet"); (KPLIB_PRST_GETVAR("alphabet")) pushBack "Alpha"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Bravo"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Charlie"; @@ -120,9 +117,12 @@ KPLIB_PRST_SETVAR("mortar", "O_Mortar_01_F"); KPLIB_PRST_SETVAR("staticAa", "O_static_AA_F"); // Static Big AA Classname KPLIB_PRST_SETVAR("staticAaBig", "O_SAM_System_04_F"); +// Static Big AA Radar Classname +KPLIB_PRST_SETVAR("staticAaBigRadar", "O_Radar_System_02_F"); // Static AT Classname KPLIB_PRST_SETVAR("staticAt", "O_static_AT_F"); + /*------------------------------------------------------------ --- REGULAR SOLDIER CLASSNAMES --- Classnames of the different regular soldier types. @@ -203,216 +203,224 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "O_V_Soldier_TL_hex_F"); --- BUILDABLE OBJECTS ARRAYS --- The arrays below are used to determine what can be build. Format: "classname", supplies, ammunition, fuel - Example: KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); + Example: KPLIB_PRST_CAT_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); The above example adds the NATO Hunter MRAP to the light vehicles list with the costs of 100 supplies, 0 ammunition and 50 fuel. ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_AR_CREATE("soldiers"); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_AR_PLAIN("soldiers", "soldiersPl"); +KPLIB_PRST_CAT_BEGIN("soldiers"); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("soldiers"); // Special Forces units -KPLIB_PRST_AR_CREATE("specOps"); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); -KPLIB_PRST_AR_PLAIN("specOps", "specOpsPl"); - -// Light vehicles -KPLIB_PRST_AR_CREATE("lVeh"); -KPLIB_PRST_AR_ADD("lVeh", "O_Quadbike_01_F", 50, 0, 25); // Quadbike -KPLIB_PRST_AR_ADD("lVeh", "O_LSV_02_unarmed_F", 75, 0, 50); // Qilin -KPLIB_PRST_AR_ADD("lVeh", "O_LSV_02_armed_F", 75, 40, 50); // Qilin (HMG) -KPLIB_PRST_AR_ADD("lVeh", "O_LSV_02_AT_F", 75, 50, 50); // Qilin (AT) -KPLIB_PRST_AR_ADD("lVeh", "O_MRAP_02_F", 100, 0, 50); // Ifrit -KPLIB_PRST_AR_ADD("lVeh", "O_MRAP_02_hmg_F", 100, 40, 50); // Ifrit (HMG) -KPLIB_PRST_AR_ADD("lVeh", "O_MRAP_02_gmg_F", 100, 60, 50); // Ifrit (GMG) -KPLIB_PRST_AR_PLAIN("lVeh", "lVehPl"); +KPLIB_PRST_CAT_BEGIN("specOps"); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); +KPLIB_PRST_CAT_END("specOps"); + +// Light vehicles (unarmed) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "O_Quadbike_01_F", 50, 0, 25); // Quadbike +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "O_LSV_02_unarmed_F", 75, 0, 50); // Qilin +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "O_MRAP_02_F", 100, 0, 50); // Ifrit +KPLIB_PRST_CAT_END("vehLightUnarmed"); + +// Light vehicles (armed) +KPLIB_PRST_CAT_BEGIN("vehLightArmed"); +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_LSV_02_armed_F", 75, 40, 50); // Qilin (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_LSV_02_AT_F", 75, 50, 50); // Qilin (AT) +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_MRAP_02_hmg_F", 100, 40, 50); // Ifrit (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_MRAP_02_gmg_F", 100, 60, 50); // Ifrit (GMG) +KPLIB_PRST_CAT_END("vehLightArmed"); // Transport trucks -KPLIB_PRST_AR_CREATE("transports"); -KPLIB_PRST_AR_ADD("transports", "O_Truck_03_transport_F", 125, 0, 75); // Tempest Transport -KPLIB_PRST_AR_ADD("transports", "O_Truck_03_covered_F", 125, 0, 75); // Tempest Transport (Covered) -KPLIB_PRST_AR_PLAIN("transports", "transportsPl"); +KPLIB_PRST_CAT_BEGIN("vehTrans"); +KPLIB_PRST_CAT_ADD("vehTrans", "O_Truck_03_transport_F", 125, 0, 75); // Tempest Transport +KPLIB_PRST_CAT_ADD("vehTrans", "O_Truck_03_covered_F", 125, 0, 75); // Tempest Transport (Covered) +KPLIB_PRST_CAT_END("vehTrans"); // Boats -KPLIB_PRST_AR_CREATE("boats"); -KPLIB_PRST_AR_ADD("boats", "O_Boat_Transport_01_F", 100, 0, 25); // Assault Boat -KPLIB_PRST_AR_ADD("boats", "O_Boat_Armed_01_hmg_F", 200, 80, 75); // Speedboat with Minigun -KPLIB_PRST_AR_ADD("boats", "O_SDV_01_F", 150, 0, 50); // SDV -KPLIB_PRST_AR_PLAIN("boats", "boatsPl"); +KPLIB_PRST_CAT_BEGIN("boats"); +KPLIB_PRST_CAT_ADD("boats", "O_Boat_Transport_01_F", 100, 0, 25); // Assault Boat +KPLIB_PRST_CAT_ADD("boats", "O_Boat_Armed_01_hmg_F", 200, 80, 75); // Speedboat with Minigun +KPLIB_PRST_CAT_ADD("boats", "O_SDV_01_F", 150, 0, 50); // SDV +KPLIB_PRST_CAT_END("boats"); + +// APCs +KPLIB_PRST_CAT_BEGIN("vehHeavyApc"); +KPLIB_PRST_CAT_ADD("vehHeavyApc", "O_APC_Wheeled_02_rcws_v2_F", 200, 75, 125); // MSE-3 Marid +KPLIB_PRST_CAT_ADD("vehHeavyApc", "O_APC_Tracked_02_cannon_F", 300, 100, 150); // BTR-K Kamysh +KPLIB_PRST_CAT_END("vehHeavyApc"); // Heavy vehicles -KPLIB_PRST_AR_CREATE("hVeh"); -KPLIB_PRST_AR_ADD("hVeh", "O_APC_Wheeled_02_rcws_v2_F", 200, 75, 125); // MSE-3 Marid -KPLIB_PRST_AR_ADD("hVeh", "O_APC_Tracked_02_cannon_F", 300, 100, 150); // BTR-K Kamysh -KPLIB_PRST_AR_ADD("hVeh", "O_MBT_02_cannon_F", 300, 250, 180); // T-100 Varsuk -KPLIB_PRST_AR_ADD("hVeh", "O_MBT_04_cannon_F", 400, 300, 200); // T-140 Angara -KPLIB_PRST_AR_ADD("hVeh", "O_MBT_04_command_F", 500, 350, 225); // T-140K Angara -KPLIB_PRST_AR_PLAIN("hVeh", "hVehPl"); +KPLIB_PRST_CAT_BEGIN("vehHeavy"); +KPLIB_PRST_CAT_ADD("vehHeavy", "O_MBT_02_cannon_F", 300, 250, 180); // T-100 Varsuk +KPLIB_PRST_CAT_ADD("vehHeavy", "O_MBT_04_cannon_F", 400, 300, 200); // T-140 Angara +KPLIB_PRST_CAT_ADD("vehHeavy", "O_MBT_04_command_F", 500, 350, 225); // T-140K Angara +KPLIB_PRST_CAT_END("vehHeavy"); // Anti Air vehicles -KPLIB_PRST_AR_CREATE("antiAir"); -KPLIB_PRST_AR_ADD("antiAir", "O_APC_Tracked_02_AA_F", 300, 250, 175); // ZSU-39 Tigris -KPLIB_PRST_AR_PLAIN("antiAir", "antiAirPl"); +KPLIB_PRST_CAT_BEGIN("vehAntiAir"); +KPLIB_PRST_CAT_ADD("vehAntiAir", "O_APC_Tracked_02_AA_F", 300, 250, 175); // ZSU-39 Tigris +KPLIB_PRST_CAT_END("vehAntiAir"); // Artillery vehicles -KPLIB_PRST_AR_CREATE("arty"); -KPLIB_PRST_AR_ADD("arty", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar -KPLIB_PRST_AR_ADD("arty", "O_MBT_02_arty_F", 600, 1250, 300); // 2S9 Sochor -KPLIB_PRST_AR_PLAIN("arty", "artyPl"); +KPLIB_PRST_CAT_BEGIN("vehArty"); +KPLIB_PRST_CAT_ADD("vehArty", "O_MBT_02_arty_F", 600, 1250, 300); // 2S9 Sochor +KPLIB_PRST_CAT_END("vehArty"); // Transport Helicopters -KPLIB_PRST_AR_CREATE("heliTrans"); -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird -KPLIB_PRST_AR_ADD("heliTrans", "O_Heli_Light_02_unarmed_F", 250, 0, 150); // PO-30 Orca (unarmed) -KPLIB_PRST_AR_ADD("heliTrans", "O_Heli_Transport_04_bench_F", 300, 0, 175); // Mi-290 Taru (Bench) -KPLIB_PRST_AR_PLAIN("heliTrans", "heliTransPl"); +KPLIB_PRST_CAT_BEGIN("heliTrans"); +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird +KPLIB_PRST_CAT_ADD("heliTrans", "O_Heli_Light_02_unarmed_F", 250, 0, 150); // PO-30 Orca (unarmed) +KPLIB_PRST_CAT_ADD("heliTrans", "O_Heli_Transport_04_bench_F", 300, 0, 175); // Mi-290 Taru (Bench) +KPLIB_PRST_CAT_END("heliTrans"); // Attack Helicopters -KPLIB_PRST_AR_CREATE("heliAttack"); -KPLIB_PRST_AR_ADD("heliAttack", "O_Heli_Light_02_dynamicLoadout_F", 250, 100, 150); // PO-30 Orca -KPLIB_PRST_AR_ADD("heliAttack", "O_Heli_Attack_02_dynamicLoadout_F", 500, 400, 200); // Mi-48 Kajman -KPLIB_PRST_AR_PLAIN("heliAttack", "heliAttackPl"); +KPLIB_PRST_CAT_BEGIN("heliAttack"); +KPLIB_PRST_CAT_ADD("heliAttack", "O_Heli_Light_02_dynamicLoadout_F", 250, 100, 150); // PO-30 Orca +KPLIB_PRST_CAT_ADD("heliAttack", "O_Heli_Attack_02_dynamicLoadout_F", 500, 400, 200); // Mi-48 Kajman +KPLIB_PRST_CAT_END("heliAttack"); // Transport Planes -KPLIB_PRST_AR_CREATE("planeTrans"); -KPLIB_PRST_AR_ADD("planeTrans", "O_T_VTOL_02_infantry_dynamicLoadout_F",750, 1000, 500); // Y-32 Xi'an (Infantry) -KPLIB_PRST_AR_ADD("planeTrans", "O_T_VTOL_02_vehicle_dynamicLoadout_F", 750, 1000, 500); // Y-32 Xi'an (Vehicle) -KPLIB_PRST_AR_PLAIN("planeTrans", "planeTransPl"); +KPLIB_PRST_CAT_BEGIN("planeTrans"); +KPLIB_PRST_CAT_ADD("planeTrans", "O_T_VTOL_02_infantry_dynamicLoadout_F", 750, 1000, 500); // Y-32 Xi'an (Infantry) +KPLIB_PRST_CAT_ADD("planeTrans", "O_T_VTOL_02_vehicle_dynamicLoadout_F", 750, 1000, 500); // Y-32 Xi'an (Vehicle) +KPLIB_PRST_CAT_END("planeTrans"); // Jets -KPLIB_PRST_AR_CREATE("jets"); -KPLIB_PRST_AR_ADD("jets", "O_Plane_CAS_02_dynamicLoadout_F", 1000, 800, 400); // To-199 Neophron -KPLIB_PRST_AR_ADD("jets", "O_Plane_Fighter_02_F", 1500, 1750, 450); // To-201 Shikra -KPLIB_PRST_AR_ADD("jets", "O_Plane_Fighter_02_Stealth_F", 1500, 1750, 450); // To-201 Shikra (Stealth) -KPLIB_PRST_AR_PLAIN("jets", "jetsPl"); +KPLIB_PRST_CAT_BEGIN("jets"); +KPLIB_PRST_CAT_ADD("jets", "O_Plane_CAS_02_dynamicLoadout_F", 1000, 800, 400); // To-199 Neophron +KPLIB_PRST_CAT_ADD("jets", "O_Plane_Fighter_02_F", 1500, 1750, 450); // To-201 Shikra +KPLIB_PRST_CAT_ADD("jets", "O_Plane_Fighter_02_Stealth_F", 1500, 1750, 450); // To-201 Shikra (Stealth) +KPLIB_PRST_CAT_END("jets"); // Static Defenses -KPLIB_PRST_AR_CREATE("statics"); -KPLIB_PRST_AR_ADD("statics", "O_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 -KPLIB_PRST_AR_ADD("statics", "O_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) -KPLIB_PRST_AR_ADD("statics", "O_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm -KPLIB_PRST_AR_ADD("statics", "O_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 100, 250, 0); // S-750 Rhea -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) -KPLIB_PRST_AR_PLAIN("statics", "staticsPl"); +KPLIB_PRST_CAT_BEGIN("statics"); +KPLIB_PRST_CAT_ADD("statics", "O_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 +KPLIB_PRST_CAT_ADD("statics", "O_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) +KPLIB_PRST_CAT_ADD("statics", "O_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm +KPLIB_PRST_CAT_ADD("statics", "O_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 250, 300, 0); // MIM-145 Defender +KPLIB_PRST_CAT_END("statics"); // Logistic vehicles and objects -KPLIB_PRST_AR_CREATE("logistic"); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); -KPLIB_PRST_AR_ADD("logistic", "O_Radar_System_02_F", 250, 0, 0); // R-750 Cronus Radar -KPLIB_PRST_AR_ADD("logistic", "O_Truck_03_repair_F", 325, 0, 75); // Tempest Repair -KPLIB_PRST_AR_ADD("logistic", "O_Truck_03_fuel_F", 125, 0, 275); // Tempest Fuel -KPLIB_PRST_AR_ADD("logistic", "O_Truck_03_ammo_F", 125, 200, 75); // Tempest Ammo -KPLIB_PRST_AR_ADD("logistic", "Land_Pod_Heli_Transport_04_repair_F", 275, 0, 0); // Taru Repair Container -KPLIB_PRST_AR_ADD("logistic", "Land_Pod_Heli_Transport_04_fuel_F", 75, 0, 200); // Taru Fuel Container -KPLIB_PRST_AR_ADD("logistic", "Land_Pod_Heli_Transport_04_ammo_F", 75, 200, 0); // Taru Ammo Container -KPLIB_PRST_AR_PLAIN("logistic", "logisticPl"); +KPLIB_PRST_CAT_BEGIN("logistic"); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("staticAaBigRadar"), 250, 0, 0); // R-750 Cronus Radar +KPLIB_PRST_CAT_ADD("logistic", "O_Truck_03_repair_F", 325, 0, 75); // Tempest Repair +KPLIB_PRST_CAT_ADD("logistic", "O_Truck_03_fuel_F", 125, 0, 275); // Tempest Fuel +KPLIB_PRST_CAT_ADD("logistic", "O_Truck_03_ammo_F", 125, 200, 75); // Tempest Ammo +KPLIB_PRST_CAT_ADD("logistic", "Land_Pod_Heli_Transport_04_repair_F", 275, 0, 0); // Taru Repair Container +KPLIB_PRST_CAT_ADD("logistic", "Land_Pod_Heli_Transport_04_fuel_F", 75, 0, 200); // Taru Fuel Container +KPLIB_PRST_CAT_ADD("logistic", "Land_Pod_Heli_Transport_04_ammo_F", 75, 200, 0); // Taru Ammo Container +KPLIB_PRST_CAT_END("logistic"); // Decorative Objects -KPLIB_PRST_AR_CREATE("deco"); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_CSAT_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_Viper_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_White_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_open_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_big_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampSolar_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampAirport_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingTable_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_altis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterTank_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncShelter_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Razorwire_F", 0, 0, 0); -KPLIB_PRST_AR_PLAIN("deco", "decoPl"); +KPLIB_PRST_CAT_BEGIN("deco"); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_CSAT_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_Viper_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_White_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_OPFOR_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_OPFOR_open_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_OPFOR_big_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampSolar_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampAirport_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingTable_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_altis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterTank_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncShelter_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); +KPLIB_PRST_CAT_END("deco"); diff --git a/Missionframework/presets/armies/customEast.sqf b/Missionframework/presets/armies/customEast.sqf index e666e4b58..d0d59fb61 100644 --- a/Missionframework/presets/armies/customEast.sqf +++ b/Missionframework/presets/armies/customEast.sqf @@ -5,31 +5,28 @@ File: customEast.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-24 - Last Update: 2018-12-02 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: Custom east side preset file for individual adjustments. */ + params [ ["_isFriendly", false, [false]] ]; + /*------------------------------------------------------------ --- GENERAL SETTINGS --- General stuff like side and colors. ------------------------------------------------------------*/ -// Color for this side -KPLIB_PRST_SETVAR("color", "ColorEast"); -// Color for this side (active) -KPLIB_PRST_SETVAR("colorAct", "ColorRed"); // Name of the used/created army in this preset KPLIB_PRST_SETVAR("name", "Custom East Army"); -// Side for this preset -KPLIB_PRST_SETVAR("side", east); + // Military alphabet -KPLIB_PRST_AR_CREATE("alphabet"); +KPLIB_PRST_CAT_BEGIN("alphabet"); (KPLIB_PRST_GETVAR("alphabet")) pushBack "Alpha"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Bravo"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Charlie"; @@ -114,9 +111,12 @@ KPLIB_PRST_SETVAR("mortar", "O_Mortar_01_F"); KPLIB_PRST_SETVAR("staticAa", "O_static_AA_F"); // Static Big AA Classname KPLIB_PRST_SETVAR("staticAaBig", "O_SAM_System_04_F"); +// Static Big AA Radar Classname +KPLIB_PRST_SETVAR("staticAaBigRadar", "O_Radar_System_02_F"); // Static AT Classname KPLIB_PRST_SETVAR("staticAt", "O_static_AT_F"); + /*------------------------------------------------------------ --- REGULAR SOLDIER CLASSNAMES --- Classnames of the different regular soldier types. @@ -197,216 +197,224 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "O_V_Soldier_TL_hex_F"); --- BUILDABLE OBJECTS ARRAYS --- The arrays below are used to determine what can be build. Format: "classname", supplies, ammunition, fuel - Example: KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); + Example: KPLIB_PRST_CAT_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); The above example adds the NATO Hunter MRAP to the light vehicles list with the costs of 100 supplies, 0 ammunition and 50 fuel. ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_AR_CREATE("soldiers"); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_AR_PLAIN("soldiers", "soldiersPl"); +KPLIB_PRST_CAT_BEGIN("soldiers"); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("soldiers"); // Special Forces units -KPLIB_PRST_AR_CREATE("specOps"); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); -KPLIB_PRST_AR_PLAIN("specOps", "specOpsPl"); - -// Light vehicles -KPLIB_PRST_AR_CREATE("lVeh"); -KPLIB_PRST_AR_ADD("lVeh", "O_Quadbike_01_F", 50, 0, 25); // Quadbike -KPLIB_PRST_AR_ADD("lVeh", "O_LSV_02_unarmed_F", 75, 0, 50); // Qilin -KPLIB_PRST_AR_ADD("lVeh", "O_LSV_02_armed_F", 75, 40, 50); // Qilin (HMG) -KPLIB_PRST_AR_ADD("lVeh", "O_LSV_02_AT_F", 75, 50, 50); // Qilin (AT) -KPLIB_PRST_AR_ADD("lVeh", "O_MRAP_02_F", 100, 0, 50); // Ifrit -KPLIB_PRST_AR_ADD("lVeh", "O_MRAP_02_hmg_F", 100, 40, 50); // Ifrit (HMG) -KPLIB_PRST_AR_ADD("lVeh", "O_MRAP_02_gmg_F", 100, 60, 50); // Ifrit (GMG) -KPLIB_PRST_AR_PLAIN("lVeh", "lVehPl"); +KPLIB_PRST_CAT_BEGIN("specOps"); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); +KPLIB_PRST_CAT_END("specOps"); + +// Light vehicles (unarmed) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "O_Quadbike_01_F", 50, 0, 25); // Quadbike +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "O_LSV_02_unarmed_F", 75, 0, 50); // Qilin +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "O_MRAP_02_F", 100, 0, 50); // Ifrit +KPLIB_PRST_CAT_END("vehLightUnarmed"); + +// Light vehicles (armed) +KPLIB_PRST_CAT_BEGIN("vehLightArmed"); +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_LSV_02_armed_F", 75, 40, 50); // Qilin (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_LSV_02_AT_F", 75, 50, 50); // Qilin (AT) +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_MRAP_02_hmg_F", 100, 40, 50); // Ifrit (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "O_MRAP_02_gmg_F", 100, 60, 50); // Ifrit (GMG) +KPLIB_PRST_CAT_END("vehLightArmed"); // Transport trucks -KPLIB_PRST_AR_CREATE("transports"); -KPLIB_PRST_AR_ADD("transports", "O_Truck_03_transport_F", 125, 0, 75); // Tempest Transport -KPLIB_PRST_AR_ADD("transports", "O_Truck_03_covered_F", 125, 0, 75); // Tempest Transport (Covered) -KPLIB_PRST_AR_PLAIN("transports", "transportsPl"); +KPLIB_PRST_CAT_BEGIN("vehTrans"); +KPLIB_PRST_CAT_ADD("vehTrans", "O_Truck_03_transport_F", 125, 0, 75); // Tempest Transport +KPLIB_PRST_CAT_ADD("vehTrans", "O_Truck_03_covered_F", 125, 0, 75); // Tempest Transport (Covered) +KPLIB_PRST_CAT_END("vehTrans"); // Boats -KPLIB_PRST_AR_CREATE("boats"); -KPLIB_PRST_AR_ADD("boats", "O_Boat_Transport_01_F", 100, 0, 25); // Assault Boat -KPLIB_PRST_AR_ADD("boats", "O_Boat_Armed_01_hmg_F", 200, 80, 75); // Speedboat with Minigun -KPLIB_PRST_AR_ADD("boats", "O_SDV_01_F", 150, 0, 50); // SDV -KPLIB_PRST_AR_PLAIN("boats", "boatsPl"); +KPLIB_PRST_CAT_BEGIN("boats"); +KPLIB_PRST_CAT_ADD("boats", "O_Boat_Transport_01_F", 100, 0, 25); // Assault Boat +KPLIB_PRST_CAT_ADD("boats", "O_Boat_Armed_01_hmg_F", 200, 80, 75); // Speedboat with Minigun +KPLIB_PRST_CAT_ADD("boats", "O_SDV_01_F", 150, 0, 50); // SDV +KPLIB_PRST_CAT_END("boats"); + +// APCs +KPLIB_PRST_CAT_BEGIN("vehHeavyApc"); +KPLIB_PRST_CAT_ADD("vehHeavyApc", "O_APC_Wheeled_02_rcws_v2_F", 200, 75, 125); // MSE-3 Marid +KPLIB_PRST_CAT_ADD("vehHeavyApc", "O_APC_Tracked_02_cannon_F", 300, 100, 150); // BTR-K Kamysh +KPLIB_PRST_CAT_END("vehHeavyApc"); // Heavy vehicles -KPLIB_PRST_AR_CREATE("hVeh"); -KPLIB_PRST_AR_ADD("hVeh", "O_APC_Wheeled_02_rcws_v2_F", 200, 75, 125); // MSE-3 Marid -KPLIB_PRST_AR_ADD("hVeh", "O_APC_Tracked_02_cannon_F", 300, 100, 150); // BTR-K Kamysh -KPLIB_PRST_AR_ADD("hVeh", "O_MBT_02_cannon_F", 300, 250, 180); // T-100 Varsuk -KPLIB_PRST_AR_ADD("hVeh", "O_MBT_04_cannon_F", 400, 300, 200); // T-140 Angara -KPLIB_PRST_AR_ADD("hVeh", "O_MBT_04_command_F", 500, 350, 225); // T-140K Angara -KPLIB_PRST_AR_PLAIN("hVeh", "hVehPl"); +KPLIB_PRST_CAT_BEGIN("vehHeavy"); +KPLIB_PRST_CAT_ADD("vehHeavy", "O_MBT_02_cannon_F", 300, 250, 180); // T-100 Varsuk +KPLIB_PRST_CAT_ADD("vehHeavy", "O_MBT_04_cannon_F", 400, 300, 200); // T-140 Angara +KPLIB_PRST_CAT_ADD("vehHeavy", "O_MBT_04_command_F", 500, 350, 225); // T-140K Angara +KPLIB_PRST_CAT_END("vehHeavy"); // Anti Air vehicles -KPLIB_PRST_AR_CREATE("antiAir"); -KPLIB_PRST_AR_ADD("antiAir", "O_APC_Tracked_02_AA_F", 300, 250, 175); // ZSU-39 Tigris -KPLIB_PRST_AR_PLAIN("antiAir", "antiAirPl"); +KPLIB_PRST_CAT_BEGIN("vehAntiAir"); +KPLIB_PRST_CAT_ADD("vehAntiAir", "O_APC_Tracked_02_AA_F", 300, 250, 175); // ZSU-39 Tigris +KPLIB_PRST_CAT_END("vehAntiAir"); // Artillery vehicles -KPLIB_PRST_AR_CREATE("arty"); -KPLIB_PRST_AR_ADD("arty", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar -KPLIB_PRST_AR_ADD("arty", "O_MBT_02_arty_F", 600, 1250, 300); // 2S9 Sochor -KPLIB_PRST_AR_PLAIN("arty", "artyPl"); +KPLIB_PRST_CAT_BEGIN("vehArty"); +KPLIB_PRST_CAT_ADD("vehArty", "O_MBT_02_arty_F", 600, 1250, 300); // 2S9 Sochor +KPLIB_PRST_CAT_END("vehArty"); // Transport Helicopters -KPLIB_PRST_AR_CREATE("heliTrans"); -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird -KPLIB_PRST_AR_ADD("heliTrans", "O_Heli_Light_02_unarmed_F", 250, 0, 150); // PO-30 Orca (unarmed) -KPLIB_PRST_AR_ADD("heliTrans", "O_Heli_Transport_04_bench_F", 300, 0, 175); // Mi-290 Taru (Bench) -KPLIB_PRST_AR_PLAIN("heliTrans", "heliTransPl"); +KPLIB_PRST_CAT_BEGIN("heliTrans"); +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird +KPLIB_PRST_CAT_ADD("heliTrans", "O_Heli_Light_02_unarmed_F", 250, 0, 150); // PO-30 Orca (unarmed) +KPLIB_PRST_CAT_ADD("heliTrans", "O_Heli_Transport_04_bench_F", 300, 0, 175); // Mi-290 Taru (Bench) +KPLIB_PRST_CAT_END("heliTrans"); // Attack Helicopters -KPLIB_PRST_AR_CREATE("heliAttack"); -KPLIB_PRST_AR_ADD("heliAttack", "O_Heli_Light_02_dynamicLoadout_F", 250, 100, 150); // PO-30 Orca -KPLIB_PRST_AR_ADD("heliAttack", "O_Heli_Attack_02_dynamicLoadout_F", 500, 400, 200); // Mi-48 Kajman -KPLIB_PRST_AR_PLAIN("heliAttack", "heliAttackPl"); +KPLIB_PRST_CAT_BEGIN("heliAttack"); +KPLIB_PRST_CAT_ADD("heliAttack", "O_Heli_Light_02_dynamicLoadout_F", 250, 100, 150); // PO-30 Orca +KPLIB_PRST_CAT_ADD("heliAttack", "O_Heli_Attack_02_dynamicLoadout_F", 500, 400, 200); // Mi-48 Kajman +KPLIB_PRST_CAT_END("heliAttack"); // Transport Planes -KPLIB_PRST_AR_CREATE("planeTrans"); -KPLIB_PRST_AR_ADD("planeTrans", "O_T_VTOL_02_infantry_dynamicLoadout_F",750, 1000, 500); // Y-32 Xi'an (Infantry) -KPLIB_PRST_AR_ADD("planeTrans", "O_T_VTOL_02_vehicle_dynamicLoadout_F", 750, 1000, 500); // Y-32 Xi'an (Vehicle) -KPLIB_PRST_AR_PLAIN("planeTrans", "planeTransPl"); +KPLIB_PRST_CAT_BEGIN("planeTrans"); +KPLIB_PRST_CAT_ADD("planeTrans", "O_T_VTOL_02_infantry_dynamicLoadout_F", 750, 1000, 500); // Y-32 Xi'an (Infantry) +KPLIB_PRST_CAT_ADD("planeTrans", "O_T_VTOL_02_vehicle_dynamicLoadout_F", 750, 1000, 500); // Y-32 Xi'an (Vehicle) +KPLIB_PRST_CAT_END("planeTrans"); // Jets -KPLIB_PRST_AR_CREATE("jets"); -KPLIB_PRST_AR_ADD("jets", "O_Plane_CAS_02_dynamicLoadout_F", 1000, 800, 400); // To-199 Neophron -KPLIB_PRST_AR_ADD("jets", "O_Plane_Fighter_02_F", 1500, 1750, 450); // To-201 Shikra -KPLIB_PRST_AR_ADD("jets", "O_Plane_Fighter_02_Stealth_F", 1500, 1750, 450); // To-201 Shikra (Stealth) -KPLIB_PRST_AR_PLAIN("jets", "jetsPl"); +KPLIB_PRST_CAT_BEGIN("jets"); +KPLIB_PRST_CAT_ADD("jets", "O_Plane_CAS_02_dynamicLoadout_F", 1000, 800, 400); // To-199 Neophron +KPLIB_PRST_CAT_ADD("jets", "O_Plane_Fighter_02_F", 1500, 1750, 450); // To-201 Shikra +KPLIB_PRST_CAT_ADD("jets", "O_Plane_Fighter_02_Stealth_F", 1500, 1750, 450); // To-201 Shikra (Stealth) +KPLIB_PRST_CAT_END("jets"); // Static Defenses -KPLIB_PRST_AR_CREATE("statics"); -KPLIB_PRST_AR_ADD("statics", "O_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 -KPLIB_PRST_AR_ADD("statics", "O_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) -KPLIB_PRST_AR_ADD("statics", "O_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm -KPLIB_PRST_AR_ADD("statics", "O_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 100, 250, 0); // S-750 Rhea -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) -KPLIB_PRST_AR_PLAIN("statics", "staticsPl"); +KPLIB_PRST_CAT_BEGIN("statics"); +KPLIB_PRST_CAT_ADD("statics", "O_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 +KPLIB_PRST_CAT_ADD("statics", "O_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) +KPLIB_PRST_CAT_ADD("statics", "O_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm +KPLIB_PRST_CAT_ADD("statics", "O_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 250, 300, 0); // MIM-145 Defender +KPLIB_PRST_CAT_END("statics"); // Logistic vehicles and objects -KPLIB_PRST_AR_CREATE("logistic"); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); -KPLIB_PRST_AR_ADD("logistic", "O_Radar_System_02_F", 250, 0, 0); // R-750 Cronus Radar -KPLIB_PRST_AR_ADD("logistic", "O_Truck_03_repair_F", 325, 0, 75); // Tempest Repair -KPLIB_PRST_AR_ADD("logistic", "O_Truck_03_fuel_F", 125, 0, 275); // Tempest Fuel -KPLIB_PRST_AR_ADD("logistic", "O_Truck_03_ammo_F", 125, 200, 75); // Tempest Ammo -KPLIB_PRST_AR_ADD("logistic", "Land_Pod_Heli_Transport_04_repair_F", 275, 0, 0); // Taru Repair Container -KPLIB_PRST_AR_ADD("logistic", "Land_Pod_Heli_Transport_04_fuel_F", 75, 0, 200); // Taru Fuel Container -KPLIB_PRST_AR_ADD("logistic", "Land_Pod_Heli_Transport_04_ammo_F", 75, 200, 0); // Taru Ammo Container -KPLIB_PRST_AR_PLAIN("logistic", "logisticPl"); +KPLIB_PRST_CAT_BEGIN("logistic"); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("staticAaBigRadar"), 250, 0, 0); // R-750 Cronus Radar +KPLIB_PRST_CAT_ADD("logistic", "O_Truck_03_repair_F", 325, 0, 75); // Tempest Repair +KPLIB_PRST_CAT_ADD("logistic", "O_Truck_03_fuel_F", 125, 0, 275); // Tempest Fuel +KPLIB_PRST_CAT_ADD("logistic", "O_Truck_03_ammo_F", 125, 200, 75); // Tempest Ammo +KPLIB_PRST_CAT_ADD("logistic", "Land_Pod_Heli_Transport_04_repair_F", 275, 0, 0); // Taru Repair Container +KPLIB_PRST_CAT_ADD("logistic", "Land_Pod_Heli_Transport_04_fuel_F", 75, 0, 200); // Taru Fuel Container +KPLIB_PRST_CAT_ADD("logistic", "Land_Pod_Heli_Transport_04_ammo_F", 75, 200, 0); // Taru Ammo Container +KPLIB_PRST_CAT_END("logistic"); // Decorative Objects -KPLIB_PRST_AR_CREATE("deco"); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_CSAT_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_Viper_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_White_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_open_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_big_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampSolar_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampAirport_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingTable_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_altis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterTank_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncShelter_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Razorwire_F", 0, 0, 0); -KPLIB_PRST_AR_PLAIN("deco", "decoPl"); +KPLIB_PRST_CAT_BEGIN("deco"); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_CSAT_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_Viper_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_White_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_OPFOR_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_OPFOR_open_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_OPFOR_big_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampSolar_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampAirport_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingTable_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_altis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterTank_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncShelter_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); +KPLIB_PRST_CAT_END("deco"); diff --git a/Missionframework/presets/armies/customWest.sqf b/Missionframework/presets/armies/customWest.sqf index feb206731..9c9b77692 100644 --- a/Missionframework/presets/armies/customWest.sqf +++ b/Missionframework/presets/armies/customWest.sqf @@ -5,31 +5,28 @@ File: customWest.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-24 - Last Update: 2018-12-02 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: Custom west side preset file for individual adjustments. */ + params [ ["_isFriendly", false, [false]] ]; + /*------------------------------------------------------------ --- GENERAL SETTINGS --- General stuff like side and colors. ------------------------------------------------------------*/ -// Color for this side -KPLIB_PRST_SETVAR("color", "ColorWest"); -// Color for this side (active) -KPLIB_PRST_SETVAR("colorAct", "ColorBlue"); // Name of the used/created army in this preset KPLIB_PRST_SETVAR("name", "Custom West Army"); -// Side for this preset -KPLIB_PRST_SETVAR("side", west); + // Military alphabet -KPLIB_PRST_AR_CREATE("alphabet"); +KPLIB_PRST_CAT_BEGIN("alphabet"); (KPLIB_PRST_GETVAR("alphabet")) pushBack "Alpha"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Bravo"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Charlie"; @@ -114,9 +111,12 @@ KPLIB_PRST_SETVAR("mortar", "B_Mortar_01_F"); KPLIB_PRST_SETVAR("staticAa", "B_static_AA_F"); // Static Big AA Classname KPLIB_PRST_SETVAR("staticAaBig", "B_SAM_System_03_F"); +// Static Big AA Radar Classname +KPLIB_PRST_SETVAR("staticAaBigRadar", "B_Radar_System_01_F"); // Static AT Classname KPLIB_PRST_SETVAR("staticAt", "B_static_AT_F"); + /*------------------------------------------------------------ --- REGULAR SOLDIER CLASSNAMES --- Classnames of the different regular soldier types. @@ -197,221 +197,229 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "B_recon_TL_F"); --- BUILDABLE OBJECTS ARRAYS --- The arrays below are used to determine what can be build. Format: "classname", supplies, ammunition, fuel - Example: KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); - The above example adds the NATO Hunter MRAP to the light vehicles list + Example: KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_MRAP_01_F", 100, 0, 50); + The above example adds the NATO Hunter MRAP to the unarmed light vehicles list with the costs of 100 supplies, 0 ammunition and 50 fuel. ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_AR_CREATE("soldiers"); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_AR_PLAIN("soldiers", "soldiersPl"); +KPLIB_PRST_CAT_BEGIN("soldiers"); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("soldiers"); // Special Forces units -KPLIB_PRST_AR_CREATE("specOps"); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); -KPLIB_PRST_AR_PLAIN("specOps", "specOpsPl"); - -// Light vehicles -KPLIB_PRST_AR_CREATE("lVeh"); -KPLIB_PRST_AR_ADD("lVeh", "B_Quadbike_01_F", 50, 0, 25); // Quadbike -KPLIB_PRST_AR_ADD("lVeh", "B_LSV_01_unarmed_F", 75, 0, 50); // Prowler -KPLIB_PRST_AR_ADD("lVeh", "B_LSV_01_armed_F", 75, 40, 50); // Prowler (HMG) -KPLIB_PRST_AR_ADD("lVeh", "B_LSV_01_AT_F", 75, 50, 50); // Prowler (AT) -KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); // Hunter -KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_hmg_F", 100, 40, 50); // Hunter (HMG) -KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_gmg_F", 100, 60, 50); // Hunter (GMG) -KPLIB_PRST_AR_PLAIN("lVeh", "lVehPl"); +KPLIB_PRST_CAT_BEGIN("specOps"); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); +KPLIB_PRST_CAT_END("specOps"); + +// Light vehicles (unarmed) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_Quadbike_01_F", 50, 0, 25); // Quadbike +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_LSV_01_unarmed_F", 75, 0, 50); // Prowler +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_MRAP_01_F", 100, 0, 50); // Hunter +KPLIB_PRST_CAT_END("vehLightUnarmed"); + +// Light vehicles (armed) +KPLIB_PRST_CAT_BEGIN("vehLightArmed"); +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_LSV_01_armed_F", 75, 40, 50); // Prowler (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_LSV_01_AT_F", 75, 50, 50); // Prowler (AT) +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_MRAP_01_hmg_F", 100, 40, 50); // Hunter (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_MRAP_01_gmg_F", 100, 60, 50); // Hunter (GMG) +KPLIB_PRST_CAT_END("vehLightArmed"); // Transport trucks -KPLIB_PRST_AR_CREATE("transports"); -KPLIB_PRST_AR_ADD("transports", "B_Truck_01_transport_F", 125, 0, 75); // HEMTT Transport -KPLIB_PRST_AR_ADD("transports", "B_Truck_01_covered_F", 125, 0, 75); // HEMTT Transport (Covered) -KPLIB_PRST_AR_PLAIN("transports", "transportsPl"); +KPLIB_PRST_CAT_BEGIN("vehTrans"); +KPLIB_PRST_CAT_ADD("vehTrans", "B_Truck_01_transport_F", 125, 0, 75); // HEMTT Transport +KPLIB_PRST_CAT_ADD("vehTrans", "B_Truck_01_covered_F", 125, 0, 75); // HEMTT Transport (Covered) +KPLIB_PRST_CAT_END("vehTrans"); // Boats -KPLIB_PRST_AR_CREATE("boats"); -KPLIB_PRST_AR_ADD("boats", "B_Boat_Transport_01_F", 100, 0, 25); // Assault Boat -KPLIB_PRST_AR_ADD("boats", "B_Boat_Armed_01_minigun_F", 200, 80, 75); // Speedboat with Minigun -KPLIB_PRST_AR_ADD("boats", "B_SDV_01_F", 50, 0, 50); // SDV -KPLIB_PRST_AR_PLAIN("boats", "boatsPl"); +KPLIB_PRST_CAT_BEGIN("boats"); +KPLIB_PRST_CAT_ADD("boats", "B_Boat_Transport_01_F", 100, 0, 25); // Assault Boat +KPLIB_PRST_CAT_ADD("boats", "B_Boat_Armed_01_minigun_F", 200, 80, 75); // Speedboat with Minigun +KPLIB_PRST_CAT_ADD("boats", "B_SDV_01_F", 50, 0, 50); // SDV +KPLIB_PRST_CAT_END("boats"); + +// APCs +KPLIB_PRST_CAT_BEGIN("vehHeavyApc"); +KPLIB_PRST_CAT_ADD("vehHeavyApc", "B_APC_Wheeled_01_cannon_F", 200, 75, 125); // AMV-7 Marshall +KPLIB_PRST_CAT_ADD("vehHeavyApc", "B_APC_Tracked_01_rcws_F", 300, 100, 150); // IFV-6c Panther +KPLIB_PRST_CAT_END("vehHeavyApc"); // Heavy vehicles -KPLIB_PRST_AR_CREATE("hVeh"); -KPLIB_PRST_AR_ADD("hVeh", "B_APC_Wheeled_01_cannon_F", 200, 75, 125); // AMV-7 Marshall -KPLIB_PRST_AR_ADD("hVeh", "B_APC_Tracked_01_rcws_F", 300, 100, 150); // IFV-6c Panther -KPLIB_PRST_AR_ADD("hVeh", "B_AFV_Wheeled_01_cannon_F", 300, 250, 180); // Rhino MGS -KPLIB_PRST_AR_ADD("hVeh", "B_AFV_Wheeled_01_up_cannon_F", 400, 300, 200); // Rhino MGS UP -KPLIB_PRST_AR_ADD("hVeh", "B_MBT_01_cannon_F", 400, 300, 200); // M2A1 Slammer -KPLIB_PRST_AR_ADD("hVeh", "B_MBT_01_TUSK_F", 500, 350, 225); // M2A4 Slammer UP -KPLIB_PRST_AR_PLAIN("hVeh", "hVehPl"); +KPLIB_PRST_CAT_BEGIN("vehHeavy"); +KPLIB_PRST_CAT_ADD("vehHeavy", "B_AFV_Wheeled_01_cannon_F", 300, 250, 180); // Rhino MGS +KPLIB_PRST_CAT_ADD("vehHeavy", "B_AFV_Wheeled_01_up_cannon_F", 400, 300, 200); // Rhino MGS UP +KPLIB_PRST_CAT_ADD("vehHeavy", "B_MBT_01_cannon_F", 400, 300, 200); // M2A1 Slammer +KPLIB_PRST_CAT_ADD("vehHeavy", "B_MBT_01_TUSK_F", 500, 350, 225); // M2A4 Slammer UP +KPLIB_PRST_CAT_END("vehHeavy"); // Anti Air vehicles -KPLIB_PRST_AR_CREATE("antiAir"); -KPLIB_PRST_AR_ADD("antiAir", "B_APC_Tracked_01_AA_F", 300, 250, 175); // IFV-6a Cheetah -KPLIB_PRST_AR_PLAIN("antiAir", "antiAirPl"); +KPLIB_PRST_CAT_BEGIN("vehAntiAir"); +KPLIB_PRST_CAT_ADD("vehAntiAir", "B_APC_Tracked_01_AA_F", 300, 250, 175); // IFV-6a Cheetah +KPLIB_PRST_CAT_END("vehAntiAir"); // Artillery vehicles -KPLIB_PRST_AR_CREATE("arty"); -KPLIB_PRST_AR_ADD("arty", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar -KPLIB_PRST_AR_ADD("arty", "B_MBT_01_arty_F", 600, 1250, 300); // M4 Scorcher -KPLIB_PRST_AR_ADD("arty", "B_MBT_01_mlrs_F", 800, 1750, 400); // M5 Sandstorm MLRS -KPLIB_PRST_AR_PLAIN("arty", "artyPl"); +KPLIB_PRST_CAT_BEGIN("vehArty"); +KPLIB_PRST_CAT_ADD("vehArty", "B_MBT_01_arty_F", 600, 1250, 300); // M4 Scorcher +KPLIB_PRST_CAT_ADD("vehArty", "B_MBT_01_mlrs_F", 800, 1750, 400); // M5 Sandstorm MLRS +KPLIB_PRST_CAT_END("vehArty"); // Transport Helicopters -KPLIB_PRST_AR_CREATE("heliTrans"); -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Transport_01_F", 250, 80, 150); // UH-80 Ghost Hawk -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Transport_01_camo_F", 250, 80, 150); // UH-80 Ghost Hawk (Camo) -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Transport_03_F", 300, 80, 175); // CH-67 Huron (Armed) -KPLIB_PRST_AR_PLAIN("heliTrans", "heliTransPl"); +KPLIB_PRST_CAT_BEGIN("heliTrans"); +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Transport_01_F", 250, 80, 150); // UH-80 Ghost Hawk +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Transport_01_camo_F", 250, 80, 150); // UH-80 Ghost Hawk (Camo) +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Transport_03_F", 300, 80, 175); // CH-67 Huron (Armed) +KPLIB_PRST_CAT_END("heliTrans"); // Attack Helicopters -KPLIB_PRST_AR_CREATE("heliAttack"); -KPLIB_PRST_AR_ADD("heliAttack", "B_Heli_Light_01_dynamicLoadout_F", 200, 100, 100); // AH-9 Pawnee -KPLIB_PRST_AR_ADD("heliAttack", "B_Heli_Attack_01_dynamicLoadout_F", 500, 400, 200); // AH-99 Blackfoot -KPLIB_PRST_AR_PLAIN("heliAttack", "heliAttackPl"); +KPLIB_PRST_CAT_BEGIN("heliAttack"); +KPLIB_PRST_CAT_ADD("heliAttack", "B_Heli_Light_01_dynamicLoadout_F", 200, 100, 100); // AH-9 Pawnee +KPLIB_PRST_CAT_ADD("heliAttack", "B_Heli_Attack_01_dynamicLoadout_F", 500, 400, 200); // AH-99 Blackfoot +KPLIB_PRST_CAT_ADD("heliAttack", "B_T_VTOL_01_armed_F", 750, 1500, 500); // V-44 X Blackfish (Armed) +KPLIB_PRST_CAT_END("heliAttack"); // Transport Planes -KPLIB_PRST_AR_CREATE("planeTrans"); -KPLIB_PRST_AR_ADD("planeTrans", "B_T_VTOL_01_armed_F", 750, 1500, 500); // V-44 X Blackfish (Armed) -KPLIB_PRST_AR_ADD("planeTrans", "B_T_VTOL_01_infantry_F", 750, 0, 500); // V-44 X Blackfish (Infantry) -KPLIB_PRST_AR_ADD("planeTrans", "B_T_VTOL_01_vehicle_F", 750, 0, 500); // V-44 X Blackfish (Vehicle) -KPLIB_PRST_AR_PLAIN("planeTrans", "planeTransPl"); +KPLIB_PRST_CAT_BEGIN("planeTrans"); +KPLIB_PRST_CAT_ADD("planeTrans", "B_T_VTOL_01_infantry_F", 750, 0, 500); // V-44 X Blackfish (Infantry) +KPLIB_PRST_CAT_ADD("planeTrans", "B_T_VTOL_01_vehicle_F", 750, 0, 500); // V-44 X Blackfish (Vehicle) +KPLIB_PRST_CAT_END("planeTrans"); // Jets -KPLIB_PRST_AR_CREATE("jets"); -KPLIB_PRST_AR_ADD("jets", "B_Plane_CAS_01_dynamicLoadout_F", 1000, 800, 400); // A-164 Wipeout (CAS) -KPLIB_PRST_AR_ADD("jets", "B_Plane_Fighter_01_F", 1500, 1750, 450); // F/A-181 Black Wasp II -KPLIB_PRST_AR_ADD("jets", "B_Plane_Fighter_01_Stealth_F", 1500, 1750, 450); // F/A-181 Black Wasp II (Stealth) -KPLIB_PRST_AR_PLAIN("jets", "jetsPl"); +KPLIB_PRST_CAT_BEGIN("jets"); +KPLIB_PRST_CAT_ADD("jets", "B_Plane_CAS_01_dynamicLoadout_F", 1000, 800, 400); // A-164 Wipeout (CAS) +KPLIB_PRST_CAT_ADD("jets", "B_Plane_Fighter_01_F", 1500, 1750, 450); // F/A-181 Black Wasp II +KPLIB_PRST_CAT_ADD("jets", "B_Plane_Fighter_01_Stealth_F", 1500, 1750, 450); // F/A-181 Black Wasp II (Stealth) +KPLIB_PRST_CAT_END("jets"); // Static Defenses -KPLIB_PRST_AR_CREATE("statics"); -KPLIB_PRST_AR_ADD("statics", "B_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 -KPLIB_PRST_AR_ADD("statics", "B_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) -KPLIB_PRST_AR_ADD("statics", "B_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm -KPLIB_PRST_AR_ADD("statics", "B_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 100, 250, 0); // MIM-145 Defender -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) -KPLIB_PRST_AR_PLAIN("statics", "staticsPl"); - -// Logistic vehicles and objects -KPLIB_PRST_AR_CREATE("logistic"); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); -KPLIB_PRST_AR_ADD("logistic", "B_Radar_System_01_F", 250, 0, 0); // AN/MPQ-105 Radar -KPLIB_PRST_AR_ADD("logistic", "B_Truck_01_Repair_F", 325, 0, 75); // HEMTT Repair -KPLIB_PRST_AR_ADD("logistic", "B_Truck_01_fuel_F", 125, 0, 275); // HEMTT Fuel -KPLIB_PRST_AR_ADD("logistic", "B_Truck_01_ammo_F", 125, 200, 75); // HEMTT Ammo -KPLIB_PRST_AR_ADD("logistic", "B_Slingload_01_Repair_F", 275, 0, 0); // Huron Repair Container -KPLIB_PRST_AR_ADD("logistic", "B_Slingload_01_Fuel_F", 75, 0, 200); // Huron Fuel Container -KPLIB_PRST_AR_ADD("logistic", "B_Slingload_01_Ammo_F", 75, 200, 0); // Huron Ammo Container -KPLIB_PRST_AR_PLAIN("logistic", "logisticPl"); +KPLIB_PRST_CAT_BEGIN("statics"); +KPLIB_PRST_CAT_ADD("statics", "B_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 +KPLIB_PRST_CAT_ADD("statics", "B_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) +KPLIB_PRST_CAT_ADD("statics", "B_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm +KPLIB_PRST_CAT_ADD("statics", "B_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 250, 300, 0); // MIM-145 Defender +KPLIB_PRST_CAT_END("statics"); + +// Logistic/Utility vehicles and objects +KPLIB_PRST_CAT_BEGIN("logistic"); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("staticAaBigRadar"), 250, 0, 0); // AN/MPQ-105 Radar +KPLIB_PRST_CAT_ADD("logistic", "B_Truck_01_Repair_F", 325, 0, 75); // HEMTT Repair +KPLIB_PRST_CAT_ADD("logistic", "B_Truck_01_fuel_F", 125, 0, 275); // HEMTT Fuel +KPLIB_PRST_CAT_ADD("logistic", "B_Truck_01_ammo_F", 125, 200, 75); // HEMTT Ammo +KPLIB_PRST_CAT_ADD("logistic", "B_Slingload_01_Repair_F", 275, 0, 0); // Huron Repair Container +KPLIB_PRST_CAT_ADD("logistic", "B_Slingload_01_Fuel_F", 75, 0, 200); // Huron Fuel Container +KPLIB_PRST_CAT_ADD("logistic", "B_Slingload_01_Ammo_F", 75, 200, 0); // Huron Ammo Container +KPLIB_PRST_CAT_END("logistic"); // Decorative Objects -KPLIB_PRST_AR_CREATE("deco"); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_NATO_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_US_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_UK_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_White_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_open_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_big_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampSolar_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampAirport_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingTable_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_altis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterTank_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncShelter_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Razorwire_F", 0, 0, 0); -KPLIB_PRST_AR_PLAIN("deco", "decoPl"); +KPLIB_PRST_CAT_BEGIN("deco"); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_NATO_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_US_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_UK_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_White_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_BLUFOR_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_BLUFOR_open_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_BLUFOR_big_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampSolar_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampAirport_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingTable_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_altis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterTank_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncShelter_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); +KPLIB_PRST_CAT_END("deco"); diff --git a/Missionframework/presets/armies/nato.sqf b/Missionframework/presets/armies/nato.sqf index 2e116bf84..3acacdea6 100644 --- a/Missionframework/presets/armies/nato.sqf +++ b/Missionframework/presets/armies/nato.sqf @@ -5,7 +5,7 @@ File: nato.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-17 - Last Update: 2018-12-02 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -17,25 +17,22 @@ Optional Mods: - None */ + params [ ["_isFriendly", false, [false]] ]; + /*------------------------------------------------------------ --- GENERAL SETTINGS --- General stuff like side and colors. ------------------------------------------------------------*/ -// Color for this side -KPLIB_PRST_SETVAR("color", "ColorWest"); -// Color for this side (active) -KPLIB_PRST_SETVAR("colorAct", "ColorBlue"); // Name of the used/created army in this preset KPLIB_PRST_SETVAR("name", "NATO"); -// Side for this preset -KPLIB_PRST_SETVAR("side", west); + // Military alphabet -KPLIB_PRST_AR_CREATE("alphabet"); +KPLIB_PRST_CAT_BEGIN("alphabet"); (KPLIB_PRST_GETVAR("alphabet")) pushBack "Alpha"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Bravo"; (KPLIB_PRST_GETVAR("alphabet")) pushBack "Charlie"; @@ -120,9 +117,12 @@ KPLIB_PRST_SETVAR("mortar", "B_Mortar_01_F"); KPLIB_PRST_SETVAR("staticAa", "B_static_AA_F"); // Static Big AA Classname KPLIB_PRST_SETVAR("staticAaBig", "B_SAM_System_03_F"); +// Static Big AA Radar Classname +KPLIB_PRST_SETVAR("staticAaBigRadar", "B_Radar_System_01_F"); // Static AT Classname KPLIB_PRST_SETVAR("staticAt", "B_static_AT_F"); + /*------------------------------------------------------------ --- REGULAR SOLDIER CLASSNAMES --- Classnames of the different regular soldier types. @@ -203,221 +203,229 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "B_recon_TL_F"); --- BUILDABLE OBJECTS ARRAYS --- The arrays below are used to determine what can be build. Format: "classname", supplies, ammunition, fuel - Example: KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); - The above example adds the NATO Hunter MRAP to the light vehicles list + Example: KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_MRAP_01_F", 100, 0, 50); + The above example adds the NATO Hunter MRAP to the unarmed light vehicles list with the costs of 100 supplies, 0 ammunition and 50 fuel. ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_AR_CREATE("soldiers"); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_AR_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_AR_PLAIN("soldiers", "soldiersPl"); +KPLIB_PRST_CAT_BEGIN("soldiers"); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("soldiers"); // Special Forces units -KPLIB_PRST_AR_CREATE("specOps"); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); -KPLIB_PRST_AR_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); -KPLIB_PRST_AR_PLAIN("specOps", "specOpsPl"); - -// Light vehicles -KPLIB_PRST_AR_CREATE("lVeh"); -KPLIB_PRST_AR_ADD("lVeh", "B_Quadbike_01_F", 50, 0, 25); // Quadbike -KPLIB_PRST_AR_ADD("lVeh", "B_LSV_01_unarmed_F", 75, 0, 50); // Prowler -KPLIB_PRST_AR_ADD("lVeh", "B_LSV_01_armed_F", 75, 40, 50); // Prowler (HMG) -KPLIB_PRST_AR_ADD("lVeh", "B_LSV_01_AT_F", 75, 50, 50); // Prowler (AT) -KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_F", 100, 0, 50); // Hunter -KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_hmg_F", 100, 40, 50); // Hunter (HMG) -KPLIB_PRST_AR_ADD("lVeh", "B_MRAP_01_gmg_F", 100, 60, 50); // Hunter (GMG) -KPLIB_PRST_AR_PLAIN("lVeh", "lVehPl"); +KPLIB_PRST_CAT_BEGIN("specOps"); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfRifleman"), 50, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfLightAt"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMarksman"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfMedic"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfExplosive"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSpotter"), 80, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSharpshooter"), 85, 0, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfSniper"), 100, 10, 0); +KPLIB_PRST_CAT_ADD("specOps", KPLIB_PRST_GETVAR("sfDiver"), 100, 0, 0); +KPLIB_PRST_CAT_END("specOps"); + +// Light vehicles (unarmed) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_Quadbike_01_F", 50, 0, 25); // Quadbike +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_LSV_01_unarmed_F", 75, 0, 50); // Prowler +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "B_MRAP_01_F", 100, 0, 50); // Hunter +KPLIB_PRST_CAT_END("vehLightUnarmed"); + +// Light vehicles (armed) +KPLIB_PRST_CAT_BEGIN("vehLightArmed"); +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_LSV_01_armed_F", 75, 40, 50); // Prowler (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_LSV_01_AT_F", 75, 50, 50); // Prowler (AT) +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_MRAP_01_hmg_F", 100, 40, 50); // Hunter (HMG) +KPLIB_PRST_CAT_ADD("vehLightArmed", "B_MRAP_01_gmg_F", 100, 60, 50); // Hunter (GMG) +KPLIB_PRST_CAT_END("vehLightArmed"); // Transport trucks -KPLIB_PRST_AR_CREATE("transports"); -KPLIB_PRST_AR_ADD("transports", "B_Truck_01_transport_F", 125, 0, 75); // HEMTT Transport -KPLIB_PRST_AR_ADD("transports", "B_Truck_01_covered_F", 125, 0, 75); // HEMTT Transport (Covered) -KPLIB_PRST_AR_PLAIN("transports", "transportsPl"); +KPLIB_PRST_CAT_BEGIN("vehTrans"); +KPLIB_PRST_CAT_ADD("vehTrans", "B_Truck_01_transport_F", 125, 0, 75); // HEMTT Transport +KPLIB_PRST_CAT_ADD("vehTrans", "B_Truck_01_covered_F", 125, 0, 75); // HEMTT Transport (Covered) +KPLIB_PRST_CAT_END("vehTrans"); // Boats -KPLIB_PRST_AR_CREATE("boats"); -KPLIB_PRST_AR_ADD("boats", "B_Boat_Transport_01_F", 100, 0, 25); // Assault Boat -KPLIB_PRST_AR_ADD("boats", "B_Boat_Armed_01_minigun_F", 200, 80, 75); // Speedboat with Minigun -KPLIB_PRST_AR_ADD("boats", "B_SDV_01_F", 50, 0, 50); // SDV -KPLIB_PRST_AR_PLAIN("boats", "boatsPl"); +KPLIB_PRST_CAT_BEGIN("boats"); +KPLIB_PRST_CAT_ADD("boats", "B_Boat_Transport_01_F", 100, 0, 25); // Assault Boat +KPLIB_PRST_CAT_ADD("boats", "B_Boat_Armed_01_minigun_F", 200, 80, 75); // Speedboat with Minigun +KPLIB_PRST_CAT_ADD("boats", "B_SDV_01_F", 50, 0, 50); // SDV +KPLIB_PRST_CAT_END("boats"); + +// APCs +KPLIB_PRST_CAT_BEGIN("vehHeavyApc"); +KPLIB_PRST_CAT_ADD("vehHeavyApc", "B_APC_Wheeled_01_cannon_F", 200, 75, 125); // AMV-7 Marshall +KPLIB_PRST_CAT_ADD("vehHeavyApc", "B_APC_Tracked_01_rcws_F", 300, 100, 150); // IFV-6c Panther +KPLIB_PRST_CAT_END("vehHeavyApc"); // Heavy vehicles -KPLIB_PRST_AR_CREATE("hVeh"); -KPLIB_PRST_AR_ADD("hVeh", "B_APC_Wheeled_01_cannon_F", 200, 75, 125); // AMV-7 Marshall -KPLIB_PRST_AR_ADD("hVeh", "B_APC_Tracked_01_rcws_F", 300, 100, 150); // IFV-6c Panther -KPLIB_PRST_AR_ADD("hVeh", "B_AFV_Wheeled_01_cannon_F", 300, 250, 180); // Rhino MGS -KPLIB_PRST_AR_ADD("hVeh", "B_AFV_Wheeled_01_up_cannon_F", 400, 300, 200); // Rhino MGS UP -KPLIB_PRST_AR_ADD("hVeh", "B_MBT_01_cannon_F", 400, 300, 200); // M2A1 Slammer -KPLIB_PRST_AR_ADD("hVeh", "B_MBT_01_TUSK_F", 500, 350, 225); // M2A4 Slammer UP -KPLIB_PRST_AR_PLAIN("hVeh", "hVehPl"); +KPLIB_PRST_CAT_BEGIN("vehHeavy"); +KPLIB_PRST_CAT_ADD("vehHeavy", "B_AFV_Wheeled_01_cannon_F", 300, 250, 180); // Rhino MGS +KPLIB_PRST_CAT_ADD("vehHeavy", "B_AFV_Wheeled_01_up_cannon_F", 400, 300, 200); // Rhino MGS UP +KPLIB_PRST_CAT_ADD("vehHeavy", "B_MBT_01_cannon_F", 400, 300, 200); // M2A1 Slammer +KPLIB_PRST_CAT_ADD("vehHeavy", "B_MBT_01_TUSK_F", 500, 350, 225); // M2A4 Slammer UP +KPLIB_PRST_CAT_END("vehHeavy"); // Anti Air vehicles -KPLIB_PRST_AR_CREATE("antiAir"); -KPLIB_PRST_AR_ADD("antiAir", "B_APC_Tracked_01_AA_F", 300, 250, 175); // IFV-6a Cheetah -KPLIB_PRST_AR_PLAIN("antiAir", "antiAirPl"); +KPLIB_PRST_CAT_BEGIN("vehAntiAir"); +KPLIB_PRST_CAT_ADD("vehAntiAir", "B_APC_Tracked_01_AA_F", 300, 250, 175); // IFV-6a Cheetah +KPLIB_PRST_CAT_END("vehAntiAir"); // Artillery vehicles -KPLIB_PRST_AR_CREATE("arty"); -KPLIB_PRST_AR_ADD("arty", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar -KPLIB_PRST_AR_ADD("arty", "B_MBT_01_arty_F", 600, 1250, 300); // M4 Scorcher -KPLIB_PRST_AR_ADD("arty", "B_MBT_01_mlrs_F", 800, 1750, 400); // M5 Sandstorm MLRS -KPLIB_PRST_AR_PLAIN("arty", "artyPl"); +KPLIB_PRST_CAT_BEGIN("vehArty"); +KPLIB_PRST_CAT_ADD("vehArty", "B_MBT_01_arty_F", 600, 1250, 300); // M4 Scorcher +KPLIB_PRST_CAT_ADD("vehArty", "B_MBT_01_mlrs_F", 800, 1750, 400); // M5 Sandstorm MLRS +KPLIB_PRST_CAT_END("vehArty"); // Transport Helicopters -KPLIB_PRST_AR_CREATE("heliTrans"); -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Transport_01_F", 250, 80, 150); // UH-80 Ghost Hawk -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Transport_01_camo_F", 250, 80, 150); // UH-80 Ghost Hawk (Camo) -KPLIB_PRST_AR_ADD("heliTrans", "B_Heli_Transport_03_F", 300, 80, 175); // CH-67 Huron (Armed) -KPLIB_PRST_AR_PLAIN("heliTrans", "heliTransPl"); +KPLIB_PRST_CAT_BEGIN("heliTrans"); +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Light_01_F", 200, 0, 100); // MH-9 Hummingbird +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Transport_01_F", 250, 80, 150); // UH-80 Ghost Hawk +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Transport_01_camo_F", 250, 80, 150); // UH-80 Ghost Hawk (Camo) +KPLIB_PRST_CAT_ADD("heliTrans", "B_Heli_Transport_03_F", 300, 80, 175); // CH-67 Huron (Armed) +KPLIB_PRST_CAT_END("heliTrans"); // Attack Helicopters -KPLIB_PRST_AR_CREATE("heliAttack"); -KPLIB_PRST_AR_ADD("heliAttack", "B_Heli_Light_01_dynamicLoadout_F", 200, 100, 100); // AH-9 Pawnee -KPLIB_PRST_AR_ADD("heliAttack", "B_Heli_Attack_01_dynamicLoadout_F", 500, 400, 200); // AH-99 Blackfoot -KPLIB_PRST_AR_PLAIN("heliAttack", "heliAttackPl"); +KPLIB_PRST_CAT_BEGIN("heliAttack"); +KPLIB_PRST_CAT_ADD("heliAttack", "B_Heli_Light_01_dynamicLoadout_F", 200, 100, 100); // AH-9 Pawnee +KPLIB_PRST_CAT_ADD("heliAttack", "B_Heli_Attack_01_dynamicLoadout_F", 500, 400, 200); // AH-99 Blackfoot +KPLIB_PRST_CAT_ADD("heliAttack", "B_T_VTOL_01_armed_F", 750, 1500, 500); // V-44 X Blackfish (Armed) +KPLIB_PRST_CAT_END("heliAttack"); // Transport Planes -KPLIB_PRST_AR_CREATE("planeTrans"); -KPLIB_PRST_AR_ADD("planeTrans", "B_T_VTOL_01_armed_F", 750, 1500, 500); // V-44 X Blackfish (Armed) -KPLIB_PRST_AR_ADD("planeTrans", "B_T_VTOL_01_infantry_F", 750, 0, 500); // V-44 X Blackfish (Infantry) -KPLIB_PRST_AR_ADD("planeTrans", "B_T_VTOL_01_vehicle_F", 750, 0, 500); // V-44 X Blackfish (Vehicle) -KPLIB_PRST_AR_PLAIN("planeTrans", "planeTransPl"); +KPLIB_PRST_CAT_BEGIN("planeTrans"); +KPLIB_PRST_CAT_ADD("planeTrans", "B_T_VTOL_01_infantry_F", 750, 0, 500); // V-44 X Blackfish (Infantry) +KPLIB_PRST_CAT_ADD("planeTrans", "B_T_VTOL_01_vehicle_F", 750, 0, 500); // V-44 X Blackfish (Vehicle) +KPLIB_PRST_CAT_END("planeTrans"); // Jets -KPLIB_PRST_AR_CREATE("jets"); -KPLIB_PRST_AR_ADD("jets", "B_Plane_CAS_01_dynamicLoadout_F", 1000, 800, 400); // A-164 Wipeout (CAS) -KPLIB_PRST_AR_ADD("jets", "B_Plane_Fighter_01_F", 1500, 1750, 450); // F/A-181 Black Wasp II -KPLIB_PRST_AR_ADD("jets", "B_Plane_Fighter_01_Stealth_F", 1500, 1750, 450); // F/A-181 Black Wasp II (Stealth) -KPLIB_PRST_AR_PLAIN("jets", "jetsPl"); +KPLIB_PRST_CAT_BEGIN("jets"); +KPLIB_PRST_CAT_ADD("jets", "B_Plane_CAS_01_dynamicLoadout_F", 1000, 800, 400); // A-164 Wipeout (CAS) +KPLIB_PRST_CAT_ADD("jets", "B_Plane_Fighter_01_F", 1500, 1750, 450); // F/A-181 Black Wasp II +KPLIB_PRST_CAT_ADD("jets", "B_Plane_Fighter_01_Stealth_F", 1500, 1750, 450); // F/A-181 Black Wasp II (Stealth) +KPLIB_PRST_CAT_END("jets"); // Static Defenses -KPLIB_PRST_AR_CREATE("statics"); -KPLIB_PRST_AR_ADD("statics", "B_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 -KPLIB_PRST_AR_ADD("statics", "B_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) -KPLIB_PRST_AR_ADD("statics", "B_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm -KPLIB_PRST_AR_ADD("statics", "B_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 100, 250, 0); // MIM-145 Defender -KPLIB_PRST_AR_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) -KPLIB_PRST_AR_PLAIN("statics", "staticsPl"); - -// Logistic vehicles and objects -KPLIB_PRST_AR_CREATE("logistic"); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); -KPLIB_PRST_AR_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); -KPLIB_PRST_AR_ADD("logistic", "B_Radar_System_01_F", 250, 0, 0); // AN/MPQ-105 Radar -KPLIB_PRST_AR_ADD("logistic", "B_Truck_01_Repair_F", 325, 0, 75); // HEMTT Repair -KPLIB_PRST_AR_ADD("logistic", "B_Truck_01_fuel_F", 125, 0, 275); // HEMTT Fuel -KPLIB_PRST_AR_ADD("logistic", "B_Truck_01_ammo_F", 125, 200, 75); // HEMTT Ammo -KPLIB_PRST_AR_ADD("logistic", "B_Slingload_01_Repair_F", 275, 0, 0); // Huron Repair Container -KPLIB_PRST_AR_ADD("logistic", "B_Slingload_01_Fuel_F", 75, 0, 200); // Huron Fuel Container -KPLIB_PRST_AR_ADD("logistic", "B_Slingload_01_Ammo_F", 75, 200, 0); // Huron Ammo Container -KPLIB_PRST_AR_PLAIN("logistic", "logisticPl"); +KPLIB_PRST_CAT_BEGIN("statics"); +KPLIB_PRST_CAT_ADD("statics", "B_HMG_01_F", 25, 40, 0); // Mk30 HMG .50 +KPLIB_PRST_CAT_ADD("statics", "B_HMG_01_high_F", 25, 40, 0); // Mk30 HMG .50 (Raised) +KPLIB_PRST_CAT_ADD("statics", "B_GMG_01_F", 35, 60, 0); // Mk32 GMG 20mm +KPLIB_PRST_CAT_ADD("statics", "B_GMG_01_high_F", 35, 60, 0); // Mk32 GMG 20mm (Raised) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAa"), 50, 100, 0); // Static Titan Launcher (AA) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAt"), 50, 100, 0); // Static Titan Launcher (AT) +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("mortar"), 80, 150, 0); // Mk6 Mortar +KPLIB_PRST_CAT_ADD("statics", KPLIB_PRST_GETVAR("staticAaBig"), 250, 300, 0); // MIM-145 Defender +KPLIB_PRST_CAT_END("statics"); + +// Logistic/Utility vehicles and objects +KPLIB_PRST_CAT_BEGIN("logistic"); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("arsenalBox"), 100, 200, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("respawnTruck"), 200, 0, 100); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobBox"), 300, 500, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("fobTruck"), 300, 500, 75); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageSmall"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("storageLarge"), 0, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("logiBuilding"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("airBuilding"), 1000, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotHeli"), 250, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("slotJet"), 500, 0, 0); +KPLIB_PRST_CAT_ADD("logistic", KPLIB_PRST_GETVAR("staticAaBigRadar"), 250, 0, 0); // AN/MPQ-105 Radar +KPLIB_PRST_CAT_ADD("logistic", "B_Truck_01_Repair_F", 325, 0, 75); // HEMTT Repair +KPLIB_PRST_CAT_ADD("logistic", "B_Truck_01_fuel_F", 125, 0, 275); // HEMTT Fuel +KPLIB_PRST_CAT_ADD("logistic", "B_Truck_01_ammo_F", 125, 200, 75); // HEMTT Ammo +KPLIB_PRST_CAT_ADD("logistic", "B_Slingload_01_Repair_F", 275, 0, 0); // Huron Repair Container +KPLIB_PRST_CAT_ADD("logistic", "B_Slingload_01_Fuel_F", 75, 0, 200); // Huron Fuel Container +KPLIB_PRST_CAT_ADD("logistic", "B_Slingload_01_Ammo_F", 75, 200, 0); // Huron Ammo Container +KPLIB_PRST_CAT_END("logistic"); // Decorative Objects -KPLIB_PRST_AR_CREATE("deco"); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_NATO_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_US_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_UK_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_White_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_open_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "CamoNet_BLUFOR_big_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampSolar_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_LampAirport_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CampingTable_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_altis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_WaterTank_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncShelter_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall1_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_CncWall4_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); -KPLIB_PRST_AR_ADD("deco", "Land_Razorwire_F", 0, 0, 0); -KPLIB_PRST_AR_PLAIN("deco", "decoPl"); +KPLIB_PRST_CAT_BEGIN("deco"); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_House_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Patrol_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Cargo_Tower_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_NATO_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_US_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_UK_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_White_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_house_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Medevac_HQ_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Flag_RedCrystal_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_BLUFOR_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_BLUFOR_open_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "CamoNet_BLUFOR_big_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_single_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PortableLight_double_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampSolar_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampHalogen_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampStreet_small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_LampAirport_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadCircle_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HelipadRescue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_green_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "PortableHelipadLight_01_red_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingChair_V2_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CampingTable_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_altis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_stratis_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "MapBoard_seismic_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Pallet_MilBoxes_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_empty_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_open_full_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_PaperBox_closed_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_DieselGroundPowerUnit_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_ToolTrolley_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Workbench_01_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_blue_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_khaki_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_01_yellow_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_GasTank_02_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BarrelWater_grey_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterBarrel_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_WaterTank_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Round_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Short_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Long_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_Corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagFence_End_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Small_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Large_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_BagBunker_Tower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_3_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrier_5_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall6_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corner_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierWall_corridor_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_HBarrierTower_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncBarrierMedium4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_4m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Concrete_SmallWall_8m_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncShelter_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall1_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_CncWall4_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryArea_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); +KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); +KPLIB_PRST_CAT_END("deco"); From a5e624c1245135181f873d7724647edc72219b9b Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 14:34:37 +0100 Subject: [PATCH 04/42] Removed old preset files --- Missionframework/presets/blufor/custom.sqf | 512 --------------------- Missionframework/presets/opfor/custom.sqf | 207 --------- 2 files changed, 719 deletions(-) delete mode 100644 Missionframework/presets/blufor/custom.sqf delete mode 100644 Missionframework/presets/opfor/custom.sqf diff --git a/Missionframework/presets/blufor/custom.sqf b/Missionframework/presets/blufor/custom.sqf deleted file mode 100644 index ea622e15b..000000000 --- a/Missionframework/presets/blufor/custom.sqf +++ /dev/null @@ -1,512 +0,0 @@ -/* - KP Liberation custom blufor preset - - File: custom.sqf - Author: KP Liberation Dev Team - https://github.com/KillahPotatoes - Date: 2017-10-16 - Last Update: 2018-01-05 - License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html - - Description: - Custom preset file for BLUFOR units which contains vanilla assets by default. - Vehicles from other common mods are also listed and therefore available if the corresponding mods are loaded by server and clients. - - Needed Mods: - - None - - Optional Mods: - - BWMod - - F/A-18 - - F-15C - - RHSUSAF -*/ - -// Side for this preset -KPLIB_preset_sidePlayers = west; -// Color for this side -KPLIB_preset_colorPlayers = "ColorWEST"; - -/*------------------------------------------------------------ - --- SUPPORT CLASSNAMES --- - Each of these should be unique, the same classnames for different purposes may cause various unpredictable issues with player actions. - Or not, just don't try! -------------------------------------------------------------*/ - -// This is the main FOB HQ building. Default is "Land_Cargo_HQ_V1_F". -KPLIB_preset_fobBuilding = "Land_Cargo_HQ_V1_F"; -// This is the FOB as a container. Default is "B_Slingload_01_Cargo_F". -KPLIB_preset_fobBox = "B_Slingload_01_Cargo_F"; -// This is the FOB as a vehicle. Default is "B_Truck_01_box_F". -KPLIB_preset_fobTruck = "B_Truck_01_box_F"; -// This is the virtual arsenal as portable supply crates. Default is "B_supplyCrate_F". -KPLIB_preset_arsenalBox = "B_supplyCrate_F"; -// This is the mobile respawn (and medical) truck. Default is "B_Truck_01_medical_F". -KPLIB_preset_respawnTruck = "B_Truck_01_medical_F"; -// This is Potato 01, a multipurpose mobile respawn as a helicopter. Default is "B_Heli_Transport_03_unarmed_F". -KPLIB_preset_potato = "B_Heli_Transport_03_unarmed_F"; -// This defines the crew for vehicles. Default is "B_crew_F". -KPLIB_preset_crewman = "B_crew_F"; -// This defines the pilot for helicopters. Default is "B_Helipilot_F". -KPLIB_preset_hpilot = "B_Helipilot_F"; -// This defines the pilot for jets. Default is "B_Fighter_Pilot_F". -KPLIB_preset_jpilot = "B_Fighter_Pilot_F"; -// These are the additional helicopter which spawn at the Operation Base. Default is "B_Heli_Light_01_F". -KPLIB_preset_addHeli = "B_Heli_Light_01_F"; -// These are the boats which spawn at the stern of the Freedom. Default is "B_Boat_Transport_01_F". -KPLIB_preset_addBoat = "B_Boat_Transport_01_F"; -// These are the trucks which are used in the logistic convoy system. Default is "B_Truck_01_transport_F". -KPLIB_preset_logiTruck = "B_Truck_01_transport_F"; -// The small storage area for resources. Default is "ContainmentArea_02_sand_F". -KPLIB_preset_smallStorage = "ContainmentArea_02_sand_F"; -// The large storage area for resources. Default is "ContainmentArea_01_sand_F". -KPLIB_preset_largeStorage = "ContainmentArea_01_sand_F"; -// The building defined to unlock FOB recycling functionality. Default is "Land_CarService_F". -KPLIB_preset_recycleBuilding = "Land_CarService_F"; -// The building defined to unlock FOB air vehicle functionality. Default is "Land_Radar_Small_F". -KPLIB_preset_airBuilding = "Land_Radar_Small_F"; -// The helipad used to increase the GLOBAL rotary-wing cap. Default is "Land_HelipadSquare_F". -KPLIB_preset_heliSlot = "Land_HelipadSquare_F"; -// The hangar used to increase the GLOBAL fixed-wing cap. Default is "Land_TentHangar_V1_F". -KPLIB_preset_planeSlot = "Land_TentHangar_V1_F"; -// This defines the supply crates, as in resources. Default is "CargoNet_01_box_F". -KPLIB_preset_sCrate = "CargoNet_01_box_F"; -// This defines the ammunition crates. Default is "B_CargoNet_01_ammo_F". -KPLIB_preset_aCrate = "B_CargoNet_01_ammo_F"; -// This defines the fuel crates. Default is "CargoNet_01_barrels_F". -KPLIB_preset_fCrate = "CargoNet_01_barrels_F"; - -/*------------------------------------------------------------ - --- FRIENDLY CLASSNAMES --- - Each array below represents one of the 7 pages within the build menu. - Format: ["vehicle_classname",supplies,ammunition,fuel], Example: ["B_APC_Tracked_01_AA_F",300,150,150], - The above example is the NATO IFV-6a Cheetah, it costs 300 supplies, 150 ammunition and 150 fuel to build. -------------------------------------------------------------*/ - -// Buildable single infantry units -KPLIB_preset_infantry = [ - ["B_Soldier_lite_F",15,0,0], //Rifleman (Light) - ["B_Soldier_F",20,0,0], //Rifleman - ["B_soldier_LAT_F",30,0,0], //Rifleman (AT) - ["B_Soldier_GL_F",25,0,0], //Grenadier - ["B_soldier_AR_F",25,0,0], //Autorifleman - ["B_HeavyGunner_F",35,0,0], //Heavygunner - ["B_soldier_M_F",30,0,0], //Marksman - ["B_Sharpshooter_F",40,0,0], //Sharpshooter - ["B_soldier_AT_F",50,10,0], //AT Specialist - ["B_soldier_AA_F",50,10,0], //AA Specialist - ["B_medic_F",30,0,0], //Combat Life Saver - ["B_engineer_F",30,0,0], //Engineer - ["B_soldier_exp_F",30,0,0], //Explosives Specialist - ["B_recon_F",20,0,0], //Recon Scout - ["B_recon_LAT_F",30,0,0], //Recon Scout (AT) - ["B_recon_M_F",30,0,0], //Recon Marksman - ["B_Recon_Sharpshooter_F",40,0,0], //Recon Sharpshooter - ["B_recon_medic_F",30,0,0], //Recon Paramedic - ["B_recon_exp_F",30,0,0], //Recon Demolition Expert - ["B_sniper_F",70,5,0], //Sniper - ["B_ghillie_ard_F",70,5,0], //Sniper (Arid) - ["B_ghillie_lsh_F",70,5,0], //Sniper (Lush) - ["B_ghillie_sard_F",70,5,0], //Sniper (Semi-Arid) - ["B_spotter_F",20,0,0], //Spotter - ["B_crew_F",10,0,0], //Crewman - ["B_soldier_PG_F",20,0,0], //Para Trooper - ["B_helicrew_F",10,0,0], //Helicopter Crew - ["B_Helipilot_F",10,0,0], //Helicopter Pilot - ["B_Pilot_F",10,0,0] //Pilot -]; - -// Buildable light vehicles -KPLIB_preset_lightVeh = [ - ["B_Quadbike_01_F",50,0,25], //Quad Bike - ["B_LSV_01_unarmed_F",75,0,50], //Prowler - ["B_LSV_01_armed_F",75,40,50], //Prowler (HMG) - ["B_MRAP_01_F",100,0,50], //Hunter - ["B_MRAP_01_hmg_F",100,40,50], //Hunter (HMG) - ["B_MRAP_01_gmg_F",100,60,50], //Hunter (GMG) - ["I_MRAP_03_F",100,0,50], //Strider - ["I_MRAP_03_hmg_F",100,40,50], //Strider (HMG) - ["I_MRAP_03_gmg_F",100,60,50], //Strider (GMG) - ["rhsusf_m1025_w",100,0,50], //M1025A2 - ["rhsusf_m1025_w_m2",100,40,50], //M1025A2 (M2) - ["rhsusf_m1025_w_mk19",100,60,50], //M1025A2 (Mk19) - ["rhsusf_m998_w_2dr_fulltop",100,0,50], //M1097A2 (2D) - ["rhsusf_m998_w_2dr_halftop",100,0,50], //M1097A2 (2D / open back) - ["BWA3_Eagle_Fleck",100,0,50], //Eagle IV - ["BWA3_Eagle_FLW100_Fleck",100,100,50], //Eagle IV (FLW 100) - ["rhsusf_M1230a1_usarmy_wd",120,0,60], //M1230A1 (MEDEVAC) - ["B_Truck_01_transport_F",125,0,75], //HEMTT Transport - ["B_Truck_01_covered_F",125,0,75], //HEMTT Transport (Covered) - ["rhsusf_M1083A1P2_wd_fmtv_usarmy",125,0,75], //M1083A1P2 (covered infantry truck) - ["rhsusf_M1083A1P2_wd_open_fmtv_usarmy",125,0,75], //M1083A1P2 (open infantry truck) - ["rhsusf_M977A4_BKIT_usarmy_wd",125,0,75], //M977A4 BKIT (cargo truck) - ["rhsusf_M977A4_BKIT_M2_usarmy_wd",125,40,75], //M977A4 BKIT (cargo truck with HMG) - ["B_UGV_01_F",150,0,50], //UGV Stomper - ["B_UGV_01_rcws_F",150,40,50], //UGV Stomper (RCWS) - ["B_Boat_Transport_01_F",100,0,25], //Assault Boat - ["B_Boat_Armed_01_minigun_F",200,80,75], //Speedboat Minigun - ["rhsusf_mkvsoc",250,200,100], //Mk.V SOCOM - ["B_SDV_01_F",150,0,50] //SDV -]; - -// Buildable heavy vehicles -KPLIB_preset_heavyVeh = [ - ["rhsusf_m113_usarmy",200,40,100], //M113A3 (M2) - ["rhsusf_m113_usarmy_MK19",200,60,100], //M113A3 (Mk19) - ["rhsusf_m113_usarmy_medical",200,0,100], //M113A3 (Medical) - ["B_APC_Wheeled_01_cannon_F",200,75,125], //AMV-7 Marshall - ["I_APC_Wheeled_03_cannon_F",200,75,125], //AFV-4 Gorgon - ["B_APC_Tracked_01_rcws_F",300,100,150], //IFV-6c Panther - ["I_APC_tracked_03_cannon_F",300,150,150], //FV-720 Mora - ["RHS_M2A2_BUSKI_WD",300,200,150], //M2A2ODS (Busk I) - ["BWA3_Puma_Fleck",300,225,150], //IFV Puma - ["RHS_M2A3_BUSKIII_wd",300,250,175], //M2A3 (Busk III) - ["B_APC_Tracked_01_AA_F",300,250,175], //IFV-6a Cheetah - ["RHS_M6_wd",300,250,175], //M6A2 - ["B_MBT_01_cannon_F",400,300,200], //M2A1 Slammer - ["I_MBT_03_cannon_F",400,300,200], //MBT-52 Kuma - ["rhsusf_m1a1aim_tuski_wd",400,350,225], //M1A1SA (Tusk I) - ["B_MBT_01_TUSK_F",500,350,225], //M2A4 Slammer UP - ["rhsusf_m1a2sep1tuskiiwd_usarmy",500,400,250], //M1A2SEPv1 (Tusk II) - ["BWA3_Leopard2A6M_Fleck",500,400,250], //MBT Leopard 2A6M - ["B_MBT_01_arty_F",600,1250,300], //M4 Scorcher - ["rhsusf_m109_usarmy",600,1250,300], //M109A6 - ["B_MBT_01_mlrs_F",800,1750,400] //M5 Sandstorm MLRS -]; - -// Buildable air vehicles -KPLIB_preset_airVeh = [ - ["B_UAV_01_F",75,0,25], //AR-2 Darter - ["B_UAV_06_F",80,0,30], //AL-6 Pelican (Cargo) - ["B_Heli_Light_01_F",200,0,100], //MH-9 Hummingbird - ["B_Heli_Light_01_dynamicLoadout_F",200,100,100], //AH-9 Pawnee - ["RHS_MELB_MH6M",200,0,100], //MH-6M Little Bird - ["RHS_MELB_AH6M",200,200,100], //AH-6M Pawnee - ["I_Heli_light_03_unarmed_F",225,0,125], //WY-55 Hellcat - ["I_Heli_light_03_dynamicLoadout_F",225,200,125], //WY-55 Hellcat (Armed) - ["RHS_UH1Y_UNARMED",225,0,125], //UH-1Y (Unarmed) - ["RHS_UH1Y_GS",225,200,125], //UH-1Y (Ground Suppression) - ["B_Heli_Attack_01_dynamicLoadout_F",500,400,200], //AH-99 Blackfoot - ["RHS_AH1Z",500,500,200], //AH-1Z (Multi-Role) - ["RHS_AH64D_wd",750,750,250], //AH-64D (Multi-Role) - ["BWA3_Tiger_RMK_Universal",750,750,250], //UH Tiger RMK (Universal) - ["B_Heli_Transport_01_F",250,80,150], //UH-80 Ghost Hawk - ["B_Heli_Transport_01_camo_F",250,80,150], //UH-80 Ghost Hawk (Camo) - ["RHS_UH60M2",250,0,150], //UH-60M (Unarmed) - ["RHS_UH60M",250,80,150], //UH-60M - ["RHS_UH60M_MEV2",300,0,150], //UH-60M MEV2 - ["RHS_CH_47F",275,80,175], //CH-47 Chinook (Armed) - ["I_Heli_Transport_02_F",275,0,175], //CH-49 Mohawk - ["rhsusf_CH53E_USMC",300,0,175], //CH-53E Super Stallion - ["B_Heli_Transport_03_F",300,80,175], //CH-67 Huron (Armed) - ["B_UAV_02_dynamicLoadout_F",400,400,200], //MQ-4A Greyhawk - ["B_T_UAV_03_dynamicLoadout_F",450,500,250], //MQ-12 Falcon - ["B_UAV_05_F",500,500,200], //UCAV Sentinel - ["I_Plane_Fighter_03_dynamicLoadout_F",500,400,350], //A-143 Buzzard - ["B_Plane_CAS_01_dynamicLoadout_F",1000,800,400], //A-164 Wipeout (CAS) - ["RHS_A10",1000,1000,400], //A-10A (CAS) - ["I_Plane_Fighter_04_F",1000,1200,400], //A-149 Gryphon - ["FIR_F15C",1250,1250,450], //F-15C Eagle - ["FIR_F15D",1250,1250,450], //F-15D Eagle - ["FIR_F15E",1250,1500,450], //F-15E Strike Eagle - ["JS_JC_FA18E",1500,1750,450], //F/A-18 E Super Hornet - ["JS_JC_FA18F",1500,1750,450], //F/A-18 F Super Hornet - ["B_Plane_Fighter_01_F",1500,1750,450], //F/A-181 Black Wasp II - ["B_Plane_Fighter_01_Stealth_F",1500,1750,450], //F/A-181 Black Wasp II (Stealth) - ["B_T_VTOL_01_armed_F",750,1500,500], //V-44 X Blackfish (Armed) - ["B_T_VTOL_01_infantry_F",750,0,500], //V-44 X Blackfish (Infantry) - ["B_T_VTOL_01_vehicle_F",750,0,500] //V-44 X Blackfish (Vehicle) -]; - -// Buildable static defense -KPLIB_preset_staticVeh = [ - ["B_HMG_01_F",25,40,0], //Mk30A HMG .50 - ["B_HMG_01_high_F",25,40,0], //Mk30 HMG .50 (Raised) - ["B_HMG_01_A_F",35,40,0], //Mk30 HMG .50 (Autonomous) - ["B_GMG_01_F",35,60,0], //Mk32A GMG 20mm - ["B_GMG_01_high_F",35,60,0], //Mk32 GMG 20mm (Raised) - ["B_GMG_01_A_F",45,60,0], //Mk32 GMG 20mm (Autonomous) - ["B_static_AT_F",50,100,0], //Static Titan Launcher (AT) - ["B_static_AA_F",50,100,0], //Static Titan Launcher (AA) - ["B_Mortar_01_F",80,150,0], //Mk6 Mortar - ["RHS_M119_WD",100,200,0] //M119A2 -]; - -// Buildable decorative assets -KPLIB_preset_buildings = [ - ["Land_Cargo_House_V1_F",0,0,0], - ["Land_Cargo_Patrol_V1_F",0,0,0], - ["Land_Cargo_Tower_V1_F",0,0,0], - ["Flag_NATO_F",0,0,0], - ["Flag_US_F",0,0,0], - ["BWA3_Flag_Ger_F",0,0,0], - ["Flag_UK_F",0,0,0], - ["Flag_White_F",0,0,0], - ["Land_Medevac_house_V1_F",0,0,0], - ["Land_Medevac_HQ_V1_F",0,0,0], - ["Flag_RedCrystal_F",0,0,0], - ["CamoNet_BLUFOR_F",0,0,0], - ["CamoNet_BLUFOR_open_F",0,0,0], - ["CamoNet_BLUFOR_big_F",0,0,0], - ["Land_PortableLight_single_F",0,0,0], - ["Land_PortableLight_double_F",0,0,0], - ["Land_LampSolar_F",0,0,0], - ["Land_LampHalogen_F",0,0,0], - ["Land_LampStreet_small_F",0,0,0], - ["Land_LampAirport_F",0,0,0], - ["Land_HelipadCircle_F",0,0,0], - ["Land_HelipadRescue_F",0,0,0], - ["PortableHelipadLight_01_blue_F",0,0,0], - ["PortableHelipadLight_01_green_F",0,0,0], - ["PortableHelipadLight_01_red_F",0,0,0], - ["Land_CampingChair_V1_F",0,0,0], - ["Land_CampingChair_V2_F",0,0,0], - ["Land_CampingTable_F",0,0,0], - ["MapBoard_altis_F",0,0,0], - ["MapBoard_stratis_F",0,0,0], - ["MapBoard_seismic_F",0,0,0], - ["Land_Pallet_MilBoxes_F",0,0,0], - ["Land_PaperBox_open_empty_F",0,0,0], - ["Land_PaperBox_open_full_F",0,0,0], - ["Land_PaperBox_closed_F",0,0,0], - ["Land_DieselGroundPowerUnit_01_F",0,0,0], - ["Land_ToolTrolley_02_F",0,0,0], - ["Land_WeldingTrolley_01_F",0,0,0], - ["Land_Workbench_01_F",0,0,0], - ["Land_GasTank_01_blue_F",0,0,0], - ["Land_GasTank_01_khaki_F",0,0,0], - ["Land_GasTank_01_yellow_F",0,0,0], - ["Land_GasTank_02_F",0,0,0], - ["Land_BarrelWater_F",0,0,0], - ["Land_BarrelWater_grey_F",0,0,0], - ["Land_WaterBarrel_F",0,0,0], - ["Land_WaterTank_F",0,0,0], - ["Land_BagFence_Round_F",0,0,0], - ["Land_BagFence_Short_F",0,0,0], - ["Land_BagFence_Long_F",0,0,0], - ["Land_BagFence_Corner_F",0,0,0], - ["Land_BagFence_End_F",0,0,0], - ["Land_BagBunker_Small_F",0,0,0], - ["Land_BagBunker_Large_F",0,0,0], - ["Land_BagBunker_Tower_F",0,0,0], - ["Land_HBarrier_1_F",0,0,0], - ["Land_HBarrier_3_F",0,0,0], - ["Land_HBarrier_5_F",0,0,0], - ["Land_HBarrier_Big_F",0,0,0], - ["Land_HBarrierWall4_F",0,0,0], - ["Land_HBarrierWall6_F",0,0,0], - ["Land_HBarrierWall_corner_F",0,0,0], - ["Land_HBarrierWall_corridor_F",0,0,0], - ["Land_HBarrierTower_F",0,0,0], - ["Land_CncBarrierMedium_F",0,0,0], - ["Land_CncBarrierMedium4_F",0,0,0], - ["Land_Concrete_SmallWall_4m_F",0,0,0], - ["Land_Concrete_SmallWall_8m_F",0,0,0], - ["Land_CncShelter_F",0,0,0], - ["Land_CncWall1_F",0,0,0], - ["Land_CncWall4_F",0,0,0], - ["Land_Sign_WarningMilitaryArea_F",0,0,0], - ["Land_Sign_WarningMilAreaSmall_F",0,0,0], - ["Land_Sign_WarningMilitaryVehicles_F",0,0,0], - ["Land_Razorwire_F",0,0,0], - ["Land_ClutterCutter_large_F",0,0,0] -]; - -// Buildable vehicles with special functionality -KPLIB_preset_supportVeh = [ - [KPLIB_preset_arsenalBox,100,200,0], - [KPLIB_preset_respawnTruck,200,0,100], - [KPLIB_preset_fobBox,300,500,0], - [KPLIB_preset_fobTruck,300,500,75], - [KPLIB_preset_smallStorage,0,0,0], - [KPLIB_preset_largeStorage,0,0,0], - [KPLIB_preset_recycleBuilding,250,0,0], - [KPLIB_preset_airBuilding,1000,0,0], - [KPLIB_preset_heliSlot,250,0,0], - [KPLIB_preset_planeSlot,500,0,0], - ["ACE_medicalSupplyCrate_advanced",50,0,0], - ["ACE_Box_82mm_Mo_HE",50,40,0], - ["ACE_Box_82mm_Mo_Smoke",50,10,0], - ["ACE_Box_82mm_Mo_Illum",50,10,0], - ["ACE_Wheel",10,0,0], - ["ACE_Track",10,0,0], - ["B_APC_Tracked_01_CRV_F",500,250,350], //CRV-6e Bobcat - ["B_Truck_01_Repair_F",325,0,75], //HEMTT Repair - ["B_Truck_01_fuel_F",125,0,275], //HEMTT Fuel - ["B_Truck_01_ammo_F",125,200,75], //HEMTT Ammo - ["rhsusf_M977A4_REPAIR_BKIT_usarmy_wd",325,0,75], //M977A4 Repair - ["rhsusf_M978A4_BKIT_usarmy_wd",125,0,275], //M978A4 Fuel - ["rhsusf_M977A4_AMMO_BKIT_usarmy_wd",125,200,75], //M977A4 Ammo - ["B_Slingload_01_Repair_F",275,0,0], //Huron Repair - ["B_Slingload_01_Fuel_F",75,0,200], //Huron Fuel - ["B_Slingload_01_Ammo_F",75,200,0] //Huron Ammo -]; - -// All the UAVs must be declared here, otherwise there shall be UAV controlling issues. Namely: you won't be able to control them. -KPLIB_preset_uavs = [ - "B_UAV_01_F", //AR-2 Darter - "B_UGV_01_F", //UGV Stomper - "B_UGV_01_rcws_F", //UGV Stomper (RCWS) - "B_UAV_02_dynamicLoadout_F", //MQ-4A Greyhawk - "B_T_UAV_03_dynamicLoadout_F", //MQ-12 Falcon - "B_UAV_05_F", //UCAV Sentinel - "B_UAV_06_F" //AL-6 Pelican -]; - -/*------------------------------------------------------------ - --- SQUAD COMPOSITIONS --- - Pre-made squads for the commander build menu. - These shouldn't exceed 10 members. -------------------------------------------------------------*/ - -// Light infantry squad. -KPLIB_preset_lightSquad = [ - "B_Soldier_TL_F", - "B_Soldier_F", - "B_Soldier_F", - "B_Soldier_LAT_F", - "B_Soldier_GL_F", - "B_soldier_AR_F", - "B_soldier_AR_F", - "B_soldier_M_F", - "B_medic_F", - "B_engineer_F" -]; - -// Heavy infantry squad. -KPLIB_preset_heavySquad = [ - "B_Soldier_TL_F", - "B_Soldier_LAT_F", - "B_Soldier_LAT_F", - "B_Soldier_GL_F", - "B_soldier_AR_F", - "B_soldier_AR_F", - "B_HeavyGunner_F", - "B_Sharpshooter_F", - "B_medic_F", - "B_engineer_F" -]; - -// AT specialists squad. -KPLIB_preset_atSquad = [ - "B_Soldier_TL_F", - "B_Soldier_F", - "B_Soldier_F", - "B_soldier_AT_F", - "B_soldier_AT_F", - "B_soldier_AT_F", - "B_medic_F", - "B_soldier_F" -]; - -// AA specialists squad. -KPLIB_preset_aaSquad = [ - "B_Soldier_TL_F", - "B_Soldier_F", - "B_Soldier_F", - "B_soldier_AA_F", - "B_soldier_AA_F", - "B_soldier_AA_F", - "B_medic_F", - "B_soldier_F" -]; - -// Force recon squad. -KPLIB_preset_reconSquad = [ - "B_recon_TL_F", - "B_recon_F", - "B_recon_F", - "B_recon_LAT_F", - "B_recon_M_F", - "B_recon_M_F", - "B_Recon_Sharpshooter_F", - "B_Recon_Sharpshooter_F", - "B_recon_medic_F", - "B_recon_exp_F" -]; - -// Paratroopers squad. -KPLIB_preset_paraSquad = [ - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F", - "B_soldier_PG_F" -]; - -/*------------------------------------------------------------ - --- Locked Vehicles --- - Vehicles from this list will be locked at campaign start. - You need to capture enemy military bases to unlock vehicles. -------------------------------------------------------------*/ - -// List for locked vehicles -KPLIB_preset_lockedVeh = [ - "rhsusf_mkvsoc", //Mk.V SOCOM - "rhsusf_m1a1aim_tuski_wd", //M1A1SA (Tusk I) - "B_MBT_01_TUSK_F", //M2A4 Slammer UP - "rhsusf_m1a2sep1tuskiiwd_usarmy", //M1A2SEPv1 (Tusk II) - "BWA3_Leopard2A6M_Fleck", //MBT Leopard 2A6M - "B_MBT_01_arty_F", //M4 Scorcher - "rhsusf_m109_usarmy", //M109A6 - "B_MBT_01_mlrs_F", //M5 Sandstorm MLRS - "B_Heli_Attack_01_dynamicLoadout_F", //AH-99 Blackfoot - "RHS_AH64D_wd", //AH-64D (Multi-Role) - "BWA3_Tiger_RMK_Universal", //UH Tiger RMK (Universal) - "B_UAV_02_dynamicLoadout_F", //MQ-4A Greyhawk - "B_T_UAV_03_dynamicLoadout_F", //MQ-12 Falcon - "B_UAV_05_F", //UCAV Sentinel - "B_Plane_CAS_01_dynamicLoadout_F", //A-164 Wipeout (CAS) - "I_Plane_Fighter_04_F", //A-149 Gryphon - "RHS_A10", //A-10A (CAS) - "FIR_F15C", //F-15C Eagle - "FIR_F15D", //F-15D Eagle - "FIR_F15E", //F-15E Strike Eagle - "JS_JC_FA18E", //F/A-18 E Super Hornet - "JS_JC_FA18F", //F/A-18 F Super Hornet - "B_Plane_Fighter_01_F", //F/A-181 Black Wasp II - "B_Plane_Fighter_01_Stealth_F", //F/A-181 Black Wasp II (Stealth) - "B_T_VTOL_01_armed_F" //V-44 X Blackfish (Armed) -]; - -// Military alphabet for this faction -KPLIB_preset_alphabet = [ - "Alpha", - "Bravo", - "Charlie", - "Delta", - "Echo", - "Foxtrot", - "Golf", - "Hotel", - "India", - "Juliet", - "Kilo", - "Lima", - "Mike", - "November", - "Oscar", - "Papa", - "Quebec", - "Romeo", - "Sierra", - "Tango", - "Uniform", - "Victor", - "Whiskey", - "X-Ray", - "Yankee", - "Zulu" -]; - - -/*------------------------------- - !!! DO NOT EDIT BELOW !!! --------------------------------*/ - -// If this is not set player will be informed about errors -KPLIB_validationNamespace setVariable ["blufor", true]; diff --git a/Missionframework/presets/opfor/custom.sqf b/Missionframework/presets/opfor/custom.sqf deleted file mode 100644 index 8c39ff092..000000000 --- a/Missionframework/presets/opfor/custom.sqf +++ /dev/null @@ -1,207 +0,0 @@ -/* - KP Liberation custom opfor preset - - File: custom.sqf - Author: KP Liberation Dev Team - https://github.com/KillahPotatoes - Date: 2017-10-16 - Last Update: 2018-01-05 - License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html - - Description: - Custom preset file for OPFOR units which contains only vanilla assets by default. - - Needed Mods: - - None - - Optional Mods: - - None - - --- NOTE - Adding a value to the arrays below will add them to a one out of however many in the array, random pick chance. - Therefore, adding the same value twice or three times means they are more likely to be chosen more often. - --- ENDNOTE -*/ - -// Side for this preset -KPLIB_preset_sideEnemy = east; -// Color for this side -KPLIB_preset_colorEnemy = "ColorEAST"; -// Color for this side (active) -KPLIB_preset_colorEnemyAct = "ColorRed"; - - -/*------------------------------------------------------------ - --- ENEMY REGULAR ARMY CLASSNAMES --- - Classnames for the regular armed forces of the enemy. -------------------------------------------------------------*/ - -// Officer -KPLIB_preset_oOfficer = "O_officer_F"; -// Squad Leader -KPLIB_preset_oSquadLeader = "O_Soldier_SL_F"; -// Team Leader -KPLIB_preset_oTeamLeader = "O_Soldier_TL_F"; -// Rifleman (Lite) -KPLIB_preset_oSentry = "O_Soldier_lite_F"; -// Rifleman -KPLIB_preset_oRifleman = "O_Soldier_F"; -// Rifleman (LAT) -KPLIB_preset_oRpg = "O_Soldier_LAT_F"; -// Grenadier -KPLIB_preset_oGrenadier = "O_Soldier_GL_F"; -// Autorifleman -KPLIB_preset_oMachinegunner = "O_Soldier_AR_F"; -// Heavy Gunner -KPLIB_preset_oHeavygunner = "O_HeavyGunner_F"; -// Marksman -KPLIB_preset_oMarksman = "O_soldier_M_F"; -// Sharpshooter -KPLIB_preset_oSharpshooter = "O_Sharpshooter_F"; -// Sniper -KPLIB_preset_oSniper = "O_sniper_F"; -// AT Specialist -KPLIB_preset_oAt = "O_Soldier_AT_F"; -// AA Specialist -KPLIB_preset_oAa = "O_Soldier_AA_F"; -// Combat Life Saver -KPLIB_preset_oMedic = "O_medic_F"; -// Engineer -KPLIB_preset_oEngineer = "O_engineer_F"; -//Paratrooper -KPLIB_preset_oParatrooper = "O_soldier_PG_F"; - -// All enemy vehicles that can spawn as sector defenders and patrols at high enemy combat readiness (aggression levels). -KPLIB_preset_oVehicles = [ - "O_MRAP_02_hmg_F", //Ifrit (HMG) - "O_MRAP_02_hmg_F", //Ifrit (GMG) - "O_MRAP_02_gmg_F", //Ifrit (GMG) - "O_APC_Tracked_02_cannon_F", //BTR-K Kamysh - "O_APC_Tracked_02_AA_F", //ZSU-39 Tigris - "O_APC_Tracked_02_AA_F", //ZSU-39 Tigris - "O_MBT_02_cannon_F", //T-100 Varsuk - "O_MBT_02_cannon_F" //T-100 Varsuk -]; - -// All enemy vehicles that can spawn as sector defenders and patrols but at a lower enemy combat readiness (aggression levels). -KPLIB_preset_oVehiclesLow = [ - "O_MRAP_02_hmg_F", //Ifrit (HMG) - "O_MRAP_02_hmg_F", //Ifrit (HMG) - "O_APC_Wheeled_02_rcws_F", //MSE-3 Marid - "O_APC_Tracked_02_cannon_F" //BTR-K Kamysh -]; - -// Enemy rotary-wings that will need to spawn in flight. -KPLIB_preset_oChoppers = [ - "O_Heli_Transport_04_bench_F", //Mi-290 Taru (Bench) - "O_Heli_Light_02_dynamicLoadout_F", //Po-30 Orca (Armed) - "O_Heli_Attack_02_dynamicLoadout_F" //Mi-48 Kajman -]; - -// Enemy fixed-wings that will need to spawn in the air. -KPLIB_preset_oJets = [ - "O_Plane_CAS_02_dynamicLoadout_F", //To-199 Neophron (CAS) - "O_Plane_Fighter_02_F" //To-201 Shikra -]; - -/*------------------------------------------------------------ - --- ENEMY MILITIA CLASSNAMES --- - Lightweight soldier classnames the game will pick from randomly as sector defenders. - Think of them like garrison or military police forces, which are more meant to control the local population instead of fighting enemy armies. -------------------------------------------------------------*/ - -// Militia soldiers -KPLIB_preset_oMilUnits = [ - "O_soldierU_F", //Rifleman (Lite) - "O_soldierU_F", //Rifleman (Lite) - "O_soldierU_F", //Rifleman - "O_soldierU_F", //Rifleman - "O_soldierU_LAT_F", //Rifleman (AT) - "O_soldierU_AR_F", //Autorifleman - "O_soldierU_M_F", //Marksman - "O_soldierU_medic_F", //Medic - "O_engineer_U_F" //Engineer -]; - -// Militia vehicles -KPLIB_preset_oMilVeh = [ - "O_LSV_02_armed_F" //Qilin (armed) -]; - -/*------------------------------------------------------------ - --- ENEMY BATTLEGROUPS CLASSNAMES --- - All enemy vehicles that can spawn as battlegroups, either assaulting or as reinforcements. -------------------------------------------------------------*/ - -// Vehicles for high enemy combat readiness (aggression level). -KPLIB_preset_oBattleVeh = [ - "O_MRAP_02_hmg_F", //Ifrit (HMG) - "O_MRAP_02_gmg_F", //Ifrit (GMG) - "O_MRAP_02_gmg_F", //Ifrit (GMG) - "O_Truck_03_transport_F", //Tempest Transport - "O_Truck_03_covered_F", //Tempest Transport (Covered) - "O_APC_Tracked_02_cannon_F", //BTR-K Kamysh - "O_APC_Tracked_02_AA_F", //ZSU-39 Tigris - "O_APC_Tracked_02_AA_F", //ZSU-39 Tigris - "O_MBT_02_cannon_F", //T-100 Varsuk - "O_MBT_02_cannon_F", //T-100 Varsuk - "O_Heli_Light_02_dynamicLoadout_F", //Po-30 Orca (Armed) - "O_Heli_Light_02_dynamicLoadout_F", //Po-30 Orca (Armed) - "O_Heli_Transport_04_bench_F", //Mi-290 Taru (Bench) - "O_Heli_Attack_02_dynamicLoadout_F" //Mi-48 Kajman -]; - -// Vehicles for lower enemy combat readiness (aggression levels). -KPLIB_preset_oBattleVehLow = [ - "O_MRAP_02_hmg_F", //Ifrit (HMG) - "O_MRAP_02_hmg_F", //Ifrit (HMG) - "O_Truck_03_transport_F", //Tempest Transport - "O_APC_Wheeled_02_rcws_F", //MSE-3 Marid - "O_APC_Tracked_02_cannon_F", //BTR-K Kamysh - "O_APC_Tracked_02_AA_F", //ZSU-39 Tigris - "O_Heli_Light_02_dynamicLoadout_F", //Po-30 Orca (Armed) - "O_Heli_Transport_04_bench_F" //Mi-290 Taru (Bench) -]; - -/* All vehicles that spawn within battlegroups (see the above 2 arrays) and also able to hold at least 8 soldiers as passengers. -If something in this array can't hold all 8 soldiers then buggy behaviours may occur. */ -KPLIB_preset_oBattleTransports = [ - "O_Truck_03_transport_F", //Tempest Transport - "O_Truck_03_covered_F", //Tempest Transport (Covered) - "O_APC_Wheeled_02_rcws_F", //MSE-3 Marid - "O_Heli_Transport_04_bench_F", //Mi-290 Taru (Bench) - "O_Heli_Light_02_dynamicLoadout_F" //Po-30 Orca (Armed) -]; - -/*------------------------------------------------------------ - --- ENEMY SECONDARY OBJECTIVE CLASSNAMES --- - Classnames which are used by the creation of secondary objectives. -------------------------------------------------------------*/ - -// Unarmed MRAP -KPLIB_preset_oMrap = "O_MRAP_02_F"; //Ifrit -// Armed MRAP -KPLIB_preset_oMrapArmed = "O_MRAP_02_hmg_F"; //Ifrit (HMG) -// Transport helicopter -KPLIB_preset_oTransportHeli = "O_Heli_Transport_04_bench_F"; //Mi-290 Taru (Bench) -// Transport truck -KPLIB_preset_oTransportTruck = "O_Truck_03_covered_F"; //Tempest Transport (Covered) -// Logistic truck (has to be able to transport reouce crates) -KPLIB_preset_oLogiTruck = "O_Truck_03_transport_F"; //Tempest Transport (Open) -// Fuel truck -KPLIB_preset_oFuelTruck = "O_Truck_03_fuel_F"; //Tempest Fuel -// Ammo truck -KPLIB_preset_oAmmoTruck = "O_Truck_03_ammo_F"; //Tempest Ammo -// Fuel container -KPLIB_preset_oFuelContainer = "Land_Pod_Heli_Transport_04_fuel_F"; //Taru Fuel Pod -// Ammo container -KPLIB_preset_oAmmoContainer = "Land_Pod_Heli_Transport_04_ammo_F"; //Taru Ammo Pod -// Enemy flag -KPLIB_preset_oFlag = "Flag_CSAT_F"; //CSAT Flag - - -/*------------------------------- - !!! DO NOT EDIT BELOW !!! --------------------------------*/ - -// Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable ["opfor", true]; From 54a0f1c5c998ab0b0b4d09c2a18a9996d60d2671 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 14:42:38 +0100 Subject: [PATCH 05/42] Update armies README.md --- Missionframework/presets/armies/README.md | 61 ++++++++++++----------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/Missionframework/presets/armies/README.md b/Missionframework/presets/armies/README.md index c0b2472b7..15a3f4844 100644 --- a/Missionframework/presets/armies/README.md +++ b/Missionframework/presets/armies/README.md @@ -15,6 +15,9 @@ KPLIB_preset_specOpsF KPLIB_preset_specOpsE ``` +The side and colors of each faction is set in the init module in the fn_init_preInit.sqf. +Changes there are not needed or required in any way, only if you want to change the colors or anything. + ## Created Variables and Arrays Each listed variable/array needs the `F` or `E` suffix to access the corresponding friendly or enemy values. @@ -36,14 +39,6 @@ Each listed variable/array needs the `F` or `E` suffix to access the correspondi *This is the virtual arsenal as portable supply crate.* -* **KPLIB_preset_color** - - *Color for this side.* - -* **KPLIB_preset_colorAct** - - *Color for this side. (active)* - * **KPLIB_preset_crateAmmo** *Ammunition resource crate.* @@ -212,10 +207,6 @@ Each listed variable/array needs the `F` or `E` suffix to access the correspondi *Special Forces Teamleader.* -* **KPLIB_preset_side** - - *Side for this preset.* - * **KPLIB_preset_slotHeli** *Helipad used to increase the GLOBAL rotary-wing cap.* @@ -232,6 +223,10 @@ Each listed variable/array needs the `F` or `E` suffix to access the correspondi *Static Big AA Classname.* +* **KPLIB_preset_staticAaBigRadar** + + *Static Big AA Radar Classname.* + * **KPLIB_preset_staticAt** *Static AT Classname.* @@ -255,14 +250,6 @@ The second variant has the suffix `Pl` for "Plain" e.g. `soldiersPl` which is a *Military alphabet with `0 = A` to `25 = Z` (obviously only one-dimensional)* -* **KPLIB_preset_antiAir** - - *Anti Air vehicles.* - -* **KPLIB_preset_arty** - - *Artillery vehicles.* - * **KPLIB_preset_boats** *All kinds of water vehicles.* @@ -279,10 +266,6 @@ The second variant has the suffix `Pl` for "Plain" e.g. `soldiersPl` which is a *Attack Helicopters.* -* **KPLIB_preset_hVeh** - - *Heavy vehicles.* - * **KPLIB_preset_jets** *Jets.* @@ -291,10 +274,6 @@ The second variant has the suffix `Pl` for "Plain" e.g. `soldiersPl` which is a *Logistic vehicles and objects.* -* **KPLIB_preset_lVeh** - - *Light vehicles.* - * **KPLIB_preset_planeTrans** *Transport Planes.* @@ -311,6 +290,30 @@ The second variant has the suffix `Pl` for "Plain" e.g. `soldiersPl` which is a *Static Defenses.* -* **KPLIB_preset_transports** +* **KPLIB_preset_vehAntiAir** + + *Anti Air vehicles.* + +* **KPLIB_preset_vehArty** + + *Artillery vehicles.* + +* **KPLIB_preset_vehHeavy** + + *Heavy vehicles.* + +* **KPLIB_preset_vehHeavyApc** + + *APC vehicles.* + +* **KPLIB_preset_vehLightArmed** + + *Light armed vehicles.* + +* **KPLIB_preset_vehLightUnarmed** + + *Light unarmed vehicles.* + +* **KPLIB_preset_vehTrans** *Unarmed transport trucks.* From 48583f5fac792ac102e15e410497032e36555556 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 15:26:45 +0100 Subject: [PATCH 06/42] Config guard update and soldiers to units --- .../00_init/fnc/fn_init_configGuard.sqf | 10 ++--- Missionframework/presets/armies/README.md | 10 ++--- Missionframework/presets/armies/csat.sqf | 42 +++++++++++-------- .../presets/armies/customEast.sqf | 42 +++++++++++-------- .../presets/armies/customWest.sqf | 42 +++++++++++-------- Missionframework/presets/armies/nato.sqf | 42 +++++++++++-------- .../presets/armies/script_component.hpp | 4 +- 7 files changed, 112 insertions(+), 80 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf b/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf index 2d93e331d..56c18379b 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf @@ -4,7 +4,7 @@ File: fn_init_configGuard.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-06-19 - Last Update: 2018-11-18 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -29,10 +29,10 @@ KPLIB_validationNamespace setVariable ["config", false]; // Arsenal if (KPLIB_param_presetArsenal > 0) then {KPLIB_validationNamespace setVariable ["arsenal", false];}; // Presets -KPLIB_validationNamespace setVariable ["blufor", false]; -KPLIB_validationNamespace setVariable ["opfor", false]; -KPLIB_validationNamespace setVariable ["civilians", false]; -KPLIB_validationNamespace setVariable ["resistance", false]; +KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedC", false]; +KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedE", false]; +KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedF", false]; +KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedR", false]; // Delay all checks until all initializations are done [] spawn { diff --git a/Missionframework/presets/armies/README.md b/Missionframework/presets/armies/README.md index 15a3f4844..7a4a10020 100644 --- a/Missionframework/presets/armies/README.md +++ b/Missionframework/presets/armies/README.md @@ -15,7 +15,7 @@ KPLIB_preset_specOpsF KPLIB_preset_specOpsE ``` -The side and colors of each faction is set in the init module in the fn_init_preInit.sqf. +The side and colors of each faction is set in the init module in the `fn_init_preInit.sqf`. Changes there are not needed or required in any way, only if you want to change the colors or anything. ## Created Variables and Arrays @@ -278,10 +278,6 @@ The second variant has the suffix `Pl` for "Plain" e.g. `soldiersPl` which is a *Transport Planes.* -* **KPLIB_preset_soldiers** - - *Regular infantry units.* - * **KPLIB_preset_specOps** *Special Forces units.* @@ -290,6 +286,10 @@ The second variant has the suffix `Pl` for "Plain" e.g. `soldiersPl` which is a *Static Defenses.* +* **KPLIB_preset_units** + + *Regular infantry units.* + * **KPLIB_preset_vehAntiAir** *Anti Air vehicles.* diff --git a/Missionframework/presets/armies/csat.sqf b/Missionframework/presets/armies/csat.sqf index 6c4f13a92..385909f8d 100644 --- a/Missionframework/presets/armies/csat.sqf +++ b/Missionframework/presets/armies/csat.sqf @@ -209,23 +209,23 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "O_V_Soldier_TL_hex_F"); ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_CAT_BEGIN("soldiers"); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_CAT_END("soldiers"); +KPLIB_PRST_CAT_BEGIN("units"); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("units"); // Special Forces units KPLIB_PRST_CAT_BEGIN("specOps"); @@ -424,3 +424,11 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0 KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); KPLIB_PRST_CAT_END("deco"); + + +/*------------------------------- + !!! DO NOT EDIT BELOW !!! +-------------------------------*/ + +// Preset was properly parsed, if this is not set player will be informed about errors +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; diff --git a/Missionframework/presets/armies/customEast.sqf b/Missionframework/presets/armies/customEast.sqf index d0d59fb61..124c35d02 100644 --- a/Missionframework/presets/armies/customEast.sqf +++ b/Missionframework/presets/armies/customEast.sqf @@ -203,23 +203,23 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "O_V_Soldier_TL_hex_F"); ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_CAT_BEGIN("soldiers"); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_CAT_END("soldiers"); +KPLIB_PRST_CAT_BEGIN("units"); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("units"); // Special Forces units KPLIB_PRST_CAT_BEGIN("specOps"); @@ -418,3 +418,11 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0 KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); KPLIB_PRST_CAT_END("deco"); + + +/*------------------------------- + !!! DO NOT EDIT BELOW !!! +-------------------------------*/ + +// Preset was properly parsed, if this is not set player will be informed about errors +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; diff --git a/Missionframework/presets/armies/customWest.sqf b/Missionframework/presets/armies/customWest.sqf index 9c9b77692..8d22a7a0f 100644 --- a/Missionframework/presets/armies/customWest.sqf +++ b/Missionframework/presets/armies/customWest.sqf @@ -203,23 +203,23 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "B_recon_TL_F"); ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_CAT_BEGIN("soldiers"); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_CAT_END("soldiers"); +KPLIB_PRST_CAT_BEGIN("units"); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("units"); // Special Forces units KPLIB_PRST_CAT_BEGIN("specOps"); @@ -423,3 +423,11 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0 KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); KPLIB_PRST_CAT_END("deco"); + + +/*------------------------------- + !!! DO NOT EDIT BELOW !!! +-------------------------------*/ + +// Preset was properly parsed, if this is not set player will be informed about errors +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; diff --git a/Missionframework/presets/armies/nato.sqf b/Missionframework/presets/armies/nato.sqf index 3acacdea6..ac9a21ee1 100644 --- a/Missionframework/presets/armies/nato.sqf +++ b/Missionframework/presets/armies/nato.sqf @@ -209,23 +209,23 @@ KPLIB_PRST_SETVAR("sfTeamLeader", "B_recon_TL_F"); ------------------------------------------------------------*/ // Infantry units -KPLIB_PRST_CAT_BEGIN("soldiers"); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); -KPLIB_PRST_CAT_ADD("soldiers", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); -KPLIB_PRST_CAT_END("soldiers"); +KPLIB_PRST_CAT_BEGIN("units"); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsRifleman"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsLightAt"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsGrenadier"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAutorifleMan"), 25, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsHeavyGunner"), 35, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMarksman"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiTank"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsAntiAir"), 50, 10, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsMedic"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsEngineer"), 30, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsParatrooper"), 20, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanVeh"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsCrewmanHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotHeli"), 10, 0, 0); +KPLIB_PRST_CAT_ADD("units", KPLIB_PRST_GETVAR("rsPilotJet"), 10, 0, 0); +KPLIB_PRST_CAT_END("units"); // Special Forces units KPLIB_PRST_CAT_BEGIN("specOps"); @@ -429,3 +429,11 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilAreaSmall_F", 0 KPLIB_PRST_CAT_ADD("deco", "Land_Sign_WarningMilitaryVehicles_F", 0, 0, 0); KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0, 0, 0); KPLIB_PRST_CAT_END("deco"); + + +/*------------------------------- + !!! DO NOT EDIT BELOW !!! +-------------------------------*/ + +// Preset was properly parsed, if this is not set player will be informed about errors +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; diff --git a/Missionframework/presets/armies/script_component.hpp b/Missionframework/presets/armies/script_component.hpp index f2c7f0427..474843cef 100644 --- a/Missionframework/presets/armies/script_component.hpp +++ b/Missionframework/presets/armies/script_component.hpp @@ -1,5 +1,5 @@ /* - KPLIB Preset Script Component + KPLIB Armies Preset Script Component File: script_component.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes @@ -8,7 +8,7 @@ License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: - Contains all preprocessor commands for the preset processing. + Contains all preprocessor commands for the armies preset processing. */ // Generates a KPLIB preset variable From 2e244ba809d8146f85faf55d72800fbb878b0c88 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 15:39:31 +0100 Subject: [PATCH 07/42] New civilian preset template --- Missionframework/presets/civilians/custom.sqf | 113 ++++++++++-------- .../presets/civilians/script_component.hpp | 32 +++++ .../presets/civilians/vanilla.sqf | 87 ++++++++++++++ 3 files changed, 181 insertions(+), 51 deletions(-) create mode 100644 Missionframework/presets/civilians/script_component.hpp create mode 100644 Missionframework/presets/civilians/vanilla.sqf diff --git a/Missionframework/presets/civilians/custom.sqf b/Missionframework/presets/civilians/custom.sqf index 9e92f321e..35efe0702 100644 --- a/Missionframework/presets/civilians/custom.sqf +++ b/Missionframework/presets/civilians/custom.sqf @@ -1,65 +1,76 @@ +#include "script_component.hpp" /* - KP Liberation custom civilian preset + KP Liberation Custom Civilian Preset File: custom.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-01-05 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: - Custom preset file for civilians which contains only vanilla assets by default. + Custom civilian preset file for individual adjustments. +*/ - Needed Mods: - - None +// Civilian Citizens (KPLIB_preset_unitsC) +KPLIB_PRST_CAT_BEGIN("units"); +KPLIB_PRST_CAT_ADD("units", "C_Man_Fisherman_01_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_w_worker_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_1_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_p_beggar_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_Messenger_01_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_hunter_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_journalist_F"); +KPLIB_PRST_CAT_ADD("units", "C_Journalist_01_War_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_shorts_2_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_UtilityWorker_01_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_1"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_2_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_3_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_4_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_5_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_6_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_2_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_3_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_4_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_5_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_6_F"); - Optional Mods: - - None -*/ +// Civilian Cars (KPLIB_preset_vehLightUnarmedC) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Quadbike_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_sport_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Offroad_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_SUV_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_01_box_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_02_transport_F"); + +// Civilian Trucks (KPLIB_preset_vehTransC) +KPLIB_PRST_CAT_BEGIN("vehTrans"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_covered_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_transport_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_vehicle_F"); + +// Civilian Utility Vehicles (KPLIB_preset_logisticC) +KPLIB_PRST_CAT_BEGIN("logistic"); +KPLIB_PRST_CAT_ADD("logistic", "C_Offroad_01_repair_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_box_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_fuel_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Van_01_fuel_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Van_02_medevac_F"); -// Civilian Units -KPLIB_preset_cUnits = [ - "C_Man_Fisherman_01_F", - "C_man_w_worker_F", - "C_man_1_1_F", - "C_man_p_beggar_F", - "C_Man_Messenger_01_F", - "C_man_hunter_1_F", - "C_journalist_F", - "C_Journalist_01_War_F", - "C_man_shorts_2_F", - "C_Man_UtilityWorker_01_F", - "C_man_1", - "C_Man_casual_1_F", - "C_Man_casual_2_F", - "C_Man_casual_3_F", - "C_Man_casual_4_F", - "C_Man_casual_5_F", - "C_Man_casual_6_F", - "C_man_polo_1_F", - "C_man_polo_2_F", - "C_man_polo_3_F", - "C_man_polo_4_F", - "C_man_polo_5_F", - "C_man_polo_6_F" -]; +// Civilian Helicopters (KPLIB_preset_heliTransC) +KPLIB_PRST_CAT_BEGIN("heliTrans"); +KPLIB_PRST_CAT_ADD("heliTrans", "C_Heli_Light_01_civil_F"); -// Civilian vehicles -KPLIB_preset_cVehicles = [ - "C_Quadbike_01_F", - "C_Hatchback_01_F", - "C_Hatchback_01_sport_F", - "C_Offroad_01_F", - "C_Offroad_01_repair_F", - "C_SUV_01_F", - "C_Van_01_fuel_F", - "C_Van_01_transport_F", - "C_Van_01_box_F", - "C_Truck_02_fuel_F", - "C_Truck_02_transport_F", - "C_Truck_02_covered_F", - "C_Truck_02_box_F" -]; +// Civilian Planes (KPLIB_preset_planeTransC) +KPLIB_PRST_CAT_BEGIN("planeTrans"); +KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_F"); +KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_racing_F"); /*------------------------------- @@ -67,4 +78,4 @@ KPLIB_preset_cVehicles = [ -------------------------------*/ // Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable ["civilians", true]; +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; diff --git a/Missionframework/presets/civilians/script_component.hpp b/Missionframework/presets/civilians/script_component.hpp new file mode 100644 index 000000000..e254c97b5 --- /dev/null +++ b/Missionframework/presets/civilians/script_component.hpp @@ -0,0 +1,32 @@ +/* + KPLIB Civilian Preset Script Component + + File: script_component.hpp + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-07 + Last Update: 2018-12-07 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Contains all preprocessor commands for the civilian preset processing. +*/ + +// Generates a KPLIB preset variable +#define KPLIB_PRST_VAR(VARIABLE)\ + "KPLIB_preset_" + VARIABLE + "C" + +// Gets the value of a KPLIB preset variable +#define KPLIB_PRST_GETVAR(VARIABLE)\ + missionnamespace getVariable [KPLIB_PRST_VAR(VARIABLE), nil] + +// Sets the value of a KPLIB preset variable +#define KPLIB_PRST_SETVAR(VARIABLE,CLASS)\ + missionnamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] + +// Creates a KPLIB preset array +#define KPLIB_PRST_CAT_BEGIN(ARRAYNAME)\ + missionnamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; + +// Adds a classname to a preset array with resource costs +#define KPLIB_PRST_CAT_ADD(ARRAYNAME, CLASSNAMESTRING)\ + (KPLIB_PRST_GETVAR(ARRAYNAME)) pushBack CLASSNAMESTRING diff --git a/Missionframework/presets/civilians/vanilla.sqf b/Missionframework/presets/civilians/vanilla.sqf new file mode 100644 index 000000000..5eae26970 --- /dev/null +++ b/Missionframework/presets/civilians/vanilla.sqf @@ -0,0 +1,87 @@ +#include "script_component.hpp" +/* + KP Liberation Vanilla Civilian Preset + + File: vanilla.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-07 + Last Update: 2018-12-07 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Vanilla civilian preset file which contains only vanilla assets. + + Needed Mods: + - None + + Optional Mods: + - None +*/ + +// Civilian Citizens (KPLIB_preset_unitsC) +KPLIB_PRST_CAT_BEGIN("units"); +KPLIB_PRST_CAT_ADD("units", "C_Man_Fisherman_01_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_w_worker_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_1_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_p_beggar_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_Messenger_01_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_hunter_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_journalist_F"); +KPLIB_PRST_CAT_ADD("units", "C_Journalist_01_War_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_shorts_2_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_UtilityWorker_01_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_1"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_2_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_3_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_4_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_5_F"); +KPLIB_PRST_CAT_ADD("units", "C_Man_casual_6_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_1_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_2_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_3_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_4_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_5_F"); +KPLIB_PRST_CAT_ADD("units", "C_man_polo_6_F"); + +// Civilian Cars (KPLIB_preset_vehLightUnarmedC) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Quadbike_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_sport_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Offroad_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_SUV_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_01_box_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_02_transport_F"); + +// Civilian Trucks (KPLIB_preset_vehTransC) +KPLIB_PRST_CAT_BEGIN("vehTrans"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_covered_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_transport_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_vehicle_F"); + +// Civilian Utility Vehicles (KPLIB_preset_logisticC) +KPLIB_PRST_CAT_BEGIN("logistic"); +KPLIB_PRST_CAT_ADD("logistic", "C_Offroad_01_repair_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_box_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_fuel_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Van_01_fuel_F"); +KPLIB_PRST_CAT_ADD("logistic", "C_Van_02_medevac_F"); + +// Civilian Helicopters (KPLIB_preset_heliTransC) +KPLIB_PRST_CAT_BEGIN("heliTrans"); +KPLIB_PRST_CAT_ADD("heliTrans", "C_Heli_Light_01_civil_F"); + +// Civilian Planes (KPLIB_preset_planeTransC) +KPLIB_PRST_CAT_BEGIN("planeTrans"); +KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_F"); +KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_racing_F"); + + +/*------------------------------- + !!! DO NOT EDIT BELOW !!! +-------------------------------*/ + +// Preset was properly parsed, if this is not set player will be informed about errors +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; From 7aeb2800919a7dba80625ce242b80e8586b143a6 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 15:42:32 +0100 Subject: [PATCH 08/42] Moved passenger van to transports --- Missionframework/presets/civilians/custom.sqf | 2 +- Missionframework/presets/civilians/vanilla.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Missionframework/presets/civilians/custom.sqf b/Missionframework/presets/civilians/custom.sqf index 35efe0702..5cadbddf4 100644 --- a/Missionframework/presets/civilians/custom.sqf +++ b/Missionframework/presets/civilians/custom.sqf @@ -46,13 +46,13 @@ KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_sport_F"); KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Offroad_01_F"); KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_SUV_01_F"); KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_01_box_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_02_transport_F"); // Civilian Trucks (KPLIB_preset_vehTransC) KPLIB_PRST_CAT_BEGIN("vehTrans"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_covered_F"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_transport_F"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_transport_F"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_vehicle_F"); // Civilian Utility Vehicles (KPLIB_preset_logisticC) diff --git a/Missionframework/presets/civilians/vanilla.sqf b/Missionframework/presets/civilians/vanilla.sqf index 5eae26970..da4b95803 100644 --- a/Missionframework/presets/civilians/vanilla.sqf +++ b/Missionframework/presets/civilians/vanilla.sqf @@ -52,13 +52,13 @@ KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_sport_F"); KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Offroad_01_F"); KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_SUV_01_F"); KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_01_box_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_02_transport_F"); // Civilian Trucks (KPLIB_preset_vehTransC) KPLIB_PRST_CAT_BEGIN("vehTrans"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_covered_F"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_transport_F"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_transport_F"); KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_vehicle_F"); // Civilian Utility Vehicles (KPLIB_preset_logisticC) From 97027ad53d9e3dcd33df00c965d602fd60d9aa25 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 16:36:09 +0100 Subject: [PATCH 09/42] Shared script_component for civ/guer --- .../presets/{civilians => }/script_component.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename Missionframework/presets/{civilians => }/script_component.hpp (84%) diff --git a/Missionframework/presets/civilians/script_component.hpp b/Missionframework/presets/script_component.hpp similarity index 84% rename from Missionframework/presets/civilians/script_component.hpp rename to Missionframework/presets/script_component.hpp index e254c97b5..483e886ad 100644 --- a/Missionframework/presets/civilians/script_component.hpp +++ b/Missionframework/presets/script_component.hpp @@ -1,5 +1,5 @@ /* - KPLIB Civilian Preset Script Component + KPLIB Civilian/Resistance Preset Script Component File: script_component.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes @@ -8,12 +8,12 @@ License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: - Contains all preprocessor commands for the civilian preset processing. + Contains all preprocessor commands for the civilian/resistance preset processing. */ // Generates a KPLIB preset variable #define KPLIB_PRST_VAR(VARIABLE)\ - "KPLIB_preset_" + VARIABLE + "C" + "KPLIB_preset_" + VARIABLE // Gets the value of a KPLIB preset variable #define KPLIB_PRST_GETVAR(VARIABLE)\ From fa851a5c4c11669fabfbf90d989a6f35dc0a0137 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 16:36:33 +0100 Subject: [PATCH 10/42] Civilian presets adjustment --- Missionframework/presets/civilians/custom.sqf | 110 +++++++++--------- .../presets/civilians/vanilla.sqf | 110 +++++++++--------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/Missionframework/presets/civilians/custom.sqf b/Missionframework/presets/civilians/custom.sqf index 5cadbddf4..22eb257d4 100644 --- a/Missionframework/presets/civilians/custom.sqf +++ b/Missionframework/presets/civilians/custom.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "../script_component.hpp" /* KP Liberation Custom Civilian Preset @@ -12,65 +12,65 @@ Custom civilian preset file for individual adjustments. */ -// Civilian Citizens (KPLIB_preset_unitsC) -KPLIB_PRST_CAT_BEGIN("units"); -KPLIB_PRST_CAT_ADD("units", "C_Man_Fisherman_01_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_w_worker_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_1_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_p_beggar_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_Messenger_01_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_hunter_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_journalist_F"); -KPLIB_PRST_CAT_ADD("units", "C_Journalist_01_War_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_shorts_2_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_UtilityWorker_01_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_1"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_2_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_3_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_4_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_5_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_6_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_2_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_3_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_4_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_5_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_6_F"); +// Civilian Citizens (KPLIB_preset_unitsPlC) +KPLIB_PRST_CAT_BEGIN("unitsPlC"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_Fisherman_01_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_w_worker_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_1_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_p_beggar_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_Messenger_01_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_hunter_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_journalist_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Journalist_01_War_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_shorts_2_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_UtilityWorker_01_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_1"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_2_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_3_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_4_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_5_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_6_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_2_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_3_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_4_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_5_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_6_F"); -// Civilian Cars (KPLIB_preset_vehLightUnarmedC) -KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Quadbike_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_sport_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Offroad_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_SUV_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_01_box_F"); +// Civilian Cars (KPLIB_preset_vehLightUnarmedPlC) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmedPlC"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Quadbike_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Hatchback_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Hatchback_01_sport_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Offroad_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_SUV_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Van_01_box_F"); -// Civilian Trucks (KPLIB_preset_vehTransC) -KPLIB_PRST_CAT_BEGIN("vehTrans"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_covered_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_transport_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_01_transport_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_transport_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_vehicle_F"); +// Civilian Trucks (KPLIB_preset_vehTransPlC) +KPLIB_PRST_CAT_BEGIN("vehTransPlC"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Truck_02_covered_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Truck_02_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Van_02_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Van_02_vehicle_F"); -// Civilian Utility Vehicles (KPLIB_preset_logisticC) -KPLIB_PRST_CAT_BEGIN("logistic"); -KPLIB_PRST_CAT_ADD("logistic", "C_Offroad_01_repair_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_box_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_fuel_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Van_01_fuel_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Van_02_medevac_F"); +// Civilian Utility Vehicles (KPLIB_preset_logisticPlC) +KPLIB_PRST_CAT_BEGIN("logisticPlC"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Offroad_01_repair_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Truck_02_box_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Truck_02_fuel_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Van_01_fuel_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Van_02_medevac_F"); -// Civilian Helicopters (KPLIB_preset_heliTransC) -KPLIB_PRST_CAT_BEGIN("heliTrans"); -KPLIB_PRST_CAT_ADD("heliTrans", "C_Heli_Light_01_civil_F"); +// Civilian Helicopters (KPLIB_preset_heliTransPlC) +KPLIB_PRST_CAT_BEGIN("heliTransPlC"); +KPLIB_PRST_CAT_ADD("heliTransPlC", "C_Heli_Light_01_civil_F"); -// Civilian Planes (KPLIB_preset_planeTransC) -KPLIB_PRST_CAT_BEGIN("planeTrans"); -KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_F"); -KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_racing_F"); +// Civilian Planes (KPLIB_preset_planeTransPlC) +KPLIB_PRST_CAT_BEGIN("planeTransPlC"); +KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_F"); +KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_racing_F"); /*------------------------------- diff --git a/Missionframework/presets/civilians/vanilla.sqf b/Missionframework/presets/civilians/vanilla.sqf index da4b95803..69fc95539 100644 --- a/Missionframework/presets/civilians/vanilla.sqf +++ b/Missionframework/presets/civilians/vanilla.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "../script_component.hpp" /* KP Liberation Vanilla Civilian Preset @@ -18,65 +18,65 @@ - None */ -// Civilian Citizens (KPLIB_preset_unitsC) -KPLIB_PRST_CAT_BEGIN("units"); -KPLIB_PRST_CAT_ADD("units", "C_Man_Fisherman_01_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_w_worker_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_1_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_p_beggar_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_Messenger_01_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_hunter_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_journalist_F"); -KPLIB_PRST_CAT_ADD("units", "C_Journalist_01_War_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_shorts_2_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_UtilityWorker_01_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_1"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_2_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_3_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_4_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_5_F"); -KPLIB_PRST_CAT_ADD("units", "C_Man_casual_6_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_1_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_2_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_3_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_4_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_5_F"); -KPLIB_PRST_CAT_ADD("units", "C_man_polo_6_F"); +// Civilian Citizens (KPLIB_preset_unitsPlC) +KPLIB_PRST_CAT_BEGIN("unitsPlC"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_Fisherman_01_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_w_worker_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_1_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_p_beggar_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_Messenger_01_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_hunter_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_journalist_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Journalist_01_War_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_shorts_2_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_UtilityWorker_01_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_1"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_2_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_3_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_4_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_5_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_casual_6_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_1_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_2_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_3_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_4_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_5_F"); +KPLIB_PRST_CAT_ADD("unitsPlC", "C_man_polo_6_F"); -// Civilian Cars (KPLIB_preset_vehLightUnarmedC) -KPLIB_PRST_CAT_BEGIN("vehLightUnarmed"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Quadbike_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Hatchback_01_sport_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Offroad_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_SUV_01_F"); -KPLIB_PRST_CAT_ADD("vehLightUnarmed", "C_Van_01_box_F"); +// Civilian Cars (KPLIB_preset_vehLightUnarmedPlC) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmedPlC"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Quadbike_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Hatchback_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Hatchback_01_sport_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Offroad_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_SUV_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlC", "C_Van_01_box_F"); -// Civilian Trucks (KPLIB_preset_vehTransC) -KPLIB_PRST_CAT_BEGIN("vehTrans"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_covered_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Truck_02_transport_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_01_transport_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_transport_F"); -KPLIB_PRST_CAT_ADD("vehTrans", "C_Van_02_vehicle_F"); +// Civilian Trucks (KPLIB_preset_vehTransPlC) +KPLIB_PRST_CAT_BEGIN("vehTransPlC"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Truck_02_covered_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Truck_02_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Van_02_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlC", "C_Van_02_vehicle_F"); -// Civilian Utility Vehicles (KPLIB_preset_logisticC) -KPLIB_PRST_CAT_BEGIN("logistic"); -KPLIB_PRST_CAT_ADD("logistic", "C_Offroad_01_repair_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_box_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Truck_02_fuel_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Van_01_fuel_F"); -KPLIB_PRST_CAT_ADD("logistic", "C_Van_02_medevac_F"); +// Civilian Utility Vehicles (KPLIB_preset_logisticPlC) +KPLIB_PRST_CAT_BEGIN("logisticPlC"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Offroad_01_repair_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Truck_02_box_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Truck_02_fuel_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Van_01_fuel_F"); +KPLIB_PRST_CAT_ADD("logisticPlC", "C_Van_02_medevac_F"); -// Civilian Helicopters (KPLIB_preset_heliTransC) -KPLIB_PRST_CAT_BEGIN("heliTrans"); -KPLIB_PRST_CAT_ADD("heliTrans", "C_Heli_Light_01_civil_F"); +// Civilian Helicopters (KPLIB_preset_heliTransPlC) +KPLIB_PRST_CAT_BEGIN("heliTransPlC"); +KPLIB_PRST_CAT_ADD("heliTransPlC", "C_Heli_Light_01_civil_F"); -// Civilian Planes (KPLIB_preset_planeTransC) -KPLIB_PRST_CAT_BEGIN("planeTrans"); -KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_F"); -KPLIB_PRST_CAT_ADD("planeTrans", "C_Plane_Civil_01_racing_F"); +// Civilian Planes (KPLIB_preset_planeTransPlC) +KPLIB_PRST_CAT_BEGIN("planeTransPlC"); +KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_F"); +KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_racing_F"); /*------------------------------- From a3846957ac9b2e10be8c2a3661ff679076806f47 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 16:36:43 +0100 Subject: [PATCH 11/42] Resistance presets --- .../presets/resistance/custom.sqf | 442 +++++++++--------- Missionframework/presets/resistance/fia.sqf | 251 ++++++++++ 2 files changed, 461 insertions(+), 232 deletions(-) create mode 100644 Missionframework/presets/resistance/fia.sqf diff --git a/Missionframework/presets/resistance/custom.sqf b/Missionframework/presets/resistance/custom.sqf index 86dca698a..22d116dc6 100644 --- a/Missionframework/presets/resistance/custom.sqf +++ b/Missionframework/presets/resistance/custom.sqf @@ -1,55 +1,44 @@ +#include "../script_component.hpp" /* - KP Liberation custom resistance preset + KP Liberation Custom Resistance Preset File: custom.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-01-05 + Last Update: 2018-12-07 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: - Custom preset file for resistance units which contains only vanilla assets by default. - The resistance faction is friendly or hostile, depending on the civil reputation. - - Needed Mods: - - None - - Optional Mods: - - None + Custom resistance preset file for individual adjustments. */ -// Side for this preset -KPLIB_preset_sideResistance = resistance; -// Color for this side -KPLIB_preset_colorResistance = "ColorGUER"; /*------------------------------------------------------------ --- RESISTANCE UNIT AND VEHICLE CLASSNAMES --- Standard loadout of the units will be replaced with a scripted one, which depends on the guerilla strength, after spawn. ------------------------------------------------------------*/ -// Resistance units -KPLIB_preset_rUnits = [ - "I_G_Soldier_AR_F", - "I_G_engineer_F", - "I_G_officer_F", - "I_G_medic_F", - "I_G_Soldier_F", - "I_G_Soldier_LAT_F", - "I_G_Soldier_M_F", - "I_G_Soldier_SL_F" -]; +// Infantry units (KPLIB_preset_unitsPlR) +KPLIB_PRST_CAT_BEGIN("unitsPlR"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_AR_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_engineer_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_officer_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_medic_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_LAT_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_M_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_SL_F"); + +// Armed vehicles (KPLIB_preset_vehLightArmedPlR) +KPLIB_PRST_CAT_BEGIN("vehLightArmedPlR"); +KPLIB_PRST_CAT_ADD("vehLightArmedPlR", "I_G_Offroad_01_armed_F"); +KPLIB_PRST_CAT_ADD("vehLightArmedPlR", "I_G_Offroad_01_AT_F"); -// Armed resistance vehicles -KPLIB_preset_rVehicles = [ - "I_G_Offroad_01_armed_F" -]; +// Transport vehicles (KPLIB_preset_vehTransPlR) +KPLIB_PRST_CAT_BEGIN("vehTransPlR"); +KPLIB_PRST_CAT_ADD("vehTransPlR", "I_G_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlR", "I_G_Van_02_transport_F"); -// Resistance transport vehicles (should be able to transport at least 10 soldiers) -KPLIB_preset_rTransports = [ - "I_G_Van_01_transport_F", - "I_G_Van_02_transport_F" -]; /*------------------------------------------------------------ --- RESISTANCE EQUIPMENT --- @@ -57,206 +46,195 @@ KPLIB_preset_rTransports = [ Important for weapons: You've to add the weapons as array like - ["Weaponclassname","Magazineclassname","magazine amount","optic","tripod"] + ["Weaponclassname", "Magazineclassname", "magazine amount", "optic", "tripod"] You can leave optic and tripod empty with "" -------------------------------------------------------------*/ - -// Resistance weapons tier 1 -KPLIB_preset_rWeapons1 =[ - ["arifle_AKM_F","30Rnd_762x39_Mag_F",4,"",""], - ["arifle_AKS_F","30Rnd_545x39_Mag_F",4,"",""], - ["hgun_PDW2000_F","30Rnd_9x21_Mag",4,"",""], - ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01",4,"",""], - ["SMG_02_F","30Rnd_9x21_Mag_SMG_02",4,"",""], - ["SMG_05_F","30Rnd_9x21_Mag_SMG_02",4,"",""] -]; - -// Resistance weapons tier 2 -KPLIB_preset_rWeapons2 =[ - ["arifle_Katiba_F","30Rnd_65x39_caseless_green",4,"optic_ACO_grn",""], - ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag",4,"optic_ACO_grn",""], - ["arifle_TRG21_F","30Rnd_556x45_Stanag",4,"optic_ACO_grn",""], - ["arifle_CTAR_blk_F","30Rnd_580x42_Mag_F",4,"optic_ACO_grn",""], - ["arifle_MX_SW_F","100Rnd_65x39_caseless_mag",3,"optic_ACO_grn","bipod_01_F_blk"], - ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag",5,"optic_Hamr","bipod_01_F_blk"] -]; - -// Resistance weapons tier 3 -KPLIB_preset_rWeapons3 =[ - ["arifle_CTAR_blk_F","30Rnd_580x42_Mag_F",4,"optic_MRCO",""], - ["arifle_SPAR_01_blk_F","30Rnd_556x45_Stanag",4,"optic_MRCO",""], - ["arifle_SPAR_03_blk_F","20Rnd_762x51_Mag",5,"optic_MRCO",""], - ["arifle_ARX_blk_F","30Rnd_65x39_caseless_green",4,"optic_MRCO",""], - ["srifle_DMR_03_F","20Rnd_762x51_Mag",5,"optic_MRCO",""], - ["srifle_EBR_F","20Rnd_762x51_Mag",5,"optic_MRCO",""], - ["srifle_DMR_07_blk_F","20Rnd_650x39_Cased_Mag_F",5,"optic_DMS",""], - ["LMG_Mk200_F","200Rnd_65x39_cased_Box",2,"optic_MRCO","bipod_01_F_blk"] -]; - -// Resistance uniforms tier 1 -KPLIB_preset_rUniforms1 = [ - "U_C_Poloshirt_blue", - "U_C_Poloshirt_burgundy", - "U_C_Poloshirt_salmon", - "U_C_Poloshirt_redwhite", - "U_C_Poloshirt_stripped", - "U_C_Poloshirt_tricolour", - "U_C_Poor_1", - "U_C_Man_casual_1_F", - "U_C_Man_casual_2_F", - "U_C_Man_casual_3_F", - "U_C_Man_casual_4_F", - "U_C_Man_casual_5_F", - "U_C_Man_casual_6_F", - "U_Marshal" - -]; -// Resistance uniforms tier 2 -KPLIB_preset_rUniforms2 = [ - "U_I_C_Soldier_Bandit_1_F", - "U_I_C_Soldier_Bandit_2_F", - "U_I_C_Soldier_Bandit_3_F", - "U_I_C_Soldier_Bandit_4_F", - "U_I_C_Soldier_Bandit_5_F", - "U_BG_Guerilla2_1", - "U_BG_Guerilla2_2", - "U_BG_Guerilla2_3", - "U_BG_Guerilla3_1", - "U_C_HunterBody_grn", - "U_C_Mechanic_01_F", - "U_I_C_Soldier_Para_5_F", - "U_I_G_resistanceLeader_F" -]; - -// Resistance uniforms tier 3 -KPLIB_preset_rUniforms3 = [ - "U_BG_Guerilla1_1", - "U_BG_Guerilla1_2_F", - "U_BG_Guerrilla_6_1", - "U_BG_leader", - "U_I_C_Soldier_Para_1_F", - "U_I_C_Soldier_Para_2_F", - "U_I_C_Soldier_Para_3_F", - "U_I_C_Soldier_Para_4_F", - "U_I_C_Soldier_Camo_F" -]; - -// Resistance vests tier 1 -KPLIB_preset_rVests1 = [ - "V_LegStrapBag_coyote_F", - "V_LegStrapBag_olive_F", - "V_LegStrapBag_black_F", - "V_Pocketed_coyote_F", - "V_Pocketed_olive_F", - "V_Pocketed_black_F", - "V_BandollierB_cbr", - "V_BandollierB_rgr", - "V_BandollierB_khk", - "V_BandollierB_oli", - "V_BandollierB_blk", - "V_BandollierB_ghex_F" -]; - -// Resistance vests tier 2 -KPLIB_preset_rVests2 = [ - "V_Chestrig_rgr", - "V_Chestrig_khk", - "V_Chestrig_oli", - "V_Chestrig_blk", - "V_HarnessO_brn", - "V_HarnessO_gry", - "V_HarnessO_ghex_F", - "V_HarnessOGL_brn", - "V_HarnessOGL_gry", - "V_HarnessOGL_ghex_F" -]; - -// Resistance vests tier 3 -KPLIB_preset_rVests3 = [ - "V_TacVest_brn", - "V_TacVest_khk", - "V_TacVest_oli", - "V_TacVest_blk", - "V_I_G_resistanceLeader_F", - "V_TacVest_camo", - "V_TacChestrig_grn_F", - "V_TacChestrig_cbr_F", - "V_TacChestrig_oli_F" -]; - -// Resistance headgear tier 1 -KPLIB_preset_rHeadgear1 = [ - "", - "", - "", - "", - "H_Hat_brown", - "H_Hat_grey", - "H_Hat_tan", - "H_Hat_checker", - "H_Hat_camo", - "H_Bandanna_surfer", - "H_Bandanna_surfer_grn", - "H_Bandanna_surfer_blk", - "H_Hat_Safari_olive_F", - "H_Hat_Safari_sand_F", - "H_Construction_basic_black_F", - "H_Helmet_Skate", - "H_Cap_blu", - "H_Cap_grn", - "H_Cap_tan", - "H_Cap_oli", - "H_Cap_red", - "H_Cap_blk" -]; - -// Resistance headgear tier 2 -KPLIB_preset_rHeadgear2 = [ - "H_Bandanna_blu", - "H_Bandanna_sand", - "H_Bandanna_gry", - "H_Bandanna_camo", - "H_Bandanna_cbr", - "H_Bandanna_sgg", - "H_Bandanna_khk", - "H_Cap_blu", - "H_Cap_grn", - "H_Cap_tan", - "H_Cap_oli", - "H_Cap_red", - "H_Cap_blk", - "H_Cap_blk_Raven", - "H_MilCap_dgtl" -]; - -// Resistance headgear tier 3 -KPLIB_preset_rHeadgear3 = [ - "H_ShemagOpen_khk", - "H_ShemagOpen_tan", - "H_Shemag_olive", - "H_Booniehat_khk", - "H_Booniehat_oli", - "H_Booniehat_tan", - "H_Booniehat_dgtl", - "H_Booniehat_tna_F", - "H_PASGT_basic_olive_F", - "H_PASGT_basic_white_F" -]; + NOTE: This system may change during the development of the resistance module +------------------------------------------------------------*/ -// Resistance facegear. Applies for tier 2 and 3. -KPLIB_preset_rFacegear = [ - "", - "", - "", - "G_Bandanna_shades", - "G_Bandanna_beast", - "G_Bandanna_tan", - "G_Bandanna_khk", - "G_Bandanna_oli", - "G_Bandanna_aviator", - "G_Bandanna_blk" -]; +// Weapons tier 1 (KPLIB_preset_weaponsR1) +KPLIB_PRST_CAT_BEGIN("weaponsR1"); +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["arifle_AKM_F", "30Rnd_762x39_Mag_F", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["arifle_AKM_F", "30Rnd_762x39_Mag_F", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["arifle_AKS_F", "30Rnd_545x39_Mag_F", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["hgun_PDW2000_F", "30Rnd_9x21_Mag", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["SMG_01_F", "30Rnd_45ACP_Mag_SMG_01", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["SMG_02_F", "30Rnd_9x21_Mag_SMG_02", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["SMG_05_F", "30Rnd_9x21_Mag_SMG_02", 4, "", ""]; + +// Weapons tier 2 (KPLIB_preset_weaponsR2) +KPLIB_PRST_CAT_BEGIN("weaponsR2"); +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_Katiba_F", "30Rnd_65x39_caseless_green", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_Mk20_plain_F", "30Rnd_556x45_Stanag", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_TRG21_F", "30Rnd_556x45_Stanag", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_CTAR_blk_F", "30Rnd_580x42_Mag_F", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_MX_SW_F", "100Rnd_65x39_caseless_mag", 3, "optic_ACO_grn", "bipod_01_F_blk"]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["srifle_DMR_06_olive_F", "20Rnd_762x51_Mag", 5, "optic_Hamr", "bipod_01_F_blk"]; + +// Weapons tier 3 (KPLIB_preset_weaponsR3) +KPLIB_PRST_CAT_BEGIN("weaponsR3"); +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_CTAR_blk_F", "30Rnd_580x42_Mag_F", 4, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_SPAR_01_blk_F", "30Rnd_556x45_Stanag", 4, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_SPAR_03_blk_F", "20Rnd_762x51_Mag", 5, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_ARX_blk_F", "30Rnd_65x39_caseless_green", 4, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["srifle_DMR_03_F", "20Rnd_762x51_Mag", 5, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["srifle_EBR_F", "20Rnd_762x51_Mag", 5, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["srifle_DMR_07_blk_F", "20Rnd_650x39_Cased_Mag_F", 5, "optic_DMS", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["LMG_Mk200_F", "200Rnd_65x39_cased_Box", 2, "optic_MRCO", "bipod_01_F_blk"]; + +// Uniforms tier 1 (KPLIB_preset_uniformsPlR1) +KPLIB_PRST_CAT_BEGIN("uniformsPlR1"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_blue"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_burgundy"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_salmon"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_redwhite"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_stripped"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_tricolour"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poor_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_1_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_3_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_4_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_5_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_6_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_Marshal"); + +// Uniforms tier 2 (KPLIB_preset_uniformsPlR2) +KPLIB_PRST_CAT_BEGIN("uniformsPlR2"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_1_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_3_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_4_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_5_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla2_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla2_2"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla2_3"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla3_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_C_HunterBody_grn"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_C_Mechanic_01_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Para_5_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_G_resistanceLeader_F"); + +// Uniforms tier 3 (KPLIB_preset_uniformsPlR3) +KPLIB_PRST_CAT_BEGIN("uniformsPlR3"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_Guerilla1_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_Guerilla1_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_Guerrilla_6_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_leader"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_1_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_3_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_4_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Camo_F"); + +// Vests tier 1 (KPLIB_preset_vestsPlR1) +KPLIB_PRST_CAT_BEGIN("vestsPlR1"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_LegStrapBag_coyote_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_LegStrapBag_olive_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_LegStrapBag_black_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_Pocketed_coyote_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_Pocketed_olive_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_Pocketed_black_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_cbr"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_rgr"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_khk"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_oli"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_blk"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_ghex_F"); + +// Vests tier 2 (KPLIB_preset_vestsPlR2) +KPLIB_PRST_CAT_BEGIN("vestsPlR2"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_rgr"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_khk"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_oli"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_blk"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessO_brn"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessO_gry"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessO_ghex_F"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessOGL_brn"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessOGL_gry"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessOGL_ghex_F"); + +// Vests tier 3 (KPLIB_preset_vestsPlR3) +KPLIB_PRST_CAT_BEGIN("vestsPlR3"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_brn"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_khk"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_oli"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_blk"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_I_G_resistanceLeader_F"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_camo"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacChestrig_grn_F"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacChestrig_cbr_F"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacChestrig_oli_F"); + +// Headgear tier 1 (KPLIB_preset_headgearPlR1) +KPLIB_PRST_CAT_BEGIN("headgearPlR1"); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_brown"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_grey"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_checker"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_camo"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Bandanna_surfer"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Bandanna_surfer_grn"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Bandanna_surfer_blk"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_Safari_olive_F"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_Safari_sand_F"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Construction_basic_black_F"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Helmet_Skate"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_blu"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_grn"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_oli"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_red"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_blk"); + +// Headgear tier 2 (KPLIB_preset_headgearPlR2) +KPLIB_PRST_CAT_BEGIN("headgearPlR2"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_blu"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_sand"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_gry"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_camo"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_cbr"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_sgg"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_khk"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_blu"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_grn"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_oli"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_red"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_blk"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_blk_Raven"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_MilCap_dgtl"); + +// Headgear tier 3 (KPLIB_preset_headgearPlR3) +KPLIB_PRST_CAT_BEGIN("headgearPlR3"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_ShemagOpen_khk"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_ShemagOpen_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Shemag_olive"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_khk"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_oli"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_dgtl"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_tna_F"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_PASGT_basic_olive_F"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_PASGT_basic_white_F"); + +// Facegear. Applies for tier 2 and 3. (KPLIB_preset_facegearPlR) +KPLIB_PRST_CAT_BEGIN("facegearPlR"); +KPLIB_PRST_CAT_ADD("facegearPlR", ""); +KPLIB_PRST_CAT_ADD("facegearPlR", ""); +KPLIB_PRST_CAT_ADD("facegearPlR", ""); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_shades"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_beast"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_tan"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_khk"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_oli"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_aviator"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_blk"); /*------------------------------- @@ -264,4 +242,4 @@ KPLIB_preset_rFacegear = [ -------------------------------*/ // Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable ["resistance", true]; +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; diff --git a/Missionframework/presets/resistance/fia.sqf b/Missionframework/presets/resistance/fia.sqf new file mode 100644 index 000000000..90b559048 --- /dev/null +++ b/Missionframework/presets/resistance/fia.sqf @@ -0,0 +1,251 @@ +#include "../script_component.hpp" +/* + KP Liberation FIA Resistance Preset + + File: fia.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-07 + Last Update: 2018-12-07 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + FIA resistance preset file which contains only vanilla assets. + + Needed Mods: + - None + + Optional Mods: + - None +*/ + + +/*------------------------------------------------------------ + --- RESISTANCE UNIT AND VEHICLE CLASSNAMES --- + Standard loadout of the units will be replaced with a scripted one, which depends on the guerilla strength, after spawn. +------------------------------------------------------------*/ + +// Infantry units (KPLIB_preset_unitsPlR) +KPLIB_PRST_CAT_BEGIN("unitsPlR"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_AR_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_engineer_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_officer_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_medic_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_LAT_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_M_F"); +KPLIB_PRST_CAT_ADD("unitsPlR", "I_G_Soldier_SL_F"); + +// Armed vehicles (KPLIB_preset_vehLightArmedPlR) +KPLIB_PRST_CAT_BEGIN("vehLightArmedPlR"); +KPLIB_PRST_CAT_ADD("vehLightArmedPlR", "I_G_Offroad_01_armed_F"); +KPLIB_PRST_CAT_ADD("vehLightArmedPlR", "I_G_Offroad_01_AT_F"); + +// Transport vehicles (KPLIB_preset_vehTransPlR) +KPLIB_PRST_CAT_BEGIN("vehTransPlR"); +KPLIB_PRST_CAT_ADD("vehTransPlR", "I_G_Van_01_transport_F"); +KPLIB_PRST_CAT_ADD("vehTransPlR", "I_G_Van_02_transport_F"); + + +/*------------------------------------------------------------ + --- RESISTANCE EQUIPMENT --- + There are 3 tiers for every category. If the strength of the resistance will increase, they'll have higher tier equipment. + + Important for weapons: + You've to add the weapons as array like + ["Weaponclassname", "Magazineclassname", "magazine amount", "optic", "tripod"] + You can leave optic and tripod empty with "" + + NOTE: This system may change during the development of the resistance module +------------------------------------------------------------*/ + +// Weapons tier 1 (KPLIB_preset_weaponsR1) +KPLIB_PRST_CAT_BEGIN("weaponsR1"); +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["arifle_AKM_F", "30Rnd_762x39_Mag_F", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["arifle_AKM_F", "30Rnd_762x39_Mag_F", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["arifle_AKS_F", "30Rnd_545x39_Mag_F", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["hgun_PDW2000_F", "30Rnd_9x21_Mag", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["SMG_01_F", "30Rnd_45ACP_Mag_SMG_01", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["SMG_02_F", "30Rnd_9x21_Mag_SMG_02", 4, "", ""]; +(KPLIB_PRST_GETVAR("weaponsR1")) pushBack ["SMG_05_F", "30Rnd_9x21_Mag_SMG_02", 4, "", ""]; + +// Weapons tier 2 (KPLIB_preset_weaponsR2) +KPLIB_PRST_CAT_BEGIN("weaponsR2"); +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_Katiba_F", "30Rnd_65x39_caseless_green", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_Mk20_plain_F", "30Rnd_556x45_Stanag", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_TRG21_F", "30Rnd_556x45_Stanag", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_CTAR_blk_F", "30Rnd_580x42_Mag_F", 4, "optic_ACO_grn", ""]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["arifle_MX_SW_F", "100Rnd_65x39_caseless_mag", 3, "optic_ACO_grn", "bipod_01_F_blk"]; +(KPLIB_PRST_GETVAR("weaponsR2")) pushBack ["srifle_DMR_06_olive_F", "20Rnd_762x51_Mag", 5, "optic_Hamr", "bipod_01_F_blk"]; + +// Weapons tier 3 (KPLIB_preset_weaponsR3) +KPLIB_PRST_CAT_BEGIN("weaponsR3"); +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_CTAR_blk_F", "30Rnd_580x42_Mag_F", 4, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_SPAR_01_blk_F", "30Rnd_556x45_Stanag", 4, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_SPAR_03_blk_F", "20Rnd_762x51_Mag", 5, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["arifle_ARX_blk_F", "30Rnd_65x39_caseless_green", 4, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["srifle_DMR_03_F", "20Rnd_762x51_Mag", 5, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["srifle_EBR_F", "20Rnd_762x51_Mag", 5, "optic_MRCO", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["srifle_DMR_07_blk_F", "20Rnd_650x39_Cased_Mag_F", 5, "optic_DMS", ""]; +(KPLIB_PRST_GETVAR("weaponsR3")) pushBack ["LMG_Mk200_F", "200Rnd_65x39_cased_Box", 2, "optic_MRCO", "bipod_01_F_blk"]; + +// Uniforms tier 1 (KPLIB_preset_uniformsPlR1) +KPLIB_PRST_CAT_BEGIN("uniformsPlR1"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_blue"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_burgundy"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_salmon"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_redwhite"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_stripped"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poloshirt_tricolour"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Poor_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_1_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_3_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_4_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_5_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_C_Man_casual_6_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR1", "U_Marshal"); + +// Uniforms tier 2 (KPLIB_preset_uniformsPlR2) +KPLIB_PRST_CAT_BEGIN("uniformsPlR2"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_1_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_3_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_4_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Bandit_5_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla2_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla2_2"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla2_3"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_BG_Guerilla3_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_C_HunterBody_grn"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_C_Mechanic_01_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_C_Soldier_Para_5_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR2", "U_I_G_resistanceLeader_F"); + +// Uniforms tier 3 (KPLIB_preset_uniformsPlR3) +KPLIB_PRST_CAT_BEGIN("uniformsPlR3"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_Guerilla1_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_Guerilla1_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_Guerrilla_6_1"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_BG_leader"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_1_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_2_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_3_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Para_4_F"); +KPLIB_PRST_CAT_ADD("uniformsPlR3", "U_I_C_Soldier_Camo_F"); + +// Vests tier 1 (KPLIB_preset_vestsPlR1) +KPLIB_PRST_CAT_BEGIN("vestsPlR1"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_LegStrapBag_coyote_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_LegStrapBag_olive_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_LegStrapBag_black_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_Pocketed_coyote_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_Pocketed_olive_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_Pocketed_black_F"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_cbr"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_rgr"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_khk"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_oli"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_blk"); +KPLIB_PRST_CAT_ADD("vestsPlR1", "V_BandollierB_ghex_F"); + +// Vests tier 2 (KPLIB_preset_vestsPlR2) +KPLIB_PRST_CAT_BEGIN("vestsPlR2"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_rgr"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_khk"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_oli"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_Chestrig_blk"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessO_brn"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessO_gry"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessO_ghex_F"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessOGL_brn"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessOGL_gry"); +KPLIB_PRST_CAT_ADD("vestsPlR2", "V_HarnessOGL_ghex_F"); + +// Vests tier 3 (KPLIB_preset_vestsPlR3) +KPLIB_PRST_CAT_BEGIN("vestsPlR3"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_brn"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_khk"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_oli"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_blk"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_I_G_resistanceLeader_F"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacVest_camo"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacChestrig_grn_F"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacChestrig_cbr_F"); +KPLIB_PRST_CAT_ADD("vestsPlR3", "V_TacChestrig_oli_F"); + +// Headgear tier 1 (KPLIB_preset_headgearPlR1) +KPLIB_PRST_CAT_BEGIN("headgearPlR1"); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", ""); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_brown"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_grey"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_checker"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_camo"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Bandanna_surfer"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Bandanna_surfer_grn"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Bandanna_surfer_blk"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_Safari_olive_F"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Hat_Safari_sand_F"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Construction_basic_black_F"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Helmet_Skate"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_blu"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_grn"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_oli"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_red"); +KPLIB_PRST_CAT_ADD("headgearPlR1", "H_Cap_blk"); + +// Headgear tier 2 (KPLIB_preset_headgearPlR2) +KPLIB_PRST_CAT_BEGIN("headgearPlR2"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_blu"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_sand"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_gry"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_camo"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_cbr"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_sgg"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Bandanna_khk"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_blu"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_grn"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_oli"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_red"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_blk"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_Cap_blk_Raven"); +KPLIB_PRST_CAT_ADD("headgearPlR2", "H_MilCap_dgtl"); + +// Headgear tier 3 (KPLIB_preset_headgearPlR3) +KPLIB_PRST_CAT_BEGIN("headgearPlR3"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_ShemagOpen_khk"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_ShemagOpen_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Shemag_olive"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_khk"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_oli"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_tan"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_dgtl"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_Booniehat_tna_F"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_PASGT_basic_olive_F"); +KPLIB_PRST_CAT_ADD("headgearPlR3", "H_PASGT_basic_white_F"); + +// Facegear. Applies for tier 2 and 3. (KPLIB_preset_facegearPlR) +KPLIB_PRST_CAT_BEGIN("facegearPlR"); +KPLIB_PRST_CAT_ADD("facegearPlR", ""); +KPLIB_PRST_CAT_ADD("facegearPlR", ""); +KPLIB_PRST_CAT_ADD("facegearPlR", ""); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_shades"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_beast"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_tan"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_khk"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_oli"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_aviator"); +KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_blk"); + + +/*------------------------------- + !!! DO NOT EDIT BELOW !!! +-------------------------------*/ + +// Preset was properly parsed, if this is not set player will be informed about errors +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; From 1d0530d31d671321e83ba8b38175e87a7c3f6209 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Fri, 7 Dec 2018 17:03:09 +0100 Subject: [PATCH 12/42] Added IDAP categories to civilian presets --- Missionframework/presets/civilians/custom.sqf | 48 +++++++++++++++++++ .../presets/civilians/vanilla.sqf | 48 +++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/Missionframework/presets/civilians/custom.sqf b/Missionframework/presets/civilians/custom.sqf index 22eb257d4..11c91160c 100644 --- a/Missionframework/presets/civilians/custom.sqf +++ b/Missionframework/presets/civilians/custom.sqf @@ -12,6 +12,12 @@ Custom civilian preset file for individual adjustments. */ + +/*------------------------------------------------------------ + --- Civilian Population --- + Just normal civilians which are living in the area. +------------------------------------------------------------*/ + // Civilian Citizens (KPLIB_preset_unitsPlC) KPLIB_PRST_CAT_BEGIN("unitsPlC"); KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_Fisherman_01_F"); @@ -73,6 +79,48 @@ KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_F"); KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_racing_F"); +/*------------------------------------------------------------ + --- Humanitarian Institution --- + Units/Vehicles from a humanitarian institution like IDAP. +------------------------------------------------------------*/ + +// Engineer (EOD Specialist) +KPLIB_PRST_SETVAR("rsEngineerIdap", "C_IDAP_Man_EOD_01_F"); +// Helicopter Pilot +KPLIB_PRST_SETVAR("rsPilotHeliIdap", "C_IDAP_Pilot_01_F"); +// Medic +KPLIB_PRST_SETVAR("rsMedicIdap", "C_IDAP_Man_Paramedic_01_F"); +// Medical Truck +KPLIB_PRST_SETVAR("respawnTruckIdap", "C_IDAP_Van_02_medevac_F"); + +// IDAP Units (KPLIB_preset_unitsPlIdap) +KPLIB_PRST_CAT_BEGIN("unitsPlIdap"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_01_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_02_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_03_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_04_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_05_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_06_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_07_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_08_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_09_F"); + +// IDAP Cars (KPLIB_preset_vehLightUnarmedPlIdap) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmedPlIdap"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlIdap", "C_IDAP_Offroad_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlIdap", "C_IDAP_Offroad_02_unarmed_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlIdap", "C_IDAP_Van_02_transport_F"); + +// IDAP Trucks (KPLIB_preset_vehTransPlIdap) +KPLIB_PRST_CAT_BEGIN("vehTransPlIdap"); +KPLIB_PRST_CAT_ADD("vehTransPlIdap", "C_IDAP_Truck_02_F"); +KPLIB_PRST_CAT_ADD("vehTransPlIdap", "C_IDAP_Truck_02_transport_F"); + +// Civilian Helicopters (KPLIB_preset_heliTransPlIdap) +KPLIB_PRST_CAT_BEGIN("heliTransPlIdap"); +KPLIB_PRST_CAT_ADD("heliTransPlIdap", "C_IDAP_Heli_Transport_02_F"); + + /*------------------------------- !!! DO NOT EDIT BELOW !!! -------------------------------*/ diff --git a/Missionframework/presets/civilians/vanilla.sqf b/Missionframework/presets/civilians/vanilla.sqf index 69fc95539..7af1d6665 100644 --- a/Missionframework/presets/civilians/vanilla.sqf +++ b/Missionframework/presets/civilians/vanilla.sqf @@ -18,6 +18,12 @@ - None */ + +/*------------------------------------------------------------ + --- Civilian Population --- + Just normal civilians which are living in the area. +------------------------------------------------------------*/ + // Civilian Citizens (KPLIB_preset_unitsPlC) KPLIB_PRST_CAT_BEGIN("unitsPlC"); KPLIB_PRST_CAT_ADD("unitsPlC", "C_Man_Fisherman_01_F"); @@ -79,6 +85,48 @@ KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_F"); KPLIB_PRST_CAT_ADD("planeTransPlC", "C_Plane_Civil_01_racing_F"); +/*------------------------------------------------------------ + --- Humanitarian Institution --- + Units/Vehicles from a humanitarian institution like IDAP. +------------------------------------------------------------*/ + +// Engineer (EOD Specialist) +KPLIB_PRST_SETVAR("rsEngineerIdap", "C_IDAP_Man_EOD_01_F"); +// Helicopter Pilot +KPLIB_PRST_SETVAR("rsPilotHeliIdap", "C_IDAP_Pilot_01_F"); +// Medic +KPLIB_PRST_SETVAR("rsMedicIdap", "C_IDAP_Man_Paramedic_01_F"); +// Medical Truck +KPLIB_PRST_SETVAR("respawnTruckIdap", "C_IDAP_Van_02_medevac_F"); + +// IDAP Units (KPLIB_preset_unitsPlIdap) +KPLIB_PRST_CAT_BEGIN("unitsPlIdap"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_01_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_02_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_03_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_04_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_05_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_06_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_07_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_08_F"); +KPLIB_PRST_CAT_ADD("idapUnitsPlC", "C_IDAP_Man_AidWorker_09_F"); + +// IDAP Cars (KPLIB_preset_vehLightUnarmedPlIdap) +KPLIB_PRST_CAT_BEGIN("vehLightUnarmedPlIdap"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlIdap", "C_IDAP_Offroad_01_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlIdap", "C_IDAP_Offroad_02_unarmed_F"); +KPLIB_PRST_CAT_ADD("vehLightUnarmedPlIdap", "C_IDAP_Van_02_transport_F"); + +// IDAP Trucks (KPLIB_preset_vehTransPlIdap) +KPLIB_PRST_CAT_BEGIN("vehTransPlIdap"); +KPLIB_PRST_CAT_ADD("vehTransPlIdap", "C_IDAP_Truck_02_F"); +KPLIB_PRST_CAT_ADD("vehTransPlIdap", "C_IDAP_Truck_02_transport_F"); + +// Civilian Helicopters (KPLIB_preset_heliTransPlIdap) +KPLIB_PRST_CAT_BEGIN("heliTransPlIdap"); +KPLIB_PRST_CAT_ADD("heliTransPlIdap", "C_IDAP_Heli_Transport_02_F"); + + /*------------------------------- !!! DO NOT EDIT BELOW !!! -------------------------------*/ From c67c3052556a6335eceac776e3c713e30491230e Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 08:49:17 +0100 Subject: [PATCH 13/42] Small typo --- Missionframework/presets/armies/script_component.hpp | 8 ++++---- Missionframework/presets/script_component.hpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Missionframework/presets/armies/script_component.hpp b/Missionframework/presets/armies/script_component.hpp index 474843cef..211f185c6 100644 --- a/Missionframework/presets/armies/script_component.hpp +++ b/Missionframework/presets/armies/script_component.hpp @@ -4,7 +4,7 @@ File: script_component.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-23 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -17,15 +17,15 @@ // Gets the value of a KPLIB preset variable #define KPLIB_PRST_GETVAR(VARIABLE)\ - missionnamespace getVariable [KPLIB_PRST_VAR(VARIABLE), nil] + missionNamespace getVariable [KPLIB_PRST_VAR(VARIABLE), nil] // Sets the value of a KPLIB preset variable #define KPLIB_PRST_SETVAR(VARIABLE,CLASS)\ - missionnamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] + missionNamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] // Creates a KPLIB preset array #define KPLIB_PRST_CAT_BEGIN(ARRAYNAME)\ - missionnamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; + missionNamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; // Adds a classname to a preset array with resource costs #define KPLIB_PRST_CAT_ADD(ARRAYNAME, UNITCLASS, RESSUPPLY, RESAMMO, RESFUEL)\ diff --git a/Missionframework/presets/script_component.hpp b/Missionframework/presets/script_component.hpp index 483e886ad..4e50a319b 100644 --- a/Missionframework/presets/script_component.hpp +++ b/Missionframework/presets/script_component.hpp @@ -4,7 +4,7 @@ File: script_component.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-07 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -17,15 +17,15 @@ // Gets the value of a KPLIB preset variable #define KPLIB_PRST_GETVAR(VARIABLE)\ - missionnamespace getVariable [KPLIB_PRST_VAR(VARIABLE), nil] + missionNamespace getVariable [KPLIB_PRST_VAR(VARIABLE), nil] // Sets the value of a KPLIB preset variable #define KPLIB_PRST_SETVAR(VARIABLE,CLASS)\ - missionnamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] + missionNamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] // Creates a KPLIB preset array #define KPLIB_PRST_CAT_BEGIN(ARRAYNAME)\ - missionnamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; + missionNamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; // Adds a classname to a preset array with resource costs #define KPLIB_PRST_CAT_ADD(ARRAYNAME, CLASSNAMESTRING)\ From 92974152a9b9ca4273a9da0edd73c59603302652 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 12:23:53 +0100 Subject: [PATCH 14/42] Preset processing refactoring --- .vscode/settings.json | 209 +++++++++++- .../00_init/fnc/fn_init_checkClass.sqf | 11 +- .../00_init/fnc/fn_init_loadPresets.sqf | 319 +++--------------- .../modules/00_init/fnc/fn_init_preInit.sqf | 4 +- .../00_init/fnc/fn_init_processPresetVar.sqf | 46 +++ .../00_init/fnc/fn_init_receiveInit.sqf | 163 +-------- .../presets/armies/script_component.hpp | 6 +- Missionframework/presets/script_component.hpp | 6 +- 8 files changed, 314 insertions(+), 450 deletions(-) create mode 100644 Missionframework/modules/00_init/fnc/fn_init_processPresetVar.sqf diff --git a/.vscode/settings.json b/.vscode/settings.json index 2baf4966c..d0aa56948 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,40 +12,227 @@ "BIS_fnc_reviveInit", "CBA_Settings_fnc_init", "KPLIB_eden_boxspawn", - "KPLIB_eden_startbase", "KPLIB_eden_potatospawn", + "KPLIB_eden_startbase", "KPLIB_param_arsenalType", "KPLIB_param_clearVehicleCargo", + "KPLIB_param_commanderZeusMode", "KPLIB_param_copyDistance", "KPLIB_param_debug", "KPLIB_param_fobRange", + "KPLIB_param_limitedZeusCeiling", + "KPLIB_param_limitedZeusRadius", "KPLIB_param_mobileRespawn", "KPLIB_param_presetArsenal", - "KPLIB_param_presetF", + "KPLIB_param_presetC", "KPLIB_param_presetE", + "KPLIB_param_presetF", "KPLIB_param_presetR", - "KPLIB_param_presetC", - "KPLIB_param_reviveMode", + "KPLIB_param_reviveBleedOutDuration", "KPLIB_param_reviveDuration", - "KPLIB_param_reviveRequiredTrait", + "KPLIB_param_reviveForceRespawnDuration", "KPLIB_param_reviveMedicSpeedMultiplier", + "KPLIB_param_reviveMode", "KPLIB_param_reviveRequiredItems", + "KPLIB_param_reviveRequiredTrait", "KPLIB_param_reviveUnconsciousStateMode", - "KPLIB_param_reviveBleedOutDuration", - "KPLIB_param_reviveForceRespawnDuration", "KPLIB_param_saveInterval", "KPLIB_param_sectorActRange", "KPLIB_param_sectorCap", "KPLIB_param_sectorCapRange", "KPLIB_param_stamina", - "KPLIB_param_commanderZeusMode", "KPLIB_param_subCommanderZeusMode", - "KPLIB_param_limitedZeusRadius", - "KPLIB_param_limitedZeusCeiling", + "KPLIB_param_timeMulti", "KPLIB_param_zeusFobIcons", "KPLIB_param_zeusLocationIcons", - "KPLIB_param_timeMulti", "KPLIB_plm_groups", + "KPLIB_preset_addBoatE", + "KPLIB_preset_addBoatF", + "KPLIB_preset_addHeliE", + "KPLIB_preset_addHeliF", + "KPLIB_preset_airBuildingE", + "KPLIB_preset_airBuildingF", + "KPLIB_preset_alphabetE", + "KPLIB_preset_alphabetF", + "KPLIB_preset_arsenalBoxE", + "KPLIB_preset_arsenalBoxF", + "KPLIB_preset_boatsE", + "KPLIB_preset_boatsF", + "KPLIB_preset_boatsPlE", + "KPLIB_preset_boatsPlF", + "KPLIB_preset_crateAmmoE", + "KPLIB_preset_crateAmmoF", + "KPLIB_preset_crateFuelE", + "KPLIB_preset_crateFuelF", + "KPLIB_preset_crateSupplyE", + "KPLIB_preset_crateSupplyF", + "KPLIB_preset_decoE", + "KPLIB_preset_decoF", + "KPLIB_preset_decoPlE", + "KPLIB_preset_decoPlF", + "KPLIB_preset_fobBoxE", + "KPLIB_preset_fobBoxF", + "KPLIB_preset_fobBuildingE", + "KPLIB_preset_fobBuildingF", + "KPLIB_preset_fobTruckE", + "KPLIB_preset_fobTruckF", + "KPLIB_preset_heliAttackE", + "KPLIB_preset_heliAttackF", + "KPLIB_preset_heliAttackPlE", + "KPLIB_preset_heliAttackPlF", + "KPLIB_preset_heliTransE", + "KPLIB_preset_heliTransF", + "KPLIB_preset_heliTransPlC", + "KPLIB_preset_heliTransPlE", + "KPLIB_preset_heliTransPlF", + "KPLIB_preset_jetsE", + "KPLIB_preset_jetsF", + "KPLIB_preset_jetsPlE", + "KPLIB_preset_jetsPlF", + "KPLIB_preset_logiBuildingE", + "KPLIB_preset_logiBuildingF", + "KPLIB_preset_logiTruckE", + "KPLIB_preset_logiTruckF", + "KPLIB_preset_logisticE", + "KPLIB_preset_logisticF", + "KPLIB_preset_logisticPlC", + "KPLIB_preset_logisticPlE", + "KPLIB_preset_logisticPlF", + "KPLIB_preset_mortarE", + "KPLIB_preset_mortarF", + "KPLIB_preset_nameE", + "KPLIB_preset_nameF", + "KPLIB_preset_planeTransE", + "KPLIB_preset_planeTransF", + "KPLIB_preset_planeTransPlC", + "KPLIB_preset_planeTransPlE", + "KPLIB_preset_planeTransPlF", + "KPLIB_preset_potatoE", + "KPLIB_preset_potatoF", + "KPLIB_preset_respawnTruckE", + "KPLIB_preset_respawnTruckF", + "KPLIB_preset_rsAntiAirE", + "KPLIB_preset_rsAntiAirF", + "KPLIB_preset_rsAntiTankE", + "KPLIB_preset_rsAntiTankF", + "KPLIB_preset_rsAutorifleManE", + "KPLIB_preset_rsAutorifleManF", + "KPLIB_preset_rsCrewmanHeliE", + "KPLIB_preset_rsCrewmanHeliF", + "KPLIB_preset_rsCrewmanVehE", + "KPLIB_preset_rsCrewmanVehF", + "KPLIB_preset_rsEngineerE", + "KPLIB_preset_rsEngineerF", + "KPLIB_preset_rsGrenadierE", + "KPLIB_preset_rsGrenadierF", + "KPLIB_preset_rsHeavyGunnerE", + "KPLIB_preset_rsHeavyGunnerF", + "KPLIB_preset_rsLightAtE", + "KPLIB_preset_rsLightAtF", + "KPLIB_preset_rsMarksmanE", + "KPLIB_preset_rsMarksmanF", + "KPLIB_preset_rsMedicE", + "KPLIB_preset_rsMedicF", + "KPLIB_preset_rsOfficerE", + "KPLIB_preset_rsOfficerF", + "KPLIB_preset_rsParatrooperE", + "KPLIB_preset_rsParatrooperF", + "KPLIB_preset_rsPilotHeliE", + "KPLIB_preset_rsPilotHeliF", + "KPLIB_preset_rsPilotJetE", + "KPLIB_preset_rsPilotJetF", + "KPLIB_preset_rsRiflemanE", + "KPLIB_preset_rsRiflemanF", + "KPLIB_preset_rsSharpshooterE", + "KPLIB_preset_rsSharpshooterF", + "KPLIB_preset_rsSquadLeaderE", + "KPLIB_preset_rsSquadLeaderF", + "KPLIB_preset_rsSurvivorE", + "KPLIB_preset_rsSurvivorF", + "KPLIB_preset_rsTeamLeaderE", + "KPLIB_preset_rsTeamLeaderF", + "KPLIB_preset_sfDiverE", + "KPLIB_preset_sfDiverF", + "KPLIB_preset_sfExplosiveE", + "KPLIB_preset_sfExplosiveF", + "KPLIB_preset_sfLightAtE", + "KPLIB_preset_sfLightAtF", + "KPLIB_preset_sfMarksmanE", + "KPLIB_preset_sfMarksmanF", + "KPLIB_preset_sfMedicE", + "KPLIB_preset_sfMedicF", + "KPLIB_preset_sfRiflemanE", + "KPLIB_preset_sfRiflemanF", + "KPLIB_preset_sfSharpshooterE", + "KPLIB_preset_sfSharpshooterF", + "KPLIB_preset_sfSniperE", + "KPLIB_preset_sfSniperF", + "KPLIB_preset_sfSpotterE", + "KPLIB_preset_sfSpotterF", + "KPLIB_preset_sfTeamLeaderE", + "KPLIB_preset_sfTeamLeaderF", + "KPLIB_preset_slotHeliE", + "KPLIB_preset_slotHeliF", + "KPLIB_preset_slotJetE", + "KPLIB_preset_slotJetF", + "KPLIB_preset_specOpsE", + "KPLIB_preset_specOpsF", + "KPLIB_preset_specOpsPlE", + "KPLIB_preset_specOpsPlF", + "KPLIB_preset_staticAaBigE", + "KPLIB_preset_staticAaBigF", + "KPLIB_preset_staticAaBigRadarE", + "KPLIB_preset_staticAaBigRadarF", + "KPLIB_preset_staticAaE", + "KPLIB_preset_staticAaF", + "KPLIB_preset_staticAtE", + "KPLIB_preset_staticAtF", + "KPLIB_preset_staticsE", + "KPLIB_preset_staticsF", + "KPLIB_preset_staticsPlE", + "KPLIB_preset_staticsPlF", + "KPLIB_preset_storageLargeE", + "KPLIB_preset_storageLargeF", + "KPLIB_preset_storageSmallE", + "KPLIB_preset_storageSmallF", + "KPLIB_preset_unitsE", + "KPLIB_preset_unitsF", + "KPLIB_preset_unitsPlC", + "KPLIB_preset_unitsPlE", + "KPLIB_preset_unitsPlF", + "KPLIB_preset_unitsPlR", + "KPLIB_preset_vehAntiAirE", + "KPLIB_preset_vehAntiAirF", + "KPLIB_preset_vehAntiAirPlE", + "KPLIB_preset_vehAntiAirPlF", + "KPLIB_preset_vehArtyE", + "KPLIB_preset_vehArtyF", + "KPLIB_preset_vehArtyPlE", + "KPLIB_preset_vehArtyPlF", + "KPLIB_preset_vehHeavyApcE", + "KPLIB_preset_vehHeavyApcF", + "KPLIB_preset_vehHeavyApcPlE", + "KPLIB_preset_vehHeavyApcPlF", + "KPLIB_preset_vehHeavyE", + "KPLIB_preset_vehHeavyF", + "KPLIB_preset_vehHeavyPlE", + "KPLIB_preset_vehHeavyPlF", + "KPLIB_preset_vehLightArmedE", + "KPLIB_preset_vehLightArmedF", + "KPLIB_preset_vehLightArmedPlE", + "KPLIB_preset_vehLightArmedPlF", + "KPLIB_preset_vehLightArmedPlR", + "KPLIB_preset_vehLightUnarmedE", + "KPLIB_preset_vehLightUnarmedF", + "KPLIB_preset_vehLightUnarmedPlC", + "KPLIB_preset_vehLightUnarmedPlE", + "KPLIB_preset_vehLightUnarmedPlF", + "KPLIB_preset_vehTransE", + "KPLIB_preset_vehTransF", + "KPLIB_preset_vehTransPlC", + "KPLIB_preset_vehTransPlE", + "KPLIB_preset_vehTransPlF", + "KPLIB_preset_vehTransPlR", "KPR_fnc_getPlaytime", "KPR_fnc_getRankName", "KPR_fnc_getScore", diff --git a/Missionframework/modules/00_init/fnc/fn_init_checkClass.sqf b/Missionframework/modules/00_init/fnc/fn_init_checkClass.sqf index 1899fd615..cf1c54c15 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_checkClass.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_checkClass.sqf @@ -4,7 +4,7 @@ File: fn_init_checkClass.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -21,12 +21,9 @@ params [ ["_toCheck", "", [""]] ]; -private _return = false; - if (isClass (configFile >> "CfgVehicles" >> _toCheck)) then { - _return = true; + true } else { - diag_log format ["[KP LIBERATION] [CHECKCLASS] %1 not found in CfgVehicles", _toCheck]; + diag_log format ["[KP LIBERATION] [PRESET] %1 not available in current modset", _toCheck]; + false }; - -_return diff --git a/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf b/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf index 5b0485db4..44d932e95 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf @@ -1,10 +1,11 @@ +#include "loadPresets_macros.hpp" /* KPLIB_fnc_init_loadPresets File: fn_init_loadPresets.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-11-24 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -17,298 +18,68 @@ Returns: Function reached the end [BOOL] - --- NOTE - Not sure about this whole publicVariable method in the preset initialization. - Idea was that the server will first initialize all vital stuff and distribute it to the clients. - This would avoid that clients check all arrays for mods etc. to ensure equality in these arrays. - As it would catch errors if a client has for example RHS loaded but not the server (due to verifySignatures 0 for example). - --- ENDNOTE + NOTE: + Still not sure about this whole publicVariable method in the preset initialization. + Idea was that the server will first initialize all vital stuff and distribute it to the clients. + This would avoid that clients check all arrays for mods etc. to ensure equality in these arrays. + As it would catch errors if a client has for example RHS loaded but not the server (due to verifySignatures 0 for example). */ // Load friendly (player side) preset switch (KPLIB_param_presetF) do { - default {call compile preprocessFileLineNumbers "presets\blufor\custom.sqf";}; + case 0: {[true] call compile preprocessFileLineNumbers "presets\armies\customEast.sqf";}; + case 1: {[true] call compile preprocessFileLineNumbers "presets\armies\csat.sqf";}; + case 2: {[true] call compile preprocessFileLineNumbers "presets\armies\customWest.sqf";}; + case 3: {[true] call compile preprocessFileLineNumbers "presets\armies\nato.sqf";}; + default {[true] call compile preprocessFileLineNumbers "presets\armies\customWest.sqf";}; }; // Load enemy preset switch (KPLIB_param_presetE) do { - default {call compile preprocessFileLineNumbers "presets\opfor\custom.sqf";}; + case 0: {[] call compile preprocessFileLineNumbers "presets\armies\customEast.sqf";}; + case 1: {[] call compile preprocessFileLineNumbers "presets\armies\csat.sqf";}; + case 2: {[] call compile preprocessFileLineNumbers "presets\armies\customWest.sqf";}; + case 3: {[] call compile preprocessFileLineNumbers "presets\armies\nato.sqf";}; + default {[] call compile preprocessFileLineNumbers "presets\armies\customEast.sqf";}; }; // Load resistance preset switch (KPLIB_param_presetR) do { - default {call compile preprocessFileLineNumbers "presets\resistance\custom.sqf";}; + case 0: {[] call compile preprocessFileLineNumbers "presets\resistance\custom.sqf";}; + case 1: {[] call compile preprocessFileLineNumbers "presets\resistance\fia.sqf";}; + default {[] call compile preprocessFileLineNumbers "presets\resistance\custom.sqf";}; }; // Load civilian preset switch (KPLIB_param_presetC) do { - default {call compile preprocessFileLineNumbers "presets\civilians\custom.sqf";}; + case 0: {[] call compile preprocessFileLineNumbers "presets\civilians\custom.sqf";}; + case 1: {[] call compile preprocessFileLineNumbers "presets\civilians\vanilla.sqf";}; + default {[] call compile preprocessFileLineNumbers "presets\civilians\custom.sqf";}; }; -// Set prices for the Blufor infantry squads (supplies, ammo, fuel) -KPLIB_preset_squads = [ - [KPLIB_preset_lightSquad,200,0,0], - [KPLIB_preset_heavySquad,300,0,0], - [KPLIB_preset_atSquad,200,250,0], - [KPLIB_preset_aaSquad,200,250,0], - [KPLIB_preset_reconSquad,250,0,0], - [KPLIB_preset_paraSquad,200,0,0] +// Prepare preset packages +KPLIB_preset_packageF = [ + ["KPLIB_preset_nameF", KPLIB_preset_nameF], + ["KPLIB_preset_alphabetF", KPLIB_preset_alphabetF] ]; - -// Filter Blufor preset arrays -KPLIB_preset_infantry = [KPLIB_preset_infantry] call KPLIB_fnc_init_filterMods; -KPLIB_preset_lightVeh = [KPLIB_preset_lightVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_heavyVeh = [KPLIB_preset_heavyVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_airVeh = [KPLIB_preset_airVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_staticVeh = [KPLIB_preset_staticVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_buildings = [KPLIB_preset_buildings] call KPLIB_fnc_init_filterMods; -KPLIB_preset_supportVeh = [KPLIB_preset_supportVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_lockedVeh = [KPLIB_preset_lockedVeh] call KPLIB_fnc_init_filterMods; - -// Send Blufor preset to clients -KPLIB_preset_bluforPackage = [ - KPLIB_preset_sidePlayers, - KPLIB_preset_colorPlayers, - KPLIB_preset_fobBuilding, - KPLIB_preset_fobBox, - KPLIB_preset_fobTruck, - KPLIB_preset_arsenalBox, - KPLIB_preset_respawnTruck, - KPLIB_preset_potato, - KPLIB_preset_crewman, - KPLIB_preset_hpilot, - KPLIB_preset_jpilot, - KPLIB_preset_addHeli, - KPLIB_preset_addBoat, - KPLIB_preset_logiTruck, - KPLIB_preset_smallStorage, - KPLIB_preset_largeStorage, - KPLIB_preset_recycleBuilding, - KPLIB_preset_airBuilding, - KPLIB_preset_heliSlot, - KPLIB_preset_planeSlot, - KPLIB_preset_sCrate, - KPLIB_preset_aCrate, - KPLIB_preset_fCrate, - KPLIB_preset_infantry, - KPLIB_preset_lightVeh, - KPLIB_preset_heavyVeh, - KPLIB_preset_airVeh, - KPLIB_preset_staticVeh, - KPLIB_preset_buildings, - KPLIB_preset_supportVeh, - KPLIB_preset_uavs, - KPLIB_preset_lightSquad, - KPLIB_preset_heavySquad, - KPLIB_preset_atSquad, - KPLIB_preset_aaSquad, - KPLIB_preset_reconSquad, - KPLIB_preset_paraSquad, - KPLIB_preset_lockedVeh, - KPLIB_preset_alphabet, - KPLIB_preset_squads -]; -publicVariable "KPLIB_preset_bluforPackage"; - -// Filter Opfor preset arrays -KPLIB_preset_oVehicles = [KPLIB_preset_oVehicles] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oVehiclesLow = [KPLIB_preset_oVehiclesLow] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oChoppers = [KPLIB_preset_oChoppers] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oJets = [KPLIB_preset_oJets] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oMilUnits = [KPLIB_preset_oMilUnits] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oMilVeh = [KPLIB_preset_oMilVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oBattleVeh = [KPLIB_preset_oBattleVeh] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oBattleVehLow = [KPLIB_preset_oBattleVehLow] call KPLIB_fnc_init_filterMods; -KPLIB_preset_oBattleTransports = [KPLIB_preset_oBattleTransports] call KPLIB_fnc_init_filterMods; - -// Prepare some additional Opfor arrays -KPLIB_preset_oInfantry = [KPLIB_preset_oSquadLeader,KPLIB_preset_oTeamLeader,KPLIB_preset_oSentry,KPLIB_preset_oRifleman,KPLIB_preset_oRpg,KPLIB_preset_oGrenadier,KPLIB_preset_oMachinegunner,KPLIB_preset_oHeavygunner,KPLIB_preset_oMarksman,KPLIB_preset_oSharpshooter,KPLIB_preset_oSniper,KPLIB_preset_oAt,KPLIB_preset_oAa,KPLIB_preset_oMedic,KPLIB_preset_oEngineer]; -KPLIB_preset_oStandard = [KPLIB_preset_oSquadLeader,KPLIB_preset_oTeamLeader,KPLIB_preset_oMachinegunner,KPLIB_preset_oHeavygunner,KPLIB_preset_oMedic,KPLIB_preset_oMarksman,KPLIB_preset_oGrenadier,KPLIB_preset_oRpg]; -KPLIB_preset_oInfKill = [KPLIB_preset_oSquadLeader,KPLIB_preset_oMachinegunner,KPLIB_preset_oMachinegunner,KPLIB_preset_oHeavygunner,KPLIB_preset_oMedic,KPLIB_preset_oMarksman,KPLIB_preset_oSharpshooter,KPLIB_preset_oSniper]; -KPLIB_preset_oTankKill = [KPLIB_preset_oSquadLeader,KPLIB_preset_oMedic,KPLIB_preset_oMachinegunner,KPLIB_preset_oRpg,KPLIB_preset_oRpg,KPLIB_preset_oAt,KPLIB_preset_oAt,KPLIB_preset_oAt]; -KPLIB_preset_oAirKill = [KPLIB_preset_oSquadLeader,KPLIB_preset_oMedic,KPLIB_preset_oMachinegunner,KPLIB_preset_oRpg,KPLIB_preset_oRpg,KPLIB_preset_oAa,KPLIB_preset_oAa,KPLIB_preset_oAa]; -KPLIB_preset_oAirVeh = []; -{KPLIB_preset_oAirVeh pushBackUnique _x;} forEach (KPLIB_preset_oChoppers + KPLIB_preset_oJets); -KPLIB_preset_oLandVeh = []; -{if (_x isKindOf "Land") then {KPLIB_preset_oLandVeh pushBackUnique _x};} forEach (KPLIB_preset_oVehicles + KPLIB_preset_oVehiclesLow + KPLIB_preset_oMilVeh + KPLIB_preset_oBattleVeh + KPLIB_preset_oBattleVehLow); - -// Send Opfor preset to clients -KPLIB_preset_opforPackage = [ - KPLIB_preset_sideEnemy, - KPLIB_preset_colorEnemy, - KPLIB_preset_colorEnemyAct, - KPLIB_preset_oOfficer, - KPLIB_preset_oSquadLeader, - KPLIB_preset_oTeamLeader, - KPLIB_preset_oSentry, - KPLIB_preset_oRifleman, - KPLIB_preset_oRpg, - KPLIB_preset_oGrenadier, - KPLIB_preset_oMachinegunner, - KPLIB_preset_oHeavygunner, - KPLIB_preset_oMarksman, - KPLIB_preset_oSharpshooter, - KPLIB_preset_oSniper, - KPLIB_preset_oAt, - KPLIB_preset_oAa, - KPLIB_preset_oMedic, - KPLIB_preset_oEngineer, - KPLIB_preset_oParatrooper, - KPLIB_preset_oVehicles, - KPLIB_preset_oVehiclesLow, - KPLIB_preset_oChoppers, - KPLIB_preset_oJets, - KPLIB_preset_oMilUnits, - KPLIB_preset_oMilVeh, - KPLIB_preset_oBattleVeh, - KPLIB_preset_oBattleVehLow, - KPLIB_preset_oBattleTransports, - KPLIB_preset_oMrap, - KPLIB_preset_oMrapArmed, - KPLIB_preset_oTransportHeli, - KPLIB_preset_oTransportTruck, - KPLIB_preset_oLogiTruck, - KPLIB_preset_oFuelTruck, - KPLIB_preset_oAmmoTruck, - KPLIB_preset_oFuelContainer, - KPLIB_preset_oAmmoContainer, - KPLIB_preset_oFlag, - KPLIB_preset_oInfantry, - KPLIB_preset_oStandard, - KPLIB_preset_oInfKill, - KPLIB_preset_oTankKill, - KPLIB_preset_oAirKill, - KPLIB_preset_oAirVeh, - KPLIB_preset_oLandVeh -]; -publicVariable "KPLIB_preset_opforPackage"; - -// Filter resistance preset arrays -KPLIB_preset_rUnits = [KPLIB_preset_rUnits] call KPLIB_fnc_init_filterMods; -KPLIB_preset_rVehicles = [KPLIB_preset_rVehicles] call KPLIB_fnc_init_filterMods; -KPLIB_preset_rTransports = [KPLIB_preset_rTransports] call KPLIB_fnc_init_filterMods; - -// Send resistance preset to clients -KPLIB_preset_resistancePackage = [ - KPLIB_preset_sideResistance, - KPLIB_preset_colorResistance, - KPLIB_preset_rUnits, - KPLIB_preset_rVehicles, - KPLIB_preset_rTransports, - KPLIB_preset_rWeapons1, - KPLIB_preset_rWeapons2, - KPLIB_preset_rWeapons3, - KPLIB_preset_rUniforms1, - KPLIB_preset_rUniforms2, - KPLIB_preset_rUniforms3, - KPLIB_preset_rVests1, - KPLIB_preset_rVests2, - KPLIB_preset_rVests3, - KPLIB_preset_rHeadgear1, - KPLIB_preset_rHeadgear2, - KPLIB_preset_rHeadgear3, - KPLIB_preset_rFacegear -]; -publicVariable "KPLIB_preset_resistancePackage"; - -// Filter civilian preset arrays -KPLIB_preset_cUnits = [KPLIB_preset_cUnits] call KPLIB_fnc_init_filterMods; -KPLIB_preset_cVehicles = [KPLIB_preset_cVehicles] call KPLIB_fnc_init_filterMods; - -// Send civilian preset to clients -KPLIB_preset_civiliansPackage = [ - KPLIB_preset_cUnits, - KPLIB_preset_cVehicles -]; -publicVariable "KPLIB_preset_civiliansPackage"; - -// Fetch and filter transport vehicles from transport config -KPLIB_transport_vehicles = [KPLIB_transport_config] call KPLIB_fnc_init_filterMods; - -// Send transport vehicles to clients -publicVariable "KPLIB_transport_vehicles"; - -/*------------------------------------------------------------ - --- COLLECTION ARRAYS --- - Arrays which combine some of the existing variables to collections. - These are needed to speed up things in the scripts which run during the game. -------------------------------------------------------------*/ - -// Array with all build menu categories -KPLIB_preset_buildLists = [ - KPLIB_preset_infantry, - KPLIB_preset_lightVeh, - KPLIB_preset_heavyVeh, - KPLIB_preset_airVeh, - KPLIB_preset_staticVeh, - KPLIB_preset_buildings, - KPLIB_preset_supportVeh, - KPLIB_preset_squads -]; - -// Array with storage areas -KPLIB_preset_storages = [ - KPLIB_preset_smallStorage, - KPLIB_preset_largeStorage -]; - -// Array with all crate types -KPLIB_preset_crates = [ - KPLIB_preset_sCrate, - KPLIB_preset_aCrate, - KPLIB_preset_fCrate -]; - -// Array with all upgrade buildings -KPLIB_preset_upgrBuildings = [ - KPLIB_preset_recycleBuilding, - KPLIB_preset_airBuilding, - KPLIB_preset_heliSlot, - KPLIB_preset_planeSlot -]; - -// Array with all slot increase buildings -KPLIB_preset_slotBuildings = [ - KPLIB_preset_heliSlot, - KPLIB_preset_planeSlot -]; - -// Fetch all possible friendly infantry classnames -KPLIB_preset_allInfantryBlue = []; -{KPLIB_preset_allInfantryBlue pushBackUnique _x;} forEach (KPLIB_preset_lightSquad + KPLIB_preset_heavySquad + KPLIB_preset_atSquad + KPLIB_preset_aaSquad + KPLIB_preset_reconSquad + KPLIB_preset_paraSquad); -{KPLIB_preset_allInfantryBlue pushBackUnique (_x select 0);} forEach KPLIB_preset_infantry; - -// Fetch all land vehicle classnames -KPLIB_preset_allLandVeh = [] + KPLIB_preset_oLandVeh; -{KPLIB_preset_allLandVeh pushBack (_x select 0);} forEach (KPLIB_preset_heavyVeh + KPLIB_preset_lightVeh); - -// Fetch all air vehicles and a seperate array with only Blufor air vehicle classnames -KPLIB_preset_allAirVeh = [] + KPLIB_preset_oAirVeh; -KPLIB_preset_allAirBlue = []; -{KPLIB_preset_allAirVeh pushBack (_x select 0); KPLIB_preset_allAirBlue pushBack (_x select 0);} forEach KPLIB_preset_airVeh; -KPLIB_preset_allAirBlue = KPLIB_preset_allAirBlue - KPLIB_preset_uavs; - -// Fetch all static classnames -KPLIB_preset_staticClassesBlue = []; -{KPLIB_preset_staticClassesBlue pushBack (_x select 0);} forEach KPLIB_preset_staticVeh; - -// Expand AI resupply sources with preset classnames -KPLIB_resupply_aiSource = KPLIB_resupply_aiSource + [KPLIB_preset_arsenalBox, KPLIB_preset_respawnTruck, KPLIB_preset_potato]; - -// Send collections to clients -KPLIB_preset_collectionsPackage = [ - KPLIB_preset_buildLists, - KPLIB_preset_storages, - KPLIB_preset_crates, - KPLIB_preset_upgrBuildings, - KPLIB_preset_slotBuildings, - KPLIB_preset_allInfantryBlue, - KPLIB_preset_allLandVeh, - KPLIB_preset_allAirVeh, - KPLIB_preset_allAirBlue, - KPLIB_preset_staticClassesBlue, - KPLIB_resupply_aiSource +KPLIB_preset_packageE = [ + ["KPLIB_preset_nameE", KPLIB_preset_nameE], + ["KPLIB_preset_alphabetE", KPLIB_preset_alphabetE] ]; -publicVariable "KPLIB_preset_collectionsPackage"; +KPLIB_preset_packageR = []; +KPLIB_preset_packageC = []; + +// Process all preset variables +private _suffix = ""; +{ + _suffix = _x; + { + [_x, _suffix] call KPLIB_fnc_init_processPresetVar; + } forEach KPLIB_preset_allVariables; +} forEach ["F", "E", "R", "C"]; + +// Pack all preset packages and publish them to the clients +KPLIB_preset_allData = [KPLIB_preset_packageF, KPLIB_preset_packageE, KPLIB_preset_packageR, KPLIB_preset_packageC]; +publicVariable "KPLIB_preset_allData"; true diff --git a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf index 2c788119a..4c7f5085d 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf @@ -4,7 +4,7 @@ File: fn_init_preInit.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-08-31 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -66,6 +66,8 @@ KPLIB_colorResistance = "ColorGUER"; KPLIB_colorResistanceAct = "ColorGreen"; // Respawn position shortcut KPLIB_eden_respawnPos = getMarkerPos "respawn"; +// All preset variable names as collection for processing +KPLIB_preset_allVariables = []; // Squad names for the buildable squads KPLIB_preset_squadNames = [ localize "STR_KPLIB_UNITS_SQUAD_LIGHT", diff --git a/Missionframework/modules/00_init/fnc/fn_init_processPresetVar.sqf b/Missionframework/modules/00_init/fnc/fn_init_processPresetVar.sqf new file mode 100644 index 000000000..813f5e767 --- /dev/null +++ b/Missionframework/modules/00_init/fnc/fn_init_processPresetVar.sqf @@ -0,0 +1,46 @@ +/* + KPLIB_fnc_init_processPresetVar + + File: fn_init_processPresetVar.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-08 + Last Update: 2018-12-08 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Processes a given preset variable by filtering for missing mods and adding the variable to the specific package. + + Parameter(s): + _variable - Preset variable [STRING, defaults to ""] + _suffix - Preset faction suffix [STRING, defaults to ""] + + Returns: + Function reached the end [BOOL] +*/ + +params [ + ["_variable", "", [""]], + ["_suffix", "", [""]] +]; + +if (!isServer) exitWith {false}; + +// Get basic variable +private _prstVar = missionNamespace getVariable (["KPLIB_preset_", _variable, _suffix] joinString ""); + +// Skip if the basic variable is not used or if it's name or alphabet +if !(isNil "_prstVar" || _variable isEqualTo "name" || _variable isEqualTo "alphabet") then { + // Filter mods from arrays or check single classname for availability + if (_prstVar isEqualType []) then { + _prstVar = [_prstVar] call KPLIB_fnc_init_filterMods; + } else { + if !([_prstVar] call KPLIB_fnc_init_checkClass) then { + KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedSingles", false]; + }; + }; + + // Add filtered variable to package + (missionNamespace getVariable ["KPLIB_preset_package" + _suffix, []]) pushBack [["KPLIB_preset_", _variable, _suffix] joinString "", _prstVar]; +}; + +true diff --git a/Missionframework/modules/00_init/fnc/fn_init_receiveInit.sqf b/Missionframework/modules/00_init/fnc/fn_init_receiveInit.sqf index c77e5b570..5eb297198 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_receiveInit.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_receiveInit.sqf @@ -4,7 +4,7 @@ File: fn_init_receiveInit.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-25 - Last Update: 2018-11-12 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -23,161 +23,18 @@ diag_log format ["[KP LIBERATION] [%1] [CLIENT INIT] Client initializing...", di diag_log "[KP LIBERATION] [CLIENT INIT] Receiving data..."; -// Wait until the server has send the packages -waitUntil {!isNil "KPLIB_preset_bluforPackage"}; -waitUntil {!isNil "KPLIB_preset_opforPackage"}; -waitUntil {!isNil "KPLIB_preset_resistancePackage"}; -waitUntil {!isNil "KPLIB_preset_civiliansPackage"}; -waitUntil {!isNil "KPLIB_preset_collectionsPackage"}; +// Wait until the server has send the preset data +waitUntil {!isNil "KPLIB_preset_allData"}; -diag_log "[KP LIBERATION] [CLIENT INIT] Data received. Processing packages..."; +diag_log "[KP LIBERATION] [CLIENT INIT] Data received. Processing..."; -// Process Blufor package -KPLIB_preset_sidePlayers = KPLIB_preset_bluforPackage select 0; -KPLIB_preset_colorPlayers = KPLIB_preset_bluforPackage select 1; -KPLIB_preset_fobBuilding = KPLIB_preset_bluforPackage select 2; -KPLIB_preset_fobBox = KPLIB_preset_bluforPackage select 3; -KPLIB_preset_fobTruck = KPLIB_preset_bluforPackage select 4; -KPLIB_preset_arsenalBox = KPLIB_preset_bluforPackage select 5; -KPLIB_preset_respawnTruck = KPLIB_preset_bluforPackage select 6; -KPLIB_preset_potato = KPLIB_preset_bluforPackage select 7; -KPLIB_preset_crewman = KPLIB_preset_bluforPackage select 8; -KPLIB_preset_hpilot = KPLIB_preset_bluforPackage select 9; -KPLIB_preset_jpilot = KPLIB_preset_bluforPackage select 10; -KPLIB_preset_addHeli = KPLIB_preset_bluforPackage select 11; -KPLIB_preset_addBoat = KPLIB_preset_bluforPackage select 12; -KPLIB_preset_logiTruck = KPLIB_preset_bluforPackage select 13; -KPLIB_preset_smallStorage = KPLIB_preset_bluforPackage select 14; -KPLIB_preset_largeStorage = KPLIB_preset_bluforPackage select 15; -KPLIB_preset_recycleBuilding = KPLIB_preset_bluforPackage select 16; -KPLIB_preset_airBuilding = KPLIB_preset_bluforPackage select 17; -KPLIB_preset_heliSlot = KPLIB_preset_bluforPackage select 18; -KPLIB_preset_planeSlot = KPLIB_preset_bluforPackage select 19; -KPLIB_preset_sCrate = KPLIB_preset_bluforPackage select 20; -KPLIB_preset_aCrate = KPLIB_preset_bluforPackage select 21; -KPLIB_preset_fCrate = KPLIB_preset_bluforPackage select 22; -KPLIB_preset_infantry = KPLIB_preset_bluforPackage select 23; -KPLIB_preset_lightVeh = KPLIB_preset_bluforPackage select 24; -KPLIB_preset_heavyVeh = KPLIB_preset_bluforPackage select 25; -KPLIB_preset_airVeh = KPLIB_preset_bluforPackage select 26; -KPLIB_preset_staticVeh = KPLIB_preset_bluforPackage select 27; -KPLIB_preset_buildings = KPLIB_preset_bluforPackage select 28; -KPLIB_preset_supportVeh = KPLIB_preset_bluforPackage select 29; -KPLIB_preset_uavs = KPLIB_preset_bluforPackage select 30; -KPLIB_preset_lightSquad = KPLIB_preset_bluforPackage select 31; -KPLIB_preset_heavySquad = KPLIB_preset_bluforPackage select 32; -KPLIB_preset_atSquad = KPLIB_preset_bluforPackage select 33; -KPLIB_preset_aaSquad = KPLIB_preset_bluforPackage select 34; -KPLIB_preset_reconSquad = KPLIB_preset_bluforPackage select 35; -KPLIB_preset_paraSquad = KPLIB_preset_bluforPackage select 36; -KPLIB_preset_lockedVeh = KPLIB_preset_bluforPackage select 37; -KPLIB_preset_alphabet = KPLIB_preset_bluforPackage select 38; -KPLIB_preset_squads = KPLIB_preset_bluforPackage select 39; +{ + { + missionNamespace setVariable [_x select 0, _x select 1]; + } forEach _x; +} forEach KPLIB_preset_allData; -diag_log "[KP LIBERATION] [CLIENT INIT] Blufor package processed"; - -// Process Opfor package -KPLIB_preset_sideEnemy = KPLIB_preset_opforPackage select 0; -KPLIB_preset_colorEnemy = KPLIB_preset_opforPackage select 1; -KPLIB_preset_colorEnemyAct = KPLIB_preset_opforPackage select 2; -KPLIB_preset_oOfficer = KPLIB_preset_opforPackage select 3; -KPLIB_preset_oSquadLeader = KPLIB_preset_opforPackage select 4; -KPLIB_preset_oTeamLeader = KPLIB_preset_opforPackage select 5; -KPLIB_preset_oSentry = KPLIB_preset_opforPackage select 6; -KPLIB_preset_oRifleman = KPLIB_preset_opforPackage select 7; -KPLIB_preset_oRpg = KPLIB_preset_opforPackage select 8; -KPLIB_preset_oGrenadier = KPLIB_preset_opforPackage select 9; -KPLIB_preset_oMachinegunner = KPLIB_preset_opforPackage select 10; -KPLIB_preset_oHeavygunner = KPLIB_preset_opforPackage select 11; -KPLIB_preset_oMarksman = KPLIB_preset_opforPackage select 12; -KPLIB_preset_oSharpshooter = KPLIB_preset_opforPackage select 13; -KPLIB_preset_oSniper = KPLIB_preset_opforPackage select 14; -KPLIB_preset_oAt = KPLIB_preset_opforPackage select 15; -KPLIB_preset_oAa = KPLIB_preset_opforPackage select 16; -KPLIB_preset_oMedic = KPLIB_preset_opforPackage select 17; -KPLIB_preset_oEngineer = KPLIB_preset_opforPackage select 18; -KPLIB_preset_oParatrooper = KPLIB_preset_opforPackage select 19; -KPLIB_preset_oVehicles = KPLIB_preset_opforPackage select 20; -KPLIB_preset_oVehiclesLow = KPLIB_preset_opforPackage select 21; -KPLIB_preset_oChoppers = KPLIB_preset_opforPackage select 22; -KPLIB_preset_oJets = KPLIB_preset_opforPackage select 23; -KPLIB_preset_oMilUnits = KPLIB_preset_opforPackage select 24; -KPLIB_preset_oMilVeh = KPLIB_preset_opforPackage select 25; -KPLIB_preset_oBattleVeh = KPLIB_preset_opforPackage select 26; -KPLIB_preset_oBattleVehLow = KPLIB_preset_opforPackage select 27; -KPLIB_preset_oBattleTransports = KPLIB_preset_opforPackage select 28; -KPLIB_preset_oMrap = KPLIB_preset_opforPackage select 29; -KPLIB_preset_oMrapArmed = KPLIB_preset_opforPackage select 30; -KPLIB_preset_oTransportHeli = KPLIB_preset_opforPackage select 31; -KPLIB_preset_oTransportTruck = KPLIB_preset_opforPackage select 32; -KPLIB_preset_oLogiTruck = KPLIB_preset_opforPackage select 33; -KPLIB_preset_oFuelTruck = KPLIB_preset_opforPackage select 34; -KPLIB_preset_oAmmoTruck = KPLIB_preset_opforPackage select 35; -KPLIB_preset_oFuelContainer = KPLIB_preset_opforPackage select 36; -KPLIB_preset_oAmmoContainer = KPLIB_preset_opforPackage select 37; -KPLIB_preset_oFlag = KPLIB_preset_opforPackage select 38; -KPLIB_preset_oInfantry = KPLIB_preset_opforPackage select 39; -KPLIB_preset_oStandard = KPLIB_preset_opforPackage select 40; -KPLIB_preset_oInfKill = KPLIB_preset_opforPackage select 41; -KPLIB_preset_oTankKill = KPLIB_preset_opforPackage select 42; -KPLIB_preset_oAirKill = KPLIB_preset_opforPackage select 43; -KPLIB_preset_oAirVeh = KPLIB_preset_opforPackage select 44; -KPLIB_preset_oLandVeh = KPLIB_preset_opforPackage select 45; - -diag_log "[KP LIBERATION] [CLIENT INIT] Opfor package processed"; - -// Process resistance package -KPLIB_preset_sideResistance = KPLIB_preset_resistancePackage select 0; -KPLIB_preset_colorResistance = KPLIB_preset_resistancePackage select 1; -KPLIB_preset_rUnits = KPLIB_preset_resistancePackage select 2; -KPLIB_preset_rVehicles = KPLIB_preset_resistancePackage select 3; -KPLIB_preset_rTransports = KPLIB_preset_resistancePackage select 4; -KPLIB_preset_rWeapons1 = KPLIB_preset_resistancePackage select 5; -KPLIB_preset_rWeapons2 = KPLIB_preset_resistancePackage select 6; -KPLIB_preset_rWeapons3 = KPLIB_preset_resistancePackage select 7; -KPLIB_preset_rUniforms1 = KPLIB_preset_resistancePackage select 8; -KPLIB_preset_rUniforms2 = KPLIB_preset_resistancePackage select 9; -KPLIB_preset_rUniforms3 = KPLIB_preset_resistancePackage select 10; -KPLIB_preset_rVests1 = KPLIB_preset_resistancePackage select 11; -KPLIB_preset_rVests2 = KPLIB_preset_resistancePackage select 12; -KPLIB_preset_rVests3 = KPLIB_preset_resistancePackage select 13; -KPLIB_preset_rHeadgear1 = KPLIB_preset_resistancePackage select 14; -KPLIB_preset_rHeadgear2 = KPLIB_preset_resistancePackage select 15; -KPLIB_preset_rHeadgear3 = KPLIB_preset_resistancePackage select 16; -KPLIB_preset_rFacegear = KPLIB_preset_resistancePackage select 17; - -diag_log "[KP LIBERATION] [CLIENT INIT] Resistance package processed"; - -// Process civilian package -KPLIB_preset_cUnits = KPLIB_preset_civiliansPackage select 0; -KPLIB_preset_cVehicles = KPLIB_preset_civiliansPackage select 1; - -diag_log "[KP LIBERATION] [CLIENT INIT] Civilian package processed"; - -// Process collections package -KPLIB_preset_buildLists = KPLIB_preset_collectionsPackage select 0; -KPLIB_preset_storages = KPLIB_preset_collectionsPackage select 1; -KPLIB_preset_crates = KPLIB_preset_collectionsPackage select 2; -KPLIB_preset_upgrBuildings = KPLIB_preset_collectionsPackage select 3; -KPLIB_preset_slotBuildings = KPLIB_preset_collectionsPackage select 4; -KPLIB_preset_allInfantryBlue = KPLIB_preset_collectionsPackage select 5; -KPLIB_preset_allLandVeh = KPLIB_preset_collectionsPackage select 6; -KPLIB_preset_allAirVeh = KPLIB_preset_collectionsPackage select 7; -KPLIB_preset_allAirBlue = KPLIB_preset_collectionsPackage select 8; -KPLIB_preset_staticClassesBlue = KPLIB_preset_collectionsPackage select 9; -KPLIB_resupply_aiSource = KPLIB_preset_collectionsPackage select 10; - -diag_log "[KP LIBERATION] [CLIENT INIT] Collections package processed"; - -// Set correct localized squad names -KPLIB_preset_squadNames = [ - localize "STR_KPLIB_UNITS_SQUAD_LIGHT", - localize "STR_KPLIB_UNITS_SQUAD_RIFLE", - localize "STR_KPLIB_UNITS_SQUAD_AT", - localize "STR_KPLIB_UNITS_SQUAD_AA", - localize "STR_KPLIB_UNITS_SQUAD_RECON", - localize "STR_KPLIB_UNITS_SQUAD_PARA" -]; +diag_log "[KP LIBERATION] [CLIENT INIT] Data processed"; if (hasInterface) then { // Preload the arsenal to speed up arsenal opening during the game diff --git a/Missionframework/presets/armies/script_component.hpp b/Missionframework/presets/armies/script_component.hpp index 211f185c6..2442a595d 100644 --- a/Missionframework/presets/armies/script_component.hpp +++ b/Missionframework/presets/armies/script_component.hpp @@ -21,11 +21,13 @@ // Sets the value of a KPLIB preset variable #define KPLIB_PRST_SETVAR(VARIABLE,CLASS)\ - missionNamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] + missionNamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS];\ + KPLIB_preset_allVariables pushBackUnique VARIABLE // Creates a KPLIB preset array #define KPLIB_PRST_CAT_BEGIN(ARRAYNAME)\ - missionNamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; + missionNamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []];\ + KPLIB_preset_allVariables pushBackUnique ARRAYNAME // Adds a classname to a preset array with resource costs #define KPLIB_PRST_CAT_ADD(ARRAYNAME, UNITCLASS, RESSUPPLY, RESAMMO, RESFUEL)\ diff --git a/Missionframework/presets/script_component.hpp b/Missionframework/presets/script_component.hpp index 4e50a319b..f80e3e461 100644 --- a/Missionframework/presets/script_component.hpp +++ b/Missionframework/presets/script_component.hpp @@ -21,11 +21,13 @@ // Sets the value of a KPLIB preset variable #define KPLIB_PRST_SETVAR(VARIABLE,CLASS)\ - missionNamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS] + missionNamespace setVariable [KPLIB_PRST_VAR(VARIABLE), CLASS];\ + KPLIB_preset_allVariables pushBackUnique VARIABLE // Creates a KPLIB preset array #define KPLIB_PRST_CAT_BEGIN(ARRAYNAME)\ - missionNamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []]; + missionNamespace setVariable [KPLIB_PRST_VAR(ARRAYNAME), []];\ + KPLIB_preset_allVariables pushBackUnique ARRAYNAME // Adds a classname to a preset array with resource costs #define KPLIB_PRST_CAT_ADD(ARRAYNAME, CLASSNAMESTRING)\ From 234bd4d4d691e524e0107d40f5e6aa405dd5629a Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 12:24:20 +0100 Subject: [PATCH 15/42] configGuard adjustments/enhancement --- Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf | 3 ++- Missionframework/presets/civilians/custom.sqf | 4 ++-- Missionframework/presets/civilians/vanilla.sqf | 4 ++-- Missionframework/presets/resistance/custom.sqf | 4 ++-- Missionframework/presets/resistance/fia.sqf | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf b/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf index 56c18379b..75061e6f4 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf @@ -4,7 +4,7 @@ File: fn_init_configGuard.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-06-19 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -33,6 +33,7 @@ KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedC", false]; KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedE", false]; KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedF", false]; KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedR", false]; +KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedSingles", true]; // Delay all checks until all initializations are done [] spawn { diff --git a/Missionframework/presets/civilians/custom.sqf b/Missionframework/presets/civilians/custom.sqf index 11c91160c..10cb30c2f 100644 --- a/Missionframework/presets/civilians/custom.sqf +++ b/Missionframework/presets/civilians/custom.sqf @@ -5,7 +5,7 @@ File: custom.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -126,4 +126,4 @@ KPLIB_PRST_CAT_ADD("heliTransPlIdap", "C_IDAP_Heli_Transport_02_F"); -------------------------------*/ // Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checkedC"), true]; diff --git a/Missionframework/presets/civilians/vanilla.sqf b/Missionframework/presets/civilians/vanilla.sqf index 7af1d6665..2b16ff51c 100644 --- a/Missionframework/presets/civilians/vanilla.sqf +++ b/Missionframework/presets/civilians/vanilla.sqf @@ -5,7 +5,7 @@ File: vanilla.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-07 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -132,4 +132,4 @@ KPLIB_PRST_CAT_ADD("heliTransPlIdap", "C_IDAP_Heli_Transport_02_F"); -------------------------------*/ // Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checkedC"), true]; diff --git a/Missionframework/presets/resistance/custom.sqf b/Missionframework/presets/resistance/custom.sqf index 22d116dc6..7d6194a64 100644 --- a/Missionframework/presets/resistance/custom.sqf +++ b/Missionframework/presets/resistance/custom.sqf @@ -5,7 +5,7 @@ File: custom.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -242,4 +242,4 @@ KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_blk"); -------------------------------*/ // Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checkedR"), true]; diff --git a/Missionframework/presets/resistance/fia.sqf b/Missionframework/presets/resistance/fia.sqf index 90b559048..3b2f82605 100644 --- a/Missionframework/presets/resistance/fia.sqf +++ b/Missionframework/presets/resistance/fia.sqf @@ -5,7 +5,7 @@ File: fia.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-07 - Last Update: 2018-12-07 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -248,4 +248,4 @@ KPLIB_PRST_CAT_ADD("facegearPlR", "G_Bandanna_blk"); -------------------------------*/ // Preset was properly parsed, if this is not set player will be informed about errors -KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checked"), true]; +KPLIB_validationNamespace setVariable [KPLIB_PRST_VAR("checkedR"), true]; From ac2acafcca34448339590452e1f16a01b0e314cf Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 12:25:24 +0100 Subject: [PATCH 16/42] Settings/Stringtable update and missing function.hpp commit --- .../modules/00_init/fnc/fn_init_settings.sqf | 40 +++++++++++++------ .../modules/00_init/functions.hpp | 5 ++- Missionframework/stringtable.xml | 36 ++++++++++++----- 3 files changed, 57 insertions(+), 24 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_settings.sqf b/Missionframework/modules/00_init/fnc/fn_init_settings.sqf index fe9a4b755..d0ddbb5d1 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_settings.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_settings.sqf @@ -4,7 +4,7 @@ File: fn_init_settings.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-09 - Last Update: 2018-11-27 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -108,7 +108,7 @@ // KPLIB_param_presetF // Selection for the units, vehicles, etc. for the player side. -// Default: Custom Preset +// Default: Custom West Army [ "KPLIB_param_presetF", "LIST", @@ -116,12 +116,18 @@ localize "STR_KPLIB_SETTINGS_PRESET", [ [ - 0 + 0, + 1, + 2, + 3 ], [ - localize "STR_KPLIB_SETTINGS_PRESET_PLAYER_0" + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_0", + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_1", + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_2", + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_3" ], - 0 + 2 ], 1, {} @@ -129,7 +135,7 @@ // KPLIB_param_presetE // Selection for the units, vehicles, etc. for the enemy side. -// Default: Custom Preset +// Default: Custom East Army [ "KPLIB_param_presetE", "LIST", @@ -137,10 +143,16 @@ localize "STR_KPLIB_SETTINGS_PRESET", [ [ - 0 + 0, + 1, + 2, + 3 ], [ - localize "STR_KPLIB_SETTINGS_PRESET_ENEMY_0" + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_0", + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_1", + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_2", + localize "STR_KPLIB_SETTINGS_PRESET_ARMY_3" ], 0 ], @@ -158,10 +170,12 @@ localize "STR_KPLIB_SETTINGS_PRESET", [ [ - 0 + 0, + 1 ], [ - localize "STR_KPLIB_SETTINGS_PRESET_RESIS_0" + localize "STR_KPLIB_SETTINGS_PRESET_RESIS_0", + localize "STR_KPLIB_SETTINGS_PRESET_RESIS_1" ], 0 ], @@ -179,10 +193,12 @@ localize "STR_KPLIB_SETTINGS_PRESET", [ [ - 0 + 0, + 1 ], [ - localize "STR_KPLIB_SETTINGS_PRESET_CIV_0" + localize "STR_KPLIB_SETTINGS_PRESET_CIV_0", + localize "STR_KPLIB_SETTINGS_PRESET_CIV_1" ], 0 ], diff --git a/Missionframework/modules/00_init/functions.hpp b/Missionframework/modules/00_init/functions.hpp index 9d7ea96d2..7781645ab 100644 --- a/Missionframework/modules/00_init/functions.hpp +++ b/Missionframework/modules/00_init/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-11-27 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -51,6 +51,9 @@ class init { preInit = 1; }; + // Processes a given preset variable + class init_processPresetVar {}; + // Client function for processing init data which was published by the server class init_receiveInit {}; diff --git a/Missionframework/stringtable.xml b/Missionframework/stringtable.xml index 7b111b71b..9595396e4 100644 --- a/Missionframework/stringtable.xml +++ b/Missionframework/stringtable.xml @@ -789,6 +789,22 @@ KPLIB - 預設值 KPLIB - Presets + + CEA - Custom East Army + CEA - Custom East Army + + + CSAT + CSAT + + + CWA - Custom West Army + CWA - Custom West Army + + + NATO + NATO + Player 玩家 @@ -799,11 +815,6 @@ 玩家可使用的單位及載具 Auswahl der Einheiten, Fahrzeuge, etc. der Spieler. - - Custom Preset - 自訂的預設值 - Custom Preset - Enemy 敵人 @@ -814,11 +825,6 @@ 敵人可使用的單位及載具 Auswahl der Einheiten, Fahrzeuge, etc. der Gegner. - - Custom Preset - 自訂的預設值 - Custom Preset - Resistance 反抗軍 @@ -834,6 +840,10 @@ 自訂的預設值 Custom Preset + + FIA + FIA + Civlians 平民 @@ -849,6 +859,10 @@ 自訂的預設值 Custom Preset + + Vanilla + Vanilla + @@ -999,7 +1013,7 @@ Limited mode camera ceiling - 限制模式的攝影機高度 + 限制模式的攝影機高度 Show 3D fob labels From 79a77e0702a33eba4c269e54f10cd11e268e0054 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 12:28:05 +0100 Subject: [PATCH 17/42] side and color in preInit to preset category --- .../modules/00_init/fnc/fn_init_preInit.sqf | 41 ++++++++----------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf index 4c7f5085d..5f609f161 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf @@ -52,31 +52,28 @@ if (isServer) then { // Variable for ending the campaign KPLIB_campaignRunning = true; +// Respawn position shortcut +KPLIB_eden_respawnPos = getMarkerPos "respawn"; +// All preset variable names as collection for processing +KPLIB_preset_allVariables = []; // Enemy side color -KPLIB_colorEnemy = "ColorEAST"; +KPLIB_preset_colorE = "ColorEAST"; // Enemy side color (active) -KPLIB_colorEnemyAct = "ColorRed"; +KPLIB_preset_colorActE = "ColorRed"; // Friendly side color -KPLIB_colorPlayers = "ColorWEST"; +KPLIB_preset_colorF = "ColorWEST"; // Friendly side color (active) -KPLIB_colorPlayersAct = "ColorBlue"; +KPLIB_preset_colorActF = "ColorBlue"; // Resistance side color -KPLIB_colorResistance = "ColorGUER"; +KPLIB_preset_colorR = "ColorGUER"; // Resistance side color (active) -KPLIB_colorResistanceAct = "ColorGreen"; -// Respawn position shortcut -KPLIB_eden_respawnPos = getMarkerPos "respawn"; -// All preset variable names as collection for processing -KPLIB_preset_allVariables = []; -// Squad names for the buildable squads -KPLIB_preset_squadNames = [ - localize "STR_KPLIB_UNITS_SQUAD_LIGHT", - localize "STR_KPLIB_UNITS_SQUAD_RIFLE", - localize "STR_KPLIB_UNITS_SQUAD_AT", - localize "STR_KPLIB_UNITS_SQUAD_AA", - localize "STR_KPLIB_UNITS_SQUAD_RECON", - localize "STR_KPLIB_UNITS_SQUAD_PARA" -]; +KPLIB_preset_colorActR = "ColorGreen"; +// Enemy side +KPLIB_preset_sideE = east; +// Player side +KPLIB_preset_sideF = west; +// Resistance side +KPLIB_preset_sideR = resistance; // Reset position shortcut KPLIB_resetPos = [99999,99999,0]; // Indicator if the saved data is fully loaded @@ -107,12 +104,6 @@ KPLIB_sectors_military = []; KPLIB_sectors_spawn = []; // All radiotowers KPLIB_sectors_tower = []; -// Enemy side -KPLIB_sideEnemy = east; -// Player side -KPLIB_sidePlayer = west; -// Resistance side -KPLIB_sideResistance = resistance; // Zero position shortcut KPLIB_zeroPos = [0,0,0]; From f921b6346a9ee3363ad13fbbce3b8f3ef4a0c825 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 12:30:46 +0100 Subject: [PATCH 18/42] temporarily disabled locked vehicles --- .../modules/00_init/fnc/fn_init_loadData.sqf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf b/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf index b46beca2f..e2efeeff5 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf @@ -4,7 +4,7 @@ File: fn_init_loadData.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -28,7 +28,7 @@ if (_moduleData isEqualTo []) then { // Set random start date setDate [2018, ceil (random 12), ceil (random 28), 8, 0]; - // Connect locked vehicles to military bases + /*// Connect locked vehicles to military bases private _assignedVehicles = []; private _assignedBases = []; private _nextVehicle = ""; @@ -39,7 +39,7 @@ if (_moduleData isEqualTo []) then { _assignedVehicles pushBack _nextVehicle; _assignedBases pushBack _nextBase; KPLIB_sectors_lockedVeh pushBack [_nextVehicle, _nextBase]; - }; + };*/ publicVariable "KPLIB_sectors_lockedVeh"; } else { // Otherwise start applying the saved data @@ -59,7 +59,7 @@ if (_moduleData isEqualTo []) then { KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 0) in KPLIB_preset_lockedVeh}; KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 1) in KPLIB_sectors_military}; - // Check for additions in the locked vehicles array + /*// Check for additions in the locked vehicles array private _lockedVehCount = count KPLIB_sectors_lockedVeh; if ((_lockedVehCount < (count KPLIB_sectors_military)) && (_lockedVehCount < (count KPLIB_preset_lockedVeh))) then { diag_log "[KP LIBERATION] [IMPORTANT] Additional military sectors or unlock vehicles detected and assigned."; @@ -80,7 +80,7 @@ if (_moduleData isEqualTo []) then { _assignedBases pushBack _nextBase; KPLIB_sectors_lockedVeh pushBack [_nextVehicle, _nextBase]; }; - }; + };*/ publicVariable "KPLIB_sectors_lockedVeh"; // Publish blufor sectors From dc687746fc576f7b9dfee7b2eb93a54be950be39 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sat, 8 Dec 2018 12:45:01 +0100 Subject: [PATCH 19/42] First batch of some brief preset change adjustments --- .../fnc/fn_init_createLockedVehMarkers.sqf | 4 +-- .../modules/00_init/fnc/fn_init_preInit.sqf | 6 ++++ .../01_common/fnc/fn_common_createCrew.sqf | 34 ++++++------------- .../01_common/fnc/fn_common_createGroup.sqf | 6 ++-- .../01_common/fnc/fn_common_createVehicle.sqf | 6 ++-- .../fnc/fn_common_getFobAlphabetName.sqf | 4 +-- .../02_core/fnc/fn_core_areUnitsNear.sqf | 6 ++-- .../02_core/fnc/fn_core_handleSector.sqf | 4 +-- .../fnc/fn_core_handleVehicleSpawn.sqf | 12 +++---- .../02_core/fnc/fn_core_spawnPotato.sqf | 4 +-- .../02_core/fnc/fn_core_spawnStartFobBox.sqf | 4 +-- .../02_core/fnc/fn_core_spawnStartVeh.sqf | 6 ++-- .../02_core/fnc/fn_core_updateFobMarkers.sqf | 4 +-- .../fnc/fn_core_updateSectorMarkers.sqf | 14 ++++---- .../03_respawn/fnc/fn_respawn_getRespawns.sqf | 4 +-- .../15_build/fnc/fn_build_confirmSingle.sqf | 4 +-- .../15_build/fnc/fn_build_loadData.sqf | 4 +-- .../16_garrison/fnc/fn_garrison_spawn.sqf | 8 ++--- .../fnc/fn_garrison_spawnSectorInfantry.sqf | 8 ++--- .../fnc/fn_garrison_spawnSectorVehicle.sqf | 6 ++-- 20 files changed, 71 insertions(+), 77 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_createLockedVehMarkers.sqf b/Missionframework/modules/00_init/fnc/fn_init_createLockedVehMarkers.sqf index cea63b10b..db256a672 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_createLockedVehMarkers.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_createLockedVehMarkers.sqf @@ -4,7 +4,7 @@ File: fn_init_createLockedVehMarkers.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-08 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -32,7 +32,7 @@ private _cfg = configFile >> "CfgVehicles"; _marker setMarkerText (getText (_cfg >> _vehicle >> "displayName")); _marker setMarkerShape "ICON"; _marker setMarkerType "mil_pickup"; - _marker setMarkerColor KPLIB_preset_colorEnemy; + _marker setMarkerColor KPLIB_preset_colorE; // Storing of the created locked vehicle marker with relation to the base marker. KPLIB_sectors_lockedVehMarkers pushBack [_marker, _base]; diff --git a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf index 5f609f161..08ffb6c10 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_preInit.sqf @@ -56,6 +56,10 @@ KPLIB_campaignRunning = true; KPLIB_eden_respawnPos = getMarkerPos "respawn"; // All preset variable names as collection for processing KPLIB_preset_allVariables = []; +// Civilian side color +KPLIB_preset_colorC = "ColorCIV"; +// Civilian side color (active) +KPLIB_preset_colorActC = "ColorPink"; // Enemy side color KPLIB_preset_colorE = "ColorEAST"; // Enemy side color (active) @@ -68,6 +72,8 @@ KPLIB_preset_colorActF = "ColorBlue"; KPLIB_preset_colorR = "ColorGUER"; // Resistance side color (active) KPLIB_preset_colorActR = "ColorGreen"; +// Civilian side +KPLIB_preset_sideC = civilian; // Enemy side KPLIB_preset_sideE = east; // Player side diff --git a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf index 96bad3edf..e37d769ba 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf @@ -4,7 +4,7 @@ File: fn_common_createCrew.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-25 - Last Update: 2018-10-25 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -12,7 +12,7 @@ Parameter(s): _vehicle - Vehicle object which should get a crew [OBJECT, defaults to objNull] - _side - Side of the crew [SIDE, defaults to KPLIB_preset_sideEnemy] + _side - Side of the crew [SIDE, defaults to KPLIB_preset_sideE] Returns: Created crew [GROUP] @@ -20,43 +20,31 @@ params [ ["_vehicle", objNull, [objNull]], - ["_side", KPLIB_preset_sideEnemy, [sideEmpty]] + ["_side", KPLIB_preset_sideE, [sideEmpty]] ]; // Exit when no or destroyed vehicle was given if ((_vehicle isEqualTo objNull) || !(alive _vehicle)) exitWith {grpNull}; -/* NOTE - The following code will be used as soon as we've refactored the preset files structure // Determine classname side private _crewSide = switch (_side) do { - case "KPLIB_preset_sidePlayers": {""}; - case "KPLIB_preset_sideResistance": {"r"}; - case "KPLIB_preset_sideCivilian": {"c"}; - default {"o"}; + case KPLIB_preset_sideF: {"F"}; + case KPLIB_preset_sideR: {"R"}; + case KPLIB_preset_sideC: {"C"}; + default {"E"}; }; // Determine classname type for air vehicles private _crewType = switch (true) do { - case (_vehicle isKindOf "Plane"): {"Pilot"}; - case (_vehicle isKindOf "Helicopter"): {"hpilot"}; - default {"Crew"}; + case (_vehicle isKindOf "Plane"): {"rsPilotJet"}; + case (_vehicle isKindOf "Helicopter"): {"rsPilotHeli"}; + default {"rsCrewmanVeh"}; }; // Get correct classname or exit, when no classname could be found -private _crewClass = missionNamespace getVariable ["KPLIB_preset_" + _crewSide + _crewType, ""]; +private _crewClass = missionNamespace getVariable ["KPLIB_preset_" + _crewType + _crewSide, ""]; if ((_crewClass isEqualTo "") || (_crewClass isEqualTo [])) exitWith {grpNull}; -*/ - -// Determine crew classname (will be removed as soon as the above will be used) -private _crewClass = switch (_side) do { - case "KPLIB_preset_sidePlayers": {KPLIB_preset_crewman}; - case "KPLIB_preset_sideResistance": {KPLIB_preset_rUnits}; - case "KPLIB_preset_sideCivilian": {KPLIB_preset_cUnits}; - default {KPLIB_preset_oMilUnits}; -}; - // Get all turret paths of the vehicle private _turrets = [[-1]] + (allTurrets _vehicle); diff --git a/Missionframework/modules/01_common/fnc/fn_common_createGroup.sqf b/Missionframework/modules/01_common/fnc/fn_common_createGroup.sqf index c51ff103e..285e47eff 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_createGroup.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_createGroup.sqf @@ -4,14 +4,14 @@ File: fn_common_createGroup.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-24 - Last Update: 2018-10-24 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: Creates a group at given side with units according to given array of classnames and fires the Liberation group created event. Parameter(s): - _side - Side of the group [SIDE, defaults to KPLIB_preset_sideEnemy] + _side - Side of the group [SIDE, defaults to KPLIB_preset_sideE] _units - Array of classnames to spawn as group members [ARRAY, defaults to []] _spawnPos - Position to spawn the group and units [POSITION, defaults to KPLIB_zeroPos] _addition - Additional argument for unit creation [STRING, defaults to "NONE"] @@ -21,7 +21,7 @@ */ params [ - ["_side", KPLIB_preset_sideEnemy, [sideEmpty]], + ["_side", KPLIB_preset_sideE, [sideEmpty]], ["_units", [], [[]]], ["_spawnPos", [KPLIB_zeroPos], [[]], [3]], ["_addition", "NONE", [""]] diff --git a/Missionframework/modules/01_common/fnc/fn_common_createVehicle.sqf b/Missionframework/modules/01_common/fnc/fn_common_createVehicle.sqf index de7367a34..081b01392 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_createVehicle.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_createVehicle.sqf @@ -4,7 +4,7 @@ File: fn_common_createVehicle.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-03 - Last Update: 2018-11-10 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -17,7 +17,7 @@ _spawnDir - Heading for the vehicle from 0 to 360 [NUMBER, defaults to (random 360)] _justSpawn - True to skip all paradrop or air vehicle detection, even if z > 10 [BOOL, defaults to false] _withCrew - True to spawn crew for the vehicle [BOOL, defaults to false] - _side - Side to which this vehicle should belong, when _withCrew == true [SIDE, defaults to KPLIB_preset_sideEnemy] + _side - Side to which this vehicle should belong, when _withCrew == true [SIDE, defaults to KPLIB_preset_sideE] Returns: Created vehicle [OBJECT] @@ -29,7 +29,7 @@ params [ ["_spawnDir", random 360, [0]], ["_justSpawn", false, [true]], ["_withCrew", false, [true]], - ["_side", KPLIB_preset_sideEnemy, [sideEmpty]] + ["_side", KPLIB_preset_sideE, [sideEmpty]] ]; // Exit if arguments are missing diff --git a/Missionframework/modules/01_common/fnc/fn_common_getFobAlphabetName.sqf b/Missionframework/modules/01_common/fnc/fn_common_getFobAlphabetName.sqf index 751884a6e..17899990e 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_getFobAlphabetName.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_getFobAlphabetName.sqf @@ -4,7 +4,7 @@ File: fn_common_getFobAlphabetName.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-27 - Last Update: 2018-11-27 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -25,5 +25,5 @@ private _index = KPLIB_sectors_fobs findIf {_x == _fob}; if (_index isEqualTo -1) then { "" } else { - KPLIB_preset_alphabet select _index + KPLIB_preset_alphabetF select _index } diff --git a/Missionframework/modules/02_core/fnc/fn_core_areUnitsNear.sqf b/Missionframework/modules/02_core/fnc/fn_core_areUnitsNear.sqf index 354a16d95..03d56b895 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_areUnitsNear.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_areUnitsNear.sqf @@ -4,7 +4,7 @@ File: fn_core_areUnitsNear.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-07 - Last Update: 2018-11-20 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -13,7 +13,7 @@ Parameter(s): _centerPos - Position to check for units [POSITION, defaults to nil] _radius - Radius in meters [NUMBER, defaults to 1000] - _sidesToCheck - Array of SIDE values [ARRAY, defaults to KPLIB_preset_sidePlayers] + _sidesToCheck - Array of SIDE values [ARRAY, defaults to KPLIB_preset_sideF] Returns: Result [BOOL] @@ -25,7 +25,7 @@ params [ ["_centerPos", nil, [[]], [2,3]], ["_radius", 1000, [0]], - ["_sidesToCheck", [KPLIB_preset_sidePlayers], [[]]] + ["_sidesToCheck", [KPLIB_preset_sideF], [[]]] ]; if (isNil "_centerPos") exitWith {false}; diff --git a/Missionframework/modules/02_core/fnc/fn_core_handleSector.sqf b/Missionframework/modules/02_core/fnc/fn_core_handleSector.sqf index ee83eea85..55b34b07b 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_handleSector.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_handleSector.sqf @@ -4,7 +4,7 @@ File: fn_core_handleSector.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-06 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -30,7 +30,7 @@ private _handler = [ // If there are no enemy units in two times the capture range and friendly units are in capture range // capture the sector if ( - !([_sectorPos, 2 * KPLIB_param_sectorCapRange, [KPLIB_preset_sideEnemy]] call KPLIB_fnc_core_areUnitsNear) + !([_sectorPos, 2 * KPLIB_param_sectorCapRange, [KPLIB_preset_sideE]] call KPLIB_fnc_core_areUnitsNear) && {[_sectorPos, KPLIB_param_sectorCapRange] call KPLIB_fnc_core_areUnitsNear} ) then { diag_log format ["[KP LIBERATION] [%1] [CORE] Sector %2 (%3) captured", diag_tickTime, markerText _sector, _sector]; diff --git a/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf b/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf index 86b9dfaae..216257a9e 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf @@ -4,7 +4,7 @@ File: fn_core_handleVehicleSpawn.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-10 - Last Update: 2018-12-05 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -22,8 +22,8 @@ params [ ]; switch(typeOf _vehicle) do { - case KPLIB_preset_fobBox; - case KPLIB_preset_fobTruck: { + case KPLIB_preset_fobBoxF; + case KPLIB_preset_fobTruckF: { // Add FOB build action globaly and for JIP [ _vehicle, @@ -32,8 +32,8 @@ switch(typeOf _vehicle) do { ] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true]; }; - case KPLIB_preset_respawnTruck; - case KPLIB_preset_potato: { + case KPLIB_preset_respawnTruckF; + case KPLIB_preset_potatoF: { // Set vehicle as mobile respawn _vehicle setVariable ["KPLIB_respawn", true, true]; // Add redeploy action globaly and for JIP @@ -44,7 +44,7 @@ switch(typeOf _vehicle) do { ] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true]; }; - case KPLIB_preset_addHeli: { + case KPLIB_preset_addHeliF: { if ((_vehicle distance KPLIB_eden_startbase) < 20) then { // Add moving action for start helicopters [ diff --git a/Missionframework/modules/02_core/fnc/fn_core_spawnPotato.sqf b/Missionframework/modules/02_core/fnc/fn_core_spawnPotato.sqf index 0c69ed6b1..07a99f470 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_spawnPotato.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_spawnPotato.sqf @@ -4,7 +4,7 @@ File: fn_core_spawnPotato.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-05-01 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -32,7 +32,7 @@ if((KPLIB_core_potato01 distance2D KPLIB_eden_potatospawn) < 10 && !alive KPLIB_ private _spawnPos = getPosATL KPLIB_eden_potatospawn; // Create Potato 01 at the spawn position with a slight height offset. -KPLIB_core_potato01 = [KPLIB_preset_potato, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir KPLIB_eden_potatospawn, true] call KPLIB_fnc_common_createVehicle; +KPLIB_core_potato01 = [KPLIB_preset_potatoF, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir KPLIB_eden_potatospawn, true] call KPLIB_fnc_common_createVehicle; // Declare as ace medical vehicle (can also be set if ACE is not used) KPLIB_core_potato01 setVariable ["ace_medical_medicClass", 1, true]; diff --git a/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf b/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf index 07f8d224b..313ec6186 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf @@ -4,7 +4,7 @@ File: fn_core_spawnStartFobBox.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-09 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -33,7 +33,7 @@ if((_boxWreck distance2D KPLIB_eden_boxspawn) < 10 && !alive _boxWreck) exitWith private _spawnPos = getPosATL KPLIB_eden_boxspawn; // Create FOB box at the spawn position with a slight height offset. -private _fobBox = [KPLIB_preset_fobBox, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir KPLIB_eden_boxspawn, true] call KPLIB_fnc_common_createVehicle; +private _fobBox = [KPLIB_preset_fobBoxF, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir KPLIB_eden_boxspawn, true] call KPLIB_fnc_common_createVehicle; // Add event handler to call this script again if box was destroyed. _fobBox addMPEventHandler ["MPKilled", {[_this select 0] call KPLIB_fnc_core_spawnStartFobBox}]; diff --git a/Missionframework/modules/02_core/fnc/fn_core_spawnStartVeh.sqf b/Missionframework/modules/02_core/fnc/fn_core_spawnStartVeh.sqf index df13d69b0..690f7b2e0 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_spawnStartVeh.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_spawnStartVeh.sqf @@ -4,7 +4,7 @@ File: fn_core_spawnStartVeh.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-05-01 - Last Update: 2018-12-05 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -31,7 +31,7 @@ for [{_i=0}, {!isNil ("KPLIB_eden_littlebird_" + str _i)}, {_i = _i + 1}] do { _spawnPos = getPosATL _spawnPoint; // Spawn the vehicle at the spawn position with a slight height offset. - [KPLIB_preset_addHeli, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir _spawnPoint, true] call KPLIB_fnc_common_createVehicle; + [KPLIB_preset_addHeliF, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir _spawnPoint, true] call KPLIB_fnc_common_createVehicle; }; // Spawn the boats and move them in the boat racks @@ -40,7 +40,7 @@ for [{_i=0}, {!isNil ("KPLIB_eden_boat_" + str _i)}, {_i = _i + 1}] do { _spawnPoint = missionNamespace getVariable ("KPLIB_eden_boat_" + str _i); // Spawn the boat - _vehicle = [KPLIB_preset_addBoat, KPLIB_zeroPos, getDir _spawnPoint, true] call KPLIB_fnc_common_createVehicle; + _vehicle = [KPLIB_preset_addBoatF, KPLIB_zeroPos, getDir _spawnPoint, true] call KPLIB_fnc_common_createVehicle; // Move the boat to the rack _spawnPoint setVehicleCargo _vehicle; diff --git a/Missionframework/modules/02_core/fnc/fn_core_updateFobMarkers.sqf b/Missionframework/modules/02_core/fnc/fn_core_updateFobMarkers.sqf index 7882a0920..b9c16be54 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_updateFobMarkers.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_updateFobMarkers.sqf @@ -4,7 +4,7 @@ File: fn_core_updateFobMarkers.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-13 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -19,7 +19,7 @@ // Update label of every FOB marker { - _x setMarkerText format ["FOB %1", KPLIB_preset_alphabet select (_forEachIndex)]; + _x setMarkerText format ["FOB %1", KPLIB_preset_alphabetF select (_forEachIndex)]; } forEach KPLIB_sectors_fobs; true diff --git a/Missionframework/modules/02_core/fnc/fn_core_updateSectorMarkers.sqf b/Missionframework/modules/02_core/fnc/fn_core_updateSectorMarkers.sqf index 1c741d028..bf9232b48 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_updateSectorMarkers.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_updateSectorMarkers.sqf @@ -4,7 +4,7 @@ File: fn_core_updateSectorMarkers.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-27 - Last Update: 2018-11-09 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -18,19 +18,19 @@ */ // Color change for the main sector markers. -{_x setMarkerColor KPLIB_preset_colorEnemy;} forEach (KPLIB_sectors_all - KPLIB_sectors_blufor - KPLIB_sectors_active); -{_x setMarkerColor KPLIB_preset_colorEnemyAct;} forEach KPLIB_sectors_active; -{_x setMarkerColor KPLIB_preset_colorPlayers;} forEach KPLIB_sectors_blufor; +{_x setMarkerColor KPLIB_preset_colorE;} forEach (KPLIB_sectors_all - KPLIB_sectors_blufor - KPLIB_sectors_active); +{_x setMarkerColor KPLIB_preset_colorActE;} forEach KPLIB_sectors_active; +{_x setMarkerColor KPLIB_preset_colorF;} forEach KPLIB_sectors_blufor; // Color change for the locked vehicle markers. { if ((_x select 1) in KPLIB_sectors_blufor) then { - (_x select 0) setMarkerColor KPLIB_preset_colorPlayers; + (_x select 0) setMarkerColor KPLIB_preset_colorF; } else { if ((_x select 1) in KPLIB_sectors_active) then { - (_x select 0) setMarkerColor KPLIB_preset_colorEnemyAct; + (_x select 0) setMarkerColor KPLIB_preset_colorActE; } else { - (_x select 0) setMarkerColor KPLIB_preset_colorEnemy; + (_x select 0) setMarkerColor KPLIB_preset_colorE; }; }; } forEach KPLIB_sectors_lockedVehMarkers; diff --git a/Missionframework/modules/03_respawn/fnc/fn_respawn_getRespawns.sqf b/Missionframework/modules/03_respawn/fnc/fn_respawn_getRespawns.sqf index e51c90a23..cd3fa520b 100644 --- a/Missionframework/modules/03_respawn/fnc/fn_respawn_getRespawns.sqf +++ b/Missionframework/modules/03_respawn/fnc/fn_respawn_getRespawns.sqf @@ -4,7 +4,7 @@ File: fn_respawn_getRespawns.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-12 - Last Update: 2018-11-10 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -23,7 +23,7 @@ private _spawns = [[localize "STR_KPLIB_MAINBASE", KPLIB_eden_startbase]]; // Add the FOBs to the spawn list { _spawns pushBack [ - format ["FOB %1 - %2", (KPLIB_preset_alphabet select _forEachIndex), mapGridPosition getMarkerPos _x], + format ["FOB %1 - %2", (KPLIB_preset_alphabetF select _forEachIndex), mapGridPosition getMarkerPos _x], _x ]; } forEach KPLIB_sectors_fobs; diff --git a/Missionframework/modules/15_build/fnc/fn_build_confirmSingle.sqf b/Missionframework/modules/15_build/fnc/fn_build_confirmSingle.sqf index fd52d8f52..281e49588 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_confirmSingle.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_confirmSingle.sqf @@ -4,7 +4,7 @@ File: fn_build_confirmSingle.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-29 - Last Update: 2018-11-29 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -30,7 +30,7 @@ private ["_obj"]; // TODO save only builings via Build module, units and vehicles should be moved to persistence module switch true do { case (_className isKindOf "Man"): { - _obj = [createGroup KPLIB_preset_sidePlayers, _className] call KPLIB_fnc_common_createUnit; + _obj = [createGroup KPLIB_preset_sideF, _className] call KPLIB_fnc_common_createUnit; _obj setPosATL _pos; _obj setVectorDirAndUp _vectorDirAndUp; diff --git a/Missionframework/modules/15_build/fnc/fn_build_loadData.sqf b/Missionframework/modules/15_build/fnc/fn_build_loadData.sqf index aa220f72c..d82f5ef53 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_loadData.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_loadData.sqf @@ -4,7 +4,7 @@ File: fn_build_loadData.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-04 - Last Update: 2018-11-28 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -52,7 +52,7 @@ if (_moduleData isEqualTo []) then { // TODO proper deserialization/serialization with groups and vehicle crews handling switch true do { case (_className isKindOf "Man"): { - _object = [createGroup KPLIB_preset_sidePlayers, _className] call KPLIB_fnc_common_createUnit; + _object = [createGroup KPLIB_preset_sideF, _className] call KPLIB_fnc_common_createUnit; _object setPosWorld _posWorld; _object setVectorDirAndUp _vectorDirAndUp; diff --git a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawn.sqf b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawn.sqf index 77a779bbd..b750b63c9 100644 --- a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawn.sqf +++ b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawn.sqf @@ -4,7 +4,7 @@ File: fn_garrison_spawn.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-20 - Last Update: 2018-10-24 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -39,9 +39,9 @@ KPLIB_garrison_active pushBack [_sector, _sectorOwner, [], [], [], []]; // Get current sector owner switch (_sectorOwner) do { case 0; - case 1: {_sectorOwnerSide = KPLIB_preset_sideEnemy;}; - case 2: {_sectorOwnerSide = KPLIB_preset_sidePlayers;}; - default {_sectorOwnerSide = KPLIB_preset_sideEnemy;}; + case 1: {_sectorOwnerSide = KPLIB_preset_sideE;}; + case 2: {_sectorOwnerSide = KPLIB_preset_sideF;}; + default {_sectorOwnerSide = KPLIB_preset_sideE;}; }; // Spawn full infantry squads diff --git a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf index 19cbc2b72..c99723c3f 100644 --- a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf +++ b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf @@ -4,7 +4,7 @@ File: fn_garrison_spawnSectorInfantry.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-20 - Last Update: 2018-10-25 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -45,9 +45,9 @@ while {surfaceIsWater _spawnPos} do { // Set array to select soldier classnames from switch (_ownerNumber) do { - case 1: {_soldierArray = KPLIB_preset_oMilUnits; _side = KPLIB_preset_sideEnemy;}; - case 2: {_soldierArray = KPLIB_preset_lightSquad; _side = KPLIB_preset_sidePlayers;}; - default {_soldierArray = KPLIB_preset_oInfantry; _side = KPLIB_preset_sideEnemy;}; + case 1: {_soldierArray = KPLIB_preset_oMilUnits; _side = KPLIB_preset_sideE;}; + case 2: {_soldierArray = KPLIB_preset_lightSquad; _side = KPLIB_preset_sideF;}; + default {_soldierArray = KPLIB_preset_oInfantry; _side = KPLIB_preset_sideE;}; }; // Fetch unit classnames diff --git a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorVehicle.sqf b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorVehicle.sqf index 0fbf253e7..4dbb79d7a 100644 --- a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorVehicle.sqf +++ b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorVehicle.sqf @@ -4,7 +4,7 @@ File: fn_garrison_spawnSectorVehicle.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-21 - Last Update: 2018-10-25 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -13,7 +13,7 @@ Parameter(s): _sector - Markername of the sector [STRING, defaults to ""] _classname - Classname of the vehicle to spawn [STRING, defaults to ""] - _side - Side of the vehicle [SIDE, defaults to KPLIB_preset_sideEnemy] + _side - Side of the vehicle [SIDE, defaults to KPLIB_preset_sideE] _kind - Kind of the vehicle (light/heavy) [STRING, defaults to "light"] Returns: @@ -23,7 +23,7 @@ params [ ["_sector", "", [""]], ["_classname", "", [""]], - ["_side", KPLIB_preset_sideEnemy, [sideEmpty]], + ["_side", KPLIB_preset_sideE, [sideEmpty]], ["_kind", "light", [""]] ]; From c85951987cd020baa57ca6aba9dad0337c86a66c Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sun, 9 Dec 2018 10:05:04 +0100 Subject: [PATCH 20/42] Update CHANGELOG and README --- CHANGELOG.md | 2 +- README.md | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bb256b8b..b7d48b8aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## 0.97.0 (in Development) -* **Fully rewritten the mission code from scratch.** +* **Fully rewritten the mission code from scratch.** (Details in the [Dev-Blogs](https://github.com/KillahPotatoes/KP-Liberation/issues?utf8=%E2%9C%93&q=label%3Adev-blog)) * Added: Functions library via CfgFunctions. * Added: Admin dialog with various functionalities for server admins. * Added: Free camera view for building. diff --git a/README.md b/README.md index 27842e02b..d551b120e 100644 --- a/README.md +++ b/README.md @@ -195,12 +195,5 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . -### Short License Summary / Guideline -*This small summary does not replace the license text or validity in any way.* - -* If you use the mission code within your community on a **non-public server** and with **no public access to the mission code** then you can freely edit the mission code for this purpose. The only condition is that you keep the same license and the copyright notice (this readme) within your mission file. - -* If you want to edit the mission code and publish your derivative anywhere **public** or run a **public server** with an edited derivative of the original mission code, you are free to do so under these conditions: - * Your edited mission code must be published under the same license, with the original copyright notice. - * The source code of the mission must be visible to the public (via a Github repository for example). The link to this source code repository must be linked somewhere in the description/readme of the published derivative. - * You must state every change you have made to the source code at this public repository (via the commit history of your Github repository for example). +### Short License Summary/Guideline +We've provided a more illustrative [License Summary/Guideline](https://github.com/KillahPotatoes/KP-Liberation/wiki/EN_licenseGuide) in the KP Liberation Wiki. From 158781946c7fa04dad8325caf71f1838d29ea3ea Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sun, 9 Dec 2018 15:53:05 +0100 Subject: [PATCH 21/42] Removed deprecated include --- Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf b/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf index 44d932e95..431331578 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_loadPresets.sqf @@ -1,11 +1,10 @@ -#include "loadPresets_macros.hpp" /* KPLIB_fnc_init_loadPresets File: fn_init_loadPresets.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-12-08 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: From 6b00773f67debb5dee8a40bef21f0b290709fa84 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sat, 8 Dec 2018 12:14:44 +0100 Subject: [PATCH 22/42] Add common_getRandomPresetClass --- .../fnc/fn_common_getRandomPresetClass.sqf | 48 +++++++++++++++++++ .../modules/01_common/functions.hpp | 5 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf diff --git a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf b/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf new file mode 100644 index 000000000..fc8ce87d5 --- /dev/null +++ b/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf @@ -0,0 +1,48 @@ +/* + KPLIB_fnc_common_getRandomPresetClass + + File: fn_common_getRandomPresetClass.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-08 + Last Update: 2018-12-08 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Gets random class of given type from preset. + + Parameter(s): + _type - Preset type name [STRING, defaults to ""] + _side - Preset side [SIDE, defaults to KPLIB_preset_sideEnemy] + + Returns: + Classname from preset [STRING] +*/ +params [ + ["_type", "", [""]], + ["_side", KPLIB_preset_sideEnemy, [sideEmpty]] +]; + +// Determine classname side +private _sideSuffix = switch (_side) do { + case "KPLIB_preset_sidePlayers": {"F"}; + case "KPLIB_preset_sideResistance": {"R"}; + case "KPLIB_preset_sideCivilian": {"C"}; + default {"E"}; +}; + +private _classNamesVariable = format ["KPLIB_preset_%1%2", _type, _sideSuffix]; + +private _classNames = missionNamespace getVariable [_classNamesVariable, nil]; + +// Exit if there are not classnames of given type in preset +if (isNil "_classNames") exitWith { + diag_log format ["[KP LIBERATION] [%1] [COMMON] Could not find preset variable '%2'", diag_tickTime, _classNames]; + "" +}; + +// Return random className +if (_classNames isEqualType []) then { + selectRandom _classNames +} else { + _classNames +} diff --git a/Missionframework/modules/01_common/functions.hpp b/Missionframework/modules/01_common/functions.hpp index a69c0415a..f0aed9e3a 100644 --- a/Missionframework/modules/01_common/functions.hpp +++ b/Missionframework/modules/01_common/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-15 - Last Update: 2018-12-05 + Last Update: 2018-12-08 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -44,6 +44,9 @@ class common { // getPos wrapper for ATL positions class common_getPos {}; + // Gets random class of given type from preset + class common_getRandomPresetClass {}; + // Initialize common module class common_preInit { preInit = 1; From e1a5bf74d6a58804b188744c79804557a9d8a58f Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sat, 8 Dec 2018 12:15:15 +0100 Subject: [PATCH 23/42] Update common_createCrew to work with new preset structure --- .../01_common/fnc/fn_common_createCrew.sqf | 39 +++++++------------ .../fnc/fn_common_getRandomPresetClass.sqf | 8 ++-- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf index e37d769ba..6dcf7985d 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf @@ -26,47 +26,38 @@ params [ // Exit when no or destroyed vehicle was given if ((_vehicle isEqualTo objNull) || !(alive _vehicle)) exitWith {grpNull}; -// Determine classname side -private _crewSide = switch (_side) do { - case KPLIB_preset_sideF: {"F"}; - case KPLIB_preset_sideR: {"R"}; - case KPLIB_preset_sideC: {"C"}; - default {"E"}; -}; +private _turrets = (allTurrets _vehicle); -// Determine classname type for air vehicles -private _crewType = switch (true) do { +// Get driver class depending on vehicle type +private _driverType = switch (true) do { case (_vehicle isKindOf "Plane"): {"rsPilotJet"}; case (_vehicle isKindOf "Helicopter"): {"rsPilotHeli"}; default {"rsCrewmanVeh"}; }; -// Get correct classname or exit, when no classname could be found -private _crewClass = missionNamespace getVariable ["KPLIB_preset_" + _crewType + _crewSide, ""]; -if ((_crewClass isEqualTo "") || (_crewClass isEqualTo [])) exitWith {grpNull}; +private _driverClass = [[_driverType, _side] call KPLIB_fnc_common_getRandomPresetClass]; -// Get all turret paths of the vehicle -private _turrets = [[-1]] + (allTurrets _vehicle); +// Get crew class depending on vehicle type +private _crewType = switch (true) do { + case (_vehicle isKindOf "Plane"): {"rsPilotJet"}; + case (_vehicle isKindOf "Helicopter"): {"rsCrewmanHeli"}; + default {"rsCrewmanVeh"}; +}; -// Fill array for group spawning -private _classnames = []; -for "_i" from 1 to (count _turrets) do { - if (_crewClass isEqualType []) then { - _classnames pushBack (selectRandom _crewClass); - } else { - _classnames pushBack _crewClass; - }; +private _crewClasses = _turrets apply { + [_crewType, _side] call KPLIB_fnc_common_getRandomPresetClass; }; // Spawn group and move into to vehicle -private _grp = [_side, _classnames, getPos _vehicle] call KPLIB_fnc_common_createGroup; +private _grp = [_side, _driverClass + _crewClasses, getPos _vehicle] call KPLIB_fnc_common_createGroup; +// Move the units into the vehicle, -1 indicates driver { if (_forEachIndex isEqualTo 0) then { ((units _grp) select _forEachIndex) moveInDriver _vehicle; } else { ((units _grp) select _forEachIndex) moveInTurret [_vehicle, _x]; } -} forEach _turrets; +} forEach [-1] + _turrets; // Assign vehicle to group and make sure the commander is group leader _grp addVehicle _vehicle; diff --git a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf b/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf index fc8ce87d5..de27a71c5 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf @@ -30,13 +30,13 @@ private _sideSuffix = switch (_side) do { default {"E"}; }; -private _classNamesVariable = format ["KPLIB_preset_%1%2", _type, _sideSuffix]; +private _classNamesVar = format ["KPLIB_preset_%1%2", _type, _sideSuffix]; -private _classNames = missionNamespace getVariable [_classNamesVariable, nil]; +private _classNames = missionNamespace getVariable [_classNamesVar, nil]; -// Exit if there are not classnames of given type in preset +// Exit if there are no classnames of given type in preset if (isNil "_classNames") exitWith { - diag_log format ["[KP LIBERATION] [%1] [COMMON] Could not find preset variable '%2'", diag_tickTime, _classNames]; + diag_log format ["[KP LIBERATION] [%1] [COMMON] Could not find preset variable '%2'", diag_tickTime, _classNamesVar]; "" }; From ddbb375108caeafe548a41708bcd3384d6217d19 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 9 Dec 2018 16:15:19 +0100 Subject: [PATCH 24/42] Update common_getRandomPresetClass for new side variables --- .../01_common/fnc/fn_common_getRandomPresetClass.sqf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf b/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf index de27a71c5..2782c304e 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf @@ -4,7 +4,7 @@ File: fn_common_getRandomPresetClass.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-08 - Last Update: 2018-12-08 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -24,9 +24,9 @@ params [ // Determine classname side private _sideSuffix = switch (_side) do { - case "KPLIB_preset_sidePlayers": {"F"}; - case "KPLIB_preset_sideResistance": {"R"}; - case "KPLIB_preset_sideCivilian": {"C"}; + case KPLIB_preset_sideF: {"F"}; + case KPLIB_preset_sideR: {"R"}; + case KPLIB_preset_sideC: {"C"}; default {"E"}; }; From 5072df0058c1e80b381825e9b5619c665693a029 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 9 Dec 2018 16:15:42 +0100 Subject: [PATCH 25/42] Fix zeus module init being broken to 1.86 --- .../modules/14_virtual/fnc/fn_virtual_addCurator.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf b/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf index a21e57d23..b8665ad66 100644 --- a/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf +++ b/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf @@ -4,7 +4,7 @@ File: fn_virtual_addCurator.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-18 - Last Update: 2018-11-28 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -37,6 +37,9 @@ unassignCurator _oldCurator; if (KPLIB_param_debug) then {diag_log format ["[KP LIBERATION] [VIRTUAL] Adding curator for unit '%1' with mode %2", _unit, _mode]}; private _curator = (createGroup sideLogic) createUnit ["ModuleCurator_F", [0, 0, 0], [], 0, "CAN_COLLIDE"]; + // Since 1.86 modules don't activate automatically when created via scripts + // We need to activate it manually + _curator setVariable ["BIS_fnc_initModules_activate", true, true]; // Add player so he can see himself in curator _curator addCuratorEditableObjects [[_unit], false]; From 67b3dab7aaf435741d2516517103f7cdf480bf3d Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 9 Dec 2018 16:34:58 +0100 Subject: [PATCH 26/42] Rename common_getRandomPresetClass to common_getPresetClass --- .../modules/01_common/fnc/fn_common_createCrew.sqf | 6 +++--- ...etRandomPresetClass.sqf => fn_common_getPresetClass.sqf} | 6 +++--- Missionframework/modules/01_common/functions.hpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) rename Missionframework/modules/01_common/fnc/{fn_common_getRandomPresetClass.sqf => fn_common_getPresetClass.sqf} (89%) diff --git a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf index 6dcf7985d..3aed4e5f2 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf @@ -4,7 +4,7 @@ File: fn_common_createCrew.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-25 - Last Update: 2018-12-08 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -35,7 +35,7 @@ private _driverType = switch (true) do { default {"rsCrewmanVeh"}; }; -private _driverClass = [[_driverType, _side] call KPLIB_fnc_common_getRandomPresetClass]; +private _driverClass = [[_driverType, _side] call KPLIB_fnc_common_getPresetClass]; // Get crew class depending on vehicle type private _crewType = switch (true) do { @@ -45,7 +45,7 @@ private _crewType = switch (true) do { }; private _crewClasses = _turrets apply { - [_crewType, _side] call KPLIB_fnc_common_getRandomPresetClass; + [_crewType, _side] call KPLIB_fnc_common_getPresetClass; }; // Spawn group and move into to vehicle diff --git a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf b/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf similarity index 89% rename from Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf rename to Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf index 2782c304e..5bfd805a7 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_getRandomPresetClass.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf @@ -1,7 +1,7 @@ /* - KPLIB_fnc_common_getRandomPresetClass + KPLIB_fnc_common_getPresetClass - File: fn_common_getRandomPresetClass.sqf + File: fn_common_getPresetClass.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-08 Last Update: 2018-12-09 @@ -19,7 +19,7 @@ */ params [ ["_type", "", [""]], - ["_side", KPLIB_preset_sideEnemy, [sideEmpty]] + ["_side", KPLIB_preset_sideE, [sideEmpty]] ]; // Determine classname side diff --git a/Missionframework/modules/01_common/functions.hpp b/Missionframework/modules/01_common/functions.hpp index f0aed9e3a..966c93210 100644 --- a/Missionframework/modules/01_common/functions.hpp +++ b/Missionframework/modules/01_common/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-15 - Last Update: 2018-12-08 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -45,7 +45,7 @@ class common { class common_getPos {}; // Gets random class of given type from preset - class common_getRandomPresetClass {}; + class common_getPresetClass {}; // Initialize common module class common_preInit { From 6044e8e4690c9240095d977196aa4d500fd1a0f7 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 9 Dec 2018 17:48:46 +0100 Subject: [PATCH 27/42] Get classnames from plain array without costs --- .../modules/01_common/fnc/fn_common_getPresetClass.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf b/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf index 5bfd805a7..c4d779544 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf @@ -30,7 +30,7 @@ private _sideSuffix = switch (_side) do { default {"E"}; }; -private _classNamesVar = format ["KPLIB_preset_%1%2", _type, _sideSuffix]; +private _classNamesVar = format ["KPLIB_preset_%1Pl%2", _type, _sideSuffix]; private _classNames = missionNamespace getVariable [_classNamesVar, nil]; From 9bbad478a57c70f20ef451876dbae96547ec6b84 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 9 Dec 2018 17:48:58 +0100 Subject: [PATCH 28/42] Handle crew creation for civs and indfor --- .../modules/01_common/fnc/fn_common_createCrew.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf index 3aed4e5f2..56337368b 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf @@ -30,6 +30,8 @@ private _turrets = (allTurrets _vehicle); // Get driver class depending on vehicle type private _driverType = switch (true) do { + // Civilians and resitance do not have specialized infantry units + case (_side in [KPLIB_preset_sideC, KPLIB_preset_sideR]): {"units"}; case (_vehicle isKindOf "Plane"): {"rsPilotJet"}; case (_vehicle isKindOf "Helicopter"): {"rsPilotHeli"}; default {"rsCrewmanVeh"}; @@ -39,6 +41,8 @@ private _driverClass = [[_driverType, _side] call KPLIB_fnc_common_getPresetClas // Get crew class depending on vehicle type private _crewType = switch (true) do { + // Civilians and resitance do not have specialized infantry units + case (_side in [KPLIB_preset_sideC, KPLIB_preset_sideR]): {"units"}; case (_vehicle isKindOf "Plane"): {"rsPilotJet"}; case (_vehicle isKindOf "Helicopter"): {"rsCrewmanHeli"}; default {"rsCrewmanVeh"}; From 4f15f1abeba75bfcad4ec3d609f8309d2c6d7379 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Sun, 9 Dec 2018 20:45:31 +0100 Subject: [PATCH 29/42] Dynamic build categories api (wip) --- Missionframework/KPGUI/KPGUI_classes.hpp | 7 +- .../15_build/fnc/fn_build_addBuildables.sqf | 55 ++++++++++++++ ...tMode.sqf => fn_build_displayFillList.sqf} | 45 +++++++----- .../15_build/fnc/fn_build_displayLoad.sqf | 27 +++---- .../modules/15_build/fnc/fn_build_preInit.sqf | 15 +++- .../modules/15_build/fnc/fn_build_start.sqf | 5 +- .../modules/15_build/functions.hpp | 7 +- .../15_build/ui/KPLIB_buildDisplay.hpp | 72 ++++++------------- .../modules/15_build/ui/defines.hpp | 15 ++-- 9 files changed, 152 insertions(+), 96 deletions(-) create mode 100644 Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf rename Missionframework/modules/15_build/fnc/{fn_build_displaySetMode.sqf => fn_build_displayFillList.sqf} (58%) diff --git a/Missionframework/KPGUI/KPGUI_classes.hpp b/Missionframework/KPGUI/KPGUI_classes.hpp index 3ca7b3167..eed26192b 100644 --- a/Missionframework/KPGUI/KPGUI_classes.hpp +++ b/Missionframework/KPGUI/KPGUI_classes.hpp @@ -4,7 +4,7 @@ File: KPGUI_classes.hpp Author: Wyqer - https://github.com/KillahPotatoes Date: 2018-09-13 - Last Update: 2018-11-10 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -214,6 +214,11 @@ class KPGUI_PRE_ActivePicture: KPGUI_PRE_ActiveText { style = 48; }; +// Active Picture which keeps aspect ratio +class KPGUI_PRE_ActivePictureRatio: KPGUI_PRE_ActivePicture { + style = 48 + 2048; +}; + // Picture which keeps aspect ratio class KPGUI_PRE_PictureRatio: KPGUI_PRE_Picture { style = 48 + 2048; diff --git a/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf b/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf new file mode 100644 index 000000000..51b840993 --- /dev/null +++ b/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf @@ -0,0 +1,55 @@ +/* + KPLIB_fnc_build_addBuildables + + File: KPLIB_fnc_build_addBuildables.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-09 + Last Update: 2018-12-09 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Adds buildable items + + Parameter(s): + _category - Display name of category [DATATYPE, defaults to DEFAULTVALUE] + _buildables - Buildable items [DATATYPE, defaults to DEFAULTVALUE] + + Returns: + Index of items inside category [NUMBER] +*/ +params [ + ["_category", "", [""]], + ["_buildables", [], [[], {}]] +]; + +// If array given filter out bad entries +/*if (_buildables isEqualType []) then { + _buildables = _buildables select {_x isEqualTypeArray ["", 0, 0, 0]}; + + // Exit if no entries left after filtering + if (_buildables isEqualTo []) exitWith { + diag_log format [ + "[KP LIBERATION] [%1] [BUILD] No valid build entries given: '%2'. Can't add to category: '%3'. Expected buildables format: [, , , ]", + diag_tickTime, _buildables, _category + ]; + }; +};*/ + +private _categoryIndex = KPLIB_build_categoryItems findIf {(_x select 0) isEqualTo _category}; +// Add the category if it does not exist +if(_categoryIndex isEqualTo -1) then { + // Add the new category + KPLIB_build_categoryItems pushBack [ + _category, + [ + _buildables + ] + ]; + // Return index of items inside category + 0 +} else { + private _category = (KPLIB_build_categoryItems select _categoryIndex) params ["", "_categoryItems"]; + // Append the buildables to existing category + _categoryItems pushBack _buildables +} + diff --git a/Missionframework/modules/15_build/fnc/fn_build_displaySetMode.sqf b/Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf similarity index 58% rename from Missionframework/modules/15_build/fnc/fn_build_displaySetMode.sqf rename to Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf index d9522174c..21c860002 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_displaySetMode.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf @@ -1,12 +1,12 @@ #include "..\ui\defines.hpp" #include "script_components.hpp" /* - KPLIB_fnc_build_displaySetMode + KPLIB_fnc_build_displayFillList - File: fn_build_displaySetMode.sqf + File: fn_build_displayFillList.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-11-09 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -18,37 +18,48 @@ Returns: Mode was changed [BOOL] */ - params [ - ["_mode", 0, [0]] + ["_categoryIdx", 0, [0]], + ["_searchQuery", "", [""]] ]; // CfgVehicles config for shorter/faster access private _cfg = configFile >> "CfgVehicles"; -private _listElements = KPLIB_preset_buildLists select _mode; +(LGVAR(buildables) select _categoryIdx) params ["", "_categoryItems"]; private _listBox = LGVAR(display) displayCtrl KPLIB_IDC_BUILD_ITEM_LIST; _listBox lbSetCurSel -1; // Unselect current row as it sticks between clearing lnbClear _listBox; -// Fill the item list -{ - // All but squad build mode - if (_mode != 7) then { +_listBox lnbAddRow ['DBG', 0, 0, 0]; + +private _fnc_addItems = { + { _x params ["_className", "_priceSupp", "_priceAmmo", "_priceFuel"]; + private _name = getText (_cfg >> _className >> "displayName"); _listBox lnbAddRow [_name, str _priceSupp, str _priceAmmo, str _priceFuel]; + private _currentIdx = ((lnbSize _listBox) select 0) - 1; + + // Serialize classname and price + _listBox lnbSetData [[_currentIdx, 0], str _x]; private _icon = _className call KPLIB_fnc_common_getIcon; - _listBox lnbSetPicture [[((lnbSize _listBox) select 0) - 1, 0], _icon]; + _listBox lnbSetPicture [[_currentIdx, 0], _icon]; + } forEach _this; +}; - } else { - // TODO handle squad build mode - if (true) exitWith { - systemChat "Not implemented yet!"; - }; +// Fill the item list +{ + // Handle removed items + if (isNil _x) exitWith {}; + + if(_x isEqualType {}) then { + _x = [] call _x; }; -} foreach _listElements; + _x call _fnc_addItems; + +} foreach _categoryItems; true diff --git a/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf b/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf index 7fc4ca723..96e9ee2c4 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf @@ -6,7 +6,7 @@ File: fn_build_displayLoad.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-11-28 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -28,14 +28,13 @@ private _itemsList = _display displayCtrl KPLIB_IDC_BUILD_ITEM_LIST; _itemsList ctrlAddEventHandler ["LBSelChanged", { params ["_control", "_selectedIndex"]; - private _mode = LGVAR(buildMode); - - if(_selectedIndex == -1) exitWith { + if(_selectedIndex isEqualTo -1) exitWith { LSVAR("buildItem", []); }; - private _buildList = KPLIB_preset_buildLists select _mode; - private _selectedItem = _buildList select _selectedIndex; + private _stringArray = (_control lnbData [_selectedIndex, 0]); + systemChat str _stringArray; + private _selectedItem = parseSimpleArray _stringArray; LSVAR("buildItem", _selectedItem); @@ -44,13 +43,12 @@ _itemsList ctrlAddEventHandler ["LBSelChanged", { ctrlSetFocus ((ctrlParent _control) displayCtrl _currentTabIDC); }]; -// Add tab change handler +private _categoriesList = _display displayCtrl KPLIB_IDC_BUILD_CATEGORY_LIST; { - private _ctrl = _display displayCtrl _x; - _ctrl ctrlAddEventHandler ["buttonClick", { - _this call KPLIB_fnc_build_displayTabClick; - }]; -} forEach KPLIB_BUILD_TABS_IDCS_ARRAY; + _x params ["_categoryName"]; + + _categoriesList lbAdd _categoryName; +} forEach LGVAR(buildables); // Hide vignette, show hud private _vignette = _display displayCtrl 1202; @@ -58,7 +56,10 @@ _vignette ctrlShow false; showHUD true; LSVAR("display", _display); -LGVAR_D(buildMode, 0) call KPLIB_fnc_build_displaySetMode; + +// Select last category +_categoriesList lbSetCurSel LGVAR_D(selectedCategoryIdx, 0); +[LGVAR_D(selectedCategoryIdx, 0), LGVAR_D(search, "")] call KPLIB_fnc_build_displayFillList; /* Seems to be buggy on triple screen, disable for now setMousePosition LGVAR(mousePos); */ diff --git a/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf b/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf index ce6c24174..fc517d3b7 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf @@ -4,7 +4,7 @@ File: fn_build_preInit.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-18 - Last Update: 2018-11-29 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -37,6 +37,9 @@ KPLIB_build_saveNamespace = locationNull; // Object from which FOB build event originated KPLIB_build_fobBuildObject = objNull; +// Categorized buildable items +KPLIB_build_categoryItems = []; + if (isServer) then { // Register load event handler ["KPLIB_doLoad", {[] call KPLIB_fnc_build_loadData}] call CBA_fnc_addEventHandler; @@ -74,6 +77,16 @@ if (hasInterface) then { }] call CBA_fnc_addEventHandler; player addEventHandler ["Killed", KPLIB_fnc_build_stop]; + + { + _x call KPLIB_fnc_build_addBuildables; + } forEach [ + ["Heavy", {KPLIB_preset_vehHeavyF}], + ["Heavy", {KPLIB_preset_vehHeavyApcF}], + ["Light", [["O_LSV_02_armed_F", 0,1,2]]], + ["Light", ["O_LSV_02_armed_F", 0,1,4]] + ]; + }; if (isServer) then {diag_log format ["[KP LIBERATION] [%1] [PRE] [BUILD] Module initialized", diag_tickTime];}; diff --git a/Missionframework/modules/15_build/fnc/fn_build_start.sqf b/Missionframework/modules/15_build/fnc/fn_build_start.sqf index a620ec1af..405bb16c8 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_start.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_start.sqf @@ -6,7 +6,7 @@ File: fn_build_start.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-11-09 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -36,9 +36,10 @@ KPLIB_buildLogic = _logic; _logic setVariable _x; } forEach [ // General - ["buildMode", nil], + ["selectedCategoryIdx", nil], ["buildItem", []], ["buildQueue", []], + ["buildables", KPLIB_build_categoryItems], ["center", _center], ["radius", _radius], ["areaIndicators", [_center, _radius] call KPLIB_fnc_build_markArea], diff --git a/Missionframework/modules/15_build/functions.hpp b/Missionframework/modules/15_build/functions.hpp index e01aa975f..57e44c05f 100644 --- a/Missionframework/modules/15_build/functions.hpp +++ b/Missionframework/modules/15_build/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-07-01 - Last Update: 2018-11-29 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -14,6 +14,9 @@ class build { file = "modules\15_build\fnc"; + // Adds buildable items + class build_addBuildables {}; + // Manages selection depending on currently pressed keys class build_addToSelection {}; @@ -42,7 +45,7 @@ class build { class build_displayPlaceObject {}; // Set display build mode (tab) - class build_displaySetMode {}; + class build_displayFillList {}; // Handle tab click class build_displayTabClick {}; diff --git a/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp b/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp index 49ef9aeca..54cad0ae0 100644 --- a/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp +++ b/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp @@ -4,7 +4,7 @@ File: KPLIB_defines.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-07-01 - Last Update: 2018-11-29 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -50,64 +50,34 @@ class KPLIB_build { class Controls { - class KPLIB_ModeUnits: KPGUI_PRE_ActivePicture { - text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_INFANTRY; + class KPLIB_BuildCategoryList: KPGUI_PRE_Combo { + idc = KPLIB_IDC_BUILD_CATEGORY_LIST; - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,0,8); - y = KP_GETCY(KP_Y_VAL_LP,KP_HEIGHT_VAL_LP,1,20); - w = KP_GETW(KP_WIDTH_VAL_LP,8); - h = KP_GETH(KP_HEIGHT_VAL_LP,20); - }; - - class KPLIB_ModeLight: KPLIB_ModeUnits { - text = "\A3\ui_f\data\map\vehicleicons\iconCar_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_LIGHT; - - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,1,8); - }; - - class KPLIB_ModeHeavy: KPLIB_ModeUnits { - text = "\A3\ui_f\data\map\vehicleicons\iconTank_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_HEAVY; - - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,2,8); - }; - - class KPLIB_ModeAir: KPLIB_ModeUnits { - text = "\A3\ui_f\data\map\vehicleicons\iconHelicopter_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_AIR; - - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,3,8); - }; - - class KPLIB_ModeStatic: KPLIB_ModeUnits { - text = "\A3\ui_f\data\map\vehicleicons\iconStaticCannon_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_STATIC; - - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,4,8); + x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,0,1); + y = KP_GETCY(KP_Y_VAL_LP,KP_HEIGHT_VAL_LP,2,40); + w = KP_GETW(KP_WIDTH_VAL_LP,1); + h = KP_GETH(KP_HEIGHT_VAL_LP,40); }; - class KPLIB_ModeBuilding: KPLIB_ModeUnits { - text = "\A3\ui_f\data\map\mapcontrol\Bunker_CA.paa"; - idc = KPLIB_IDC_BUILD_TAB_BUILDING; + class KPLIB_BuildSearch: KPGUI_PRE_Combo { + idc = KPLIB_IDC_BUILD_SEARCH; - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,5,8); + x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,0,12); + y = KP_GETCY(KP_Y_VAL_LP,KP_HEIGHT_VAL_LP,3,40); + w = KP_GETW(KP_WIDTH_VAL_LP,(12/11)); + h = KP_GETH(KP_HEIGHT_VAL_LP,40); }; - class KPLIB_ModeSupport: KPLIB_ModeUnits { - text = "\A3\ui_f\data\map\vehicleicons\iconCrateAmmo_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_SUPPORT; - - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,6,8); - }; + class KPLIB_BuildSearchButton: KPGUI_PRE_ActivePictureRatio { + idc = KPLIB_IDC_BUILD_SEARCH_BUTTON; - class KPLIB_ModeSquad: KPLIB_ModeUnits { - text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; - idc = KPLIB_IDC_BUILD_TAB_SQUAD; + x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,11,12); + y = KP_GETCY(KP_Y_VAL_LP,KP_HEIGHT_VAL_LP,3,40); + w = KP_GETW(KP_WIDTH_VAL_LP,(12/1)); + h = KP_GETH(KP_HEIGHT_VAL_LP,40); - x = KP_GETCX(KP_X_VAL_LP,KP_WIDTH_VAL_LP,7,8); - }; + text = "\a3\Ui_f\data\GUI\RscCommon\RscButtonSearch\search_start_ca.paa"; + } class KPLIB_BuildList: KPGUI_PRE_ListNBox { idc = KPLIB_IDC_BUILD_ITEM_LIST; diff --git a/Missionframework/modules/15_build/ui/defines.hpp b/Missionframework/modules/15_build/ui/defines.hpp index b28ce5d33..59e41b6a8 100644 --- a/Missionframework/modules/15_build/ui/defines.hpp +++ b/Missionframework/modules/15_build/ui/defines.hpp @@ -4,7 +4,7 @@ File: defines.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-07-01 - Last Update: 2018-11-29 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -16,14 +16,11 @@ // IDCs #define KPLIB_IDC_MOUSEHANDLER 101 -#define KPLIB_IDC_BUILD_TAB_INFANTRY 70100 -#define KPLIB_IDC_BUILD_TAB_LIGHT 70101 -#define KPLIB_IDC_BUILD_TAB_HEAVY 70102 -#define KPLIB_IDC_BUILD_TAB_AIR 70103 -#define KPLIB_IDC_BUILD_TAB_STATIC 70104 -#define KPLIB_IDC_BUILD_TAB_BUILDING 70105 -#define KPLIB_IDC_BUILD_TAB_SUPPORT 70106 -#define KPLIB_IDC_BUILD_TAB_SQUAD 70107 + +#define KPLIB_IDC_BUILD_CATEGORY_LIST 70100 + +#define KPLIB_IDC_BUILD_SEARCH 70101 +#define KPLIB_IDC_BUILD_SEARCH_BUTTON 70102 #define KPLIB_IDC_BUILD_TOOLBOX_MOVEITEMS 70111 From 656f4ff4ec78a178a545783ef49e3f599d7f2ee7 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sun, 9 Dec 2018 22:15:16 +0100 Subject: [PATCH 30/42] Enabled locked vehicles processing again --- .vscode/settings.json | 1 + .../modules/00_init/fnc/fn_init_loadData.sqf | 22 +++++++++---------- Missionframework/presets/armies/csat.sqf | 18 ++++++++++++++- .../presets/armies/customEast.sqf | 18 ++++++++++++++- .../presets/armies/customWest.sqf | 20 ++++++++++++++++- Missionframework/presets/armies/nato.sqf | 20 ++++++++++++++++- 6 files changed, 84 insertions(+), 15 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d0aa56948..9b8ea3444 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -89,6 +89,7 @@ "KPLIB_preset_jetsF", "KPLIB_preset_jetsPlE", "KPLIB_preset_jetsPlF", + "KPLIB_preset_lockedVehPlF", "KPLIB_preset_logiBuildingE", "KPLIB_preset_logiBuildingF", "KPLIB_preset_logiTruckE", diff --git a/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf b/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf index e2efeeff5..cd196978b 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_loadData.sqf @@ -4,7 +4,7 @@ File: fn_init_loadData.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-12-08 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -28,18 +28,18 @@ if (_moduleData isEqualTo []) then { // Set random start date setDate [2018, ceil (random 12), ceil (random 28), 8, 0]; - /*// Connect locked vehicles to military bases + // Connect locked vehicles to military bases private _assignedVehicles = []; private _assignedBases = []; private _nextVehicle = ""; private _nextBase = ""; - while {((count _assignedVehicles) < (count KPLIB_preset_lockedVeh)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do { - _nextVehicle = selectRandom (KPLIB_preset_lockedVeh select {!(_x in _assignedVehicles)}); + while {((count _assignedVehicles) < (count KPLIB_preset_lockedVehPlF)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do { + _nextVehicle = selectRandom (KPLIB_preset_lockedVehPlF select {!(_x in _assignedVehicles)}); _nextBase = selectRandom (KPLIB_sectors_military select {!(_x in _assignedBases)}); _assignedVehicles pushBack _nextVehicle; _assignedBases pushBack _nextBase; KPLIB_sectors_lockedVeh pushBack [_nextVehicle, _nextBase]; - };*/ + }; publicVariable "KPLIB_sectors_lockedVeh"; } else { // Otherwise start applying the saved data @@ -56,12 +56,12 @@ if (_moduleData isEqualTo []) then { // Check for deleted military sectors or deleted classnames in the locked vehicles array KPLIB_sectors_lockedVeh = _moduleData select 1; - KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 0) in KPLIB_preset_lockedVeh}; + KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 0) in KPLIB_preset_lockedVehPlF}; KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 1) in KPLIB_sectors_military}; - /*// Check for additions in the locked vehicles array + // Check for additions in the locked vehicles array private _lockedVehCount = count KPLIB_sectors_lockedVeh; - if ((_lockedVehCount < (count KPLIB_sectors_military)) && (_lockedVehCount < (count KPLIB_preset_lockedVeh))) then { + if ((_lockedVehCount < (count KPLIB_sectors_military)) && (_lockedVehCount < (count KPLIB_preset_lockedVehPlF))) then { diag_log "[KP LIBERATION] [IMPORTANT] Additional military sectors or unlock vehicles detected and assigned."; private _assignedVehicles = []; private _assignedBases = []; @@ -73,14 +73,14 @@ if (_moduleData isEqualTo []) then { _assignedBases pushBack (_x select 1); } forEach KPLIB_sectors_lockedVeh; - while {((count _assignedVehicles) < (count KPLIB_preset_lockedVeh)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do { - _nextVehicle = selectRandom (KPLIB_preset_lockedVeh select {!(_x in _assignedVehicles)}); + while {((count _assignedVehicles) < (count KPLIB_preset_lockedVehPlF)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do { + _nextVehicle = selectRandom (KPLIB_preset_lockedVehPlF select {!(_x in _assignedVehicles)}); _nextBase = selectRandom (KPLIB_sectors_military select {!(_x in _assignedBases)}); _assignedVehicles pushBack _nextVehicle; _assignedBases pushBack _nextBase; KPLIB_sectors_lockedVeh pushBack [_nextVehicle, _nextBase]; }; - };*/ + }; publicVariable "KPLIB_sectors_lockedVeh"; // Publish blufor sectors diff --git a/Missionframework/presets/armies/csat.sqf b/Missionframework/presets/armies/csat.sqf index 385909f8d..8506d738d 100644 --- a/Missionframework/presets/armies/csat.sqf +++ b/Missionframework/presets/armies/csat.sqf @@ -5,7 +5,7 @@ File: csat.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-17 - Last Update: 2018-12-07 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -426,6 +426,22 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0 KPLIB_PRST_CAT_END("deco"); +/*------------------------------------------------------------ + --- LOCKED VEHICLE CLASSNAMES --- + Classnames of vehicles which shouldn't be available from the start. + The listed classnames have to be also listed in one of the build categories above. + You can leave this category empty, but leave the line with BEGIN untouched. +------------------------------------------------------------*/ + +KPLIB_PRST_CAT_BEGIN("lockedVehPl"); +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_MBT_04_cannon_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_MBT_04_command_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_Heli_Attack_02_dynamicLoadout_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_Plane_Fighter_02_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_Plane_Fighter_02_Stealth_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_MBT_02_arty_F"; + + /*------------------------------- !!! DO NOT EDIT BELOW !!! -------------------------------*/ diff --git a/Missionframework/presets/armies/customEast.sqf b/Missionframework/presets/armies/customEast.sqf index 124c35d02..199c3a1d4 100644 --- a/Missionframework/presets/armies/customEast.sqf +++ b/Missionframework/presets/armies/customEast.sqf @@ -5,7 +5,7 @@ File: customEast.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-24 - Last Update: 2018-12-07 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -420,6 +420,22 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0 KPLIB_PRST_CAT_END("deco"); +/*------------------------------------------------------------ + --- LOCKED VEHICLE CLASSNAMES --- + Classnames of vehicles which shouldn't be available from the start. + The listed classnames have to be also listed in one of the build categories above. + You can leave this category empty, but leave the line with BEGIN untouched. +------------------------------------------------------------*/ + +KPLIB_PRST_CAT_BEGIN("lockedVehPl"); +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_MBT_04_cannon_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_MBT_04_command_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_Heli_Attack_02_dynamicLoadout_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_Plane_Fighter_02_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_Plane_Fighter_02_Stealth_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "O_MBT_02_arty_F"; + + /*------------------------------- !!! DO NOT EDIT BELOW !!! -------------------------------*/ diff --git a/Missionframework/presets/armies/customWest.sqf b/Missionframework/presets/armies/customWest.sqf index 8d22a7a0f..9271f19ae 100644 --- a/Missionframework/presets/armies/customWest.sqf +++ b/Missionframework/presets/armies/customWest.sqf @@ -5,7 +5,7 @@ File: customWest.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-24 - Last Update: 2018-12-07 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -425,6 +425,24 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0 KPLIB_PRST_CAT_END("deco"); +/*------------------------------------------------------------ + --- LOCKED VEHICLE CLASSNAMES --- + Classnames of vehicles which shouldn't be available from the start. + The listed classnames have to be also listed in one of the build categories above. + You can leave this category empty, but leave the line with BEGIN untouched. +------------------------------------------------------------*/ + +KPLIB_PRST_CAT_BEGIN("lockedVehPl"); +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_AFV_Wheeled_01_cannon_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_AFV_Wheeled_01_up_cannon_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_MBT_01_arty_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_MBT_01_mlrs_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_Heli_Attack_01_dynamicLoadout_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_T_VTOL_01_armed_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_Plane_Fighter_01_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_Plane_Fighter_01_Stealth_F"; + + /*------------------------------- !!! DO NOT EDIT BELOW !!! -------------------------------*/ diff --git a/Missionframework/presets/armies/nato.sqf b/Missionframework/presets/armies/nato.sqf index ac9a21ee1..3590d15a6 100644 --- a/Missionframework/presets/armies/nato.sqf +++ b/Missionframework/presets/armies/nato.sqf @@ -5,7 +5,7 @@ File: nato.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-17 - Last Update: 2018-12-07 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -431,6 +431,24 @@ KPLIB_PRST_CAT_ADD("deco", "Land_Razorwire_F", 0 KPLIB_PRST_CAT_END("deco"); +/*------------------------------------------------------------ + --- LOCKED VEHICLE CLASSNAMES --- + Classnames of vehicles which shouldn't be available from the start. + The listed classnames have to be also listed in one of the build categories above. + You can leave this category empty, but leave the line with BEGIN untouched. +------------------------------------------------------------*/ + +KPLIB_PRST_CAT_BEGIN("lockedVehPl"); +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_AFV_Wheeled_01_cannon_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_AFV_Wheeled_01_up_cannon_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_MBT_01_arty_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_MBT_01_mlrs_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_Heli_Attack_01_dynamicLoadout_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_T_VTOL_01_armed_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_Plane_Fighter_01_F"; +(KPLIB_PRST_GETVAR("lockedVehPl")) pushBack "B_Plane_Fighter_01_Stealth_F"; + + /*------------------------------- !!! DO NOT EDIT BELOW !!! -------------------------------*/ From 1b96536df1ac6ac9b089a71b6dd704478640d848 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Sun, 9 Dec 2018 22:31:08 +0100 Subject: [PATCH 31/42] Adjusted garrison module to new preset format --- .../16_garrison/fnc/fn_garrison_initSector.sqf | 12 ++++++------ .../fnc/fn_garrison_spawnSectorInfantry.sqf | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Missionframework/modules/16_garrison/fnc/fn_garrison_initSector.sqf b/Missionframework/modules/16_garrison/fnc/fn_garrison_initSector.sqf index 003d823a7..34324fa30 100644 --- a/Missionframework/modules/16_garrison/fnc/fn_garrison_initSector.sqf +++ b/Missionframework/modules/16_garrison/fnc/fn_garrison_initSector.sqf @@ -4,7 +4,7 @@ File: fn_garrison_initSector.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-24 - Last Update: 2018-10-25 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -48,13 +48,13 @@ switch (toString _tempMarker) do { case "KPLIB_eden_f": { _side = 1; _soldiers = (ceil (random 2) + 2) * 6; - _lVehCount = (round (random 3)) + 2; + _lVehCount = (round (random 2)) + 2; _hVehCount = 0; }; case "KPLIB_eden_m": { _side = 1; _soldiers = (ceil (random 5) + 3) * 6; - _lVehCount = (round (random 4)) + 4; + _lVehCount = (round (random 3)) + 3; _hVehCount = 0; }; case "KPLIB_eden_t": { @@ -68,15 +68,15 @@ switch (toString _tempMarker) do { // Add light vehicles for "_i" from 1 to _lVehCount do { if (_side isEqualTo 0) then { - _lVehicles pushBack (selectRandom KPLIB_preset_oVehiclesLow); + _lVehicles pushBack (selectRandom KPLIB_preset_vehLightArmedPlE); } else { - _lVehicles pushBack (selectRandom KPLIB_preset_oMilVeh); + _lVehicles pushBack (selectRandom (KPLIB_preset_vehLightArmedPlE + KPLIB_preset_vehHeavyApcPlE)); }; }; // Add heavy vehicles for "_i" from 1 to _hVehCount do { - _hVehicles pushBack (selectRandom KPLIB_preset_oVehicles); + _hVehicles pushBack (selectRandom (KPLIB_preset_vehHeavyApcPlE + KPLIB_preset_vehHeavyPlE)); }; // Return garrison data diff --git a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf index c99723c3f..a574dd15b 100644 --- a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf +++ b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf @@ -4,7 +4,7 @@ File: fn_garrison_spawnSectorInfantry.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-20 - Last Update: 2018-12-08 + Last Update: 2018-12-09 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -45,9 +45,9 @@ while {surfaceIsWater _spawnPos} do { // Set array to select soldier classnames from switch (_ownerNumber) do { - case 1: {_soldierArray = KPLIB_preset_oMilUnits; _side = KPLIB_preset_sideE;}; - case 2: {_soldierArray = KPLIB_preset_lightSquad; _side = KPLIB_preset_sideF;}; - default {_soldierArray = KPLIB_preset_oInfantry; _side = KPLIB_preset_sideE;}; + case 1: {_soldierArray = KPLIB_preset_unitsPlE; _side = KPLIB_preset_sideE;}; + case 2: {_soldierArray = KPLIB_preset_unitsPlF; _side = KPLIB_preset_sideF;}; + default {_soldierArray = KPLIB_preset_unitsPlE; _side = KPLIB_preset_sideE;}; }; // Fetch unit classnames From fba174775f38b48024a7483ddf2574160f799cf0 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Tue, 11 Dec 2018 16:50:09 +0100 Subject: [PATCH 32/42] getRandomSpawnMarker function --- .../fnc/fn_common_getRandomSpawnMarker.sqf | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Missionframework/modules/01_common/fnc/fn_common_getRandomSpawnMarker.sqf diff --git a/Missionframework/modules/01_common/fnc/fn_common_getRandomSpawnMarker.sqf b/Missionframework/modules/01_common/fnc/fn_common_getRandomSpawnMarker.sqf new file mode 100644 index 000000000..c7aea2a45 --- /dev/null +++ b/Missionframework/modules/01_common/fnc/fn_common_getRandomSpawnMarker.sqf @@ -0,0 +1,48 @@ +/* + KPLIB_fnc_common_getRandomSpawnMarker + + File: fn_common_getRandomSpawnMarker.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-11 + Last Update: 2018-12-11 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Gets a random marker from KPLIB_sectors_airspawn or KPLIB_sectors_spawn with given distances to other sectors. + + Parameter(s): + _markersArray - Array of markers. KPLIB_sectors_airspawn or KPLIB_sectors_spawn [BOOL, defaults to false] + _minDistE - Minimum distance to any enemy sector [NUMBER, defaults to 300] + _minDistF - Minimum distance to any friendly sector [NUMBER, defaults to 300] + + Returns: + Selected map marker [STRING] +*/ + +params [ + ["_markersArray", [], [[]]], + ["_minDistE", 300, [0]], + ["_minDistF", 300, [0]] +]; + +// Return empty string, when the provided markers array is empty +if (_markersArray isEqualTo []) exitWith {""}; + +// Make a copy of the markers array +_markersArray = +_markersArray; + +// Select one random available marker +private _marker = _markersArray deleteAt (floor random count _markersArray); + +// First check if all blufor sectors are far enough away from selected marker +if (KPLIB_sectors_blufor findIf {((markerPos _x) distance2D (markerPos _marker)) < _minDistF} != -1) exitWith { + [_markersArray, _minDistE, _minDistF] call KPLIB_fnc_common_getRandomSpawnMarker; +}; + +// Now check the same for all enemy sectors +if ((KPLIB_sectors_all - KPLIB_sectors_blufor) findIf {((markerPos _x) distance2D (markerPos _marker)) < _minDistE} != -1) exitWith { + [_markersArray, _minDistE, _minDistF] call KPLIB_fnc_common_getRandomSpawnMarker; +}; + +// Return a random marker or an empty string, if conditions aren't met +_marker From 2bcb04b044ef1b7f084b2eab4e13dc03c54ffbe4 Mon Sep 17 00:00:00 2001 From: Wyqer Date: Tue, 11 Dec 2018 16:53:21 +0100 Subject: [PATCH 33/42] Place first FOB random action on FOBbox --- .../modules/01_common/functions.hpp | 5 +- .../02_core/fnc/fn_core_buildFobRandom.sqf | 52 +++++++++++++++++++ .../fnc/fn_core_handleVehicleSpawn.sqf | 6 +-- .../02_core/fnc/fn_core_spawnStartFobBox.sqf | 10 +++- .../modules/02_core/functions.hpp | 5 +- .../modules/15_build/fnc/fn_build_preInit.sqf | 4 +- .../15_build/fnc/fn_build_start_single.sqf | 3 +- Missionframework/stringtable.xml | 16 ++++-- 8 files changed, 87 insertions(+), 14 deletions(-) create mode 100644 Missionframework/modules/02_core/fnc/fn_core_buildFobRandom.sqf diff --git a/Missionframework/modules/01_common/functions.hpp b/Missionframework/modules/01_common/functions.hpp index 966c93210..52bb55054 100644 --- a/Missionframework/modules/01_common/functions.hpp +++ b/Missionframework/modules/01_common/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-15 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -47,6 +47,9 @@ class common { // Gets random class of given type from preset class common_getPresetClass {}; + // Gets a random spawn marker + class common_getRandomSpawnMarker {}; + // Initialize common module class common_preInit { preInit = 1; diff --git a/Missionframework/modules/02_core/fnc/fn_core_buildFobRandom.sqf b/Missionframework/modules/02_core/fnc/fn_core_buildFobRandom.sqf new file mode 100644 index 000000000..d239f67d2 --- /dev/null +++ b/Missionframework/modules/02_core/fnc/fn_core_buildFobRandom.sqf @@ -0,0 +1,52 @@ +/* + KPLIB_fnc_core_buildFobRandom + + File: fn_core_buildFobRandom.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-11 + Last Update: 2018-12-11 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + No description added yet. + + Parameter(s): + _localVariable - Description [DATATYPE, defaults to DEFAULTVALUE] + + Returns: + Function reached the end [BOOL] +*/ + +params [ + ["_box", objNull, [objNull]] +]; + +// Exit if provided box isn't a FOB box +if !((typeOf _box) isEqualTo KPLIB_preset_fobBoxF) exitWith {false}; + +// Get a valid spawn marker for the FOB +private _spawnMarker = [KPLIB_sectors_spawn, 500] call KPLIB_fnc_common_getRandomSpawnMarker; + +if (_spawnMarker isEqualTo "") exitWith { + hint localize "STR_KPLIB_HINT_RANDOMFOBERROR"; + [{hintSilent "";}, [], 5] call CBA_fnc_waitAndExecute; + false +}; + +private _spawnPos = markerPos _spawnMarker; + +// Disable damage handling and simulation +_box allowDamage false; +_box enableSimulationGlobal false; + +// Set the vehicle to the position where it should be +_box setPosATL [_spawnPos select 0, _spawnPos select 1, 0.25]; + +// Activate the simulation again +_box enableSimulationGlobal true; +_box setDamage 0; +_box allowDamage true; + +["KPLIB_fob_build_requested", _box] call CBA_fnc_localEvent; + +true diff --git a/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf b/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf index 216257a9e..b15b9b6d5 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf @@ -4,7 +4,7 @@ File: fn_core_handleVehicleSpawn.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-10 - Last Update: 2018-12-08 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -21,7 +21,7 @@ params [ ["_vehicle", objNull, [objNull]] ]; -switch(typeOf _vehicle) do { +switch (typeOf _vehicle) do { case KPLIB_preset_fobBoxF; case KPLIB_preset_fobTruckF: { // Add FOB build action globaly and for JIP @@ -50,7 +50,7 @@ switch(typeOf _vehicle) do { [ _vehicle, "STR_KPLIB_ACTION_HELIMOVE", - [{[_this select 0] call KPLIB_fnc_core_heliToDeck;}, nil, 10, true, true, "", "(_target distance KPLIB_eden_startbase) < 20", 3], + [{[_this select 0] call KPLIB_fnc_core_heliToDeck;}, nil, 10, true, true, "", "(_target distance KPLIB_eden_startbase) < 20", 4], "#FF8000" ] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true]; }; diff --git a/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf b/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf index 313ec6186..21ba413b4 100644 --- a/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf +++ b/Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf @@ -4,7 +4,7 @@ File: fn_core_spawnStartFobBox.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-05-09 - Last Update: 2018-12-08 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -35,6 +35,14 @@ private _spawnPos = getPosATL KPLIB_eden_boxspawn; // Create FOB box at the spawn position with a slight height offset. private _fobBox = [KPLIB_preset_fobBoxF, [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.1], getDir KPLIB_eden_boxspawn, true] call KPLIB_fnc_common_createVehicle; +// Add random FOB placement action for start FOB box +[ + _fobBox, + "STR_KPLIB_ACTION_DEPLOYRANDOM", + [{[_this select 0] call KPLIB_fnc_core_buildFobRandom;}, true, -800, false, true, "", "(_target distance KPLIB_eden_boxspawn) < 3 && KPLIB_sectors_fobs isEqualTo []", 4], + "#FF0000" +] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true]; + // Add event handler to call this script again if box was destroyed. _fobBox addMPEventHandler ["MPKilled", {[_this select 0] call KPLIB_fnc_core_spawnStartFobBox}]; diff --git a/Missionframework/modules/02_core/functions.hpp b/Missionframework/modules/02_core/functions.hpp index 9334b26cf..0f847f661 100644 --- a/Missionframework/modules/02_core/functions.hpp +++ b/Missionframework/modules/02_core/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-28 - Last Update: 2018-12-05 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -20,6 +20,9 @@ class core { // Build fob and register it class core_buildFob {}; + // Build fob at random position and register it + class core_buildFobRandom {}; + // Checks if player can build fob class core_canBuildFob {}; diff --git a/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf b/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf index fc517d3b7..539eb1259 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf @@ -4,7 +4,7 @@ File: fn_build_preInit.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-18 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -70,7 +70,7 @@ if (hasInterface) then { params ["_object"]; KPLIB_build_fobBuildObject = _object; // Start single item build for fob building - [getPos _object, nil, [KPLIB_preset_fobBuilding, 0,0,0], { + [getPos _object, nil, [KPLIB_preset_fobBuildingF, 0,0,0], { // On confirm callback, create FOB on server [_this select 0, KPLIB_build_fobBuildObject] remoteExec ["KPLIB_fnc_build_handleFobBuildConfirm", 2]; }] call KPLIB_fnc_build_start_single; diff --git a/Missionframework/modules/15_build/fnc/fn_build_start_single.sqf b/Missionframework/modules/15_build/fnc/fn_build_start_single.sqf index 1ff64b70f..8cdff88ff 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_start_single.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_start_single.sqf @@ -1,4 +1,3 @@ - #include "script_components.hpp" #include "..\ui\defines.hpp" /* @@ -7,7 +6,7 @@ File: fn_build_start_single.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-11-29 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: diff --git a/Missionframework/stringtable.xml b/Missionframework/stringtable.xml index 9595396e4..87f43de20 100644 --- a/Missionframework/stringtable.xml +++ b/Missionframework/stringtable.xml @@ -208,6 +208,10 @@ -- DESPLEGAR FOB -- -- FOB KUR -- + + -- RANDOM FOB DEPLOYMENT -- + -- ZUFÄLLIGE FOB PLATZIERUNG -- + Move to aft deck Zum Achterdeck bewegen @@ -636,6 +640,14 @@ Следующие элементы не разрешены:\n%1 Şu eşyalar yasaklı:\n%1 + + Clear the aft deck and the helicopter first. + Räume zuerst das Achterdeck und den Helikopter. + + + Random placement of a FOB is currently not possible. + Zufällige FOB Platzierung ist im Moment nicht möglich. + %1 minutes mobile respawn cooldown left. 機動重生點還需要 %1 分鐘冷卻。 @@ -644,10 +656,6 @@ Mancano ancora %1 minuti al respawn. Falta(m) %1 minuto(s) de tempo de espera do respawn móvel. - - Clear the aft deck and the helicopter first. - Räume zuerst das Achterdeck und den Helikopter. - From 57ef50654cb3588189a41b8a54f26fcec571dffb Mon Sep 17 00:00:00 2001 From: Wyqer Date: Tue, 11 Dec 2018 17:17:01 +0100 Subject: [PATCH 34/42] array selector for getPresetClass --- .../01_common/fnc/fn_common_getPresetClass.sqf | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf b/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf index c4d779544..72abcde2e 100644 --- a/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf +++ b/Missionframework/modules/01_common/fnc/fn_common_getPresetClass.sqf @@ -4,22 +4,24 @@ File: fn_common_getPresetClass.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-08 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: Gets random class of given type from preset. Parameter(s): - _type - Preset type name [STRING, defaults to ""] - _side - Preset side [SIDE, defaults to KPLIB_preset_sideEnemy] + _type - Preset type name [STRING, defaults to ""] + _side - Preset side [SIDE, defaults to KPLIB_preset_sideEnemy] + _isArray - Array of classnames (true) or single classname (false) [BOOL, defaults to false] Returns: Classname from preset [STRING] */ params [ ["_type", "", [""]], - ["_side", KPLIB_preset_sideE, [sideEmpty]] + ["_side", KPLIB_preset_sideE, [sideEmpty]], + ["_isArray", false, [false]] ]; // Determine classname side @@ -30,7 +32,11 @@ private _sideSuffix = switch (_side) do { default {"E"}; }; -private _classNamesVar = format ["KPLIB_preset_%1Pl%2", _type, _sideSuffix]; +private _classNamesVar = format ["KPLIB_preset_%1%2", _type, _sideSuffix]; + +if (_isArray) then { + _classNamesVar = format ["KPLIB_preset_%1Pl%2", _type, _sideSuffix]; +}; private _classNames = missionNamespace getVariable [_classNamesVar, nil]; From 631b23285672b2c7f1d0433c58cbd5bfb0562d0c Mon Sep 17 00:00:00 2001 From: Wyqer Date: Tue, 11 Dec 2018 17:27:22 +0100 Subject: [PATCH 35/42] Removed unwanted soldier types in sectorspawn --- .../fnc/fn_garrison_spawnSectorInfantry.sqf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf index a574dd15b..b7ae4ed21 100644 --- a/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf +++ b/Missionframework/modules/16_garrison/fnc/fn_garrison_spawnSectorInfantry.sqf @@ -4,7 +4,7 @@ File: fn_garrison_spawnSectorInfantry.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-10-20 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -50,6 +50,16 @@ switch (_ownerNumber) do { default {_soldierArray = KPLIB_preset_unitsPlE; _side = KPLIB_preset_sideE;}; }; +// Remove unwanted soldier types +_soldierArray = _soldierArray - [ + ["rsCrewmanHeli", _side] call KPLIB_fnc_common_getPresetClass, + ["rsCrewmanVeh", _side] call KPLIB_fnc_common_getPresetClass, + ["rsPilotHeli", _side] call KPLIB_fnc_common_getPresetClass, + ["rsPilotJet", _side] call KPLIB_fnc_common_getPresetClass, + ["rsParatrooper", _side] call KPLIB_fnc_common_getPresetClass, + ["rsSurvivor", _side] call KPLIB_fnc_common_getPresetClass +]; + // Fetch unit classnames for "_i" from 1 to _amount do { _classnames pushBack (selectRandom _soldierArray); From 59cde297fa5e58cbe77eef256cb0e53546f5a25a Mon Sep 17 00:00:00 2001 From: Wyqer Date: Tue, 11 Dec 2018 17:50:31 +0100 Subject: [PATCH 36/42] Antennas for radio tower sectors --- .../00_init/fnc/fn_init_placeTowers.sqf | 32 +++++++++++++++++++ .../modules/00_init/fnc/fn_init_postInit.sqf | 5 ++- .../modules/00_init/functions.hpp | 5 ++- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 Missionframework/modules/00_init/fnc/fn_init_placeTowers.sqf diff --git a/Missionframework/modules/00_init/fnc/fn_init_placeTowers.sqf b/Missionframework/modules/00_init/fnc/fn_init_placeTowers.sqf new file mode 100644 index 000000000..862d9824f --- /dev/null +++ b/Missionframework/modules/00_init/fnc/fn_init_placeTowers.sqf @@ -0,0 +1,32 @@ +/* + KPLIB_fnc_init_placeTowers + + File: fn_init_placeTowers.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-11 + Last Update: 2018-12-11 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Places Antennas at Radio Tower markers. + + Parameter(s): + NONE + + Returns: + Function reached the end [BOOL] +*/ + +private _antenna = objNull; + +{ + // Create antenna and make sure it isn't aligned to terrain + _antenna = createVehicle ["Land_Communication_F", markerPos _x, [], 0, "CAN_COLLIDE"]; + _antenna setpos (markerpos _x); + _antenna setVectorUp [0,0,1]; + + // Make sure this little antenna can't be destroyed by accident + _antenna allowDamage false; +} forEach KPLIB_sectors_tower; + +true diff --git a/Missionframework/modules/00_init/fnc/fn_init_postInit.sqf b/Missionframework/modules/00_init/fnc/fn_init_postInit.sqf index 7d30bcb25..49f1c8aa1 100644 --- a/Missionframework/modules/00_init/fnc/fn_init_postInit.sqf +++ b/Missionframework/modules/00_init/fnc/fn_init_postInit.sqf @@ -4,7 +4,7 @@ File: fn_init_postInit.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-08-31 - Last Update: 2018-11-27 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -47,6 +47,9 @@ if (isServer) then { // Create locked vehicle markers [] call KPLIB_fnc_init_createLockedVehMarkers; + // Place down Antennas at Radio Tower sectors + [] call KPLIB_fnc_init_placeTowers; + diag_log format ["[KP LIBERATION] [%1] [POST] [INIT] Module initialized", diag_tickTime]; }; diff --git a/Missionframework/modules/00_init/functions.hpp b/Missionframework/modules/00_init/functions.hpp index 7781645ab..ce5d6ae4b 100644 --- a/Missionframework/modules/00_init/functions.hpp +++ b/Missionframework/modules/00_init/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2017-10-16 - Last Update: 2018-12-08 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -41,6 +41,9 @@ class init { // Loads and checks the configured unit presets class init_loadPresets {}; + // Places Antennas at Radio Tower sectors + class init_placeTowers {}; + // Module post initialization class init_postInit { postInit = 1; From 8bd59897b148cbfb34c5ed5722f5ea464f7cff2a Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Tue, 11 Dec 2018 21:48:36 +0100 Subject: [PATCH 37/42] Add default buildables from preset --- .../modules/15_build/fnc/fn_build_preInit.sqf | 39 +++++++++++++++--- Missionframework/stringtable.xml | 41 +++++++++++++++++++ 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf b/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf index 539eb1259..2dd7ee28f 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_preInit.sqf @@ -78,13 +78,42 @@ if (hasInterface) then { player addEventHandler ["Killed", KPLIB_fnc_build_stop]; + // Add default buildables from preset { - _x call KPLIB_fnc_build_addBuildables; + [ + localize (_x select 0), + compile format ["KPLIB_preset_%1F", _x select 1] + ] call KPLIB_fnc_build_addBuildables; } forEach [ - ["Heavy", {KPLIB_preset_vehHeavyF}], - ["Heavy", {KPLIB_preset_vehHeavyApcF}], - ["Light", [["O_LSV_02_armed_F", 0,1,2]]], - ["Light", ["O_LSV_02_armed_F", 0,1,4]] + // Infantry + ["STR_KPLIB_CAT_INFANTRY", "units"], + ["STR_KPLIB_CAT_INFANTRY", "specOps"], + // Light + ["STR_KPLIB_CAT_LIGHT", "vehLightUnarmed"], + ["STR_KPLIB_CAT_LIGHT", "vehLightArmed"], + // Heavy + ["STR_KPLIB_CAT_HEAVY", "vehHeavyApc"], + ["STR_KPLIB_CAT_HEAVY", "vehHeavy"], + // Transport + ["STR_KPLIB_CAT_TRANSPORT", "vehTrans"], + // Helicopters + ["STR_KPLIB_CAT_HELI", "heliTrans"], + ["STR_KPLIB_CAT_HELI", "heliAttack"], + // Planes + ["STR_KPLIB_CAT_PLANES", "planeTrans"], + ["STR_KPLIB_CAT_PLANES", "jets"], + // Statics + ["STR_KPLIB_CAT_AA", "vehAntiAir"], + // Artillery + ["STR_KPLIB_CAT_ARTY", "vehArty"], + // Anti-Air + ["STR_KPLIB_CAT_STATICS", "statics"], + // Boats + ["STR_KPLIB_CAT_BOATS", "boats"], + // Logistic + ["STR_KPLIB_CAT_LOGISTIC", "logistic"], + // Decoration + ["STR_KPLIB_CAT_DECO", "deco"] ]; }; diff --git a/Missionframework/stringtable.xml b/Missionframework/stringtable.xml index 87f43de20..7a467fdf3 100644 --- a/Missionframework/stringtable.xml +++ b/Missionframework/stringtable.xml @@ -1110,4 +1110,45 @@ Ağır Silah Timi + + + + + + Anti-Air + + + Artillery + + + Boats + + + Infantry + + + Light + + + Logistic + + + Heavy + + + Statics + + + Transport + + + Helicopters + + + Planes + + + Decorations + + From f37c32029e28be496ea5c72cb5394942963c8c2c Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Tue, 11 Dec 2018 21:49:16 +0100 Subject: [PATCH 38/42] Add build_removeBuildables --- .../fnc/fn_build_removeBuildables.sqf | 43 +++++++++++++++++++ .../modules/15_build/functions.hpp | 5 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Missionframework/modules/15_build/fnc/fn_build_removeBuildables.sqf diff --git a/Missionframework/modules/15_build/fnc/fn_build_removeBuildables.sqf b/Missionframework/modules/15_build/fnc/fn_build_removeBuildables.sqf new file mode 100644 index 000000000..ed1883f43 --- /dev/null +++ b/Missionframework/modules/15_build/fnc/fn_build_removeBuildables.sqf @@ -0,0 +1,43 @@ +/* + KPLIB_fnc_build_removeBuildables + + File: KPLIB_fnc_build_removeBuildables.sqf + Author: KP Liberation Dev Team - https://github.com/KillahPotatoes + Date: 2018-12-09 + Last Update: 2018-12-11 + License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html + + Description: + Removes buildable items + + Parameter(s): + _category - Display name of category [String, defaults to ""] + _itemsIndex - Index of items to remove from category [DATATYPE, defaults to DEFAULTVALUE] + + Returns: + Items were removed [BOOL] +*/ +params [ + ["_category", "", [""]], + ["_itemsIndex", -1, [0]] +]; + +private _categoryIndex = KPLIB_build_categoryItems findIf {(_x select 0) isEqualTo _category}; +// There is no category with given name, do nothing +if(_categoryIndex isEqualTo -1) exitWith {false}; + +// Get category items +private _categoryBuildables = (KPLIB_build_categoryItems select _categoryIndex) select 1; + +// If no items were removed return false +if (isNil {_categoryBuildables deleteAt _itemsIndex}) exitWith { + false +}; + +// If no items left in the category then remove it +if (_categoryBuildables isEqualTo []) then { + KPLIB_build_categoryItems deleteAt _categoryIndex; +}; + +true + diff --git a/Missionframework/modules/15_build/functions.hpp b/Missionframework/modules/15_build/functions.hpp index 57e44c05f..ea6c4cada 100644 --- a/Missionframework/modules/15_build/functions.hpp +++ b/Missionframework/modules/15_build/functions.hpp @@ -4,7 +4,7 @@ File: functions.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-07-01 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -96,6 +96,9 @@ class build { preInit = 1; }; + // Removes buildable items from category + class build_removeBuildables {}; + // Handle persistent data saving class build_saveData {}; From 3e28a936c0e57a6c540075b609a98885357be6f1 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Tue, 11 Dec 2018 21:49:48 +0100 Subject: [PATCH 39/42] Clean up build_addBuildables --- .../15_build/fnc/fn_build_addBuildables.sqf | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf b/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf index 51b840993..e03006ca3 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_addBuildables.sqf @@ -4,7 +4,7 @@ File: KPLIB_fnc_build_addBuildables.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-12-09 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -22,22 +22,9 @@ params [ ["_buildables", [], [[], {}]] ]; -// If array given filter out bad entries -/*if (_buildables isEqualType []) then { - _buildables = _buildables select {_x isEqualTypeArray ["", 0, 0, 0]}; - - // Exit if no entries left after filtering - if (_buildables isEqualTo []) exitWith { - diag_log format [ - "[KP LIBERATION] [%1] [BUILD] No valid build entries given: '%2'. Can't add to category: '%3'. Expected buildables format: [, , , ]", - diag_tickTime, _buildables, _category - ]; - }; -};*/ - private _categoryIndex = KPLIB_build_categoryItems findIf {(_x select 0) isEqualTo _category}; // Add the category if it does not exist -if(_categoryIndex isEqualTo -1) then { +if(_categoryIndex isEqualTo -1) exitWith { // Add the new category KPLIB_build_categoryItems pushBack [ _category, @@ -47,9 +34,8 @@ if(_categoryIndex isEqualTo -1) then { ]; // Return index of items inside category 0 -} else { - private _category = (KPLIB_build_categoryItems select _categoryIndex) params ["", "_categoryItems"]; - // Append the buildables to existing category - _categoryItems pushBack _buildables -} +}; +private _categoryBuildables = (KPLIB_build_categoryItems select _categoryIndex) select 1; +// Append the buildables to existing category +_categoryBuildables pushBack _buildables From c498ab56c60b0f971ab965c1628798922e9d6265 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Tue, 11 Dec 2018 22:24:59 +0100 Subject: [PATCH 40/42] Finish build menu category selection --- .../15_build/fnc/fn_build_displayFillList.sqf | 29 +++++++++---------- .../15_build/fnc/fn_build_displayLoad.sqf | 22 ++++++++++---- .../15_build/fnc/fn_build_handleMouse.sqf | 3 +- .../15_build/ui/KPLIB_buildDisplay.hpp | 4 ++- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf b/Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf index 21c860002..3e90d3a12 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_displayFillList.sqf @@ -6,7 +6,7 @@ File: fn_build_displayFillList.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -25,14 +25,25 @@ params [ // CfgVehicles config for shorter/faster access private _cfg = configFile >> "CfgVehicles"; +// Get category items (LGVAR(buildables) select _categoryIdx) params ["", "_categoryItems"]; private _listBox = LGVAR(display) displayCtrl KPLIB_IDC_BUILD_ITEM_LIST; _listBox lbSetCurSel -1; // Unselect current row as it sticks between clearing lnbClear _listBox; -_listBox lnbAddRow ['DBG', 0, 0, 0]; private _fnc_addItems = { + +}; + +// Fill the item list +{ + // If item is a code execute it + if(_x isEqualType {}) then { + _x = [] call _x; + }; + + // Fill the list with items from currently selected category { _x params ["_className", "_priceSupp", "_priceAmmo", "_priceFuel"]; @@ -46,19 +57,7 @@ private _fnc_addItems = { private _icon = _className call KPLIB_fnc_common_getIcon; _listBox lnbSetPicture [[_currentIdx, 0], _icon]; - } forEach _this; -}; - -// Fill the item list -{ - // Handle removed items - if (isNil _x) exitWith {}; - - if(_x isEqualType {}) then { - _x = [] call _x; - }; - - _x call _fnc_addItems; + } forEach _x; } foreach _categoryItems; diff --git a/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf b/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf index 96e9ee2c4..c8b003f38 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_displayLoad.sqf @@ -6,7 +6,7 @@ File: fn_build_displayLoad.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -39,14 +39,27 @@ _itemsList ctrlAddEventHandler ["LBSelChanged", { LSVAR("buildItem", _selectedItem); // Unfocus the listbox to prevent camera controls from changing the selection - private _currentTabIDC = KPLIB_BUILD_TABS_IDCS_ARRAY select _mode; - ctrlSetFocus ((ctrlParent _control) displayCtrl _currentTabIDC); + ctrlSetFocus ((ctrlParent _control) displayCtrl KPLIB_IDC_BUILD_CONFIRM); }]; + private _categoriesList = _display displayCtrl KPLIB_IDC_BUILD_CATEGORY_LIST; +_categoriesList ctrlAddEventHandler ["LBSelChanged", { + params ["_control", "_selectedIndex"]; + + // Clear the search on category change + LSVAR("search", ""); + + // Fill the items list + [_selectedIndex, ""] call KPLIB_fnc_build_displayFillList; + + // Unfocus the listbox to prevent camera controls from changing the selection + ctrlSetFocus ((ctrlParent _control) displayCtrl KPLIB_IDC_BUILD_CONFIRM); +}]; + +// Fill the list of categories { _x params ["_categoryName"]; - _categoriesList lbAdd _categoryName; } forEach LGVAR(buildables); @@ -59,7 +72,6 @@ LSVAR("display", _display); // Select last category _categoriesList lbSetCurSel LGVAR_D(selectedCategoryIdx, 0); -[LGVAR_D(selectedCategoryIdx, 0), LGVAR_D(search, "")] call KPLIB_fnc_build_displayFillList; /* Seems to be buggy on triple screen, disable for now setMousePosition LGVAR(mousePos); */ diff --git a/Missionframework/modules/15_build/fnc/fn_build_handleMouse.sqf b/Missionframework/modules/15_build/fnc/fn_build_handleMouse.sqf index 946d72e02..b6a0672a9 100644 --- a/Missionframework/modules/15_build/fnc/fn_build_handleMouse.sqf +++ b/Missionframework/modules/15_build/fnc/fn_build_handleMouse.sqf @@ -6,7 +6,7 @@ File: fn_build_handleMouse.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-09-09 - Last Update: 2018-11-28 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -112,6 +112,7 @@ switch toLower _mode do { }; }; + case "onmousezchanged_buildcategorylist"; case "onmousezchanged_buildlist": { // Disable camera movement when scrolling over build dialog // TODO is there any better solution? diff --git a/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp b/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp index 54cad0ae0..b9eb5c294 100644 --- a/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp +++ b/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp @@ -4,7 +4,7 @@ File: KPLIB_defines.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-07-01 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -57,6 +57,8 @@ class KPLIB_build { y = KP_GETCY(KP_Y_VAL_LP,KP_HEIGHT_VAL_LP,2,40); w = KP_GETW(KP_WIDTH_VAL_LP,1); h = KP_GETH(KP_HEIGHT_VAL_LP,40); + + onMouseZChanged = "['onMouseZChanged_BuildCategoryList', _this] call KPLIB_fnc_build_handleMouse"; }; class KPLIB_BuildSearch: KPGUI_PRE_Combo { From 66fd0242751d53b76d713f53cb305b8b7bf7372a Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Tue, 11 Dec 2018 22:26:41 +0100 Subject: [PATCH 41/42] Do not delete curator modules for now --- .../modules/14_virtual/fnc/fn_virtual_addCurator.sqf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf b/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf index b8665ad66..c044c1901 100644 --- a/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf +++ b/Missionframework/modules/14_virtual/fnc/fn_virtual_addCurator.sqf @@ -4,7 +4,7 @@ File: fn_virtual_addCurator.sqf Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-11-18 - Last Update: 2018-12-09 + Last Update: 2018-12-11 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -32,7 +32,10 @@ unassignCurator _oldCurator; [{isNull getAssignedCuratorLogic (_this select 0)}, { params ["_unit", "_mode", "_oldCurator"]; - deleteVehicle _oldCurator; + // TODO + // This causes rpt spam about not existing objects + // Disable for now + //deleteVehicle _oldCurator; if (KPLIB_param_debug) then {diag_log format ["[KP LIBERATION] [VIRTUAL] Adding curator for unit '%1' with mode %2", _unit, _mode]}; From 8561032c687ea8e2969bde06009e9eba3e7b872b Mon Sep 17 00:00:00 2001 From: Wyqer Date: Wed, 12 Dec 2018 14:52:38 +0100 Subject: [PATCH 42/42] missing `;` in KPLIB_buildDisplay.hpp --- Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp b/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp index b9eb5c294..7e3080364 100644 --- a/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp +++ b/Missionframework/modules/15_build/ui/KPLIB_buildDisplay.hpp @@ -4,7 +4,7 @@ File: KPLIB_defines.hpp Author: KP Liberation Dev Team - https://github.com/KillahPotatoes Date: 2018-07-01 - Last Update: 2018-12-11 + Last Update: 2018-12-12 License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html Description: @@ -125,7 +125,7 @@ class KPLIB_build { w = KP_GETW(KP_WIDTH_VAL_LP,4); h = KP_GETH(KP_HEIGHT_VAL_LP,20) - 0.02; - onButtonClick = "_this call KPLIB_fnc_build_changeQueueMode" + onButtonClick = "_this call KPLIB_fnc_build_changeQueueMode"; }; }; };