initial files
This commit is contained in:
9
kp_liberation.brf_sumava/scripts/shared/defines.hpp
Normal file
9
kp_liberation.brf_sumava/scripts/shared/defines.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Get parameter
|
||||
#define GET_PARAM(outVar, paramName, paramDefault) outVar = [paramName,paramDefault] call KPLIB_fnc_getSaveableParam;\
|
||||
publicVariable #outVar;\
|
||||
[format ["%1: %2", paramName, outVar], "PARAM"] call KPLIB_fnc_log
|
||||
|
||||
// Get parameter and convert to bool
|
||||
#define GET_PARAM_BOOL(outVar, paramName, paramDefault) outVar = ([paramName,paramDefault] call KPLIB_fnc_getSaveableParam) isEqualTo 1;\
|
||||
publicVariable #outVar;\
|
||||
[format ["%1: %2", paramName, outVar], "PARAM"] call KPLIB_fnc_log
|
||||
63
kp_liberation.brf_sumava/scripts/shared/diagnostics.sqf
Normal file
63
kp_liberation.brf_sumava/scripts/shared/diagnostics.sqf
Normal file
@@ -0,0 +1,63 @@
|
||||
private _source = "";
|
||||
|
||||
["------------------------------------", "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Name: %1", (localize "STR_MISSION_TITLE")], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["World: %1", worldName], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Version: %1", (localize "STR_MISSION_VERSION")], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Author: %1", [missionConfigFile] call BIS_fnc_overviewAuthor], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Blufor: %1", KP_liberation_preset_blufor], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Opfor: %1", KP_liberation_preset_opfor], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Resistance: %1", KP_liberation_preset_resistance], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Civilians: %1", KP_liberation_preset_civilians], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["Arsenal: %1", KP_liberation_arsenal], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["CBA: %1", KPPLM_CBA], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["ACE: %1", KP_liberation_ace], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
[format ["KP Ranks: %1", KPPLM_KPR], "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
["------------------------------------", "MISSIONSTART"] call KPLIB_fnc_log;
|
||||
|
||||
waitUntil {sleep 1; !isNil "active_sectors"};
|
||||
|
||||
private _delay = 120;
|
||||
|
||||
while {true} do {
|
||||
if (isDedicated) then {
|
||||
_source = "Server";
|
||||
} else {
|
||||
_source = name player;
|
||||
_delay = 300;
|
||||
};
|
||||
|
||||
if (isServer) then {
|
||||
[
|
||||
format [
|
||||
"%1 - FPS: %2 - Local groups: %3 - Local units: %4 - Active Sectors: %5 - Active Scripts: [spawn: %6, execVM: %7, exec: %8, execFSM: %9]",
|
||||
_source,
|
||||
((round (diag_fps * 100.0)) / 100.0),
|
||||
{local _x} count allGroups,
|
||||
{local _x} count allUnits,
|
||||
count active_sectors,
|
||||
diag_activeScripts select 0,
|
||||
diag_activeScripts select 1,
|
||||
diag_activeScripts select 2,
|
||||
diag_activeScripts select 3
|
||||
],
|
||||
"STATS"
|
||||
] call KPLIB_fnc_log;
|
||||
} else {
|
||||
[
|
||||
format [
|
||||
"%1 - FPS: %2 - Local groups: %3 - Local units: %4 - Active Scripts: [spawn: %5, execVM: %6, exec: %7, execFSM: %8]",
|
||||
_source,
|
||||
((round (diag_fps * 100.0)) / 100.0),
|
||||
{local _x} count allGroups,
|
||||
{local _x} count allUnits,
|
||||
diag_activeScripts select 0,
|
||||
diag_activeScripts select 1,
|
||||
diag_activeScripts select 2,
|
||||
diag_activeScripts select 3
|
||||
],
|
||||
"STATS"
|
||||
] remoteExecCall ["KPLIB_fnc_log", 2];
|
||||
};
|
||||
sleep _delay;
|
||||
};
|
||||
491
kp_liberation.brf_sumava/scripts/shared/fetch_params.sqf
Normal file
491
kp_liberation.brf_sumava/scripts/shared/fetch_params.sqf
Normal file
@@ -0,0 +1,491 @@
|
||||
#include "defines.hpp"
|
||||
|
||||
// Check if ACE is running
|
||||
if (isClass (configfile >> "CfgPatches" >> "ace_common")) then {KP_liberation_ace = true; ["ACE detected. Deactivating resupply script from Liberation.", "MOD"] call KPLIB_fnc_log;} else {KP_liberation_ace = false};
|
||||
|
||||
/* Not saveable params */
|
||||
GRLIB_param_wipe_savegame_1 = ["WipeSave1", 0] call bis_fnc_getParamValue;
|
||||
GRLIB_param_wipe_savegame_2 = ["WipeSave2", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_civinfo_debug = ["DebugCivInfo", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_civrep_debug = ["DebugCivRep", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_savegame_debug = ["DebugSave", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_asymmetric_debug = ["DebugAsymmetric", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_logistic_debug = ["DebugLogistic", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_sectorspawn_debug = ["DebugSectorSpawn", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_kill_debug = ["DebugKill", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_production_debug = ["DebugProduction", 0] call bis_fnc_getParamValue;
|
||||
KP_liberation_highcommand_debug = ["DebugHighCommand", 0] call bis_fnc_getParamValue;
|
||||
|
||||
KP_load_params = ["LoadSaveParams", 1] call BIS_fnc_getParamValue;
|
||||
|
||||
if(isServer) then {
|
||||
private _start = diag_tickTime;
|
||||
/* Saveable params */
|
||||
["----- Server starts parameter initialization", "PARAM"] call KPLIB_fnc_log;
|
||||
switch (KP_load_params) do {
|
||||
case 0: {
|
||||
["Save/Load is set to SAVE", "PARAM"] call KPLIB_fnc_log;
|
||||
};
|
||||
case 1: {
|
||||
["Save/Load is set to LOAD", "PARAM"] call KPLIB_fnc_log;
|
||||
};
|
||||
case 2: {
|
||||
["Save/Load is set to USE SELECTED", "PARAM"] call KPLIB_fnc_log;
|
||||
};
|
||||
default {
|
||||
["Save/Load has no valid value", "PARAM"] call KPLIB_fnc_log;
|
||||
};
|
||||
};
|
||||
|
||||
// Mission Options
|
||||
["--- Mission Options ---", "PARAM"] call KPLIB_fnc_log;
|
||||
GET_PARAM(GRLIB_unitcap, "Unitcap", 2);
|
||||
GET_PARAM(GRLIB_difficulty_modifier, "Difficulty", 2);
|
||||
GET_PARAM(GRLIB_csat_aggressivity, "Aggressivity", 2);
|
||||
GET_PARAM_BOOL(GRLIB_adaptive_opfor, "AdaptToPlayercount", 1);
|
||||
GET_PARAM(GRLIB_civilian_activity, "Civilians", 1);
|
||||
GET_PARAM_BOOL(GRLIB_build_first_fob, "FirstFob", 0);
|
||||
GET_PARAM_BOOL(KP_liberation_fob_vehicle, "FirstFobVehicle", 0);
|
||||
GET_PARAM(GRLIB_maximum_fobs, "MaximumFobs", 26);
|
||||
GET_PARAM(GRLIB_max_squad_size, "MaxSquadSize", 10);
|
||||
GET_PARAM_BOOL(GRLIB_blufor_defenders, "BluforDefenders", 1);
|
||||
GET_PARAM_BOOL(GRLIB_autodanger, "Autodanger", 0);
|
||||
GET_PARAM(GRLIB_time_factor, "DayDuration", 12);
|
||||
GET_PARAM_BOOL(GRLIB_shorter_nights, "ShorterNights", 0);
|
||||
GET_PARAM(GRLIB_weather_param, "Weather", 3);
|
||||
GET_PARAM_BOOL(KP_liberation_fog_param, "VanillaFog", 1);
|
||||
GET_PARAM(GRLIB_resources_multiplier, "ResourcesMultiplier", 3);
|
||||
GET_PARAM_BOOL(KP_liberation_arsenal_type, "ArsenalType", 0);
|
||||
GET_PARAM_BOOL(KPLIB_directArsenal, "DirectArsenal", 0);
|
||||
GET_PARAM_BOOL(KP_liberation_playermenu, "PlayerMenu", 1);
|
||||
GET_PARAM(KP_liberation_victoryCondition, "VictoryCondition", 0);
|
||||
|
||||
// Deactivate BI Revive when ACE Medical is running
|
||||
if (isClass (configfile >> "CfgPatches" >> "ace_medical")) then {
|
||||
bis_reviveParam_mode = 0; publicVariable "bis_reviveParam_mode";
|
||||
["ACE Medical detected. Deactivating BI Revive System.", "PARAM"] call KPLIB_fnc_log;
|
||||
} else {
|
||||
// Revive Options
|
||||
["--- Revive Options ---", "PARAM"] call KPLIB_fnc_log;
|
||||
GET_PARAM(bis_reviveParam_mode, "ReviveMode", 1);
|
||||
GET_PARAM(bis_reviveParam_duration, "ReviveDuration", 6);
|
||||
GET_PARAM(bis_reviveParam_requiredTrait, "ReviveRequiredTrait", 1);
|
||||
GET_PARAM(bis_reviveParam_medicSpeedMultiplier, "ReviveMedicSpeedMultiplier", 1);
|
||||
GET_PARAM(bis_reviveParam_requiredItems, "ReviveRequiredItems", 1);
|
||||
GET_PARAM(bis_reviveParam_unconsciousStateMode, "UnconsciousStateMode", 0);
|
||||
GET_PARAM(bis_reviveParam_bleedOutDuration, "ReviveBleedOutDuration", 180);
|
||||
GET_PARAM(bis_reviveParam_forceRespawnDuration, "ReviveForceRespawnDuration", 10);
|
||||
};
|
||||
|
||||
// Gameplay Options
|
||||
["--- Gameplay Options ---", "PARAM"] call KPLIB_fnc_log;
|
||||
GET_PARAM_BOOL(GRLIB_fatigue, "Fatigue", 1);
|
||||
GET_PARAM_BOOL(KPLIB_sway, "WeaponSway", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_arsenalUsePreset, "ArsenalUsePreset", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_mapmarkers, "MapMarkers", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_mobilerespawn, "MobileRespawn", 1);
|
||||
GET_PARAM(KP_liberation_respawn_cooldown, "RespawnCooldown", 900);
|
||||
GET_PARAM_BOOL(KP_liberation_mobilearsenal, "MobileArsenal", 1);
|
||||
GET_PARAM_BOOL(KPLIB_respawnOnAttackedSectors, "AttackedSectorRespawn", 0);
|
||||
GET_PARAM_BOOL(KP_liberation_ailogistics, "AiLogistics", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_cr_param_buildings, "CR_Building", 0);
|
||||
GET_PARAM(GRLIB_halo_param, "HaloJump", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_clear_cargo, "ClearCargo", 1);
|
||||
GET_PARAM(KP_liberation_allowEnemiesInImmobile, "AllowEnemiesInImmobile", 50);
|
||||
GET_PARAM(KP_liberation_delayDespawnMax, "DelayDespawnMax", 5);
|
||||
GET_PARAM_BOOL(KP_liberation_limited_zeus, "LimitedZeus", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_commander_zeus, "CommanderZeus", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_enemies_zeus, "ZeusAddEnemies", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_high_command, "HighCommand", 1);
|
||||
GET_PARAM(KP_liberation_suppMod, "SuppMod", 1);
|
||||
GET_PARAM_BOOL(KP_liberation_tutorial, "Tutorial", 1);
|
||||
|
||||
// Technical Options
|
||||
["--- Technical Options ---", "PARAM"] call KPLIB_fnc_log;
|
||||
GET_PARAM_BOOL(GRLIB_permissions_param, "Permissions", 1);
|
||||
GET_PARAM(GRLIB_cleanup_vehicles, "CleanupVehicles", 2);
|
||||
GET_PARAM_BOOL(GRLIB_introduction, "Introduction", 1);
|
||||
GET_PARAM_BOOL(GRLIB_deployment_cinematic, "DeploymentCinematic", 1);
|
||||
GET_PARAM_BOOL(GRLIB_use_whitelist, "Whitelist", 0);
|
||||
GET_PARAM(KP_liberation_restart, "ServerRestart", 0);
|
||||
|
||||
GREUH_allow_mapmarkers = KP_liberation_mapmarkers; publicVariable "GREUH_allow_mapmarkers";
|
||||
GREUH_allow_platoonview = KP_liberation_mapmarkers; publicVariable "GREUH_allow_platoonview";
|
||||
|
||||
KP_serverParamsFetched = true;
|
||||
publicVariable "KP_serverParamsFetched";
|
||||
|
||||
[format ["----- Server finished parameter initialization - Time needed: %1 seconds", diag_ticktime - _start], "PARAM"] call KPLIB_fnc_log;
|
||||
};
|
||||
|
||||
// Fix for not working float values in mission params
|
||||
switch (GRLIB_unitcap) do {
|
||||
case 0: {GRLIB_unitcap = 0.5;};
|
||||
case 1: {GRLIB_unitcap = 0.75;};
|
||||
case 2: {GRLIB_unitcap = 1;};
|
||||
case 3: {GRLIB_unitcap = 1.25;};
|
||||
case 4: {GRLIB_unitcap = 1.5;};
|
||||
case 5: {GRLIB_unitcap = 2;};
|
||||
default {GRLIB_unitcap = 1;};
|
||||
};
|
||||
|
||||
switch (GRLIB_difficulty_modifier) do {
|
||||
case 0: {GRLIB_difficulty_modifier = 0.5;};
|
||||
case 1: {GRLIB_difficulty_modifier = 0.75;};
|
||||
case 2: {GRLIB_difficulty_modifier = 1;};
|
||||
case 3: {GRLIB_difficulty_modifier = 1.25;};
|
||||
case 4: {GRLIB_difficulty_modifier = 1.5;};
|
||||
case 5: {GRLIB_difficulty_modifier = 2;};
|
||||
case 6: {GRLIB_difficulty_modifier = 4;};
|
||||
case 7: {GRLIB_difficulty_modifier = 10;};
|
||||
default {GRLIB_difficulty_modifier = 1;};
|
||||
};
|
||||
|
||||
switch (GRLIB_csat_aggressivity) do {
|
||||
case 0: {GRLIB_csat_aggressivity = 0.25;};
|
||||
case 1: {GRLIB_csat_aggressivity = 0.5;};
|
||||
case 2: {GRLIB_csat_aggressivity = 1;};
|
||||
case 3: {GRLIB_csat_aggressivity = 2;};
|
||||
case 4: {GRLIB_csat_aggressivity = 4;};
|
||||
default {GRLIB_csat_aggressivity = 1;};
|
||||
};
|
||||
|
||||
switch (GRLIB_civilian_activity) do {
|
||||
case 0: {GRLIB_civilian_activity = 0;};
|
||||
case 1: {GRLIB_civilian_activity = 0.5;};
|
||||
case 2: {GRLIB_civilian_activity = 1;};
|
||||
case 3: {GRLIB_civilian_activity = 2;};
|
||||
default {GRLIB_csat_aggressivity = 1;};
|
||||
};
|
||||
|
||||
switch (GRLIB_resources_multiplier) do {
|
||||
case 0: {GRLIB_resources_multiplier = 0.25;};
|
||||
case 1: {GRLIB_resources_multiplier = 0.5;};
|
||||
case 2: {GRLIB_resources_multiplier = 0.75;};
|
||||
case 3: {GRLIB_resources_multiplier = 1;};
|
||||
case 4: {GRLIB_resources_multiplier = 1.25;};
|
||||
case 5: {GRLIB_resources_multiplier = 1.5;};
|
||||
case 6: {GRLIB_resources_multiplier = 2;};
|
||||
case 7: {GRLIB_resources_multiplier = 3;};
|
||||
default {GRLIB_resources_multiplier = 1;};
|
||||
};
|
||||
|
||||
switch (KP_liberation_victoryCondition) do {
|
||||
case 1: {
|
||||
KP_liberation_victoryCheck = {
|
||||
(count (blufor_sectors select {_x in sectors_bigtown})) == (count sectors_bigtown)
|
||||
&&
|
||||
{
|
||||
(count (blufor_sectors select {_x in sectors_military})) == (count sectors_military)
|
||||
}
|
||||
};
|
||||
};
|
||||
case 2: {
|
||||
KP_liberation_victoryCheck = {
|
||||
(count (blufor_sectors select {_x in sectors_bigtown})) == (count sectors_bigtown)
|
||||
&&
|
||||
{
|
||||
(count (blufor_sectors select {!(_x in sectors_bigtown)})) >= ((count (sectors_allSectors - sectors_bigtown)) * 0.6)
|
||||
}
|
||||
};
|
||||
};
|
||||
case 3: {
|
||||
KP_liberation_victoryCheck = {
|
||||
(count (blufor_sectors select {_x in sectors_bigtown})) == (count sectors_bigtown)
|
||||
&&
|
||||
{
|
||||
(count (blufor_sectors select {!(_x in sectors_bigtown)})) >= ((count (sectors_allSectors - sectors_bigtown)) * 0.8)
|
||||
}
|
||||
};
|
||||
};
|
||||
case 4: {
|
||||
KP_liberation_victoryCheck = {
|
||||
(count blufor_sectors) == (count sectors_allSectors)
|
||||
};
|
||||
};
|
||||
default {
|
||||
KP_liberation_victoryCheck = {
|
||||
(count (blufor_sectors select {_x in sectors_bigtown})) == (count sectors_bigtown)
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!isDedicated && hasInterface) then {
|
||||
// Create diary section for an overview of actual mission parameters
|
||||
player createDiarySubject ["parameters", "Mission Parameters"];
|
||||
|
||||
private _param = localize "STR_PARAMS_UNITCAP";
|
||||
private _value = (format ["%1", GRLIB_unitcap * 100]) + "%";
|
||||
private _text = format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_DIFFICULTY";
|
||||
switch (GRLIB_difficulty_modifier) do {
|
||||
case 0.75: {_value = localize "STR_PARAMS_DIFFICULTY2";};
|
||||
case 1: {_value = localize "STR_PARAMS_DIFFICULTY3";};
|
||||
case 1.25: {_value = localize "STR_PARAMS_DIFFICULTY4";};
|
||||
case 1.5: {_value = localize "STR_PARAMS_DIFFICULTY5";};
|
||||
case 2: {_value = localize "STR_PARAMS_DIFFICULTY6";};
|
||||
case 4: {_value = localize "STR_PARAMS_DIFFICULTY7";};
|
||||
case 10: {_value = localize "STR_PARAMS_DIFFICULTY8";};
|
||||
default {_value = localize "STR_PARAMS_DIFFICULTY1";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_AGGRESSIVITY_PARAM";
|
||||
switch (GRLIB_csat_aggressivity) do {
|
||||
case 0.5: {_value = localize "STR_AGGRESSIVITY_PARAM1";};
|
||||
case 1: {_value = localize "STR_AGGRESSIVITY_PARAM2";};
|
||||
case 2: {_value = localize "STR_AGGRESSIVITY_PARAM3";};
|
||||
case 4: {_value = localize "STR_AGGRESSIVITY_PARAM4";};
|
||||
default {_value = localize "STR_AGGRESSIVITY_PARAM0";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_ADAPT_TO_PLAYERCOUNT";
|
||||
_value = if (GRLIB_adaptive_opfor) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_CIVILIANS";
|
||||
switch (GRLIB_civilian_activity) do {
|
||||
case 0.5: {_value = localize "STR_PARAMS_CIVILIANS2";};
|
||||
case 1: {_value = localize "STR_PARAMS_CIVILIANS3";};
|
||||
case 2: {_value = localize "STR_PARAMS_CIVILIANS4";};
|
||||
default {_value = localize "STR_PARAMS_CIVILIANS1";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_FIRSTFOB";
|
||||
_value = if (GRLIB_build_first_fob) then {localize "STR_YES";} else {localize "STR_NO";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_FIRSTFOBVEHICLE";
|
||||
_value = if (KP_liberation_fob_vehicle) then {localize "STR_PARAMS_FIRSTFOBVEHICLE_TRUCK";} else {localize "STR_PARAMS_FIRSTFOBVEHICLE_CONTAINTER";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_FOBS_COUNT";
|
||||
_value = str GRLIB_maximum_fobs;
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_SQUAD_SIZE";
|
||||
_value = str GRLIB_max_squad_size;
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_BLUFOR_DEFENDERS";
|
||||
_value = if (GRLIB_blufor_defenders) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_AUTODANGER";
|
||||
_value = if (GRLIB_autodanger) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_DAYDURATION";
|
||||
_value = str (24 / GRLIB_time_factor);
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_SHORTER_NIGHTS_PARAM";
|
||||
_value = if (GRLIB_shorter_nights) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_WEATHER_PARAM";
|
||||
switch (GRLIB_weather_param) do {
|
||||
case 2: {_value = localize "STR_WEATHER_PARAM2";};
|
||||
case 3: {_value = localize "STR_WEATHER_PARAM3";};
|
||||
default {_value = localize "STR_WEATHER_PARAM1";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_FOG_PARAM";
|
||||
_value = if (KP_liberation_fog_param) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_RESOURCESMULTIPLIER";
|
||||
_value = format ["x%1", GRLIB_resources_multiplier];
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_ARSENAL";
|
||||
_value = if (KP_liberation_arsenal_type) then {localize "STR_PARAMS_ARSENAL_ACE";} else {localize "STR_PARAMS_ARSENAL_BI";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_DIRECTARSENAL";
|
||||
_value = if (KPLIB_directArsenal) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_PLAYERMENU";
|
||||
_value = if (KP_liberation_playermenu) then {localize "STR_PARAMS_PLAYERMENU_KP";} else {localize "STR_PARAMS_PLAYERMENU_GREUH";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_VICTORYCONDITION";
|
||||
switch (KP_liberation_victoryCondition) do {
|
||||
case 1: {_value = localize "STR_PARAMS_VICTORYCONDITION_1";};
|
||||
case 2: {_value = localize "STR_PARAMS_VICTORYCONDITION_2";};
|
||||
case 3: {_value = localize "STR_PARAMS_VICTORYCONDITION_3";};
|
||||
case 4: {_value = localize "STR_PARAMS_VICTORYCONDITION_4";};
|
||||
default {_value = localize "STR_PARAMS_VICTORYCONDITION_0";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_ReviveMode";
|
||||
_value = if (bis_reviveParam_mode == 1) then {localize "STR_A3_EnabledForAllPlayers";} else {localize "STR_A3_Disabled";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
if (bis_reviveParam_mode == 1) then {
|
||||
_param = localize "STR_A3_ReviveDuration";
|
||||
_value = str bis_reviveParam_duration;
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_RequiredTrait";
|
||||
_value = if (bis_reviveParam_requiredTrait == 1) then {localize "STR_A3_Medic";} else {localize "STR_A3_None";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_RequiredTrait_MedicSpeedMultiplier";
|
||||
_value = format ["x%1", bis_reviveParam_medicSpeedMultiplier];
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_RequiredItems";
|
||||
switch (bis_reviveParam_requiredItems) do {
|
||||
case 1: {_value = localize "STR_A3_Medikit";};
|
||||
case 2: {_value = localize "STR_A3_FirstAidKitOrMedikit";};
|
||||
default {_value = localize "STR_A3_None";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_IncapacitationMode";
|
||||
switch (bis_reviveParam_unconsciousStateMode) do {
|
||||
case 1: {_value = localize "STR_A3_Advanced";};
|
||||
case 2: {_value = localize "STR_A3_Realistic";};
|
||||
default {_value = localize "STR_A3_Basic";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_BleedOutDuration";
|
||||
_value = str bis_reviveParam_bleedOutDuration;
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_A3_ForceRespawnDuration";
|
||||
_value = str bis_reviveParam_forceRespawnDuration;
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
};
|
||||
|
||||
_param = localize "STR_PARAMS_FATIGUE";
|
||||
_value = if (GRLIB_fatigue) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_WEAPSWAY";
|
||||
_value = if (KPLIB_sway) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_ARSENALUSEPRESET";
|
||||
_value = if (KP_liberation_arsenalUsePreset) then {localize "STR_PARAMS_USEPRESET";} else {localize "STR_PARAMS_NORESTRICTIONS";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_MAPMARKERS";
|
||||
_value = if (KP_liberation_mapmarkers) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_MOBILERESPAWN";
|
||||
_value = if (KP_liberation_mobilerespawn) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_RESPAWN_COOLDOWN";
|
||||
_value = if (KP_liberation_respawn_cooldown == 0) then {localize "STR_PARAMS_DISABLED";} else {str (KP_liberation_respawn_cooldown / 60);};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_MOBILEARSENAL";
|
||||
_value = if (KP_liberation_mobilearsenal) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_ATTACKEDSECTORRESPAWN";
|
||||
_value = if (KPLIB_respawnOnAttackedSectors) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_AILOGISTICS";
|
||||
_value = if (KP_liberation_ailogistics) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_CR_BUILDING";
|
||||
_value = if (KP_liberation_cr_param_buildings) then {localize "STR_PARAM_CR_DAMAGED";} else {localize "STR_PARAM_CR_DESTROYED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_HALO_PARAM";
|
||||
switch (GRLIB_halo_param) do {
|
||||
case 1: {_value = localize "STR_HALO_PARAM1";};
|
||||
case 5: {_value = localize "STR_HALO_PARAM2";};
|
||||
case 10: {_value = localize "STR_HALO_PARAM3";};
|
||||
case 15: {_value = localize "STR_HALO_PARAM4";};
|
||||
case 20: {_value = localize "STR_HALO_PARAM5";};
|
||||
case 30: {_value = localize "STR_HALO_PARAM6";};
|
||||
default {_value = localize "STR_PARAMS_DISABLED";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_CLEAR_CARGO";
|
||||
_value = if (KP_liberation_clear_cargo) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_ALLOW_ENEMIES_IN_IMMOBILE";
|
||||
_value = if (KP_liberation_allowEnemiesInImmobile == 0) then {localize "STR_PARAMS_DISABLED";} else {KP_liberation_allowEnemiesInImmobile;};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_DELAY_DESPAWN_MAX";
|
||||
_value = if (KP_liberation_delayDespawnMax == 0) then {localize "STR_PARAMS_DISABLED";} else {KP_liberation_delayDespawnMax;};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_COMMANDERZEUS";
|
||||
_value = if (KP_liberation_commander_zeus) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_LIMITEDZEUS";
|
||||
_value = if (KP_liberation_limited_zeus) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_ZEUSADDENEMIES";
|
||||
_value = if (KP_liberation_enemies_zeus) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_HIGHCOMMAND";
|
||||
_value = if (KP_liberation_high_command) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_SUPPMOD";
|
||||
switch (KP_liberation_suppMod) do {
|
||||
case 1: {_value = localize "STR_PARAM_SUPPMOD_CMDRANDWHITELIST";};
|
||||
case 2: {_value = localize "STR_PARAM_SUPPMOD_EVERYONE";};
|
||||
default {_value = localize "STR_PARAMS_DISABLED";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAM_TUTORIAL";
|
||||
_value = if (KP_liberation_tutorial) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PERMISSIONS_PARAM";
|
||||
_value = if (GRLIB_permissions_param) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_CLEANUP_PARAM";
|
||||
switch (GRLIB_cleanup_vehicles) do {
|
||||
case 1: {_value = localize "STR_CLEANUP_PARAM1";};
|
||||
case 2: {_value = localize "STR_CLEANUP_PARAM2";};
|
||||
case 4: {_value = localize "STR_CLEANUP_PARAM3";};
|
||||
default {_value = localize "STR_PARAMS_DISABLED";};
|
||||
};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_INTRO";
|
||||
_value = if (GRLIB_introduction) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_PARAMS_DEPLOYMENTCAMERA";
|
||||
_value = if (GRLIB_deployment_cinematic) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_WHITELIST_PARAM";
|
||||
_value = if (GRLIB_use_whitelist) then {localize "STR_WHITELIST_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
_param = localize "STR_RESTART_PARAM";
|
||||
_value = if (KP_liberation_restart == 0) then {localize "STR_PARAMS_DISABLED";} else {KP_liberation_restart;};
|
||||
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
|
||||
|
||||
player createDiaryRecord ["parameters", ["Active", _text]];
|
||||
};
|
||||
37
kp_liberation.brf_sumava/scripts/shared/init_shared.sqf
Normal file
37
kp_liberation.brf_sumava/scripts/shared/init_shared.sqf
Normal file
@@ -0,0 +1,37 @@
|
||||
kill_manager = compileFinal preprocessFileLineNumbers "scripts\shared\kill_manager.sqf";
|
||||
|
||||
build_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\build_remote_call.sqf";
|
||||
build_fob_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\build_fob_remote_call.sqf";
|
||||
cancel_build_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\cancel_build_remote_call.sqf";
|
||||
prisonner_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\prisonner_remote_call.sqf";
|
||||
recycle_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\recycle_remote_call.sqf";
|
||||
reinforcements_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\reinforcements_remote_call.sqf";
|
||||
sector_liberated_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\sector_liberated_remote_call.sqf";
|
||||
intel_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\intel_remote_call.sqf";
|
||||
start_secondary_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\start_secondary_remote_call.sqf";
|
||||
change_prod_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\change_prod_remote_call.sqf";
|
||||
build_fac_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\build_fac_remote_call.sqf";
|
||||
if (KP_liberation_ailogistics) then {
|
||||
add_logiGroup_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\add_logiGroup_remote_call.sqf";
|
||||
del_logiGroup_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\del_logiGroup_remote_call.sqf";
|
||||
add_logiTruck_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\add_logiTruck_remote_call.sqf";
|
||||
del_logiTruck_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\del_logiTruck_remote_call.sqf";
|
||||
save_logi_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\save_logi_remote_call.sqf";
|
||||
abort_logi_remote_call = compileFinal preprocessFileLineNumbers "scripts\server\remotecall\abort_logi_remote_call.sqf";
|
||||
};
|
||||
|
||||
remote_call_sector = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_sector.sqf";
|
||||
remote_call_fob = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_fob.sqf";
|
||||
remote_call_battlegroup = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_battlegroup.sqf";
|
||||
remote_call_endgame = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_endgame.sqf";
|
||||
remote_call_prisonner = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_prisonner.sqf";
|
||||
remote_call_intel = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_intel.sqf";
|
||||
remote_call_incoming = compileFinal preprocessFileLineNumbers "scripts\client\remotecall\remote_call_incoming.sqf";
|
||||
|
||||
civinfo_notifications = compileFinal preprocessFileLineNumbers "scripts\client\civinformant\civinfo_notifications.sqf";
|
||||
civinfo_escort = compileFinal preprocessFileLineNumbers "scripts\client\civinformant\civinfo_escort.sqf";
|
||||
civinfo_delivered = compileFinal preprocessFileLineNumbers "scripts\server\civinformant\civinfo_delivered.sqf";
|
||||
|
||||
asymm_notifications = compileFinal preprocessFileLineNumbers "scripts\client\asymmetric\asymm_notifications.sqf";
|
||||
|
||||
execVM "scripts\shared\diagnostics.sqf";
|
||||
176
kp_liberation.brf_sumava/scripts/shared/kill_manager.sqf
Normal file
176
kp_liberation.brf_sumava/scripts/shared/kill_manager.sqf
Normal file
@@ -0,0 +1,176 @@
|
||||
params ["_unit", "_killer"];
|
||||
|
||||
if (isServer) then {
|
||||
|
||||
if (KP_liberation_kill_debug > 0) then {[format ["Kill Manager executed - _unit: %1 (%2) - _killer: %3 (%4)", typeOf _unit, _unit, typeOf _killer, _killer], "KILL"] call KPLIB_fnc_log;};
|
||||
|
||||
// Get Killer, when ACE enabled, via lastDamageSource
|
||||
if (KP_liberation_ace) then {
|
||||
if (local _unit) then {
|
||||
_killer = _unit getVariable ["ace_medical_lastDamageSource", _killer];
|
||||
if (KP_liberation_kill_debug > 0) then {["_unit is local to server", "KILL"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
if (KP_liberation_kill_debug > 0) then {["_unit is not local to server", "KILL"] call KPLIB_fnc_log;};
|
||||
if (isNil "KP_liberation_ace_killer") then {KP_liberation_ace_killer = objNull;};
|
||||
waitUntil {sleep 0.5; !(isNull KP_liberation_ace_killer)};
|
||||
if (KP_liberation_kill_debug > 0) then {["KP_liberation_ace_killer received on server", "KILL"] call KPLIB_fnc_log;};
|
||||
_killer = KP_liberation_ace_killer;
|
||||
KP_liberation_ace_killer = objNull;
|
||||
publicVariable "KP_liberation_ace_killer";
|
||||
};
|
||||
};
|
||||
|
||||
// Failsafe if something gets killed before the save manager is finished
|
||||
if (isNil "infantry_weight") then {infantry_weight = 33};
|
||||
if (isNil "armor_weight") then {armor_weight = 33};
|
||||
if (isNil "air_weight") then {air_weight = 33};
|
||||
|
||||
// BLUFOR Killer handling
|
||||
if ((side _killer) == GRLIB_side_friendly) then {
|
||||
|
||||
// Increase combat readiness for kills near a capital.
|
||||
private _nearby_bigtown = sectors_bigtown select {!(_x in blufor_sectors) && (_unit distance (markerpos _x) < 250)};
|
||||
if (count _nearby_bigtown > 0) then {
|
||||
combat_readiness = combat_readiness + (0.5 * GRLIB_difficulty_modifier);
|
||||
stats_readiness_earned = stats_readiness_earned + (0.5 * GRLIB_difficulty_modifier);
|
||||
if (combat_readiness > 100.0 && GRLIB_difficulty_modifier < 2) then {combat_readiness = 100.0};
|
||||
};
|
||||
|
||||
// Weights adjustments depending on what vehicle the BLUFOR killer used
|
||||
if (_killer isKindOf "Man") then {
|
||||
infantry_weight = infantry_weight + 1;
|
||||
armor_weight = armor_weight - 0.66;
|
||||
air_weight = air_weight - 0.66;
|
||||
} else {
|
||||
if ((toLower (typeOf (vehicle _killer))) in KPLIB_allLandVeh_classes) then {
|
||||
infantry_weight = infantry_weight - 0.66;
|
||||
armor_weight = armor_weight + 1;
|
||||
air_weight = air_weight - 0.66;
|
||||
};
|
||||
if ((toLower (typeOf (vehicle _killer))) in KPLIB_allAirVeh_classes) then {
|
||||
infantry_weight = infantry_weight - 0.66;
|
||||
armor_weight = armor_weight - 0.66;
|
||||
air_weight = air_weight + 1;
|
||||
};
|
||||
};
|
||||
|
||||
// Keep within ranges
|
||||
infantry_weight = 0 max (infantry_weight min 100);
|
||||
armor_weight = 0 max (armor_weight min 100);
|
||||
air_weight = 0 max (air_weight min 100);
|
||||
};
|
||||
|
||||
// Player was killed
|
||||
if (isPlayer _unit) then {
|
||||
stats_player_deaths = stats_player_deaths + 1;
|
||||
// Disconnect UAV from player on death
|
||||
_unit connectTerminalToUAV objNull;
|
||||
// Eject Player from vehicle
|
||||
if (vehicle _unit != _unit) then {moveOut _unit;};
|
||||
};
|
||||
|
||||
// Check for Man or Vehicle
|
||||
if (_unit isKindOf "Man") then {
|
||||
|
||||
// OPFOR casualty
|
||||
if (side (group _unit) == GRLIB_side_enemy) then {
|
||||
// Killed by BLUFOR
|
||||
if (side _killer == GRLIB_side_friendly) then {
|
||||
stats_opfor_soldiers_killed = stats_opfor_soldiers_killed + 1;
|
||||
};
|
||||
|
||||
// Killed by a player
|
||||
if (isplayer _killer) then {
|
||||
stats_opfor_killed_by_players = stats_opfor_killed_by_players + 1;
|
||||
};
|
||||
};
|
||||
|
||||
// BLUFOR casualty
|
||||
if (side (group _unit) == GRLIB_side_friendly) then {
|
||||
stats_blufor_soldiers_killed = stats_blufor_soldiers_killed + 1;
|
||||
|
||||
// Killed by BLUFOR
|
||||
if (side _killer == GRLIB_side_friendly) then {
|
||||
stats_blufor_teamkills = stats_blufor_teamkills + 1;
|
||||
};
|
||||
};
|
||||
|
||||
// Resistance casualty
|
||||
if (side (group _unit) == GRLIB_side_resistance) then {
|
||||
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength - 1;
|
||||
stats_resistance_killed = stats_resistance_killed + 1;
|
||||
|
||||
// Resistance is friendly to BLUFOR
|
||||
if ((GRLIB_side_friendly getFriend GRLIB_side_resistance) >= 0.6) then {
|
||||
|
||||
// Killed by BLUFOR
|
||||
if (side _killer == GRLIB_side_friendly) then {
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Guerilla unit killed by: %1", name _killer], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
[3, [(name _unit)]] remoteExec ["KPLIB_fnc_crGlobalMsg"];
|
||||
stats_resistance_teamkills = stats_resistance_teamkills + 1;
|
||||
[KP_liberation_cr_resistance_penalty, true] spawn F_cr_changeCR;
|
||||
};
|
||||
|
||||
// Killed by a player
|
||||
if (isplayer _killer) then {
|
||||
stats_resistance_teamkills_by_players = stats_resistance_teamkills_by_players + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Civilian casualty
|
||||
if (side (group _unit) == GRLIB_side_civilian) then {
|
||||
stats_civilians_killed = stats_civilians_killed + 1;
|
||||
|
||||
// Killed by BLUFOR
|
||||
if (side _killer == GRLIB_side_friendly) then {
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["Civilian killed by: %1", name _killer], "CIVREP"] call KPLIB_fnc_log;};
|
||||
[2, [(name _unit)]] remoteExec ["KPLIB_fnc_crGlobalMsg"];
|
||||
[KP_liberation_cr_kill_penalty, true] spawn F_cr_changeCR;
|
||||
};
|
||||
|
||||
// Killed by a player
|
||||
if (isPlayer _killer) then {
|
||||
stats_civilians_killed_by_players = stats_civilians_killed_by_players + 1;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Enemy vehicle casualty
|
||||
if ((toLower (typeof _unit)) in KPLIB_o_allVeh_classes) then {
|
||||
stats_opfor_vehicles_killed = stats_opfor_vehicles_killed + 1;
|
||||
|
||||
// Destroyed by player
|
||||
if (isplayer _killer) then {
|
||||
stats_opfor_vehicles_killed_by_players = stats_opfor_vehicles_killed_by_players + 1;
|
||||
};
|
||||
} else {
|
||||
// Civilian vehicle casualty
|
||||
if (typeOf _unit in civilian_vehicles) then {
|
||||
stats_civilian_vehicles_killed = stats_civilian_vehicles_killed + 1;
|
||||
|
||||
// Destroyed by player
|
||||
if (isplayer _killer) then {
|
||||
stats_civilian_vehicles_killed_by_players = stats_civilian_vehicles_killed_by_players + 1;
|
||||
};
|
||||
} else {
|
||||
// It has to be a BLUFOR vehicle then
|
||||
stats_blufor_vehicles_killed = stats_blufor_vehicles_killed + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Get Killer and send it to server, when ACE enabled, via lastDamageSource
|
||||
if (KP_liberation_ace && local _unit) then {
|
||||
if (KP_liberation_kill_debug > 0) then {[format ["_unit is local to: %1", debug_source], "KILL"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
KP_liberation_ace_killer = _unit getVariable ["ace_medical_lastDamageSource", _killer];
|
||||
publicVariable "KP_liberation_ace_killer";
|
||||
};
|
||||
};
|
||||
|
||||
// Body/Wreck deletion after cleanup delay
|
||||
if (isServer && !isplayer _unit) then {
|
||||
sleep GRLIB_cleanup_delay;
|
||||
hidebody _unit;
|
||||
sleep 10;
|
||||
deleteVehicle _unit;
|
||||
};
|
||||
Reference in New Issue
Block a user