Skip to content

Commit

Permalink
Update 240703
Browse files Browse the repository at this point in the history
BugFix:
[Update Fullheal: Sync ServerTime](87cac6a)
[Update send_paratroopers.sqf](4a0e83d)

Improve:
[Update VehicleSeized Report](9de41e3)
[Update building_defence_ai.sqf](6915e19)

Nerf/Buff
[Nerf Backcountry SAM](78a6a87)
[Update KPLIB_transportConfigs.sqf](cf5be9d)
[Extend spawn range again](0bd0d31)
  • Loading branch information
Apricot-ale authored Jul 3, 2024
2 parents be2a0f7 + 0bd0d31 commit 689c3e9
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 32 deletions.
8 changes: 4 additions & 4 deletions Missionframework/KPLIB_config.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ KPLIB_height_halo = 2500;
// Range to activate a sector.
KPLIB_range_sectorActivation = 1000;
KPLIB_range_capitalActivation = 1250;
KPLIB_range_cityActivation = 750;
KPLIB_range_factoryActivation = 500;
KPLIB_range_cityActivation = 1000;
KPLIB_range_factoryActivation = 750;
KPLIB_range_militaryActivation = 1500;
KPLIB_range_towerActivation = 500;
KPLIB_range_airSpawnActivation = 500;
KPLIB_range_pointActivation = 500;
KPLIB_range_airSpawnActivation = 1500;
KPLIB_range_pointActivation = 1000;

// Range to capture a sector.
KPLIB_range_sectorCapture = 175;
Expand Down
29 changes: 21 additions & 8 deletions Missionframework/KPLIB_transportConfigs.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

