Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal Preset Templates Adjustments #555

Merged
merged 42 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9b1500c
Faction colors and sides moved to preInit of init module
Wyqer Dec 7, 2018
4526a3f
Renamed preset macros
Wyqer Dec 7, 2018
d2032c2
Adjustments in macros and categories
Wyqer Dec 7, 2018
a5e624c
Removed old preset files
Wyqer Dec 7, 2018
54a0f1c
Update armies README.md
Wyqer Dec 7, 2018
48583f5
Config guard update and soldiers to units
Wyqer Dec 7, 2018
2e244ba
New civilian preset template
Wyqer Dec 7, 2018
7aeb280
Moved passenger van to transports
Wyqer Dec 7, 2018
97027ad
Shared script_component for civ/guer
Wyqer Dec 7, 2018
fa851a5
Civilian presets adjustment
Wyqer Dec 7, 2018
a384695
Resistance presets
Wyqer Dec 7, 2018
1d0530d
Added IDAP categories to civilian presets
Wyqer Dec 7, 2018
c67c305
Small typo
Wyqer Dec 8, 2018
9297415
Preset processing refactoring
Wyqer Dec 8, 2018
234bd4d
configGuard adjustments/enhancement
Wyqer Dec 8, 2018
ac2acaf
Settings/Stringtable update
Wyqer Dec 8, 2018
79a77e0
side and color in preInit to preset category
Wyqer Dec 8, 2018
f921b63
temporarily disabled locked vehicles
Wyqer Dec 8, 2018
dc68774
First batch of some brief preset change adjustments
Wyqer Dec 8, 2018
c859519
Update CHANGELOG and README
Wyqer Dec 9, 2018
1587819
Removed deprecated include
Wyqer Dec 9, 2018
6b00773
Add common_getRandomPresetClass
veteran29 Dec 8, 2018
e1a5bf7
Update common_createCrew to work with new preset structure
veteran29 Dec 8, 2018
ddbb375
Update common_getRandomPresetClass for new side variables
veteran29 Dec 9, 2018
5072df0
Fix zeus module init being broken to 1.86
veteran29 Dec 9, 2018
67b3dab
Rename common_getRandomPresetClass to common_getPresetClass
veteran29 Dec 9, 2018
6044e8e
Get classnames from plain array without costs
veteran29 Dec 9, 2018
9bbad47
Handle crew creation for civs and indfor
veteran29 Dec 9, 2018
4f15f1a
Dynamic build categories api (wip)
veteran29 Dec 9, 2018
656f4ff
Enabled locked vehicles processing again
Wyqer Dec 9, 2018
1b96536
Adjusted garrison module to new preset format
Wyqer Dec 9, 2018
fba1747
getRandomSpawnMarker function
Wyqer Dec 11, 2018
2bcb04b
Place first FOB random action on FOBbox
Wyqer Dec 11, 2018
57ef506
array selector for getPresetClass
Wyqer Dec 11, 2018
631b232
Removed unwanted soldier types in sectorspawn
Wyqer Dec 11, 2018
59cde29
Antennas for radio tower sectors
Wyqer Dec 11, 2018
8bd5989
Add default buildables from preset
veteran29 Dec 11, 2018
f37c320
Add build_removeBuildables
veteran29 Dec 11, 2018
3e28a93
Clean up build_addBuildables
veteran29 Dec 11, 2018
c498ab5
Finish build menu category selection
veteran29 Dec 11, 2018
66fd024
Do not delete curator modules for now
veteran29 Dec 11, 2018
8561032
missing `;` in KPLIB_buildDisplay.hpp
Wyqer Dec 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 199 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,228 @@
"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_lockedVehPlF",
"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",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 6 additions & 1 deletion Missionframework/KPGUI/KPGUI_classes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 4 additions & 7 deletions Missionframework/modules/00_init/fnc/fn_init_checkClass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
11 changes: 6 additions & 5 deletions Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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-08
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html

Description:
Expand All @@ -29,10 +29,11 @@ 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];
KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedSingles", true];

// Delay all checks until all initializations are done
[] spawn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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];
Expand Down
14 changes: 7 additions & 7 deletions Missionframework/modules/00_init/fnc/fn_init_loadData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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-09
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html

Description:
Expand Down Expand Up @@ -33,8 +33,8 @@ if (_moduleData isEqualTo []) then {
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;
Expand All @@ -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
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 = [];
Expand All @@ -73,8 +73,8 @@ 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;
Expand Down
Loading