* Fixed SDV recycle error

* Update kp_liberation_config.sqf (#119)

Added CUP BAF WolfHound, and RHSUSAF smaller family of flatbed trucks to box_transport_config = [];

* Resource crates pushing

* Update README.md

* more configs from Chief

* Some additional rhs vehicles to the presets. Even more configs. Thanks to Chief

* Update README.md

* -.-

* HMMWV halftop transport config

* Adjusted starting daytime

* 6am is still dark on some maps -.-

* Fixed: AI squads weren't saved

* Tweaked: Syncing times for production when resources are stores or unstored in sector storages

* Update 3cbBAF.sqf (#122)

Added m72a7 disposable launcher after researching AT weapons for British forces. The LAW rocket was reintroduced to British forces deployed to Afghanistan.

* Removed Clutter and "wrong resource crates"

* More lights for the FOB

* Added a devkit

* Update README.md

* Error message wasn't displayed when no space to store crates.

* Empty Inventory on startvehicle spawn

* Armed boat caused script error

* crate slingload fix

* deep array copy in sync function

* Added FRIES exception for building

* ACE and Debug moved to parameters

* Update README.md

* Adjust version
This commit is contained in:
Christian 2017-06-04 01:07:21 +02:00 committed by GitHub
parent f0c96fedc7
commit f9f8e79629
39 changed files with 7766 additions and 33728 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@ GRLIB_arsenal_weapons = [
"rhs_weap_M136",
"rhs_weap_M136_hedp",
"rhs_weap_M136_hp",
"rhs_weap_m72a7", //reintroduced to BAF forces in Afghanistan
"UK3CB_BAF_L1A1",
"UK3CB_BAF_L1A1_Wood",
"UK3CB_BAF_L110A1",

View File

@ -2,10 +2,6 @@
CONFIG FILE FOR KP LIBERATION
*/
/* - ACE settings.
Enable ACE? (true,false). */
KP_liberation_ace = false;
// Vehicle classnames which also function as ACE medical vehicles.
KP_liberation_medical_vehicles = [
"B_Truck_01_medical_F",
@ -54,7 +50,6 @@ KP_liberation_fuel_max = 45;
Name of the savegame namespace inside of the [ServerProfileName].vars.Arma3Profile file. */
GRLIB_save_key = "KP_LIBERATION_" + (toUpper worldName) + "_SAVEGAME";
KP_liberation_debug = false; // Enables debug messages in the server log
KP_liberation_savegame_debug = false; // Enables displaying of the whole save array in the server log on each save
GRLIB_side_friendly = WEST; // Friendly side.
@ -217,7 +212,22 @@ box_transport_config = [
["O_Truck_03_covered_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["O_T_Truck_03_transport_ghex_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["O_T_Truck_03_covered_ghex_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["greuh_eh101_gr", -6.5, [0,4.2,-1.45], [0,2.5,-1.45], [0,0.8,-1.45], [0,-0.9,-1.45]]
["greuh_eh101_gr", -6.5, [0,4.2,-1.45], [0,2.5,-1.45], [0,0.8,-1.45], [0,-0.9,-1.45]],
["CUP_B_Wolfhound_GMG_GB_W", -6.5, [0,-3.5,2.3]],
["CUP_B_Wolfhound_HMG_GB_W", -6.5, [0,-3.5,2.3]],
["CUP_B_Wolfhound_LMG_GB_W", -6.5, [0,-3.5,2.3]],
["rhsusf_m998_w_2dr_halftop", -4.5, [0,-0.9,-0.2]],
["rhsusf_m998_d_2dr_halftop", -4.5, [0,-0.9,-0.2]],
["rhsusf_M1078A1P2_wd_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1078A1P2_d_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1083A1P2_wd_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1083A1P2_wd_open_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1083A1P2_d_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1083A1P2_d_open_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1078A1P2_B_M2_d_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1078A1P2_B_M2_wd_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1083A1P2_B_M2_d_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1083A1P2_B_M2_wd_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]]
];
/* Various other settings.

View File

@ -150,6 +150,10 @@ buildings = [
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["Land_LampSolar_F",0,0,0],
["Land_LampHalogen_F",0,0,0],
["Land_LampStreet_small_F",0,0,0],
["Land_LampAirport_F",0,0,0],
["Land_HelipadCircle_F",0,0,0], //Strictly aesthetic - as in it does not increase helicopter cap!
["PortableHelipadLight_01_blue_F",0,0,0],
["PortableHelipadLight_01_green_F",0,0,0],

View File

@ -46,6 +46,7 @@ infantry_units = [
["B_T_Recon_LAT_F",30,0,0], //Recon Scout (AT)
["B_T_Recon_M_F",30,0,0], //Recon Marksman
["B_T_Recon_Medic_F",30,0,0], //Recon Paramedic
["B_T_Recon_exp_F",30,0,0], //Recon Demolition Expert
["B_T_Sniper_F",70,5,0], //Sniper
["B_T_ghillie_tna_F",70,5,0], //Sniper (Jungle)
["B_T_Spotter_F",20,0,0], //Spotter
@ -69,10 +70,14 @@ light_vehicles = [
["rhsusf_m1025_w",100,0,50], //M1025A2
["rhsusf_m1025_w_m2",100,40,50], //M1025A2 (M2)
["rhsusf_m1025_w_mk19",100,60,50], //M1025A2 (Mk19)
["rhsusf_m998_w_2dr_fulltop",100,0,50], //M1097A2 (2D)
["rhsusf_m998_w_2dr_halftop",100,0,50], //M1097A2 (2D / open back)
["BWA3_Eagle_Fleck",100,0,50], //Eagle IV
["BWA3_Eagle_FLW100_Fleck",100,100,50], //Eagle IV (FLW 100)
["B_T_Truck_01_transport_F",125,0,75], //HEMTT Transport
["B_T_Truck_01_covered_F",125,0,75], //HEMTT Transport (Covered)
["rhsusf_M1083A1P2_wd_fmtv_usarmy",125,0,75], //M1083A1P2 (covered infantry truck)
["rhsusf_M1083A1P2_wd_open_fmtv_usarmy",125,0,75], //M1083A1P2 (open infantry truck)
["rhsusf_M977A4_BKIT_usarmy_wd",125,0,75], //M977A4 BKIT
["rhsusf_M977A4_BKIT_M2_usarmy_wd",125,40,75], //M977A4 BKIT (HMG)
["B_UGV_01_F",150,0,50], //UGV Stomper
@ -176,6 +181,10 @@ buildings = [
["CamoNet_ghex_big_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["Land_LampSolar_F",0,0,0],
["Land_LampHalogen_F",0,0,0],
["Land_LampStreet_small_F",0,0,0],
["Land_LampAirport_F",0,0,0],
["Land_HelipadCircle_F",0,0,0], //Strictly aesthetic - as in it does not increase helicopter cap!
["PortableHelipadLight_01_blue_F",0,0,0],
["PortableHelipadLight_01_green_F",0,0,0],

View File

@ -50,6 +50,7 @@ infantry_units = [
["B_recon_M_F",30,0,0], //Recon Marksman
["B_Recon_Sharpshooter_F",40,0,0], //Recon Sharpshooter
["B_recon_medic_F",30,0,0], //Recon Paramedic
["B_recon_exp_F",30,0,0], //Recon Demolition Expert
["B_sniper_F",70,5,0], //Sniper
["B_ghillie_ard_F",70,5,0], //Sniper (Arid)
["B_ghillie_lsh_F",70,5,0], //Sniper (Lush)
@ -76,6 +77,7 @@ light_vehicles = [
["rhsusf_m1025_w_m2",100,40,50], //M1025A2 (M2)
["rhsusf_m1025_w_mk19",100,60,50], //M1025A2 (Mk19)
["rhsusf_m998_w_2dr_fulltop",100,0,50], //M1097A2 (2D)
["rhsusf_m998_w_2dr_halftop",100,0,50], //M1097A2 (2D / open back)
["BWA3_Eagle_Fleck",100,0,50], //Eagle IV
["BWA3_Eagle_FLW100_Fleck",100,100,50], //Eagle IV (FLW 100)
["B_Truck_01_transport_F",125,0,75], //HEMTT Transport
@ -185,6 +187,10 @@ buildings = [
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["Land_LampSolar_F",0,0,0],
["Land_LampHalogen_F",0,0,0],
["Land_LampStreet_small_F",0,0,0],
["Land_LampAirport_F",0,0,0],
["Land_HelipadCircle_F",0,0,0], //Strictly aesthetic - as in it does not increase helicopter cap!
["PortableHelipadLight_01_blue_F",0,0,0],
["PortableHelipadLight_01_green_F",0,0,0],

View File

@ -66,6 +66,7 @@ light_vehicles = [
["rhsusf_m1025_w_m2",100,40,50], //M1025A2 (M2)
["rhsusf_m1025_w_mk19",100,60,50], //M1025A2 (Mk19)
["rhsusf_m998_w_2dr_fulltop",100,0,50], //M1097A2 (2D)
["rhsusf_m998_w_2dr_halftop",100,0,50], //M1097A2 (2D / open back)
["rhsusf_M1083A1P2_wd_fmtv_usarmy",125,0,75], //M1083A1P2 (covered infantry truck)
["rhsusf_M1083A1P2_wd_open_fmtv_usarmy",125,0,75], //M1083A1P2 (open infantry truck)
["rhsusf_M977A4_BKIT_usarmy_wd",125,0,75], //M977A4 BKIT (cargo truck)
@ -141,6 +142,10 @@ buildings = [
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["Land_LampSolar_F",0,0,0],
["Land_LampHalogen_F",0,0,0],
["Land_LampStreet_small_F",0,0,0],
["Land_LampAirport_F",0,0,0],
["Land_HelipadCircle_F",0,0,0], //Strictly aesthetic - as in it does not increase helicopter cap!
["PortableHelipadLight_01_blue_F",0,0,0],
["PortableHelipadLight_01_green_F",0,0,0],

View File

@ -66,6 +66,7 @@ light_vehicles = [
["rhsusf_m1025_w_m2",100,40,50], //M1025A2 (M2)
["rhsusf_m1025_w_mk19",100,60,50], //M1025A2 (Mk19)
["rhsusf_m998_w_2dr_fulltop",100,0,50], //M1097A2 (2D)
["rhsusf_m998_w_2dr_halftop",100,0,50], //M1097A2 (2D / open back)
["BWA3_Eagle_Fleck",100,0,50], //Eagle IV
["BWA3_Eagle_FLW100_Fleck",100,100,50], //Eagle IV (FLW 100)
["rhsusf_M1083A1P2_wd_fmtv_usarmy",125,0,75], //M1083A1P2 (covered infantry truck)
@ -147,6 +148,10 @@ buildings = [
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["Land_LampSolar_F",0,0,0],
["Land_LampHalogen_F",0,0,0],
["Land_LampStreet_small_F",0,0,0],
["Land_LampAirport_F",0,0,0],
["Land_HelipadCircle_F",0,0,0], //Strictly aesthetic - as in it does not increase helicopter cap!
["PortableHelipadLight_01_blue_F",0,0,0],
["PortableHelipadLight_01_green_F",0,0,0],

View File

@ -65,13 +65,14 @@ light_vehicles = [
["rhsusf_m1025_d",100,0,50], //M1025A2
["rhsusf_m1025_d_m2",100,40,50], //M1025A2 (M2)
["rhsusf_m1025_d_Mk19",100,60,50], //M1025A2 (Mk19)
["rhsusf_m998_d_2dr_fulltop",100,0,50], //M1097A2 (2D)
["rhsusf_m998_d_2dr_halftop",100,0,50], //M1097A2 (2D / open back)
["rhsusf_M1083A1P2_d_fmtv_usarmy",125,0,75], //M1083A1P2 (covered infantry truck)
["rhsusf_M1083A1P2_d_open_fmtv_usarmy",125,0,75], //M1083A1P2 (open infantry truck)
["rhsusf_M977A4_BKIT_usarmy_d",125,0,75], //M977A4 BKIT
["rhsusf_M977A4_BKIT_M2_usarmy_d",125,40,75], //M977A4 BKIT (HMG)
["B_UGV_01_F",150,0,50], //UGV Stomper
["B_UGV_01_rcws_F",150,40,50], //UGV Stomper (RCWS)
["B_Boat_Transport_01_F",100,0,25], //Assault Boat
["B_Boat_Armed_01_minigun_F",200,80,75], //Speedboat Minigun
["rhsusf_mkvsoc",250,200,100] //Mk.V SOCOM
["B_UGV_01_rcws_F",150,40,50] //UGV Stomper (RCWS)
];
heavy_vehicles = [
@ -137,6 +138,10 @@ buildings = [
["CamoNet_BLUFOR_big_F",0,0,0],
["Land_PortableLight_single_F",0,0,0],
["Land_PortableLight_double_F",0,0,0],
["Land_LampSolar_F",0,0,0],
["Land_LampHalogen_F",0,0,0],
["Land_LampStreet_small_F",0,0,0],
["Land_LampAirport_F",0,0,0],
["Land_HelipadCircle_F",0,0,0], //Strictly aesthetic - as in it does not increase helicopter cap!
["PortableHelipadLight_01_blue_F",0,0,0],
["PortableHelipadLight_01_green_F",0,0,0],
@ -487,7 +492,6 @@ civilian_vehicles = [
// Elite vehicles that should be unlocked through military base capture.
elite_vehicles = [
"rhsusf_mkvsoc", //Mk.V SOCOM
"rhsusf_m1a1aim_tuski_d", //M1A1SA (Tusk I)
"rhsusf_m1a2sep1tuskiid_usarmy", //M1A2SEPv1 (Tusk II)
"rhsusf_m109d_usarmy", //M109A6

View File

@ -31,7 +31,7 @@ if (((typeOf _vehtorecycle) in _building_classnames) || ((typeOf _vehtorecycle)
_ammoMulti = _currentAmmo/_allAmmo;
_fuelMulti = fuel _vehtorecycle;
if ((typeOf _vehtorecycle) == "B_Boat_Transport_01_F") then {
if (((typeOf _vehtorecycle) == "B_Boat_Transport_01_F") || ((typeOf _vehtorecycle) == "B_SDV_01_F") || ((typeOf _vehtorecycle) == "B_Boat_Armed_01_minigun_F")) then {
_suppMulti = (((_vehtorecycle getHitPointDamage "HitEngine") - 1) * -1);
};
};

View File

@ -4,7 +4,7 @@ waitUntil {!isNil "one_eco_done"};
waitUntil {one_synchro_done};
waitUntil {one_eco_done};
private ["_managed_trucks", "_managed_boxes", "_managed_areas", "_next_truck", "_next_box", "_truck_load", "_checked_trucks", "_checked_boxes", "_action_id"];
private ["_managed_trucks", "_managed_boxes", "_managed_areas", "_next_truck", "_next_box", "_truck_load", "_checked_trucks", "_checked_boxes", "_action_id","_b_action_id1","_b_action_id2","_b_action_id3","_b_action_id4"];
_managed_trucks = [];
_managed_boxes = [];
@ -53,12 +53,14 @@ while {true} do {
{
_next_box = _x;
if (!(_next_box in _managed_boxes) && ( isNull attachedTo _next_box )) then {
_action_id = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_LOAD_BOX" + "</t>","scripts\client\ammoboxes\do_load_box_action.sqf","",-501,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_action_id2 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_STORE_CRATE" + "</t>",{[(_this select 0), (nearestObjects [player,KP_liberation_storage_buildings,20]) select 0] call F_crateToStorage;},"",-502,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_action_id3 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_VALUE" + "</t>",{[_this select 0] call F_crateCheckValue;uiSleep 3; hint "";},"",-503,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_next_box setVariable ["GRLIB_ammo_box_action", _action_id, false];
_next_box setVariable ["KP_crate_store_action", _action_id2, false];
_next_box setVariable ["KP_crate_value_action", _action_id3, false];
_b_action_id1 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_LOAD_BOX" + "</t>","scripts\client\ammoboxes\do_load_box_action.sqf","",-501,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id2 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_STORE_CRATE" + "</t>",{[(_this select 0), (nearestObjects [player,KP_liberation_storage_buildings,20]) select 0,true] call F_crateToStorage;},"",-502,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id3 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_VALUE" + "</t>",{[_this select 0] call F_crateCheckValue;uiSleep 3; hint "";},"",-503,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id4 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_PUSH" + "</t>",{(_this select 0) setPos ((_this select 0) getRelPos [1, (((_this select 0) getRelDir player) - 180)]);},"",-504,true,false,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_next_box setVariable ["GRLIB_ammo_box_action", _b_action_id1, false];
_next_box setVariable ["KP_crate_store_action", _b_action_id2, false];
_next_box setVariable ["KP_crate_value_action", _b_action_id3, false];
_next_box setVariable ["KP_crate_push_action", _b_action_id4, false];
_managed_boxes pushback _next_box;
};
@ -72,6 +74,7 @@ while {true} do {
_next_box removeAction (_next_box getVariable ["GRLIB_ammo_box_action", -1]);
_next_box removeAction (_next_box getVariable ["KP_crate_store_action", -1]);
_next_box removeAction (_next_box getVariable ["KP_crate_value_action", -1]);
_next_box removeAction (_next_box getVariable ["KP_crate_push_action", -1]);
}
} foreach _managed_boxes;
@ -82,11 +85,11 @@ while {true} do {
_area_load = count (attachedObjects _x);
if (!(_next_area in _managed_areas) && (_area_load > 0)) then {
_action_id = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_SUPPLY" + "</t>",{[KP_liberation_supply_crate, (_this select 0)] spawn F_crateFromStorage;},"",-504,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_SUPPLY" + "</t>",{[KP_liberation_supply_crate, (_this select 0), true] spawn F_crateFromStorage;},"",-504,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_supply_unstore_action", _action_id, false];
_action_id2 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_AMMO" + "</t>",{[KP_liberation_ammo_crate, (_this select 0)] spawn F_crateFromStorage;},"",-505,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id2 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_AMMO" + "</t>",{[KP_liberation_ammo_crate, (_this select 0), true] spawn F_crateFromStorage;},"",-505,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_ammo_unstore_action", _action_id2, false];
_action_id3 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_FUEL" + "</t>",{[KP_liberation_fuel_crate, (_this select 0)] spawn F_crateFromStorage;},"",-506,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id3 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_FUEL" + "</t>",{[KP_liberation_fuel_crate, (_this select 0), true] spawn F_crateFromStorage;},"",-506,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_fuel_unstore_action", _action_id3, false];
_managed_areas pushback _next_area;
};

View File

@ -33,4 +33,6 @@ _truck_to_load = objNull;
if ( isNull _truck_to_load && !isDedicated ) then {
hint localize "STR_BOX_CANTLOAD";
uiSleep 2;
hint "";
};

View File

@ -31,4 +31,6 @@ if ( _truck_to_unload getVariable ["GRLIB_ammo_truck_load", 0] > 0 ) then {
[_truck_to_unload, true] remoteExec ["F_objectProtection"];
hint localize "STR_BOX_UNLOADED";
uiSleep 2;
hint "";
};

View File

@ -122,7 +122,7 @@ while {dialog && (alive player)} do {
if ((_listselect != -1) && (_logi_count > 0)) then {
{ctrlShow [_x, true]} forEach _detailControls;
_selectedGroup = (KP_liberation_logistics select _listselect);
_selectedGroup = +(KP_liberation_logistics select _listselect);
if ((_selectedGroup select 7) == 0) then {
ctrlEnable [758021, true];

View File

@ -31,11 +31,11 @@ while {dialog && (alive player)} do {
if (saveSectorSetting == 1) then {
saveSectorSetting = 0;
[(_selectedSector select 1), new_production] remoteExec ["change_prod_remote_call",2];
sleep 0.5;
waitUntil {sleep 0.5; (!(_selectedSector isEqualTo (KP_liberation_logistics select _listselect)))};
};
_listselect = (lbCurSel 75802);
_selectedSector = (KP_liberation_production select _listselect);
_selectedSector = +(KP_liberation_production select _listselect);
ctrlSetText [75803,(_selectedSector select 0)];

View File

@ -10,6 +10,10 @@ for [{_i=0}, {!isNil ("littlebird_" + str _i)}, {_i = _i + 1}] do {
_KP_liberation_little_bird allowdamage false;
_KP_liberation_little_bird setposATL [((getposATL _KP_liberation_little_bird_pad) select 0),((getposATL _KP_liberation_little_bird_pad) select 1),((getposATL _KP_liberation_little_bird_pad) select 2) + 0.1];
_KP_liberation_little_bird setDir (getDir _KP_liberation_little_bird_pad);
clearWeaponCargoGlobal _KP_liberation_little_bird;
clearMagazineCargoGlobal _KP_liberation_little_bird;
clearItemCargoGlobal _KP_liberation_little_bird;
clearBackpackCargoGlobal _KP_liberation_little_bird;
sleep 0.5;
_KP_liberation_little_bird enableSimulationGlobal true;
_KP_liberation_little_bird setDamage 0;
@ -24,6 +28,10 @@ for [{_i=0}, {!isNil ("boat_" + str _i)}, {_i = _i + 1}] do {
_KP_liberation_boat allowdamage false;
_KP_liberation_boat setposATL (getposATL _KP_liberation_boat_spawn);
_KP_liberation_boat setDir (getDir _KP_liberation_boat_spawn);
clearWeaponCargoGlobal _KP_liberation_boat;
clearMagazineCargoGlobal _KP_liberation_boat;
clearItemCargoGlobal _KP_liberation_boat;
clearBackpackCargoGlobal _KP_liberation_boat;
sleep 0.5;
_KP_liberation_boat enableSimulationGlobal true;
_KP_liberation_boat setDamage 0;

View File

@ -469,7 +469,7 @@ while { true } do {
if ( side _nextgroup == GRLIB_side_friendly ) then {
if ( { isPlayer _x } count ( units _nextgroup ) == 0 ) then {
if ( { alive _x } count ( units _nextgroup ) > 0 ) then {
if ((_fobpos distance (leader _nextgroup) < GRLIB_fob_range * 2) && ((typeOf (leader _nextgroup)) in infantry_units)) then {
if ((_fobpos distance (leader _nextgroup) < GRLIB_fob_range * 2) && ((typeOf (leader _nextgroup)) in friendly_infantry_classnames)) then {
private [ "_grouparray" ];
_grouparray = [];
{

View File

@ -24,8 +24,8 @@ while {true} do {
sync_eco = [KP_liberation_production,KP_liberation_logistics];
publicVariable "sync_eco";
_KP_liberation_production_old = KP_liberation_production;
_KP_liberation_logistics_old = KP_liberation_logistics;
_KP_liberation_production_old = +KP_liberation_production;
_KP_liberation_logistics_old = +KP_liberation_logistics;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Serverside eco sent from: %1", (name player)];_text remoteExec ["diag_log",2];};
};

View File

@ -64,7 +64,7 @@ while {true} do {
sync_vars = [KP_liberation_fob_resources,KP_liberation_supplies_global,KP_liberation_ammo_global,KP_liberation_fuel_global,unitcap,KP_liberation_heli_count,KP_liberation_plane_count,KP_liberation_heli_slots,KP_liberation_plane_slots,combat_readiness,resources_intel,infantry_cap];
publicVariable "sync_vars";
_KP_liberation_fob_resources_old = KP_liberation_fob_resources;
_KP_liberation_fob_resources_old = +KP_liberation_fob_resources;
_KP_liberation_supplies_global_old = KP_liberation_supplies_global;
_KP_liberation_ammo_global_old = KP_liberation_ammo_global;
_KP_liberation_fuel_global_old = KP_liberation_fuel_global;

View File

@ -74,4 +74,4 @@ if (isServer) then {
[ _liberated_sector ] spawn spawn_battlegroup;
};
};
};
};

View File

@ -1,6 +1,9 @@
waitUntil {!isNil "save_is_loaded"};
waitUntil {!isNil "KP_liberation_production"};
sectors_recalculating = false;
sectors_timer = false;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource management started on: %1", (name player)];_text remoteExec ["diag_log",2];};
while {GRLIB_endgame == 0} do {
@ -8,9 +11,14 @@ while {GRLIB_endgame == 0} do {
recalculate_sectors = false;
if (((count allPlayers) > 0) && ((count KP_liberation_production) > 0)) then {
waitUntil {sleep 0.5; !sectors_recalculating};
sectors_recalculating = true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource interval started: %1", time];_text remoteExec ["diag_log",2];};
private ["_tempProduction", "_storage", "_storageArray", "_supplyValue", "_ammoValue", "_fuelValue", "_time", "_crateType", "_crate"];
private ["_time_update", "_tempProduction", "_storage", "_storageArray", "_supplyValue", "_ammoValue", "_fuelValue", "_time", "_crateType", "_crate"];
_time_update = false;
if (sectors_timer) then {_time_update = true; sectors_timer = false;};
_tempProduction = [];
@ -26,25 +34,28 @@ while {GRLIB_endgame == 0} do {
if ((count _storage) > 0) then {
_storage = (_storage select 0);
_storageArray = [(getPosATL _storage),(getDir _storage),(vectorUpVisual _storage)];
if (_time_update) then {
if ((_time - 1) < 1) then {
_time = KP_liberation_production_interval;
if (((count (attachedObjects _storage)) < 12) && !((_x select 7) == 3)) then {
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;};
};
_crate = _crateType createVehicle (getPosATL _storage);
_crate setVariable ["KP_liberation_crate_value", 100, true];
[_crate, 500] remoteExec ["F_setMass",_crate];
[_crate, _storage] call F_crateToStorage;
if ((_time - 1) < 1) then {
_time = KP_liberation_production_interval;
if (((count (attachedObjects _storage)) < 12) && !((_x select 7) == 3)) then {
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;};
};
_crate = _crateType createVehicle (getPosATL _storage);
_crate setVariable ["KP_liberation_crate_value", 100, true];
[_crate, 500] remoteExec ["F_setMass",_crate];
[_crate, _storage] call F_crateToStorage;
} else {
_time = _time - 1;
};
} else {
_time = _time - 1;
};
{
@ -80,6 +91,7 @@ while {GRLIB_endgame == 0} do {
KP_liberation_production = +_tempProduction;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource interval finished: %1", time];_text remoteExec ["diag_log",2];};
sectors_recalculating = false;
};
waitUntil {sleep 1; recalculate_sectors};
};

View File

@ -3,4 +3,5 @@ waitUntil { !isNil "save_is_loaded" };
while {true} do {
uiSleep 60;
recalculate_sectors = true;
sectors_timer = true;
};

View File

@ -7,7 +7,7 @@ if (!(_sector in KP_capture_sectors_already_activated)) then {
KP_capture_sectors_already_activated pushback _sector;
_crates_amount = 1 + ((ceil (random 3)) * GRLIB_resources_multiplier);
_crates_amount = ((ceil (random 3)) * GRLIB_resources_multiplier);
for [{_i=0},{_i < _crates_amount},{_i=_i+1}] do {

View File

@ -40,6 +40,8 @@ opfor_squad_8_standard = [opfor_squad_leader,opfor_team_leader,opfor_machinegunn
opfor_squad_8_infkillers = [opfor_squad_leader,opfor_machinegunner,opfor_machinegunner,opfor_heavygunner,opfor_medic,opfor_marksman,opfor_sharpshooter,opfor_sniper];
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);
all_resistance_troops = [] + militia_squad;
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);
@ -102,5 +104,8 @@ GRLIB_ignore_colisions_when_building = [
"B_GMG_01_A_F", //Mk32A GMG 20mm
"B_GMG_01_high_F", //Mk32 GMG 20mm (Raised)
"B_static_AT_F", //Static TTitan Launcher (AT)
"B_static_AA_F" //Static Titan Launcher (AA)
"B_static_AA_F", //Static Titan Launcher (AA)
"ACE_friesAnchorBar", //ACE FRIES
"ACE_friesGantryReverse", //ACE FRIES
"ACE_friesGantry" //ACE FRIES
];

View File

@ -29,6 +29,8 @@ if ( isMultiplayer ) then {
KP_liberation_mobilerespawn = ["MobileRespawn",1] call bis_fnc_getParamValue;
KP_liberation_mobilearsenal = ["MobileArsenal",1] call bis_fnc_getParamValue;
KP_liberation_ailogistics = ["AiLogistics",1] call bis_fnc_getParamValue;
KP_liberation_ace = ["AceEnable",0] call bis_fnc_getParamValue;
KP_liberation_debug = ["DebugEnable",0] call bis_fnc_getParamValue;
} else {
GRLIB_difficulty_modifier = 2;
GRLIB_time_factor = 12;
@ -60,6 +62,8 @@ if ( isMultiplayer ) then {
KP_liberation_mobilerespawn = 1;
KP_liberation_mobilearsenal = 1;
KP_liberation_ailogistics = 1;
KP_liberation_ace = 0;
KP_liberation_debug = 0;
};
if ( GRLIB_fatigue < 0.1 ) then { GRLIB_fatigue = false } else { GRLIB_fatigue = true };
@ -78,6 +82,8 @@ if (KP_liberation_mapmarkers == 1) then {KP_liberation_mapmarkers = true; GREUH_
if (KP_liberation_mobilerespawn == 1) then {KP_liberation_mobilerespawn = true} else {KP_liberation_mobilerespawn = false};
if (KP_liberation_mobilearsenal == 1) then {KP_liberation_mobilearsenal = true} else {KP_liberation_mobilearsenal = false};
if (KP_liberation_ailogistics == 1) then {KP_liberation_ailogistics = true} else {KP_liberation_ailogistics = false};
if (KP_liberation_ace == 1) then {KP_liberation_ace = true} else {KP_liberation_ace = false};
if (KP_liberation_debug == 1) then {KP_liberation_debug = true} else {KP_liberation_debug = false};
// Fix for not working float values in mission params
switch (GRLIB_unitcap) do {

View File

@ -17,7 +17,7 @@ hint format [localize "STR_ACTION_CRATE_VALUE_HINT", (_this select 0) getVariabl
if (!(ropeAttachEnabled (_this select 0))) then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Crate had ropeAttachEnabled %1. Checked by: %2", (ropeAttachEnabled (_this select 0)), (name player)];_text remoteExec ["diag_log",2];};
(_this select 0) enableRopeAttach true;
[(_this select 0), true] remoteExec ["enableRopeAttach",(_this select 0)];
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Crate check done - value: %1 - ropeAttachEnabled: %2 - Checked by: %3",((_this select 0) getVariable "KP_liberation_crate_value"), (ropeAttachEnabled (_this select 0)), (name player)];_text remoteExec ["diag_log",2];};

View File

@ -10,32 +10,35 @@ Unloads given crate type from storage area
Parameters:
_this select 0 - STRING - Crate type
_this select 1 - OBJECT - Storage
_this select 2 - BOOL - Update sector resources
*/
params ["_cratetype", "_storage", ["_update",false]];
private ["_storage_positions","_unload_distance","_unload_pos","_i","_unloaded","_stored_crates","_height"];
switch (typeOf (_this select 1)) do {
switch (typeOf _storage) do {
case KP_liberation_small_storage_building: {_storage_positions = KP_liberation_small_storage_positions; _unload_distance = 4;};
case KP_liberation_large_storage_building: {_storage_positions = KP_liberation_large_storage_positions; _unload_distance = 6.5;};
default {_storage_positions = KP_liberation_large_storage_positions; _unload_distance = 6.5;};
};
_i = 0;
_unload_pos = [(_this select 1), _unload_distance, (getDir (_this select 1)) - 180] call BIS_fnc_relPos;
_unload_pos = [_storage, _unload_distance, (getDir _storage) - 180] call BIS_fnc_relPos;
while {!((nearestObjects [_unload_pos,KP_liberation_crates,1]) isEqualTo [])} do {
_i = _i + 1;
_unload_pos = [(_this select 1), _unload_distance + _i * 1.8, (getDir (_this select 1)) - 180] call BIS_fnc_relPos;
_unload_pos = [_storage, _unload_distance + _i * 1.8, (getDir _storage) - 180] call BIS_fnc_relPos;
};
sleep 0.5;
_unloaded = false;
_stored_crates = attachedObjects (_this select 1);
_stored_crates = attachedObjects _storage;
reverse _stored_crates;
{
if (typeOf _x == (_this select 0)) then {
if (typeOf _x == _cratetype) then {
detach _x;
clearWeaponCargoGlobal _x;
@ -44,7 +47,7 @@ reverse _stored_crates;
clearItemCargoGlobal _x;
_x setPos _unload_pos;
_x enableRopeAttach true;
[_x, true] remoteExec ["enableRopeAttach",_x];
_unloaded = true;
};
if (_unloaded) exitWith {
@ -58,8 +61,14 @@ reverse _stored_crates;
default {_height = 0.6;};
};
detach _x;
_x attachTo [(_this select 1), [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
_x attachTo [_storage, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
_i = _i + 1;
} forEach attachedObjects (_this select 1);
} forEach attachedObjects _storage;
};
} forEach _stored_crates;
if (_update) then {
if ((_storage getVariable ["KP_liberation_storage_type",-1]) == 1) then {
remoteExec ["check_sector_ress_remote_call",2];
};
};

View File

@ -10,33 +10,45 @@ Attach given crate at storage area
Parameters:
_this select 0 - OBJECT - Crate
_this select 1 - OBJECT - Storage
_this select 2 - BOOL - Update sector resources
*/
params ["_crate", ["_storage",nil], ["_update",false]];
private ["_storage_positions","_height","_crates_count","_placed","_current_pos"];
if (!isNull (_this select 1)) then {
switch (typeOf (_this select 1)) do {
if (!isNil "_storage") then {
switch (typeOf _storage) 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;};
};
switch (typeOf (_this select 0)) do {
switch (typeOf _crate) 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;};
};
clearWeaponCargoGlobal (_this select 0);
clearMagazineCargoGlobal (_this select 0);
clearBackpackCargoGlobal (_this select 0);
clearItemCargoGlobal (_this select 0);
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearBackpackCargoGlobal _crate;
clearItemCargoGlobal _crate;
_crates_count = count (attachedObjects (_this select 1));
_crates_count = count (attachedObjects _storage);
if (_crates_count >= (count _storage_positions)) exitWith {if (!isDedicated) then {hint localize "STR_BOX_CANTSTORE";};};
_crate attachTo [_storage, [(_storage_positions select _crates_count) select 0, (_storage_positions select _crates_count) select 1, _height]];
[_crate, false] remoteExec ["enableRopeAttach",_crate];
if (_update) then {
if ((_storage getVariable ["KP_liberation_storage_type",-1]) == 1) then {
remoteExec ["check_sector_ress_remote_call",2];
};
};
(_this select 0) attachTo [(_this select 1), [(_storage_positions select _crates_count) select 0, (_storage_positions select _crates_count) select 1, _height]];
(_this select 0) enableRopeAttach false;
} else {
if (!isDedicated) then {
hint localize "STR_BOX_CANTSTORE";

View File

@ -8,16 +8,16 @@
<!-- Russion localization made by _KOC_: Constantin.rogozin@ya.ru -->
<!-- English corrections / proofreading by Applejakerie: https://github.com/Applejakerie -->
<Key ID="STR_MISSION_TITLE">
<Original>KP Liberation v0.951</Original>
<German>KP Liberation v0.951</German>
<Spanish>KP Liberation v0.951</Spanish>
<Italian>KP Liberation v0.951</Italian>
<Original>KP Liberation v0.952</Original>
<German>KP Liberation v0.952</German>
<Spanish>KP Liberation v0.952</Spanish>
<Italian>KP Liberation v0.952</Italian>
</Key>
<Key ID="STR_MISSION_VERSION">
<Original>v0.951</Original>
<German>v0.951</German>
<Spanish>v0.951</Spanish>
<Italian>v0.951</Italian>
<Original>v0.952</Original>
<German>v0.952</German>
<Spanish>v0.952</Spanish>
<Italian>v0.952</Italian>
</Key>
<Key ID="STR_Deploy_OnPoint">
<Original>Deploy</Original>
@ -3103,13 +3103,13 @@
<Italian>Rimborso: 50 approvvigionamenti e 50 carburante.</Italian>
</Key>
<Key ID="STR_LOGISTIC_CONFIRM">
<Original>Confirm mission</Original>
<Original>Confirm Mission</Original>
<German>Auftrag bestätigen</German>
<Russian>Подтвердить миссию</Russian>
<Italian>Conferma missione</Italian>
</Key>
<Key ID="STR_LOGISTIC_CANCEL">
<Original>Abort mission</Original>
<Original>Abort Mission</Original>
<German>Auftrag abbrechen</German>
<Russian>Отменить миссию</Russian>
<Italian>Termina missione</Italian>
@ -3455,5 +3455,17 @@
<Original>Use preset from config</Original>
<German>Benutze Preset aus Konfiguration</German>
</Key>
<Key ID="STR_ACTION_CRATE_PUSH">
<Original>-- PUSH CRATE</Original>
<German>-- KISTE SCHIEBEN</German>
</Key>
<Key ID="STR_PARAMS_ACE_ENABLE">
<Original>ACE Compatibility (deactivates the Liberation weather and resupply script)</Original>
<German>ACE Kompatibilität (deaktiviert das Liberation Wetter- und Versorgungsscript)</German>
</Key>
<Key ID="STR_PARAMS_DEBUG_ENABLE">
<Original>Debug messages for server.rpt</Original>
<German>Debugnachrichten für die server.rpt</German>
</Key>
</Package>
</Project>

View File

@ -186,6 +186,12 @@ class Params
texts[] = { "" };
default = "";
};
class AceEnable {
title = $STR_PARAMS_ACE_ENABLE;
values[] = { 0, 1 };
texts[] = { $STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED };
default = 0;
};
class Fatigue {
title = $STR_PARAMS_FATIGUE;
values[] = { 0, 1 };
@ -226,7 +232,7 @@ class Params
title = $STR_PARAM_TEAMKILL_PENALTY;
values[] = {1,0};
texts[] = { $STR_PARAMS_ENABLED, $STR_PARAMS_DISABLED };
default = 0;
default = 1;
};
class HaloJump{
title = $STR_HALO_PARAM;
@ -276,6 +282,12 @@ class Params
texts[] = { $STR_WHITELIST_ENABLED, $STR_PARAMS_DISABLED };
default = 0;
};
class DebugEnable {
title = $STR_PARAMS_DEBUG_ENABLE;
values[] = { 0, 1 };
texts[] = { $STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED };
default = 0;
};
class WipeSave1{
title = $STR_WIPE_TITLE;
values[] = {0,1};

View File

@ -2,7 +2,7 @@
# KP Liberation for ArmA 3
## Current version : 0.951
## Current version : 0.952
[BI Forum Thread](https://forums.bistudio.com/topic/202711-mpcti-coop-liberation-continued/)
@ -158,6 +158,22 @@ class Missions
## Changelog
### 0.952
* Added: Action to push resource crates
* Added: More transport configs for various vehicles. Thanks to [ChiefOwens](https://github.com/ChiefOwens)
* Added: Some more vehicles from RHS to the presets
* Added: More buildable lights for the FOB. Thanks to [Reckulation](https://www.killahpotatoes.de/index.php?user/130-reckulation/)
* Added: A devkit mission.sqm for people who want to port Liberation to other maps
* Added: [GitHub Wiki](https://github.com/Wyqer/kp_liberation/wiki) (will be expanded step by step in the future)
* Removed: Some clutter of the custom enemy bases on each map. Could maybe increase performance a little bit
* Tweaked: Starting times of the maps were not equal
* Tweaked: Syncing times for production when resources are stored or unstored in sector storages
* Tweaked: Moved ACE compatibility and Debug setting from `kp_liberation_config.sqf` to parameters
* Fixed: SDV and armed boat recycle caused a script error
* Fixed: AI Squads weren't saved
* Fixed: Start vehicles were spawning with items in the inventory
* Fixed: Sometimes you couldn't slingload crates which were unloaded from a storage
### 0.951
* Added: Boats at the stern of the Freedom for amphibious insertion
* Added: Transport configs for guerilla offroad and van