// Vehicle transport configs
KPLIB_transportConfigs = [
["PRACS_SLA_URAL_Open", -6.5, [0,0,0.32],[0,-1.8,0.32]],
["PRACS_SLA_Ural_flat_bed", -6.5, [0.73,0,0.32],[-0.73,0,0.32],[0.73,-1.4,0.32],[-0.73,-1.4,0.32],[0.73,-2.8,0.32],[-0.73,-2.8,0.32]],
["PRACS_SLA_MAZ_Transport", -6.5, [0.8,0.8,2.25],[-0.8,0.8,2.25],[0.8,-0.7,2.25],[-0.8,-0.7,2.25],[0.8,-2.2,2.25],[-0.8,-2.2,2.25],[0.8,-3.7,2.25],[-0.8,-3.7,2.25],[0.8,-5.2,2.25],[-0.8,-5.2,2.25]],
["PRACS_m548", -6.5, [0.2,-0.2,-0.35],[0.2,-1.6,-0.35]],
["PRACS_M250", -6.5, [0,-1.0,2.12],[0,-2.5,2.12],[0,-4.0,2.12]],
["PRACS_M250_flat_bed", -6.5, [0.66,-1.0,2.12],[-0.79,-1.0,2.12],[0.66,-2.5,2.12],[-0.79,-2.5,2.12],[0.66,-4.0,2.12],[-0.79,-4.0,2.12]],
Expand All @@ -27,7 +30,17 @@ KPLIB_transportConfigs = [
["rhsusf_mtvr_mk27_d", -6.5, [0,0.9,0.1],[0,-0.6,0.1],[0,-2.1,0.1],[0,-3.6,0.1]],
["rhsusf_mtvr_mk27_apk_d", -6.5, [0,0.9,-0.3],[0,-0.6,-0.3],[0,-2.1,-0.3],[0,-3.6,-0.3]],
["rhsusf_mtvr_mk27_apk_m2_d", -6.5, [0,0.9,-0.75],[0,-0.6,-0.75],[0,-2.1,-0.75],[0,-3.6,-0.75]],
["rhsusf_mtvr_mk23_wd", -6.5, [0,-0.4,0.1],[0,-2.4,0.1]],
["rhsusf_mtvr_mk23_apk_wd", -6.5, [0,-0.4,-0.3],[0,-2.4,-0.3]],
["rhsusf_mtvr_mk23_apk_m2_wd", -6.5, [0,-0.4,-0.75],[0,-2.4,-0.75]],
["rhsusf_mtvr_mk37_wd", -6.5, [0,0.5,0.1],[0,-1.0,0.1],[0,-2.5,0.1]],
["rhsusf_mtvr_mk37_apk_wd", -6.5, [0,0.5,-0.3],[0,-1.0,-0.3],[0,-2.5,-0.3]],
["rhsusf_mtvr_mk37_apk_m2_wd", -6.5, [0,0.5,-0.75],[0,-1.0,-0.75],[0,-2.5,-0.75]],
["rhsusf_mtvr_mk27_wd", -6.5, [0,0.9,0.1],[0,-0.6,0.1],[0,-2.1,0.1],[0,-3.6,0.1]],
["rhsusf_mtvr_mk27_apk_wd", -6.5, [0,0.9,-0.3],[0,-0.6,-0.3],[0,-2.1,-0.3],[0,-3.6,-0.3]],
["rhsusf_mtvr_mk27_apk_m2_wd", -6.5, [0,0.9,-0.75],[0,-0.6,-0.75],[0,-2.1,-0.75],[0,-3.6,-0.75]],
["rhusf_m1077a1_flatrack_Base", -6.5, [0,2,0.1],[0,0.6,0.1],[0,-0.8,0.1],[0,-2.2,0.1]],
["rhusf_m1077a1_flatrack_wd", -6.5, [0,2,0.1],[0,0.6,0.1],[0,-0.8,0.1],[0,-2.2,0.1]],
["rhsusf_m871_trailer_wd", -6.5, [-0,4.2,0.65],[0.73,2.8,0.65],[-0.73,2.8,0.65],[0.73,1.4,0.65],[-0.73,1.4,0.65],[0.73,0,0.65],[-0.73,0,0.65],[0.73,-1.4,0.65],[-0.73,-1.4,0.65],[0.73,-2.8,0.65],[-0.73,-2.8,0.65],[-0,4.2,1.68],[0.73,2.8,1.68],[-0.73,2.8,1.68],[0.73,1.4,1.68],[-0.73,1.4,1.68],[0.73,0,1.68],[-0.73,0,1.68],[0.73,-1.4,1.68],[-0.73,-1.4,1.68],[0.73,-2.8,1.68],[-0.73,-2.8,1.68]],
["rhsusf_m870_trailer_wd", -6.5, [0.73,2.9,0.25],[-0.73,2.9,0.25],[0.73,1.5,0.25],[-0.73,1.5,0.25],[0.73,0.1,0.25],[-0.73,0.1,0.25],[0.73,-1.3,0.25],[-0.73,-1.3,0.25],[0.73,-2.7,0.25],[-0.73,-2.7,0.25],[0.73,-4.1,0.25],[-0.73,-4.1,0.25],[0.73,2.9,1.28],[-0.73,2.9,1.28],[0.73,1.5,1.28],[-0.73,1.5,1.28],[0.73,0.1,1.28],[-0.73,0.1,1.28],[0.73,-1.3,1.28],[-0.73,-1.3,1.28],[0.73,-2.7,1.28],[-0.73,-2.7,1.28],[0.73,-4.1,1.28],[-0.73,-4.1,1.28]],
["SX2220", -6.5, [0,0.15,-0.6],[0,-1.35,-0.6],[0,-2.85,-0.6]],
Expand All @@ -45,16 +58,16 @@ KPLIB_transportConfigs = [
["B_FR_H225_MCaracal_01", -6.5, [0,1.5,1.9], [0,0.0,1.9], [0,-1.5,1.9], [0,-2.5,1.9], [0,-4.0,2.2]],
["B_Heli_Transport_03_F", -8, [0,2.2,-1], [0,0.5,-1], [0,-1.2,-1]],
["B_Heli_Transport_03_unarmed_F", -8, [0,2.2,-1], [0,0.5,-1], [0,-1.2,-1]],
["B_T_Truck_01_cargo_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_T_Truck_01_covered_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_T_Truck_01_flatbed_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_T_Truck_01_transport_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_T_VTOL_01_infantry_F", -7.5,[0,4.7,-4.88],[0,3,-4.88],[0,1.3,-4.88],[0,-0.4,-4.88],[0,-2.1,-4.88]],
["B_T_VTOL_01_vehicle_F", -7.5,[0,4.7,-4.88],[0,3,-4.88],[0,1.3,-4.88],[0,-0.4,-4.88],[0,-2.1,-4.88]],
["B_Truck_01_cargo_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_Truck_01_covered_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_Truck_01_flatbed_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_Truck_01_transport_F", -6.5, [0,-0.4,0.4], [0,-2.1,0.4], [0,-3.8,0.4]],
["B_Truck_01_flatbed_F", -6.5, [0.06,0.45,-0.28], [0.06,-1.0,-0.28], [0.06,-2.45,-0.28], [0.06,-3.9,-0.28]],
["B_T_Truck_01_flatbed_F", -6.5, [0.06,0.45,-0.28], [0.06,-1.0,-0.28], [0.06,-2.45,-0.28], [0.06,-3.9,-0.28]],
["B_Truck_01_cargo_F", -6.5, [0,0.4,0], [0,-1.3,0], [0,-3.0,0]],
["B_T_Truck_01_cargo_F", -6.5, [0,0.4,0], [0,-1.3,0], [0,-3.0,0]],
["B_Truck_01_covered_F", -6.5, [0,-0.4,0], [0,-2.1,0], [0,-3.8,0]],
["B_T_Truck_01_covered_F", -6.5, [0,-0.4,0], [0,-2.1,0], [0,-3.8,0]],
["B_Truck_01_transport_F", -6.5, [0,-0.4,0], [0,-2.1,0], [0,-3.8,0]],
["B_T_Truck_01_transport_F", -6.5, [0,-0.4,0], [0,-2.1,0], [0,-3.8,0]],
["BW_AW101_Trans_Heer_F", -6.5, [0,4.2,-1.45], [0,2.5,-1.45], [0,0.8,-1.45], [0,-0.9,-1.45]],
["BW_LKW7T_Trans_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["BWA3_WLP14_Flatbed_Oliv", -6.5, [0.73,2.5,-0.65],[-0.73,2.5,-0.65],[0.73,1.05,-0.65],[-0.73,1.05,-0.65],[0.73,-0.4,-0.65],[-0.73,-0.4,-0.65],[0.73,-1.85,-0.65],[-0.73,-1.85,-0.65]],
Expand Down
2 changes: 1 addition & 1 deletion Missionframework/functions/fn_crGlobalMsg.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ params [
if (KPLIB_civrep_debug > 0) then {[format ["globalMsg called on: %1 - Parameters: [%2, %3]", debug_source, _msgType, _data], "CIVREP"] remoteExecCall ["KPLIB_fnc_log", 2];};

switch (_msgType) do {
case 0: {systemChat localize "STR_CR_VEHICLEMSG";};
case 0: {systemChat (format [localize "STR_CR_VEHICLEMSG", (_data select 0)]);};
case 1: {systemChat (format [localize "STR_CR_BUILDINGMSG", (_data select 0)]);};
case 2: {systemChat (format [localize "STR_CR_KILLMSG", (_data select 0), (_data select 1)]);};
case 3: {systemChat (format [localize "STR_CR_RESISTANCE_KILLMSG", (_data select 0), (_data select 1)]);};
Expand Down
13 changes: 7 additions & 6 deletions Missionframework/functions/fn_fullHeal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ if (isClass (configfile >> "CfgPatches" >> "ace_field_rations")) then {_acefr =

{
private _target = _x;
private _localtime = time;
private _lastHeal = _target getVariable ["lastHealTime", -6000];
private _localtime = serverTime; // MP
if (_localtime isEqualTo 0) then {_localtime = time}; // SP
private _lastHeal = _target getVariable ["KPLIB_lastHealTime", -6000];
private _cooltime = KPLIB_param_fullHealCooldown + _lastHeal;
if (_cooltime < _localtime) then {
_target setVariable ["lastHealTime", _localtime];
_target setVariable ["KPLIB_lastHealTime", _localtime];
if (KPLIB_ace_med) then {[_caller, _target] call ace_medical_treatment_fnc_fullHeal;} else {_target setDamage 0;};
if (isPlayer _target) then {
if (_acefr) then {_target setVariable ["acex_field_rations_thirst",0,true]; _target setVariable ["acex_field_rations_hunger",0,true];};
Expand All @@ -51,10 +52,10 @@ if (isClass (configfile >> "CfgPatches" >> "ace_field_rations")) then {_acefr =
} else {
_cooldownunits pushBack _target;
private _cooldowntime = (_cooltime - _localtime)/60;
if (_target isNotEqualTo _caller) then {
[format [localize "STR_FULLHEAL_COOLDOWN", round _cooldowntime, name _caller]] remoteExecCall ["hint", _target];
} else {
if (_target isEqualTo _caller) then {
[format [localize "STR_FULLHEAL_COOLDOWN_OWN", round _cooldowntime]] remoteExecCall ["hint", _target];
} else {
[format [localize "STR_FULLHEAL_COOLDOWN", round _cooldowntime, name _caller]] remoteExecCall ["hint", _target];
};
};
} forEach _targetunits;
Expand Down
6 changes: 4 additions & 2 deletions Missionframework/functions/fn_setVehicleSeized.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
*/

params [
["_veh", objNull, [objNull]]
["_veh", objNull, [objNull]],
["_unit", objNull, [objNull]]
];

if (isNull _veh) exitWith {["Null object given"] call BIS_fnc_error; false};
Expand All @@ -28,7 +29,8 @@ if !(_type in KPLIB_c_vehicles) exitWith {false};

if !(_veh getVariable ["KPLIB_seized", false]) then {
_veh setVariable ["KPLIB_seized", true, true];
[0] remoteExec ["KPLIB_fnc_crGlobalMsg"];
_seizedUser = name _unit;
[0, [_seizedUser]] remoteExec ["KPLIB_fnc_crGlobalMsg"];
[KPLIB_cr_vehicle_penalty, true] remoteExec ["F_cr_changeCR", 2];
stats_civilian_vehicles_seized = stats_civilian_vehicles_seized + 1;
publicVariable "stats_civilian_vehicles_seized";
Expand Down
2 changes: 1 addition & 1 deletion Missionframework/scripts/client/init_client.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ player addMPEventHandler ["MPKilled", {
if (KPLIB_param_fuelconsumption) then {
player addEventHandler ["GetInMan", {[_this select 2] spawn kp_fuel_consumption;}];
};
player addEventHandler ["GetInMan", {[_this select 2] call KPLIB_fnc_setVehicleSeized;}];
player addEventHandler ["GetInMan", {[_this select 2, _this select 0] call KPLIB_fnc_setVehicleSeized;}];
player addEventHandler ["GetInMan", {[_this select 2] call KPLIB_fnc_setVehicleCaptured;}];
player addEventHandler ["GetInMan", {[_this select 2] call kp_vehicle_permissions;}];
player addEventHandler ["GetInMan", {
Expand Down
8 changes: 4 additions & 4 deletions Missionframework/scripts/server/ai/SAM_turret_manager.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ while {KPLIB_endgame == 0} do {
private _helislots = KPLIB_heli_slots;
private _planeslots = KPLIB_plane_slots * 1.5;
private _difficulty = KPLIB_param_difficulty;
if (KPLIB_param_difficulty isEqualTo 4) then {_difficulty = 3};
if (KPLIB_param_difficulty isEqualTo 10) then {_difficulty = 5};
_maxSAMnumber = _maxSAMnumber + _helislots + _planeslots;
if (KPLIB_param_difficulty isEqualTo 4) then {_difficulty = 1};
if (KPLIB_param_difficulty isEqualTo 10) then {_difficulty = 2};
_maxSAMnumber = _maxSAMnumber + (_helislots / 2) + (_planeslots);
_maxSAMnumber = _maxSAMnumber + (KPLIB_enemyReadiness / 30);
_maxSAMnumber = _maxSAMnumber * _difficulty;
_maxSAMnumber = round _maxSAMnumber;
if (_maxSAMnumber > 20) then {_maxSAMnumber = 20};
if (_maxSAMnumber > 10) then {_maxSAMnumber = 10};
// maximum amount of SAM turrets should not exceed number of opfor sectors
if (_maxSAMnumber > (count KPLIB_sectors_all - count KPLIB_sectors_player)) then {_maxSAMnumber = count KPLIB_sectors_all - count KPLIB_sectors_player};

Expand Down
2 changes: 1 addition & 1 deletion Missionframework/scripts/server/ai/building_defence_ai.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ scriptName "building_defence_ai";
params ["_unit", ["_sector", ""]];

//Check LAMBS_Danger.fsm is running. if running, skip KPLIB built in troop garrisoning and call lambs wp garrisoning.
if (isClass (configfile >> "CfgPatches" >> "lambs_wp")) exitWith {[_unit, _unit, 40] call lambs_wp_fnc_taskGarrison;};
if (isClass (configfile >> "CfgPatches" >> "lambs_wp")) exitWith {[_unit, _unit, 40, [], false, false, -1, false] call lambs_wp_fnc_taskGarrison;};

_unit setUnitPos "UP";
_unit disableAI "PATH";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ while {(count (units _para_group)) < 8} do {
[KPLIB_o_paratrooper, markerPos _spawnsector, _para_group] call KPLIB_fnc_createManagedUnit;
};

{removeBackpack _x; _x addBackPack "B_parachute"; _x moveInCargo _newvehicle;} forEach (units _para_group);
{removeBackpack _x; _x addBackPack "B_parachute"; _x moveInCargo _newvehicle; _x assignAsCargo _newvehicle;} forEach (units _para_group);

while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
Expand Down
11 changes: 7 additions & 4 deletions Missionframework/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2356,8 +2356,11 @@
<Chinesesimp>附身</Chinesesimp>
<Chinese>取代</Chinese>
<Turkish>Değiştir</Turkish>
<Portuguese>Substituir</Portuguese>.
<Korean>분대원 교체</Korean><Czech>Nahradit</Czech><Japanese>置き換え</Japanese></Key>
<Portuguese>Substituir</Portuguese>
<Korean>분대원 교체</Korean>
<Czech>Nahradit</Czech>
<Japanese>置き換え</Japanese>
</Key>
<Key ID="STR_DEPLOY_ON_MEMBER_TOOLTIP">
<Original>You will deploy on the selected squad member and replace them while keeping your current loadout.</Original>
<French>Vous allez vous déployer à la place du member d'escouade selectionné tout en conservant votre équipement actuel.</French>
Expand Down Expand Up @@ -6252,7 +6255,7 @@
<Japanese>民間人 %1 が %2 に殺害された!</Japanese>
</Key>
<Key ID="STR_CR_VEHICLEMSG">
<Original>A civilian's vehicle was seized!</Original>
<Original>Citizens reporting their vehicle was seized by %1!</Original>
<German>Ein Zivilfahrzeug wurde beschlagnahmt!</German>
<Spanish>Un vehículo civil fue tomado!</Spanish>
<Russian>Транспорт гражданского был захвачен!</Russian>
Expand All @@ -6263,7 +6266,7 @@
<Portuguese>Um veículo de civil foi tomado!</Portuguese>
<Korean>민간인의 차량이 탈취되었다!</Korean>
<Czech>Civilní vozidlo bylo zajato jednotkami BLUFOR!</Czech>
<Japanese>民間車両を違法に徴用しています!</Japanese>
<Japanese>市民は %1 によって彼らの車両が不当に徴用されたと報告しています!</Japanese>
</Key>
<Key ID="STR_CR_BUILDINGMSG">
<Original>Civilians are complaining about %1 lost buildings.</Original>
Expand Down

0 comments on commit 689c3e9

Please sign in to comment.