Merge pull request #627 from KillahPotatoes/v0.96.5-Wyqer

Wyqer pt2
This commit is contained in:
Christian 2019-06-27 21:20:57 +02:00 committed by GitHub
commit 66fd935c65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 1988 additions and 2515 deletions

View File

@ -183,10 +183,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -224,10 +224,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -224,10 +224,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -265,10 +265,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -189,10 +189,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -224,10 +224,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -232,10 +232,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -207,10 +207,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -207,10 +207,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -434,10 +434,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -201,10 +201,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -291,10 +291,6 @@ class Mission
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
rainForced=1;
lightningsForced=1;
wavesForced=1;
windForced=1;
year=2038;
month=6;
day=6;

View File

@ -22,7 +22,9 @@ if (!isDedicated && !hasInterface && isMultiplayer) then {
};
if (!isDedicated && hasInterface) then {
waitUntil {alive player};
execVM "scripts\client\markers\sector_manager.sqf";
execVM "scripts\client\markers\fob_markers.sqf";
waitUntil {alive player};
if (debug_source != name player) then {debug_source = name player};
[] call compileFinal preprocessFileLineNumbers "scripts\client\init_client.sqf";
} else {

View File

@ -3,13 +3,23 @@ Format = [Array of classnames as strings, Code to apply]
_this is the reference to the object with the classname */
KPLIB_objectInits = [
// Set KP logo on white flag
[["Flag_White_F"], {_this setFlagTexture "res\kpflag.jpg";}],
// Add helipads to zeus, as they can't be recycled after built
[["Land_HelipadSquare_F", "Land_HelipadCircle_F", "Land_HelipadRescue_F"], {{[_x, [[_this], true]] remoteExecCall ["addCuratorEditableObjects", 2]} forEach allCurators;}],
// Add ViV action to FOB box
[[FOB_box_typename], {_this call F_setFobMass; [_this] remoteExecCall ["F_setLoadableViV", 0, _this];}],
[[KP_liberation_recycle_building], {_this setVariable ["ace_isRepairFacility", 1, true];}],
// Add storage type variable to built storage areas (only for FOB built/loaded ones)
[[KP_liberation_small_storage_building, KP_liberation_large_storage_building], {_this setVariable ["KP_liberation_storage_type", 0, true];}],
// Add ACE variables to corresponding building types
[[KP_liberation_recycle_building], {_this setVariable ["ace_isRepairFacility", 1, true];}],
[KP_liberation_medical_facilities, {_this setVariable ["ace_medical_isMedicalFacility", true, true];}],
[KP_liberation_medical_vehicles, {_this setVariable ["ace_medical_medicClass", 1, true];}],
// Hide Cover on big GM trucks
[["gm_ge_army_kat1_454_cargo", "gm_ge_army_kat1_454_cargo_win"], {_this animateSource ["cover_unhide", 0, true];}]
];

View File

@ -31,7 +31,7 @@ KP_liberation_truck_classname = "rhsusf_M977A4_BKIT_usarmy_d"; // T
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.

View File

@ -31,7 +31,7 @@ KP_liberation_truck_classname = "rhsusf_M977A4_BKIT_usarmy_wd"; // T
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.

View File

@ -29,7 +29,7 @@ KP_liberation_truck_classname = "B_T_Truck_01_transport_F"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_green_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -187,7 +187,8 @@ static_vehicles = [
["B_T_Static_AT_F",50,100,0], // Static Titan Launcher (AT)
["B_T_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
["RHS_M119_WD",100,200,0], // M119A2
["B_SAM_System_03_F",250,500,0] // MIM-145 Defender
];
buildings = [

View File

@ -28,7 +28,7 @@ KP_liberation_truck_classname = "rhsusf_M977A4_BKIT_usarmy_wd"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -152,7 +152,8 @@ static_vehicles = [
["RHS_TOW_TriPod_WD",50,100,0], // TOW (AT)
["RHS_Stinger_AA_pod_WD",50,100,0], // Stinger (AA)
["RHS_M252_WD",80,150,0], // Mk6 Mortar
["RHS_M119_WD",100,200,0] // M119A2
["RHS_M119_WD",100,200,0], // M119A2
["B_SAM_System_03_F",250,500,0] // MIM-145 Defender
];
buildings = [

View File

@ -28,7 +28,7 @@ KP_liberation_truck_classname = "rhsusf_M977A4_BKIT_usarmy_d"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -153,7 +153,8 @@ static_vehicles = [
["RHS_TOW_TriPod_D",50,100,0], // TOW (AT)
["RHS_Stinger_AA_pod_D",50,100,0], // Stinger (AA)
["RHS_M252_D",80,150,0], // Mk6 Mortar
["RHS_M119_D",100,200,0] // M119A2
["RHS_M119_D",100,200,0], // M119A2
["B_SAM_System_03_F",250,500,0] // MIM-145 Defender
];
buildings = [

View File

@ -26,7 +26,7 @@ KP_liberation_truck_classname = "O_Truck_03_transport_F"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "O_Radar_System_02_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -116,8 +116,7 @@ static_vehicles = [
["O_static_AT_F",50,100,0], // Static Titan Launcher (AT)
["O_static_AA_F",50,100,0], // Static Titan Launcher (AA)
["O_Mortar_01_F",80,150,0], // Mk6 Mortar
["O_Radar_System_02_F",100,0,0], // Air Radar
["O_SAM_System_04_F",100,200,0] // SAM Rhea
["O_SAM_System_04_F",250,500,0] // S-750 Rhea
];
buildings = [

View File

@ -26,7 +26,7 @@ KP_liberation_truck_classname = "O_T_Truck_03_covered_ghex_F"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_green_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "O_Radar_System_02_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -88,7 +88,7 @@ heavy_vehicles = [
["O_T_APC_Wheeled_02_rcws_v2_ghex_F",200,150,150], // Otokar
["O_T_APC_Tracked_02_cannon_ghex_F",200,200,150], // Stalker
["O_T_APC_Tracked_02_AA_ghex_F",300,250,175], // Tigris
["O_T_MBT_02_cannon_ghex_F"500,400,250], // T-100
["O_T_MBT_02_cannon_ghex_F",500,400,250], // T-100
["O_T_MBT_04_cannon_F",550,450,250], // T-14
["O_T_MBT_04_command_F",550,500,250], // T-14K
["O_T_MBT_02_arty_ghex_F",600,1250,300] // Sochor
@ -122,8 +122,7 @@ static_vehicles = [
["O_static_AT_F",50,100,0], // Static Titan Launcher (AT)
["O_static_AA_F",50,100,0], // Static Titan Launcher (AA)
["O_Mortar_01_F",80,150,0], // Mk6 Mortar
["O_Radar_System_02_F",100,0,0], // Air Radar
["O_SAM_System_04_F",100,200,0] // SAM Rhea
["O_SAM_System_04_F",250,500,0] // S-750 Rhea
];
buildings = [

View File

@ -29,7 +29,7 @@ KP_liberation_truck_classname = "B_Truck_01_transport_F"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -200,7 +200,8 @@ static_vehicles = [
["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
["RHS_M119_WD",100,200,0], // M119A2
["B_SAM_System_03_F",250,500,0] // MIM-145 Defender
];
buildings = [

View File

@ -27,7 +27,7 @@ KP_liberation_truck_classname = "rhsusf_M977A4_BKIT_usarmy_d"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -149,7 +149,8 @@ static_vehicles = [
["RHS_TOW_TriPod_D",50,100,0], // TOW (AT)
["RHS_Stinger_AA_pod_D",50,100,0], // Stinger (AA)
["RHS_M252_D",80,150,0], // Mk6 Mortar
["RHS_M119_D",100,200,0] // M119A2
["RHS_M119_D",100,200,0], // M119A2
["B_SAM_System_03_F",250,500,0] // MIM-145 Defender
];
buildings = [

View File

@ -27,7 +27,7 @@ KP_liberation_truck_classname = "rhsusf_M977A4_BKIT_usarmy_wd"; // These
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
KP_liberation_recycle_building = "Land_RepairDepot_01_tan_F"; // The building defined to unlock FOB recycling functionality.
KP_liberation_air_vehicle_building = "Land_Radar_Small_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_air_vehicle_building = "B_Radar_System_01_F"; // The building defined to unlock FOB air vehicle functionality.
KP_liberation_heli_slot_building = "Land_HelipadSquare_F"; // The helipad used to increase the GLOBAL rotary-wing cap.
KP_liberation_plane_slot_building = "Land_TentHangar_V1_F"; // The hangar used to increase the GLOBAL fixed-wing cap.
KP_liberation_supply_crate = "CargoNet_01_box_F"; // This defines the supply crates, as in resources.
@ -148,7 +148,8 @@ static_vehicles = [
["RHS_TOW_TriPod_WD",50,100,0], // TOW (AT)
["RHS_Stinger_AA_pod_WD",50,100,0], // Stinger (AA)
["RHS_M252_WD",80,150,0], // Mk6 Mortar
["RHS_M119_WD",100,200,0] // M119A2
["RHS_M119_WD",100,200,0], // M119A2
["B_SAM_System_03_F",250,500,0] // MIM-145 Defender
];
buildings = [

View File

@ -162,8 +162,8 @@ opfor_squad_8_infkillers = [opfor_squad_leader,opfor_machinegunner,opfor_machine
opfor_squad_8_tankkillers = [opfor_squad_leader,opfor_medic,opfor_machinegunner,opfor_rpg,opfor_rpg,opfor_at,opfor_at,opfor_at];
opfor_squad_8_airkillers = [opfor_squad_leader,opfor_medic,opfor_machinegunner,opfor_rpg,opfor_rpg,opfor_aa,opfor_aa,opfor_aa];
friendly_infantry_classnames = [];
{if (!(_x in friendly_infantry_classnames)) then {friendly_infantry_classnames pushBack _x};} forEach (blufor_squad_inf_light + blufor_squad_inf + blufor_squad_at + blufor_squad_aa + blufor_squad_recon + blufor_squad_para);
{if (!((_x select 0) in friendly_infantry_classnames)) then {friendly_infantry_classnames pushBack (_x select 0)};} forEach infantry_units;
{friendly_infantry_classnames pushBackUnique _x;} forEach (blufor_squad_inf_light + blufor_squad_inf + blufor_squad_at + blufor_squad_aa + blufor_squad_recon + blufor_squad_para);
{friendly_infantry_classnames pushBackUnique (_x select 0);} forEach infantry_units;
all_hostile_classnames = (land_vehicles_classnames + opfor_air + opfor_choppers + opfor_troup_transports + opfor_vehicles_low_intensity);
{land_vehicles_classnames pushback (_x select 0);} foreach (heavy_vehicles + light_vehicles);
air_vehicles_classnames = [] + opfor_choppers;

View File

@ -99,7 +99,7 @@ opfor_battlegroup_vehicles = [
"uns_Type55_RR57", // Type 55 APC (57mm Type36)
"uns_Type55_RR57", // Type 55 APC (57mm Type36)
"uns_nvatruck_open", // Ural Truck (Open)
"uns_nvatruck_mg" // Ural Truck (MG)
"uns_nvatruck_mg", // Ural Truck (MG)
"uns_Type63_mg", // Type63 APC (MG)
"uns_Type63_mg", // Type63 APC (MG)
"pook_ZSU57_NVA", // ZSU-57-2 (Sparka)
@ -116,7 +116,7 @@ opfor_battlegroup_vehicles = [
opfor_battlegroup_vehicles_low_intensity = [
"uns_Type55_patrol", // Type 55 APC (Patrol)
"uns_Type55_patrol", // Type 55 APC (Patrol)
"uns_nvatruck_mg" // Ural Truck (MG)
"uns_nvatruck_mg", // Ural Truck (MG)
"uns_Type63_mg", // Type63 APC (MG)
"uns_Type63_mg", // Type63 APC (MG)
"pook_ZSU57_NVA", // ZSU-57-2 (Sparka)
@ -128,7 +128,7 @@ If something in this array can't hold all 8 soldiers then buggy behaviours may o
opfor_troup_transports = [
"uns_nvatruck_open", // Ural Truck (Open)
"uns_nvatruck", // Ural Truck
"uns_nvatruck_mg" // Ural Truck (MG)
"uns_nvatruck_mg", // Ural Truck (MG)
"uns_Type63_mg", // Type63 APC (MG)
"uns_Mi8TV_VPAF_MG" // Mi-8TV Hip-C (Transport)
];

View File

@ -326,7 +326,7 @@ while { true } do {
[ _vehicle ] call F_forceBluforCrew;
};
_vehicle call F_addObjectInit;
[_vehicle] call F_addObjectInit;
sleep 0.3;
_vehicle allowDamage true;

View File

@ -3,16 +3,19 @@ params ["_vehicle"];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] checkVehicle called on: %1 - Vehicle: %2", debug_source, _vehicle];_text remoteExec ["diag_log",2];};
if (isNil "KP_liberation_cr_vehicles") then {
KP_liberation_cr_vehicles = [];
KP_liberation_cr_vehicles = [];
};
if (((typeOf _vehicle) in civilian_vehicles) && !(_vehicle in KP_liberation_cr_vehicles)) then {
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] Vehicle was stolen by: %1", debug_source];_text remoteExec ["diag_log",2];};
[0] remoteExec ["F_cr_globalMsg"];
[KP_liberation_cr_vehicle_penalty, true] remoteExec ["F_cr_changeCR", 2];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] Vehicle was stolen by: %1", debug_source];_text remoteExec ["diag_log",2];};
[0] remoteExec ["F_cr_globalMsg"];
[KP_liberation_cr_vehicle_penalty, true] remoteExec ["F_cr_changeCR", 2];
KP_liberation_cr_vehicles pushBack _vehicle;
publicVariable "KP_liberation_cr_vehicles";
KP_liberation_cr_vehicles pushBack _vehicle;
publicVariable "KP_liberation_cr_vehicles";
stats_civilian_vehicles_seized = stats_civilian_vehicles_seized + 1;
publicVariable "stats_civilian_vehicles_seized";
};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] checkVehicle finished on: %1 - Stolen vehicle list: %2", debug_source, KP_liberation_cr_vehicles];_text remoteExec ["diag_log",2];};

View File

@ -42,11 +42,9 @@ execVM "scripts\client\build\build_overlay.sqf";
execVM "scripts\client\build\do_build.sqf";
execVM "scripts\client\commander\enforce_whitelist.sqf";
if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\empty_vehicles_marker.sqf";};
execVM "scripts\client\markers\fob_markers.sqf";
if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\group_icons.sqf";};
execVM "scripts\client\markers\hostile_groups.sqf";
if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\huron_marker.sqf";} else {deleteMarkerLocal "huronmarker"};
execVM "scripts\client\markers\sector_manager.sqf";
execVM "scripts\client\markers\spot_timer.sqf";
execVM "scripts\client\misc\broadcast_squad_colors.sqf";
execVM "scripts\client\misc\disable_remote_sensors.sqf";

View File

@ -6,12 +6,14 @@ _cfg = configFile >> "cfgVehicles";
_vehtomark = [];
_support_to_skip = [
KP_liberation_supply_crate,
KP_liberation_ammo_crate,
KP_liberation_fuel_crate,
"B_Slingload_01_Repair_F",
"B_Slingload_01_Fuel_F",
"B_Slingload_01_Ammo_F"
KP_liberation_recycle_building,
KP_liberation_air_vehicle_building,
KP_liberation_supply_crate,
KP_liberation_ammo_crate,
KP_liberation_fuel_crate,
"B_Slingload_01_Repair_F",
"B_Slingload_01_Fuel_F",
"B_Slingload_01_Ammo_F"
];
{

View File

@ -1,47 +1,49 @@
private [ "_markers", "_markers_mobilespawns", "_marker", "_idx", "_respawn_trucks", "_markers_mobilespawns" ];
_markers = [];
_markers_mobilespawns = [];
waitUntil { !isNil "GRLIB_all_fobs" };
waitUntil {!isNil "save_is_loaded"};
waitUntil {!isNil "GRLIB_all_fobs"};
uiSleep 3;
while { true } do {
if ( count _markers != count GRLIB_all_fobs ) then {
{ deleteMarkerLocal _x } foreach _markers;
_markers = [];
for [ {_idx=0},{_idx < count GRLIB_all_fobs},{_idx=_idx+1}] do {
_marker = createMarkerLocal [format ["fobmarker%1",_idx], markers_reset];
_marker setMarkerTypeLocal "b_hq";
_marker setMarkerSizeLocal [ 1.5, 1.5 ];
_marker setMarkerPosLocal (GRLIB_all_fobs select _idx);
_marker setMarkerTextLocal format ["FOB %1",military_alphabet select _idx];
_marker setMarkerColorLocal "ColorYellow";
_markers pushback _marker;
};
};
private _markers = [];
private _markers_mobilespawns = [];
if (KP_liberation_mobilerespawn) then {
_respawn_trucks = call F_getMobileRespawns;
if ( count _markers_mobilespawns != count _respawn_trucks ) then {
{ deleteMarkerLocal _x; } foreach _markers_mobilespawns;
_markers_mobilespawns = [];
for [ {_idx=0} , {_idx < (count _respawn_trucks)} , {_idx=_idx+1} ] do {
_marker = createMarkerLocal [format ["mobilespawn%1",_idx], markers_reset];
_marker setMarkerTypeLocal "mil_end";
_marker setMarkerColorLocal "ColorYellow";
_markers_mobilespawns pushback _marker;
};
};
while {true} do {
if (count _markers != count GRLIB_all_fobs) then {
{deleteMarkerLocal _x;} forEach _markers;
_markers = [];
if ( count _respawn_trucks == count _markers_mobilespawns ) then {
for [ {_idx=0},{_idx < (count _markers_mobilespawns)},{_idx=_idx+1} ] do {
(_markers_mobilespawns select _idx) setMarkerPosLocal getpos (_respawn_trucks select _idx);
(_markers_mobilespawns select _idx) setMarkerTextLocal format ["%1 %2",localize "STR_RESPAWN_TRUCK",mapGridPosition (_respawn_trucks select _idx)];
};
};
};
for "_idx" from 0 to ((count GRLIB_all_fobs) - 1) do {
private _marker = createMarkerLocal [format ["fobmarker%1", _idx], markers_reset];
_marker setMarkerTypeLocal "b_hq";
_marker setMarkerSizeLocal [1.5, 1.5];
_marker setMarkerPosLocal (GRLIB_all_fobs select _idx);
_marker setMarkerTextLocal format ["FOB %1",military_alphabet select _idx];
_marker setMarkerColorLocal "ColorYellow";
_markers pushback _marker;
};
};
sleep 5.12;
if (KP_liberation_mobilerespawn) then {
private _respawn_trucks = [] call F_getMobileRespawns;
if (count _markers_mobilespawns != count _respawn_trucks) then {
{deleteMarkerLocal _x;} forEach _markers_mobilespawns;
_markers_mobilespawns = [];
for "_idx" from 0 to ((count _respawn_trucks) - 1) do {
_marker = createMarkerLocal [format ["mobilespawn%1", _idx], markers_reset];
_marker setMarkerTypeLocal "mil_end";
_marker setMarkerColorLocal "ColorYellow";
_markers_mobilespawns pushback _marker;
};
};
if (count _respawn_trucks == count _markers_mobilespawns) then {
for "_idx" from 0 to ((count _markers_mobilespawns) - 1) do {
(_markers_mobilespawns select _idx) setMarkerPosLocal getPos (_respawn_trucks select _idx);
(_markers_mobilespawns select _idx) setMarkerTextLocal format ["%1 %2", localize "STR_RESPAWN_TRUCK", mapGridPosition (_respawn_trucks select _idx)];
};
};
};
sleep 5;
};

View File

@ -1,42 +1,35 @@
private [ "_sector_count", "_vehicle_unlock_markers", "_marker", "_nextbase", "_nextvehicle", "_cfg", "_nextmarker" ];
waitUntil {!isNil "save_is_loaded"};
waitUntil {!isNil "GRLIB_vehicle_to_military_base_links"};
waitUntil {!isNil "blufor_sectors"};
waitUntil { !isNil "sectors_allSectors" };
waitUntil { !isNil "save_is_loaded" };
waitUntil { !isNil "blufor_sectors" };
_vehicle_unlock_markers = [];
_cfg = configFile >> "cfgVehicles";
private _vehicle_unlock_markers = [];
private _cfg = configFile >> "cfgVehicles";
{
_nextvehicle = _x select 0;
_nextbase = _x select 1;
_marker = createMarkerLocal [format ["vehicleunlockmarker%1",_nextbase], [ markerpos _nextbase select 0, (markerpos _nextbase select 1) + 125]];
_marker setMarkerTextLocal ( getText (_cfg >> _nextvehicle >> "displayName") );
_marker setMarkerColorLocal GRLIB_color_enemy;
_marker setMarkerTypeLocal "mil_pickup";
_vehicle_unlock_markers pushback [ _marker, _nextbase ];
} foreach GRLIB_vehicle_to_military_base_links;
_x params ["_vehicle", "_base"];
private _marker = createMarkerLocal [format ["vehicleunlockmarker%1", _base], [(markerpos _base) select 0, ((markerpos _base) select 1) + 125]];
_marker setMarkerTextLocal (getText (_cfg >> _vehicle >> "displayName"));
_marker setMarkerColorLocal GRLIB_color_enemy;
_marker setMarkerTypeLocal "mil_pickup";
_vehicle_unlock_markers pushback [_marker, _base];
} forEach GRLIB_vehicle_to_military_base_links;
_sector_count = -1;
private _sector_count = -1;
uiSleep 1;
while { true } do {
waitUntil {
uiSleep 1;
count blufor_sectors != _sector_count
};
while {true} do {
waitUntil {
uiSleep 1;
count blufor_sectors != _sector_count
};
{ _x setMarkerColorLocal GRLIB_color_enemy; } foreach (sectors_allSectors - blufor_sectors);
{ _x setMarkerColorLocal GRLIB_color_friendly; } foreach blufor_sectors;
{_x setMarkerColorLocal GRLIB_color_enemy;} forEach (sectors_allSectors - blufor_sectors);
{_x setMarkerColorLocal GRLIB_color_friendly;} forEach blufor_sectors;
{
_nextmarker = _x;
(_nextmarker select 0) setMarkerColorLocal GRLIB_color_enemy;
{
if ( _x == (_nextmarker select 1) ) exitWith { (_nextmarker select 0) setMarkerColorLocal GRLIB_color_friendly; };
} foreach blufor_sectors;
} foreach _vehicle_unlock_markers;
_sector_count = count blufor_sectors;
};
{
_x params ["_marker", "_base"];
_marker setMarkerColorLocal ([GRLIB_color_enemy, GRLIB_color_friendly] select (_base in blufor_sectors));
} forEach _vehicle_unlock_markers;
_sector_count = count blufor_sectors;
};

View File

@ -17,8 +17,6 @@ stats_spartan_respawns = publicstats select 13;
stats_secondary_objectives = publicstats select 14;
stats_hostile_battlegroups = publicstats select 15;
stats_ieds_detonated = publicstats select 16;
stats_saves_performed = publicstats select 17;
stats_saves_loaded = publicstats select 18;
stats_reinforcements_called = publicstats select 19;
stats_prisonners_captured = publicstats select 20;
stats_blufor_teamkills = publicstats select 21;
@ -33,4 +31,4 @@ stats_readiness_earned = publicstats select 27;
GRLIB_endgame = 1;
sleep 20;
[] call compileFinal preprocessFileLineNumbers "scripts\client\ui\end_screen.sqf";
[] call compileFinal preprocessFileLineNumbers "scripts\client\ui\end_screen.sqf";

View File

@ -18,5 +18,5 @@ while { true } do {
if ( combat_readiness > 100.0 && GRLIB_difficulty_modifier < 2 ) then { combat_readiness = 100.0 };
sleep (45 + random (45));
};
sleep (180 + random (180));
};

View File

@ -8,27 +8,16 @@ if (_negative) then {
KP_liberation_civ_rep = KP_liberation_civ_rep + _amount;
};
if (KP_liberation_civ_rep < -100) then {KP_liberation_civ_rep = -100;};
if (KP_liberation_civ_rep > 100) then {KP_liberation_civ_rep = 100;};
KP_liberation_civ_rep = -100 max (KP_liberation_civ_rep min 100);
if (KP_liberation_civ_rep <= -25) then {
GRLIB_side_resistance setFriend [GRLIB_side_enemy, 1];
GRLIB_side_enemy setFriend [GRLIB_side_resistance, 1];
GRLIB_side_resistance setFriend [GRLIB_side_friendly, 0];
GRLIB_side_friendly setFriend [GRLIB_side_resistance, 0];
};
if (KP_liberation_civ_rep > -25 && KP_liberation_civ_rep < 25) then {
GRLIB_side_resistance setFriend [GRLIB_side_enemy, 1];
GRLIB_side_enemy setFriend [GRLIB_side_resistance, 1];
GRLIB_side_resistance setFriend [GRLIB_side_friendly, 1];
GRLIB_side_friendly setFriend [GRLIB_side_resistance, 1];
};
if (KP_liberation_civ_rep >= 25) then {
GRLIB_side_resistance setFriend [GRLIB_side_friendly, 1];
GRLIB_side_friendly setFriend [GRLIB_side_resistance, 1];
GRLIB_side_resistance setFriend [GRLIB_side_enemy, 0];
GRLIB_side_enemy setFriend [GRLIB_side_resistance, 0];
};
// Set correct resistance standing
private _resistanceEnemy = [0, 1] select (KP_liberation_civ_rep < 25);
private _resistanceFriendly = [0, 1] select (KP_liberation_civ_rep >= -25);
GRLIB_side_resistance setFriend [GRLIB_side_enemy, _resistanceEnemy];
GRLIB_side_enemy setFriend [GRLIB_side_resistance, _resistanceEnemy];
GRLIB_side_resistance setFriend [GRLIB_side_friendly, _resistanceFriendly];
GRLIB_side_friendly setFriend [GRLIB_side_resistance, _resistanceFriendly];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] changeCR finished on: %1 - New value: %2", debug_source, KP_liberation_civ_rep];_text remoteExec ["diag_log",2];};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] %1 getFriend %2: %3 - %1 getFriend %4: %5", GRLIB_side_resistance, GRLIB_side_enemy, (GRLIB_side_resistance getFriend GRLIB_side_enemy), GRLIB_side_friendly, (GRLIB_side_resistance getFriend GRLIB_side_friendly)];_text remoteExec ["diag_log",2];};

View File

@ -4,11 +4,13 @@ if (_sector in sectors_bigtown || _sector in sectors_capture) then {
if (KP_liberation_civrep_debug > 0) then {diag_log format ["[KP LIBERATION] [CIVREP] liberatedSector called at: %1 - Sector: %2", time, markerText _sector];};
private _penalty = 0;
{
if (_sector == (_x select 0)) exitWith {_penalty = (_x select 1) - ([_sector] call F_cr_getBuildings)};
} forEach KP_liberation_cr_sectorbuildings;
stats_civilian_buildings_destroyed = stats_civilian_buildings_destroyed + _penalty;
_penalty = _penalty * KP_liberation_cr_building_penalty;
if (_penalty > 0) then {

View File

@ -48,6 +48,7 @@ while {_units_near > 0} do {
[4, [(name _civ)]] remoteExec ["F_cr_globalMsg"];
[KP_liberation_cr_wounded_gain] call F_cr_changeCR;
_healed_civs pushBack _civ;
stats_civilians_healed = stats_civilians_healed +1;
}
} forEach _civs;
sleep 1;

View File

@ -1,22 +0,0 @@
waitUntil { !(isNil "GRLIB_player_scores") };
waitUntil { !isNil "save_is_loaded" };
while { true } do {
{
if ( ( _x getVariable [ "GRLIB_score_set", 0 ] ) == 0 ) then {
_x setVariable [ "GRLIB_score_set", 1, false ];
private [ "_nextplayer" ];
_nextplayer = _x;
{
if ( (getPlayerUID _nextplayer) == (_x select 0) ) exitWith {
_nextplayer addScore ((_x select 1) - (score _nextplayer));
};
} foreach GRLIB_player_scores;
};
} foreach allPlayers;
sleep 15;
};

View File

@ -2,45 +2,80 @@ sleep 5;
_blufor_bigtowns = blufor_sectors select {_x in sectors_bigtown};
if ( count _blufor_bigtowns == count sectors_bigtown ) then {
GRLIB_endgame = 1;
publicVariable "GRLIB_endgame";
{ _x allowDamage false; (vehicle _x) allowDamage false; } foreach allPlayers;
if (count _blufor_bigtowns == count sectors_bigtown) then {
GRLIB_endgame = 1;
publicVariable "GRLIB_endgame";
{_x allowDamage false; (vehicle _x) allowDamage false;} forEach allPlayers;
publicstats = [];
publicstats pushback stats_opfor_soldiers_killed;
publicstats pushback stats_opfor_killed_by_players;
publicstats pushback stats_blufor_soldiers_killed;
publicstats pushback stats_player_deaths;
publicstats pushback stats_opfor_vehicles_killed;
publicstats pushback stats_opfor_vehicles_killed_by_players;
publicstats pushback stats_blufor_vehicles_killed;
publicstats pushback stats_blufor_soldiers_recruited;
publicstats pushback stats_blufor_vehicles_built;
publicstats pushback stats_civilians_killed;
publicstats pushback stats_civilians_killed_by_players;
publicstats pushback stats_sectors_liberated;
publicstats pushback stats_playtime;
publicstats pushback stats_spartan_respawns;
publicstats pushback stats_secondary_objectives;
publicstats pushback stats_hostile_battlegroups;
publicstats pushback stats_ieds_detonated;
publicstats pushback stats_saves_performed;
publicstats pushback stats_saves_loaded;
publicstats pushback stats_reinforcements_called;
publicstats pushback stats_prisonners_captured;
publicstats pushback stats_blufor_teamkills;
publicstats pushback stats_vehicles_recycled;
publicstats pushback stats_ammo_spent;
publicstats pushback stats_sectors_lost;
publicstats pushback stats_fobs_built;
publicstats pushback stats_fobs_lost;
publicstats pushback (round stats_readiness_earned);
publicstats = [];
publicstats pushback stats_opfor_soldiers_killed;
publicstats pushback stats_opfor_killed_by_players;
publicstats pushback stats_blufor_soldiers_killed;
publicstats pushback stats_player_deaths;
publicstats pushback stats_opfor_vehicles_killed;
publicstats pushback stats_opfor_vehicles_killed_by_players;
publicstats pushback stats_blufor_vehicles_killed;
publicstats pushback stats_blufor_soldiers_recruited;
publicstats pushback stats_blufor_vehicles_built;
publicstats pushback stats_civilians_killed;
publicstats pushback stats_civilians_killed_by_players;
publicstats pushback stats_sectors_liberated;
publicstats pushback stats_playtime;
publicstats pushback stats_spartan_respawns;
publicstats pushback stats_secondary_objectives;
publicstats pushback stats_hostile_battlegroups;
publicstats pushback stats_ieds_detonated;
publicstats pushback stats_reinforcements_called;
publicstats pushback stats_prisonners_captured;
publicstats pushback stats_blufor_teamkills;
publicstats pushback stats_vehicles_recycled;
publicstats pushback stats_ammo_spent;
publicstats pushback stats_sectors_lost;
publicstats pushback stats_fobs_built;
publicstats pushback stats_fobs_lost;
publicstats pushback (round stats_readiness_earned);
[publicstats] remoteExec ["remote_call_endgame"];
[publicstats] remoteExec ["remote_call_endgame"];
sleep 20;
private _playtime_days = floor (stats_playtime / 86400);
private _playtime_hours = floor ((stats_playtime % 86400) / 3600);
private _playtime_minutes = floor ((stats_playtime % 3600) / 60);
private _playtime_seconds = stats_playtime % 60;
{ if ( !(isPlayer _x)) then { deleteVehicle _x } } foreach allUnits;
diag_log text "[KP LIBERATION] [MISSION END] ------------------------------------";
diag_log text format ["[KP LIBERATION] [MISSION END] Playtime: %1 days, %2 hours, %3 minutes, %4 seconds", _playtime_days, _playtime_hours, _playtime_minutes, _playtime_seconds];
diag_log text format ["[KP LIBERATION] [MISSION END] OPFOR infantry killed: %1", stats_opfor_soldiers_killed];
diag_log text format ["[KP LIBERATION] [MISSION END] OPFOR infantry killed by players: %1", stats_opfor_killed_by_players];
diag_log text format ["[KP LIBERATION] [MISSION END] OPFOR vehicles destroyed: %1", stats_opfor_vehicles_killed];
diag_log text format ["[KP LIBERATION] [MISSION END] OPFOR vehicles destroyed by players: %1", stats_opfor_vehicles_killed_by_players];
diag_log text format ["[KP LIBERATION] [MISSION END] BLUFOR infantry killed: %1", stats_blufor_soldiers_killed];
diag_log text format ["[KP LIBERATION] [MISSION END] Player deaths: %1", stats_player_deaths];
diag_log text format ["[KP LIBERATION] [MISSION END] BLUFOR friendly fire incidents: %1", stats_blufor_teamkills];
diag_log text format ["[KP LIBERATION] [MISSION END] BLUFOR soldiers recruited: %1", stats_blufor_soldiers_recruited];
diag_log text format ["[KP LIBERATION] [MISSION END] Civilians killed: %1", stats_civilians_killed];
diag_log text format ["[KP LIBERATION] [MISSION END] Civilians killed by players: %1", stats_civilians_killed_by_players];
diag_log text format ["[KP LIBERATION] [MISSION END] BLUFOR vehicles destroyed: %1", stats_blufor_vehicles_killed];
diag_log text format ["[KP LIBERATION] [MISSION END] BLUFOR vehicles built: %1", stats_blufor_vehicles_built];
diag_log text format ["[KP LIBERATION] [MISSION END] Vehicles recycled: %1", stats_vehicles_recycled];
diag_log text format ["[KP LIBERATION] [MISSION END] Ammunition units spent: %1", stats_ammo_spent];
diag_log text format ["[KP LIBERATION] [MISSION END] Sectors liberated: %1", stats_sectors_liberated];
diag_log text format ["[KP LIBERATION] [MISSION END] Sectors lost: %1", stats_sectors_lost];
diag_log text format ["[KP LIBERATION] [MISSION END] FOBs built: %1", stats_fobs_built];
diag_log text format ["[KP LIBERATION] [MISSION END] FOBs lost: %1", stats_fobs_lost];
diag_log text format ["[KP LIBERATION] [MISSION END] Secondary objectives accomplished: %1", stats_secondary_objectives];
diag_log text format ["[KP LIBERATION] [MISSION END] Prisonners captured: %1", stats_prisonners_captured];
diag_log text format ["[KP LIBERATION] [MISSION END] Hostile battlegroups called: %1", stats_hostile_battlegroups];
diag_log text format ["[KP LIBERATION] [MISSION END] Hostile reinforcements called: %1", stats_reinforcements_called];
diag_log text format ["[KP LIBERATION] [MISSION END] Total combat readiness raised: %1", round stats_readiness_earned];
diag_log text format ["[KP LIBERATION] [MISSION END] IEDs detonated: %1", stats_ieds_detonated];
diag_log text format ["[KP LIBERATION] [MISSION END] Number of Potato 01 losses: %1", stats_spartan_respawns];
diag_log text format ["[KP LIBERATION] [MISSION END] Rabbits killed: %1", round (random 69) + round (random 69)];
diag_log text format ["[KP LIBERATION] [MISSION END] Secondary objectives accomplished: %1", stats_secondary_objectives];
diag_log text format ["[KP LIBERATION] [MISSION END] Prisonners captured: %1", stats_prisonners_captured];
diag_log text "[KP LIBERATION] [MISSION END] ------------------------------------";
sleep 20;
{if !(isPlayer _x) then {deleteVehicle _x;}} forEach allUnits;
};

View File

@ -1,17 +1,18 @@
private [ "_weathers", "_weathertime" ];
private _weathers = [
[0.25],
[0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55],
[0, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1]
] select (GRLIB_weather_param - 1);
_weathers = [0.4];
if ( GRLIB_weather_param == 2 ) then {
_weathers = [0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55];
private _newWeather = selectRandom _weathers;
0 setOvercast _newWeather;
forceWeatherChange;
diag_log format ["[KP LIBERATION] [WEATHER] Set initial weather to: %1 - Param Value: %2 - Time: %3", _newWeather, GRLIB_weather_param, diag_tickTime];
while {GRLIB_endgame == 0} do {
_newWeather = selectRandom _weathers;
3600 setOvercast _newWeather;
diag_log format ["[KP LIBERATION] [WEATHER] Set next weather transition to: %1 - Time: %2", _newWeather, diag_tickTime];
sleep 3000; // Slighty less than weather transition time, as sleep duration is depending on FPS
};
if ( GRLIB_weather_param == 3 ) then {
_weathers = [0,0.01,0.02,0.03,0.05,0.07,0.1,0.15,0.2,0.25,0.3,0.4,0.45,0.5,0.55,0.6,0.7,0.8,0.9,1.0];
};
_weathertime = 1800;
while { GRLIB_endgame == 0 } do {
chosen_weather = selectRandom _weathers;
publicVariable "chosen_weather";
sleep _weathertime;
};

View File

@ -2,5 +2,5 @@ _save_interval = 20;
while { GRLIB_endgame == 0 } do {
sleep _save_interval;
trigger_server_save = true;
};
doSaveTrigger = true;
};

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,6 @@ execVM "scripts\server\battlegroup\counter_battlegroup.sqf";
execVM "scripts\server\battlegroup\random_battlegroups.sqf";
execVM "scripts\server\battlegroup\readiness_increase.sqf";
execVM "scripts\server\game\apply_default_permissions.sqf";
execVM "scripts\server\game\apply_saved_scores.sqf";
execVM "scripts\server\game\capture_vehicles.sqf";
execVM "scripts\server\game\clean.sqf";
execVM "scripts\server\game\cleanup_vehicles.sqf";
@ -57,7 +56,6 @@ execVM "scripts\server\game\synchronise_vars.sqf";
execVM "scripts\server\game\synchronise_eco.sqf";
execVM "scripts\server\game\zeus_synchro.sqf";
execVM "scripts\server\offloading\offload_calculation.sqf";
//execVM "scripts\server\offloading\offload_manager.sqf";
execVM "scripts\server\offloading\show_fps.sqf";
execVM "scripts\server\patrols\civilian_patrols.sqf";
execVM "scripts\server\patrols\manage_patrols.sqf";

View File

@ -1,35 +0,0 @@
while {GRLIB_endgame == 0} do {
private _commander = [] call F_getCommander;
if !(isNull _commander) then {
private _blufor_ai_groups = [];
private _localgroup = grpNull;
private _is_ai_only = true;
{
if (side _x == GRLIB_side_friendly) then {
_localgroup = _x;
_is_ai_only = true;
{
if (isPlayer _x) exitWith {_is_ai_only = false;};
} foreach units _localgroup;
if (_is_ai_only) then {
_blufor_ai_groups pushback _localgroup;
};
};
} foreach (allGroups select {groupOwner _x != owner _commander});
if (count _blufor_ai_groups > 0) then {
{
if (((leader _x) distance startbase) > 500 && (groupOwner _x != owner _commander)) then {
_x setGroupOwner (owner _commander);
sleep 1;
};
} foreach _blufor_ai_groups;
};
};
sleep 15;
};

View File

@ -10,94 +10,98 @@ private _price_f = 100;
private _success = false;
switch (_fac) do {
case "supply": {_checkFor = 4;_price_s = 50};
case "ammo": {_checkFor = 5;_price_a = 50;};
case "fuel": {_checkFor = 6;_price_f = 50;};
case "supply": {_checkFor = 4;_price_s = 50};
case "ammo": {_checkFor = 5;_price_a = 50;};
case "fuel": {_checkFor = 6;_price_f = 50;};
};
{
if ((_x select 1) == (_sector select 1)) exitWith {
if (((_x select 9) >= _price_s) && ((_x select 10) >= _price_a) && ((_x select 11) >= _price_f)) then {
private _storage = nearestObjects [(markerPos (_x select 1)), [KP_liberation_small_storage_building], GRLIB_fob_range];
_storage = _storage select {(_x getVariable ["KP_liberation_storage_type",-1]) == 1};
if ((count _storage) == 0) exitWith {};
_storage = (_storage select 0);
private _storedCrates = (attachedObjects _storage);
reverse _storedCrates;
if ((_x select 1) == (_sector select 1)) exitWith {
if (((_x select 9) >= _price_s) && ((_x select 10) >= _price_a) && ((_x select 11) >= _price_f)) then {
stats_supplies_spent = stats_supplies_spent + _price_s;
stats_ammo_spent = stats_ammo_spent + _price_a;
stats_fuel_spent = stats_fuel_spent + _price_f;
{
private _crateValue = _x getVariable ["KP_liberation_crate_value",0];
private _storage = nearestObjects [(markerPos (_x select 1)), [KP_liberation_small_storage_building], GRLIB_fob_range];
_storage = _storage select {(_x getVariable ["KP_liberation_storage_type",-1]) == 1};
if ((count _storage) == 0) exitWith {};
_storage = (_storage select 0);
private _storedCrates = (attachedObjects _storage);
reverse _storedCrates;
switch ((typeOf _x)) do {
case KP_liberation_supply_crate: {
if (_price_s > 0) then {
if (_crateValue > _price_s) then {
_crateValue = _crateValue - _price_s;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_s = 0;
} else {
detach _x;
deleteVehicle _x;
_price_s = _price_s - _crateValue;
};
};
};
case KP_liberation_ammo_crate: {
if (_price_a > 0) then {
if (_crateValue > _price_a) then {
_crateValue = _crateValue - _price_a;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_a = 0;
} else {
detach _x;
deleteVehicle _x;
_price_a = _price_a - _crateValue;
};
};
};
case KP_liberation_fuel_crate: {
if (_price_f > 0) then {
if (_crateValue > _price_f) then {
_crateValue = _crateValue - _price_f;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_f = 0;
} else {
detach _x;
deleteVehicle _x;
_price_f = _price_f - _crateValue;
};
};
};
default {diag_log format ["[KP LIBERATION] [ERROR] Invalid object (%1) at storage area", (typeOf _x)];};
};
} forEach _storedCrates;
{
private _crateValue = _x getVariable ["KP_liberation_crate_value",0];
private _i = 0;
{
private _height = 0.6;
switch (typeOf _x) do {
case KP_liberation_supply_crate: {_height = 0.4;};
case KP_liberation_ammo_crate: {_height = 0.6;};
case KP_liberation_fuel_crate: {_height = 0.3;};
default {_height = 0.6;};
};
detach _x;
_x attachTo [_storage, [(KP_liberation_small_storage_positions select _i) select 0, (KP_liberation_small_storage_positions select _i) select 1, _height]];
_i = _i + 1;
} forEach (attachedObjects _storage);
switch ((typeOf _x)) do {
case KP_liberation_supply_crate: {
if (_price_s > 0) then {
if (_crateValue > _price_s) then {
_crateValue = _crateValue - _price_s;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_s = 0;
} else {
detach _x;
deleteVehicle _x;
_price_s = _price_s - _crateValue;
};
};
};
case KP_liberation_ammo_crate: {
if (_price_a > 0) then {
if (_crateValue > _price_a) then {
_crateValue = _crateValue - _price_a;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_a = 0;
} else {
detach _x;
deleteVehicle _x;
_price_a = _price_a - _crateValue;
};
};
};
case KP_liberation_fuel_crate: {
if (_price_f > 0) then {
if (_crateValue > _price_f) then {
_crateValue = _crateValue - _price_f;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_f = 0;
} else {
detach _x;
deleteVehicle _x;
_price_f = _price_f - _crateValue;
};
};
};
default {diag_log format ["[KP LIBERATION] [ERROR] Invalid object (%1) at storage area", (typeOf _x)];};
};
} forEach _storedCrates;
_x set [_checkFor, true];
private _hint = format [localize "STR_PRODUCTION_FACBUILD_SUCCESS"];
_hint remoteExec ["hint",_clientID];
_success = true;
} else {
private _hint = format [localize "STR_PRODUCTION_FACBUILD_ERROR",_price_s,_price_a,_price_f];
_hint remoteExec ["hint",_clientID];
};
};
private _i = 0;
{
private _height = 0.6;
switch (typeOf _x) do {
case KP_liberation_supply_crate: {_height = 0.4;};
case KP_liberation_ammo_crate: {_height = 0.6;};
case KP_liberation_fuel_crate: {_height = 0.3;};
default {_height = 0.6;};
};
detach _x;
_x attachTo [_storage, [(KP_liberation_small_storage_positions select _i) select 0, (KP_liberation_small_storage_positions select _i) select 1, _height]];
_i = _i + 1;
} forEach (attachedObjects _storage);
_x set [_checkFor, true];
private _hint = format [localize "STR_PRODUCTION_FACBUILD_SUCCESS"];
_hint remoteExec ["hint",_clientID];
_success = true;
} else {
private _hint = format [localize "STR_PRODUCTION_FACBUILD_ERROR",_price_s,_price_a,_price_f];
_hint remoteExec ["hint",_clientID];
};
};
} forEach _tempProduction;
if (_success) then {
KP_liberation_production = +_tempProduction;
recalculate_sectors = true;
KP_liberation_production = +_tempProduction;
recalculate_sectors = true;
};

View File

@ -14,7 +14,7 @@ if ( _create_fob_building ) then {
sleep 1;
};
trigger_server_save = true;
doSaveTrigger = true;
sleep 3;
[_new_fob, 0] remoteExec ["remote_call_fob"];

View File

@ -3,99 +3,99 @@ if (!isServer) exitWith {};
params ["_price_s", "_price_a", "_price_f", "_typename", "_localtype", "_storage_areas"];
if ((_price_s > 0) || (_price_a > 0) || (_price_f > 0)) then {
{
private _storage_positions = [];
private _storedCrates = (attachedObjects _x);
reverse _storedCrates;
{
_crateValue = _x getVariable ["KP_liberation_crate_value",0];
stats_supplies_spent = stats_supplies_spent + _price_s;
stats_ammo_spent = stats_ammo_spent + _price_a;
stats_fuel_spent = stats_fuel_spent + _price_f;
switch ((typeOf _x)) do {
case KP_liberation_supply_crate: {
if (_price_s > 0) then {
if (_crateValue > _price_s) then {
_crateValue = _crateValue - _price_s;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_s = 0;
} else {
detach _x;
deleteVehicle _x;
_price_s = _price_s - _crateValue;
};
};
};
case KP_liberation_ammo_crate: {
if (_price_a > 0) then {
if (_crateValue > _price_a) then {
_crateValue = _crateValue - _price_a;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_a = 0;
} else {
detach _x;
deleteVehicle _x;
_price_a = _price_a - _crateValue;
};
};
};
case KP_liberation_fuel_crate: {
if (_price_f > 0) then {
if (_crateValue > _price_f) then {
_crateValue = _crateValue - _price_f;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_f = 0;
} else {
detach _x;
deleteVehicle _x;
_price_f = _price_f - _crateValue;
};
};
};
default {diag_log format ["[KP LIBERATION] [ERROR] Invalid object (%1) at storage area", (typeOf _x)];};
};
} forEach _storedCrates;
switch (typeOf _x) do {
case KP_liberation_small_storage_building: {_storage_positions = KP_liberation_small_storage_positions;};
case KP_liberation_large_storage_building: {_storage_positions = KP_liberation_large_storage_positions;};
default {_storage_positions = KP_liberation_large_storage_positions;};
};
{
private _storage_positions = [];
private _storedCrates = (attachedObjects _x);
reverse _storedCrates;
private _area = _x;
_i = 0;
{
_height = 0.6;
switch (typeOf _x) do {
case KP_liberation_supply_crate: {_height = 0.4;};
case KP_liberation_ammo_crate: {_height = 0.6;};
case KP_liberation_fuel_crate: {_height = 0.3;};
default {_height = 0.6;};
};
detach _x;
_x attachTo [_area, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
_i = _i + 1;
} forEach attachedObjects (_x);
{
_crateValue = _x getVariable ["KP_liberation_crate_value",0];
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
} forEach _storage_areas;
switch ((typeOf _x)) do {
case KP_liberation_supply_crate: {
if (_price_s > 0) then {
if (_crateValue > _price_s) then {
_crateValue = _crateValue - _price_s;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_s = 0;
} else {
detach _x;
deleteVehicle _x;
_price_s = _price_s - _crateValue;
};
};
};
case KP_liberation_ammo_crate: {
if (_price_a > 0) then {
if (_crateValue > _price_a) then {
_crateValue = _crateValue - _price_a;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_a = 0;
} else {
detach _x;
deleteVehicle _x;
_price_a = _price_a - _crateValue;
};
};
};
case KP_liberation_fuel_crate: {
if (_price_f > 0) then {
if (_crateValue > _price_f) then {
_crateValue = _crateValue - _price_f;
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
_price_f = 0;
} else {
detach _x;
deleteVehicle _x;
_price_f = _price_f - _crateValue;
};
};
};
default {diag_log format ["[KP LIBERATION] [ERROR] Invalid object (%1) at storage area", (typeOf _x)];};
};
} forEach _storedCrates;
if ( _localtype == 8 ) then {
stats_blufor_soldiers_recruited = stats_blufor_soldiers_recruited + 10;
} else {
if ( _typename isKindOf "Man" ) then {
stats_blufor_soldiers_recruited = stats_blufor_soldiers_recruited + 1;
} else {
if ( ! ( _typename isKindOf "Building" ) ) then {
stats_blufor_vehicles_built = stats_blufor_vehicles_built + 1;
};
};
};
switch (typeOf _x) do {
case KP_liberation_small_storage_building: {_storage_positions = KP_liberation_small_storage_positions;};
case KP_liberation_large_storage_building: {_storage_positions = KP_liberation_large_storage_positions;};
default {_storage_positions = KP_liberation_large_storage_positions;};
};
stats_ammo_spent = stats_ammo_spent + _price_a;
private _area = _x;
_i = 0;
{
_height = 0.6;
switch (typeOf _x) do {
case KP_liberation_supply_crate: {_height = 0.4;};
case KP_liberation_ammo_crate: {_height = 0.6;};
case KP_liberation_fuel_crate: {_height = 0.3;};
default {_height = 0.6;};
};
detach _x;
_x attachTo [_area, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
_i = _i + 1;
} forEach attachedObjects (_x);
please_recalculate = true;
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
} forEach _storage_areas;
if ( _localtype == 8 ) then {
stats_blufor_soldiers_recruited = stats_blufor_soldiers_recruited + 10;
} else {
if ( _typename isKindOf "Man" ) then {
stats_blufor_soldiers_recruited = stats_blufor_soldiers_recruited + 1;
} else {
if ( ! ( _typename isKindOf "Building" ) ) then {
stats_blufor_vehicles_built = stats_blufor_vehicles_built + 1;
};
};
};
please_recalculate = true;
};

View File

@ -71,7 +71,7 @@ publicVariable "asymm_blocked_sectors";
sleep 1;
trigger_server_save = true;
doSaveTrigger = true;
sleep 45;

View File

@ -41,9 +41,9 @@ while {GRLIB_endgame == 0} do {
if (((count (attachedObjects _storage)) < 12) && !((_x select 7) == 3)) then {
private _crateType = KP_liberation_supply_crate;
switch (_x select 7) do {
case 1: {_crateType = KP_liberation_ammo_crate;};
case 2: {_crateType = KP_liberation_fuel_crate;};
default {_crateType = KP_liberation_supply_crate;};
case 1: {_crateType = KP_liberation_ammo_crate; stats_ammo_produced = stats_ammo_produced + 100;};
case 2: {_crateType = KP_liberation_fuel_crate; stats_fuel_produced = stats_fuel_produced + 100;};
default {_crateType = KP_liberation_supply_crate; stats_supplies_produced = stats_supplies_produced + 100;};
};
private _crate = [_crateType, 100, getPosATL _storage] call F_createCrate;

View File

@ -159,4 +159,4 @@ stats_secondary_objectives = stats_secondary_objectives + 1;
[5] remoteExec ["remote_call_intel"];
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
sleep 1;
trigger_server_save = true;
doSaveTrigger = true;

View File

@ -123,9 +123,9 @@ waitUntil {
combat_readiness = round (combat_readiness * GRLIB_secondary_objective_impact);
stats_secondary_objectives = stats_secondary_objectives + 1;
sleep 1;
trigger_server_save = true;
doSaveTrigger = true;
sleep 3;
[3] remoteExec ["remote_call_intel"];
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";

View File

@ -104,4 +104,4 @@ stats_secondary_objectives = stats_secondary_objectives + 1;
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
sleep 1;
trigger_server_save = true;
doSaveTrigger = true;

View File

@ -46,7 +46,7 @@ if ( GRLIB_endgame == 0 ) then {
publicVariable "GRLIB_all_fobs";
reset_battlegroups_ai = true;
[_thispos] call destroy_fob;
trigger_server_save = true;
doSaveTrigger = true;
stats_fobs_lost = stats_fobs_lost + 1;
} else {
[_thispos, 3] remoteExec ["remote_call_fob"];

View File

@ -49,7 +49,7 @@ if ( GRLIB_endgame == 0 ) then {
publicVariable "blufor_sectors";
[_sector, 2] remoteExec ["remote_call_sector"];
reset_battlegroups_ai = true;
trigger_server_save = true;
doSaveTrigger = true;
stats_sectors_lost = stats_sectors_lost + 1;
{
if (_sector in _x) exitWith {

View File

@ -20,12 +20,12 @@ params [["_object", objNull, [objNull]]];
private _elements = KPLIB_objectInits select {(toLower (typeOf _object)) in ((_x select 0) apply {toLower _x})};
if !(_elements isEqualTo []) exitWith {
{
_object call (_x select 1);
} forEach _elements;
true
if (_elements isEqualTo []) exitWith {
false
};
false
{
_object call (_x select 1);
} forEach _elements;
true

View File

@ -0,0 +1,31 @@
params [
["_supply", 0, [0]],
["_ammo", 0, [0]],
["_fuel", 0, [0]],
["_storage", objNull, [objNull]],
["_delay", false, [false]]
];
if (isNull _storage) exitWith {false};
private _crateType = KP_liberation_supply_crate;
private _amount = 0;
private _crate = objNull;
private _pos = getPos _storage;
{
_crateType = [KP_liberation_supply_crate, KP_liberation_ammo_crate, KP_liberation_fuel_crate] select _forEachIndex;
while {_x > 0} do {
_amount = 100;
if ((_x / 100) < 1) then {
_amount = _x;
};
_x = _x - _amount;
_crate = [_crateType, _amount, _pos] call F_createCrate;
if (_delay) then {sleep 0.1;};
[_crate, _storage] call F_crateToStorage;
};
} forEach [_supply, _ammo, _fuel];
true

View File

@ -32,35 +32,4 @@ private _fuel = 0;
sleep 0.5;
while {_supply > 0} do {
private _amount = 100;
if ((_supply / 100) < 1) then {
_amount = _supply;
};
_supply = _supply - _amount;
private _crate = [KP_liberation_supply_crate, _amount, _pos] call F_createCrate;
sleep 0.1;
[_crate, _storage] call F_crateToStorage;
};
while {_ammo > 0} do {
private _amount = 100;
if ((_ammo / 100) < 1) then {
_amount = _ammo;
};
_ammo = _ammo - _amount;
private _crate = [KP_liberation_ammo_crate, _amount, _pos] call F_createCrate;
sleep 0.1;
[_crate, _storage] call F_crateToStorage;
};
while {_fuel > 0} do {
private _amount = 100;
if ((_fuel / 100) < 1) then {
_amount = _fuel;
};
_fuel = _fuel - _amount;
private _crate = [KP_liberation_fuel_crate, _amount, _pos] call F_createCrate;
sleep 0.1;
[_crate, _storage] call F_crateToStorage;
};
[_supply, _ammo, _fuel, _storage, true] spawn F_fillStorage;

View File

@ -39,4 +39,3 @@ asymm_notifications = compileFinal preprocessFileLineNumbers "scripts\client\asy
execVM "scripts\shared\scan_skill.sqf";
execVM "scripts\shared\diagnostics.sqf";
execVM "scripts\shared\manage_weather.sqf";

View File

@ -2,132 +2,180 @@ params ["_unit", "_killer"];
if (isServer) then {
if (KP_liberation_kill_debug > 0) then {diag_log format ["[KP LIBERATION] [KILL] Kill Manager executed - _unit: %1 (%2) - _killer: %3 (%4)", typeOf _unit, _unit, typeOf _killer, _killer];};
if (KP_liberation_kill_debug > 0) then {diag_log format ["[KP LIBERATION] [KILL] Kill Manager executed - _unit: %1 (%2) - _killer: %3 (%4)", typeOf _unit, _unit, typeOf _killer, _killer];};
if (KP_liberation_ace) then {
if (local _unit) then {
_killer = _unit getVariable ["ace_medical_lastDamageSource", _killer];
if (KP_liberation_kill_debug > 0) then {diag_log format ["[KP LIBERATION] [KILL] _unit is local to %1", debug_source];};
} else {
if (KP_liberation_kill_debug > 0) then {diag_log format ["[KP LIBERATION] [KILL] _unit is not local to %1", debug_source];};
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 {diag_log format ["[KP LIBERATION] [KILL] KP_liberation_ace_killer received on %1", debug_source];};
_killer = KP_liberation_ace_killer;
KP_liberation_ace_killer = objNull;
publicVariable "KP_liberation_ace_killer";
};
};
// 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 {diag_log format ["[KP LIBERATION] [KILL] _unit is local to %1", debug_source];};
} else {
if (KP_liberation_kill_debug > 0) then {diag_log format ["[KP LIBERATION] [KILL] _unit is not local to %1", debug_source];};
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 {diag_log format ["[KP LIBERATION] [KILL] KP_liberation_ace_killer received on %1", debug_source];};
_killer = KP_liberation_ace_killer;
KP_liberation_ace_killer = objNull;
publicVariable "KP_liberation_ace_killer";
};
};
please_recalculate = true;
// 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};
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 {
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};
};
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 ((typeof (vehicle _killer)) in land_vehicles_classnames) then {
infantry_weight = infantry_weight - 0.66;
armor_weight = armor_weight + 1;
air_weight = air_weight - 0.66;
};
if ((typeof (vehicle _killer)) in air_vehicles_classnames) then {
infantry_weight = infantry_weight - 0.66;
armor_weight = armor_weight - 0.66;
air_weight = air_weight + 1;
};
};
if (_killer isKindOf "Man") then {
infantry_weight = infantry_weight + 1;
armor_weight = armor_weight - 0.66;
air_weight = air_weight - 0.66;
} else {
if ((typeof (vehicle _killer)) in land_vehicles_classnames) then {
infantry_weight = infantry_weight - 0.66;
armor_weight = armor_weight + 1;
air_weight = air_weight - 0.66;
};
if ((typeof (vehicle _killer)) in air_vehicles_classnames) 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);
};
if (infantry_weight > 100) then {infantry_weight = 100};
if (armor_weight > 100) then {armor_weight = 100};
if (air_weight > 100) then {air_weight = 100};
if (infantry_weight < 0) then {infantry_weight = 0};
if (armor_weight < 0) then {armor_weight = 0};
if (air_weight < 0) then {air_weight = 0};
};
// 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;};
};
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 {
if (_unit isKindOf "Man") then {
if (side (group _unit) == GRLIB_side_civilian) then {
stats_civilians_killed = stats_civilians_killed + 1;
if (side _killer == GRLIB_side_friendly) then {
if (KP_liberation_civrep_debug > 0) then {diag_log format ["[KP LIBERATION] [CIVREP] Civilian killed by: %1", name _killer];};
[2, [(name _unit)]] remoteExec ["F_cr_globalMsg"];
[KP_liberation_cr_kill_penalty, true] spawn F_cr_changeCR;
};
if (isPlayer _killer) then {
stats_civilians_killed_by_players = stats_civilians_killed_by_players + 1;
};
};
// 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;
};
if (side _killer == GRLIB_side_friendly) then {
if (side (group _unit) == GRLIB_side_enemy) then {
stats_opfor_soldiers_killed = stats_opfor_soldiers_killed + 1;
if (isplayer _killer) then {
stats_opfor_killed_by_players = stats_opfor_killed_by_players + 1;
};
};
// Killed by a player
if (isplayer _killer) then {
stats_opfor_killed_by_players = stats_opfor_killed_by_players + 1;
};
};
if (side (group _unit) == GRLIB_side_friendly) then {
stats_blufor_teamkills = stats_blufor_teamkills + 1;
stats_blufor_soldiers_killed = stats_blufor_soldiers_killed + 1;
};
};
// BLUFOR casualty
if (side (group _unit) == GRLIB_side_friendly) then {
stats_blufor_soldiers_killed = stats_blufor_soldiers_killed + 1;
if (side (group _unit) == GRLIB_side_resistance) then {
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength - 1;
if (((GRLIB_side_friendly getFriend GRLIB_side_resistance) >= 0.6) && (side _killer == GRLIB_side_friendly)) then {
if (KP_liberation_asymmetric_debug > 0) then {diag_log format ["[KP LIBERATION] [ASYMMETRIC] Guerilla unit killed by: %1", name _killer];};
[3, [(name _unit)]] remoteExec ["F_cr_globalMsg"];
[KP_liberation_cr_resistance_penalty, true] spawn F_cr_changeCR;
};
};
} else {
if (typeof _unit in all_hostile_classnames) then {
stats_opfor_vehicles_killed = stats_opfor_vehicles_killed + 1;
if (isplayer _killer) then {
stats_opfor_vehicles_killed_by_players = stats_opfor_vehicles_killed_by_players + 1;
};
} else {
stats_blufor_vehicles_killed = stats_blufor_vehicles_killed + 1;
};
};
// Killed by BLUFOR
if (side _killer == GRLIB_side_friendly) then {
stats_blufor_teamkills = stats_blufor_teamkills + 1;
};
// Killed by a player
if (isplayer _killer) then {
stats_blufor_teamkills_by_players = stats_blufor_teamkills_by_players + 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 {diag_log format ["[KP LIBERATION] [ASYMMETRIC] Guerilla unit killed by: %1", name _killer];};
[3, [(name _unit)]] remoteExec ["F_cr_globalMsg"];
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 {diag_log format ["[KP LIBERATION] [CIVREP] Civilian killed by: %1", name _killer];};
[2, [(name _unit)]] remoteExec ["F_cr_globalMsg"];
[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 (typeof _unit in all_hostile_classnames) 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 {
if (KP_liberation_ace && local _unit) then {
if (KP_liberation_kill_debug > 0) then {private _text = format ["[KP LIBERATION] [KILL] _unit is local to: %1", debug_source];_text remoteExec ["diag_log",2];};
KP_liberation_ace_killer = _unit getVariable ["ace_medical_lastDamageSource", _killer];
publicVariable "KP_liberation_ace_killer";
};
// 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 {private _text = format ["[KP LIBERATION] [KILL] _unit is local to: %1", debug_source];_text remoteExec ["diag_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 {
if (((typeof _unit) == KP_liberation_ammo_crate) && ((getPosATL _unit) select 2 < 10)) then {
("R_80mm_HE" createVehicle (getPosATL _unit)) setVelocity [0, 0, -200];
deleteVehicle _unit;
} else {
sleep GRLIB_cleanup_delay;
hidebody _unit;
sleep 10;
deleteVehicle _unit;
};
sleep GRLIB_cleanup_delay;
hidebody _unit;
sleep 10;
deleteVehicle _unit;
};

View File

@ -46,6 +46,7 @@ F_getCorrectedSectorRange = compileFinal preprocessFileLineNumbers "scripts\shar
F_getLocationName = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_getLocationName.sqf";
F_correctLaserBatteries = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_correctLaserBatteries.sqf";
F_crateToStorage = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_kp_crate_to_storage.sqf";
F_fillStorage = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_kp_fillStorage.sqf";
F_crateFromStorage = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_kp_crate_from_storage.sqf";
F_crateCheckValue = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_kp_crate_checkValue.sqf";
F_sortStorage = compileFinal preprocessFileLineNumbers "scripts\shared\functions\F_kp_sort_storage.sqf";

View File

@ -1,9 +0,0 @@
waitUntil { !isNil "chosen_weather" };
while { true } do {
3600 setOvercast chosen_weather;
if ( overcast < 0.75 ) then { 2 setRain 0 };
if ( overcast >= 0.75 && overcast < 0.95 ) then { 2 setRain 0.1 };
if ( overcast >= 0.95 ) then { 2 setRain 0.2 }; // Removed heavy rain due to severe fps issues
sleep 5;
};

File diff suppressed because it is too large Load Diff

View File

@ -103,7 +103,7 @@ These mods are recommended by us, as they are likely to increase your gaming exp
* [KP Ranks](http://steamcommunity.com/sharedfiles/filedetails/?id=741621641)
* [LAxemann's Suppress](https://steamcommunity.com/sharedfiles/filedetails/?id=825174634)
Also you should think about using these mods as serverside mods:
Also you should think about using these mods as serverside mods:
* [Advanced Rappeling](http://steamcommunity.com/sharedfiles/filedetails/?id=713709341)
* [Advanced Sling Loading](http://steamcommunity.com/sharedfiles/filedetails/?id=615007497)
* [Advanced Towing](http://steamcommunity.com/sharedfiles/filedetails/?id=639837898)
@ -164,11 +164,24 @@ class Missions
### 0.96.5 (TBD due to Contacts Release)
* Added: The Unsung Vietnam War Mod presets.
* Added: The Unsung Vietnam War Mod transport configs.
* Added: Statistic values for destroyed civilian buildings and vehicles
* Added: Statistic values for total and friendly resistance kills.
* Added: Statistic values for spent/produced resources.
* Added: Statistics will be posted additionally in the server log after winning the campaign.
* Added: Encore Anti Air static to sensible presets.
* Removed: Vanilla player score saving.
* Tweaked: Changed default recycle building from carservice building to tanks repair depot building.
* Tweaked: Changed default air building from small radar dome to encore static radar.
* Tweaked: Vehicle in Vehicle action on FOB box is not displaying directly anymore when approaching the box.
* Tweaked: Added elite vehicles to CSAT presets.
* Tweaked: Formatting/Comments in the preset files.
* Tweaked: objectInit function and added comments to the array.
* Tweaked: Some smaller code optimizations in the whole framework.
* Tweaked: Changes in elite vehicles in presets are now also applied during a running campaign.
* Tweaked: Player lead squads are now also saved near FOBs. (but still needs to be reassigned via zeus after load, of course)
* Tweaked: Weather is now only handled by the server.
* Fixed: Intel value could get corrupted if leaving the secondary dialog directly after starting a mission.
* Fixed: "All is red" for first player after a server restart. (just a visual bug, doesn't affect gameplay)
### 0.96.4 (10th May 2019 due to Global Mobilization Release)
* Added: East Germany arsenal preset.
@ -241,7 +254,7 @@ class Missions
* Fixed: Players couldn't ziptie the civilian informant, if playing with ACE.
* Fixed: File name instead of mission name in mission selection screen.
* Fixed: "Taking Command" spam from AI after players death.
* Fixed: Fixed range for recycling and start of building instead of using FOB range.
* Fixed: Fixed range for recycling and start of building instead of using FOB range.
* Fixed: Some vehicles with dynamic loadout support lost their weapons when rearmed by Liberation rearm module.
### 0.963 (05th January 2018)