Added HVT assassination task which can spawn due informant delivery
closes #146
This commit is contained in:
parent
052c367406
commit
c9dccd2391
|
@ -118,9 +118,11 @@ KP_liberation_civinfo_max = 10800; // Civil Informant maximum
|
|||
KP_liberation_civinfo_chance = 75; // Civil Informant spawn chance. (0-100)
|
||||
KP_liberation_civinfo_intel = 5; // Civil Informant intel amount.
|
||||
KP_liberation_civinfo_duration = 1200; // Civil Informant staytime until despawning. (seconds)
|
||||
KP_liberation_civinfo_task_chance = 40; // Chance (0-100) that the delivered informant will spawn a time critical task.
|
||||
KP_liberation_civinfo_task_duration = 900; // Duration until the task will despawn if no player is near. (seconds)
|
||||
|
||||
KP_liberation_convoy_ambush_chance = 5; // Chance that a logistic convoy will be ambushed, when civil reputation is low.
|
||||
KP_liberation_convoy_ambush_duration = 1800; // Duration of the convoy ambush event. (seconds)
|
||||
KP_liberation_convoy_ambush_duration = 1200; // Duration of the convoy ambush event. (seconds)
|
||||
|
||||
KP_liberation_resistance_tier2 = 30; // At which strength (0-100) the guerilla forces will be at tier 2?
|
||||
KP_liberation_resistance_tier3 = 70; // At which strength (0-100) the guerilla forces will be at tier 3?
|
||||
|
|
|
@ -23,5 +23,27 @@ switch (_notif_id) do {
|
|||
["lib_civ_informant_death"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "informantmarker";
|
||||
};
|
||||
case 4: {
|
||||
["lib_civ_hvt_start", [markertext ([10000, _pos] call F_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
private _marker = createMarker ["HVT_marker", _pos];
|
||||
_marker setMarkerColor GRLIB_color_enemy_bright;
|
||||
_marker setMarkerType "hd_unknown";
|
||||
|
||||
private _marker_zone = createMarker ["HVT_zone", _pos];
|
||||
_marker_zone setMarkerColor GRLIB_color_enemy_bright;
|
||||
_marker_zone setMarkerShape "ELLIPSE";
|
||||
_marker_zone setMarkerBrush "FDiagonal";
|
||||
_marker_zone setMarkerSize [500,500];
|
||||
};
|
||||
case 5: {
|
||||
["lib_civ_hvt_success"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "HVT_marker";
|
||||
deleteMarkerLocal "HVT_zone";
|
||||
};
|
||||
case 6: {
|
||||
["lib_civ_hvt_fail"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "HVT_marker";
|
||||
deleteMarkerLocal "HVT_zone";
|
||||
};
|
||||
default {private _text = format ["[KP LIBERATION] [ERROR] civinfo_notifications.sqf -> no valid value for _notif_id: %1", _notif_id];_text remoteExec ["diag_log",2];};
|
||||
};
|
||||
|
|
|
@ -62,8 +62,8 @@ _defenders_to_build = [
|
|||
[opfor_sentry,[6,-20,1],0],
|
||||
[opfor_sentry,[3,-23,1],90],
|
||||
[opfor_rifleman,[3,-20,1],180],
|
||||
[opfor_officer,[6,-23,1],270],
|
||||
[opfor_officer,[3,-18,1],180],
|
||||
[opfor_team_leader,[6,-23,1],270],
|
||||
[opfor_team_leader,[3,-18,1],180],
|
||||
[opfor_sentry,[6,-18,1],270],
|
||||
[opfor_rifleman,[-9,25,1],180],
|
||||
[opfor_sentry,[-11,25,1],180],
|
||||
|
|
|
@ -65,7 +65,7 @@ _defenders_to_build = [
|
|||
[ opfor_machinegunner, [-4.14, 3.26, 4.64], 155.19 ],
|
||||
[ opfor_marksman, [-1.97, 5.92, 17.89], 39.77 ],
|
||||
[ opfor_sentry, [-5.07, 4.03, 13.02], 288.05 ],
|
||||
[ opfor_officer, [-6.25, 3.04, 15.37], 288.05 ],
|
||||
[ opfor_team_leader, [-6.25, 3.04, 15.37], 288.05 ],
|
||||
[ opfor_sentry, [5.03, 5.17, 0], 245.18 ],
|
||||
[ opfor_sentry, [7.48, 0.16, 0], 140.42 ],
|
||||
[ opfor_sentry, [-7.52, 2.19, 15.37], 53.89 ],
|
||||
|
|
|
@ -62,7 +62,7 @@ _defenders_to_build = [
|
|||
[ opfor_sentry, [13.86, -12.54, 0], 348.81 ],
|
||||
[ opfor_engineer, [15.06, -11.78, 0], 288.05 ],
|
||||
[ opfor_rifleman, [9.24, 16.75, 0.6], 129.9 ],
|
||||
[ opfor_officer, [10.71, 16.31, 0.6], 288.05 ],
|
||||
[ opfor_team_leader, [10.71, 16.31, 0.6], 288.05 ],
|
||||
[ opfor_aa, [15.62, 12.01, 3.09], 124.01 ],
|
||||
[ opfor_sentry, [-17.92, -8.58, 0.73], 122.29 ],
|
||||
[ opfor_aa, [8.45, 18.85, 3.13], 335.85 ],
|
||||
|
|
|
@ -53,7 +53,7 @@ _defenders_to_build = [
|
|||
[ opfor_sentry, [-13.57, -0.21, 0], 280.01 ],
|
||||
[ opfor_rifleman, [9.47, -10.01, 0.6], 129.9 ],
|
||||
[ opfor_rifleman, [9.67, -11.29, 0.6], 53.89 ],
|
||||
[ opfor_officer, [10.93, -10.44, 0.6], 288.05 ],
|
||||
[ opfor_team_leader, [10.93, -10.44, 0.6], 288.05 ],
|
||||
[ opfor_aa, [14.26, -9.29, 3.13], 48.56 ],
|
||||
[ opfor_rifleman, [11.05, -14.06, 0.6], 105.44 ],
|
||||
[ opfor_at, [8.89, -16.68, 3.13], 201.77 ],
|
||||
|
|
|
@ -40,7 +40,7 @@ _defenders_to_build = [
|
|||
[ opfor_engineer, [2.31, 4.93, 0], 158.22 ],
|
||||
[ opfor_rifleman, [3.96, -9.85, 0], 37.83 ],
|
||||
[ opfor_machinegunner, [-9.04, -11.04, 3.13], 48.56 ],
|
||||
[ opfor_officer, [-12.46, -12.21, 0.6], 288.05 ],
|
||||
[ opfor_team_leader, [-12.46, -12.21, 0.6], 288.05 ],
|
||||
[ opfor_aa, [-14.62, -9.64, 3.13], 335.85 ],
|
||||
[ opfor_sharpshooter, [17.7, 2.21, 4.35], 31.1 ],
|
||||
[ opfor_aa, [-7.46, -16.48, 3.09], 124.01 ],
|
||||
|
|
|
@ -22,7 +22,6 @@ if (count GRLIB_all_fobs == 0) then {
|
|||
|
||||
_spawnplace = selectRandom _potentialplaces;
|
||||
[markerPos _spawnplace, true] remoteExec ["build_fob_remote_call",2];
|
||||
|
||||
} else {
|
||||
private _fobbox = objNull;
|
||||
|
||||
|
@ -39,11 +38,8 @@ if (count GRLIB_all_fobs == 0) then {
|
|||
sleep 1;
|
||||
!(alive _fobbox) || ((count GRLIB_all_fobs) > 0) || (((getPosASL _fobbox) select 2) < 0)
|
||||
};
|
||||
|
||||
sleep 15;
|
||||
|
||||
sleep 15;
|
||||
};
|
||||
|
||||
deleteVehicle _fobbox;
|
||||
};
|
||||
|
||||
|
@ -75,5 +71,4 @@ if (count GRLIB_all_fobs == 0) then {
|
|||
private _smoke = "SmokeShellGreen" createVehicle (getPos _x);
|
||||
_smoke attachTo [_x];
|
||||
} forEach _crateArray;
|
||||
|
||||
};
|
||||
|
|
|
@ -2,6 +2,18 @@ params ["_informant"];
|
|||
|
||||
if (isServer && alive _informant) then {
|
||||
resources_intel = resources_intel + KP_liberation_civinfo_intel;
|
||||
[2, false] spawn F_cr_changeCR;
|
||||
[2] spawn F_cr_changeCR;
|
||||
[1] remoteExec ["civinfo_notifications"];
|
||||
|
||||
sleep 6;
|
||||
|
||||
if ((random 100) <= KP_liberation_civinfo_task_chance) then {
|
||||
private _hc = [] call F_lessLoadedHC;
|
||||
|
||||
if (isNull _hc) then {
|
||||
[] spawn civinfo_task;
|
||||
} else {
|
||||
[] remoteExec ["civinfo_task", _hc];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] Module initialising on: %1", debug_source];_text remoteExec ["diag_log",2];};
|
||||
|
||||
// Scripts
|
||||
// Task selection and spawning
|
||||
civinfo_task = compileFinal preprocessFileLineNumbers "scripts\server\civinformant\tasks\civinfo_task.sqf";
|
||||
|
||||
// Start spawn loop
|
||||
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\civinformant\civinfo_loop.sqf";
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] civinfo_task.sqf spawned on: %1", debug_source];_text remoteExec ["diag_log",2];};
|
||||
|
||||
private _spawn_marker = [2000,999999,false] call F_findOpforSpawnPoint;
|
||||
private _roadObj = [markerPos _spawn_marker, 400, []] call BIS_fnc_nearestRoad;
|
||||
|
||||
if (isNull _roadObj) exitWith {if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] civinfo_task.sqf -> no road found";_text remoteExec ["diag_log",2];};};
|
||||
|
||||
private _veh = createVehicle [opfor_mrap, getPos _roadObj, [], 0, "NONE"];
|
||||
_veh setDir (getDir _roadObj);
|
||||
{
|
||||
if ((_x find "FWheel") != -1) then {
|
||||
_veh setHitPointDamage [_x, 1];
|
||||
};
|
||||
} forEach ((getAllHitPointsDamage _veh) select 0);
|
||||
|
||||
private _grp = createGroup GRLIB_side_enemy;
|
||||
private _hvt = _grp createUnit [opfor_officer, getPos _roadObj, [], 30, "NONE"];
|
||||
for "_i" from 1 to 4 do {
|
||||
(selectRandom militia_squad) createUnit [_grp, _grp, "this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]"];
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
private _waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] civinfo_task.sqf -> vehicle and group created on: %1", debug_source];_text remoteExec ["diag_log",2];};
|
||||
|
||||
private _marker_pos = [((((getPos _roadObj) select 0) + 200) - random 400),((((getPos _roadObj) select 1) + 200) - random 400),0];
|
||||
|
||||
[4, _marker_pos] remoteExec ["civinfo_notifications"];
|
||||
|
||||
private _time_remaining = KP_liberation_civinfo_task_duration;
|
||||
|
||||
while {(alive _hvt) && _time_remaining > 0} do {
|
||||
uiSleep 1;
|
||||
private _player_near = false;
|
||||
{
|
||||
if (((_x distance _veh) < 1000) && (alive _x)) exitWith {_player_near = true};
|
||||
} foreach allPlayers;
|
||||
|
||||
if !(_player_near) then {
|
||||
_time_remaining = _time_remaining - 1;
|
||||
};
|
||||
if ((KP_liberation_civinfo_debug > 0) && ((_time_remaining % 60) == 0)) then {private _text = format ["[KP LIBERATION] [CIVINFO] civinfo_task.sqf -> Task will despawn in %1 minutes", round (_time_remaining / 60)];_text remoteExec ["diag_log",2];};
|
||||
};
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVINFO] civinfo_task.sqf -> loop exited on: %1", debug_source];_text remoteExec ["diag_log",2];};
|
||||
|
||||
if (alive _hvt) then {
|
||||
deleteVehicle _veh;
|
||||
{deleteVehicle _x} forEach (units _grp);
|
||||
[6] remoteExec ["civinfo_notifications"];
|
||||
if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] civinfo_task.sqf -> Task despawned";_text remoteExec ["diag_log",2];};
|
||||
} else {
|
||||
combat_readiness = round (combat_readiness * 0.8);
|
||||
if (!isServer) then {
|
||||
publicVariableServer "combat_readiness";
|
||||
};
|
||||
[5] remoteExec ["civinfo_notifications"];
|
||||
if (KP_liberation_civinfo_debug > 0) then {private _text = "[KP LIBERATION] [CIVINFO] civinfo_task.sqf -> Task ended with success";_text remoteExec ["diag_log",2];};
|
||||
};
|
|
@ -12,6 +12,7 @@ wait_to_spawn_sector = compileFinal preprocessFileLineNumbers "scripts\server\se
|
|||
manage_asymIED = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\ied\manage_asymIED.sqf";
|
||||
sector_guerilla = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\sector_guerilla.sqf";
|
||||
asym_sector_ambush = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\asym_sector_ambush.sqf";
|
||||
civinfo_task = compileFinal preprocessFileLineNumbers "scripts\server\civinformant\tasks\civinfo_task.sqf";
|
||||
|
||||
[] spawn compileFinal preprocessFileLineNumbers "scripts\client\misc\synchronise_vars.sqf";
|
||||
[] spawn compileFinal preprocessFileLineNumbers "scripts\server\offloading\show_fps.sqf";
|
||||
|
|
|
@ -4876,5 +4876,17 @@
|
|||
<Original>You need a field dressing.</Original>
|
||||
<German>Du brauchst eine einfache Bandage.</German>
|
||||
</Key>
|
||||
<Key ID="STR_NOTIFICATION_CIV_HVT_START">
|
||||
<Original>There is a high ranked officer near %1.</Original>
|
||||
<German>Ein hochrangiger Offizier befindet sich in der Nähe von %1.</German>
|
||||
</Key>
|
||||
<Key ID="STR_NOTIFICATION_CIV_HVT_SUCCESS">
|
||||
<Original>The officer was successfully killed.</Original>
|
||||
<German>Der Offizier konnte erfolgreich getötet werden.</German>
|
||||
</Key>
|
||||
<Key ID="STR_NOTIFICATION_CIV_HVT_FAIL">
|
||||
<Original>The officer has moved on.</Original>
|
||||
<German>Der Offizier ist weitergezogen.</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
|
|
@ -160,6 +160,15 @@ class CfgNotifications {
|
|||
class lib_civ_informant_death : lib_intel {
|
||||
description = $STR_NOTIFICATION_CIV_INFORMANT_DEATH;
|
||||
};
|
||||
class lib_civ_hvt_start : lib_intel {
|
||||
description = $STR_NOTIFICATION_CIV_HVT_START;
|
||||
};
|
||||
class lib_civ_hvt_success : lib_intel {
|
||||
description = $STR_NOTIFICATION_CIV_HVT_SUCCESS;
|
||||
};
|
||||
class lib_civ_hvt_fail : lib_intel {
|
||||
description = $STR_NOTIFICATION_CIV_HVT_FAIL;
|
||||
};
|
||||
class lib_asymm_convoy_ambush : lib_default_notification {
|
||||
title = $STR_NOTIFICATION_ASYMMCONVOYAMBUSH_TITLE;
|
||||
description = $STR_NOTIFICATION_ASYMMCONVOYAMBUSH_TEXT;
|
||||
|
|
|
@ -176,6 +176,7 @@ class Missions
|
|||
* Added: Civil informant.
|
||||
* Added: If you've a good reputation, a civil informant can rarely spawn at blufor sectors.
|
||||
* Added: Intel increase, if you capture the informant and bring him back to a FOB.
|
||||
* Added: There is a chance that an informant will reveal a time critical task to kill a HVT.
|
||||
* Added: Asymmetric Threats.
|
||||
* Added: Possibility of IEDs in blufor sectors, if you have a bad civil reputation.
|
||||
* Added: Own logistic convoys can be ambushed by guerilla forces.
|
||||
|
@ -194,6 +195,7 @@ class Missions
|
|||
* Added: Turkish localization. Thanks to [Carbneth](https://github.com/Carbneth)
|
||||
* Removed: Liberation skill handling of AI units, as BI do this good enough now concerning wounds, etc.
|
||||
* Removed: Vehicle explosion chance script for convoy ambush.
|
||||
* Removed: Old debug messages.
|
||||
* Tweaked: Terrain alignment will be persistent during repeat building of objects (like walls). Thanks to [veteran29](https://github.com/veteran29)
|
||||
* Tweaked: Some reordering of UI elements.
|
||||
* Tweaked: Localization support for the extended options menu. Thanks to [nercon](https://github.com/nercon)
|
||||
|
|
Loading…
Reference in New Issue