Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ if (isServer) then {
_zeus setCuratorCoef ["Place", 0];
_zeus setCuratorCoef ["Delete", 0];

removeAllCuratorAddons _zeus;
};

_zeus setVariable ["KPLIB_limited", _limited];
Expand Down
6 changes: 4 additions & 2 deletions Missionframework/kp_liberation_config.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ KP_liberation_preset_blufor = 0;
17 = CUP Armed Forces of the Russian Federation (Modern MSV)
18 = CUP Chernarus Defense Force
19 = CUP British Armed Forces (Desert)
20 = CUP British Armed Forces (Woodland) */
20 = CUP British Armed Forces (Woodland)
21 = RHS USAF (Woodland)*/
KP_liberation_preset_opfor = 0;

/* Resistance preset:
Expand Down Expand Up @@ -204,8 +205,9 @@ GRLIB_color_enemy_bright = "ColorRED"; // Enemy

GRLIB_fob_range = 125; // Build range around the main FOB building.
GRLIB_halo_altitude = 2500; // Altitude in metres for the HALO jump.
GRLIB_secondary_missions_costs = [15, 10, 8]; // Intel price for the secondary missions [FOB hunting, Convoy ambush, SAR].
GRLIB_secondary_missions_costs = [15, 10, 8, 5]; // Intel price for the secondary missions [FOB hunting, Convoy ambush, SAR, Humanitarian Aid].
GRLIB_secondary_objective_impact = 0.6; // The percentage impact against enemy combat readiness for a successful FOB hunt.
KP_liberation_civ_supplies_impact = 5; // The percentage increase received when completing a Humanitarian Aid secondary objective
GRLIB_recycling_percentage = 0.5; // Percentage of resources you get back from recycling.
KP_liberation_production_interval = 30; // Time in minutes until a production process is finished, when resources multiplier is set to 1.

Expand Down
1 change: 1 addition & 0 deletions Missionframework/presets/init_presets.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ switch (KP_liberation_preset_opfor) do {
case 18: {[] call compileFinal preprocessFileLineNumbers "presets\opfor\CUP_CDF.sqf";};
case 19: {[] call compileFinal preprocessFileLineNumbers "presets\opfor\CUP_BAF_Desert.sqf";};
case 20: {[] call compileFinal preprocessFileLineNumbers "presets\opfor\CUP_BAF_Woodland.sqf";};
case 21: {[] call compileFinal preprocessFileLineNumbers "presets\opfor\rhs_usaf_wdl.sqf";};
default {[] call compileFinal preprocessFileLineNumbers "presets\opfor\custom.sqf";};
};

Expand Down
143 changes: 143 additions & 0 deletions Missionframework/presets/opfor/rhs_usaf_wdl.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
Needed Mods:
- RHS USAF

Optional Mods:
- None
*/

// Enemy infantry classes
opfor_officer = "rhsusf_army_ucp_officer"; // Officer
opfor_squad_leader = "rhsusf_army_ucp_squadleader"; // Squad Leader
opfor_team_leader = "rhsusf_army_ucp_teamleader"; // Team Leader
opfor_sentry = "rhsusf_army_ucp_riflemanl"; // Rifleman (Lite)
opfor_rifleman = "rhsusf_army_ucp_rifleman_m4"; // Rifleman M4
opfor_rpg = "rhsusf_army_ucp_maaws"; // Rifleman (MAAWS)
opfor_grenadier = "rhsusf_army_ucp_grenadier"; // Grenadier
opfor_machinegunner = "rhsusf_army_ucp_autorifleman"; // Autorifleman
opfor_heavygunner = "rhsusf_army_ucp_machinegunner"; // Heavy Gunner
opfor_marksman = "rhsusf_army_ucp_marksman"; // Marksman
opfor_sharpshooter = "rhsusf_army_ucp_m107"; // Sharpshooter
opfor_sniper = "rhsusf_army_ucp_sniper"; // Sniper
opfor_at = "rhsusf_army_ucp_javelin"; // AT Specialist
opfor_aa = "rhsusf_army_ucp_aa"; // AA Specialist
opfor_medic = "rhsusf_army_ucp_medic"; // Combat Life Saver
opfor_engineer = "rhsusf_army_ucp_engineer"; // Engineer
opfor_paratrooper = "O_soldier_PG_F"; // Paratrooper
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to RHS unit


// Enemy vehicles used by secondary objectives.
opfor_mrap = "rhsusf_M1220_usarmy_wd"; // M1220 MRAP
opfor_mrap_armed = "thsusf_M1120_M2_usarmy_wd"; // HMMWV (M2)
opfor_transport_helo = "RHS_UH60M"; // UH 60 M
opfor_transport_truck = "rhsusf_M1083A1P2_WD_fmtv_usarmy"; // M1083A1P2 (Covered)
opfor_ammobox_transport = "rhsusf_M1083A1P2_WD_flatbed_fmtv_usarmy"; // M1083A1P2 (Open)
opfor_fuel_truck = "rhsusf_M978A4_BKIT_usarmy_wd"; // M978A4 Fuel
opfor_ammo_truck = "rhsusf_M977A4_AMMO_BKIT_usarmy_wd"; // M977A4 Ammo
opfor_fuel_container = "Land_Pod_Heli_Transport_04_fuel_F"; // Taru Fuel Pod
opfor_ammo_container = "Land_Pod_Heli_Transport_04_ammo_F"; // Taru Ammo Pod
opfor_flag = "Flag_US_F"; // Flag

/* Adding a value to these arrays below will add them to a one out of however many in the array, random pick chance.
Therefore, adding the same value twice or three times means they are more likely to be chosen more often. */

/* Militia infantry. Lightweight soldier classnames the game will pick from randomly as sector defenders.
Think of them like garrison or military police forces, which are more meant to control the local population instead of fighting enemy armies. */
militia_squad = [
"rhsusf_army_ucp_riflemanl", // Rifleman (Lite)
"rhsusf_army_ucp_riflemanl", // Rifleman (Lite)
"rhsusf_army_ucp_rifleman", // Rifleman
"rhsusf_army_ucp_rifleman", // Rifleman
"rhsusf_army_ucp_riflemanat", // Rifleman (AT)
"rhsusf_army_ucp_autorifleman", // Autorifleman
"rhsusf_army_ucp_marksman", // Marksman
"rhsusf_army_ucp_medic", // Medic
"rhsusf_army_ucp_engineer" // Engineer
];

// Militia vehicles. Lightweight vehicle classnames the game will pick from randomly as sector defenders. Can also be empty for only infantry milita.
militia_vehicles = [
"rhsusf_m1025_w_m2" // HMMWV (M2)
];

// All enemy vehicles that can spawn as sector defenders and patrols at high enemy combat readiness (aggression levels).
opfor_vehicles = [
"rhsusf_m1151_m2_v1_usarmy_wd", // HMMWV (M2)
"rhsusf_m1151_m2crows_usarmy_wd", // HMMWV (M2 Crows)
"rhsusf_m1151_mk19_v2_usarmy_wd", // HMMWV (MK19)
"rhsusf_m1151_m240_usarmy_wd", // HMMWV (TOW)
"RHS_M2A3_BUSKI_wd ", // M2A3 Bradley
"RHS_M2A3_wd", // M2A3 Bradley
"RHS_M6_wd", // M6 AA Bradley
"RHS_M6_wd", // M6 AA Bradley
"rhsusf_m1a1aimwd_usarmy", // M1A1 Abrams
"rhsusf_m1a1aim_tuski_wd", // M1A1 Abrams TUSK I
"rhsusf_m1a2sep1wd_usarmy", // M1A2 Abrams
"rhsusf_m1a2sep1tuskiiwd_usarmy" // M1A2 Abrams TUSK II
];

// All enemy vehicles that can spawn as sector defenders and patrols but at a lower enemy combat readiness (aggression levels).
opfor_vehicles_low_intensity = [
"rhsusf_m1025_w_m2", // HMMWV (HMG)
"rhsusf_m1025_w_m2", // HMMWV (HMG)
"rhsusf_m1045_w_s", // HMMWV (TOW)
"rhsusf_m1240a1_m2_usarmy_wd", // M-ATV (HMG)
"rhsusf_m113_usarmy" // M113
];

// All enemy vehicles that can spawn as battlegroups, either assaulting or as reinforcements, at high enemy combat readiness (aggression levels).
opfor_battlegroup_vehicles = [
"rhsusf_m1151_m2_v1_usarmy_wd", // HMMWV (M2)
"rhsusf_m1025_w_m2", // HMMWV (M2)
"rhsusf_m1025_w_mk19", // HMMWV (MK19)
"rhsusf_m966_w", // HMMWV (TOW)
"rhsusf_M1232_M2_usarmy_wd", // M1232 Transport (M2)
"rhsusf_M1078A1P2_WD_fmtv_usarmy", // M1078A1P2 Transport (Covered)
"rhsusf_stryker_m1127_m2_wd", // Stryker
"RHS_M2A2_wd", // Bradley
"RHS_M6_wd", // M6 AA Bradley
"RHS_M6_wd", // M6 AA Bradley
"rhsusf_m1a1aimwd_usarmy", // M1A1 Abrams
"rhsusf_m1a2sep1wd_usarmy", // M1A2 Abrams
"rhsusf_m1a2sep1tskiwd_usarmy", // M1A2 Abrams TUSK I
"rhsusf_m1a2sep1tskiiwd_usarmy", // M1A2 Abrams TUSK II
"RHS_UH1Y_d", // UH1Y (Armed)
"RHS_UH60M_d", // UH60M
"RHS_CH_47F_10", // Chinhook
"RHS_AH64D_wd" // AH64D
];

// All enemy vehicles that can spawn as battlegroups, either assaulting or as reinforcements, at lower enemy combat readiness (aggression levels).
opfor_battlegroup_vehicles_low_intensity = [
"rhsusf_m1025_w_m2", // HMMWV (M2)
"rhsusf_m1151_ma_v1_usarmy_wd", // HMMWV (M2)
"rhsusf_M1232_M2_usarmy_wd", // M1232 Transport (M2)
"rhsusf_m113_usarmy_M240", // M113 (M240)
"RHS_M2A2_wd", // M2A2 Bradley
"RHS_M6_wdF", // M6 AA Bradley
"RHS_UH1Y_d", // UH1Y (Armed)
"RHS_UH60M_d" // UH60M
];

/* All vehicles that spawn within battlegroups (see the above 2 arrays) and also hold 8 soldiers as passengers.
If something in this array can't hold all 8 soldiers then buggy behaviours may occur. */
opfor_troup_transports = [
"rhsusf_M1078A1P2_WD_fmtv_usarmy", // M1078A1P2 Transport (Covered)
"rhsusf_stryker_m1127_m2_wd", // Stryker
"rhsusf_M1232_M2_usarmy_wd", // M1232 Transport (M2)
"RHS_UH60M_d", // UH60M
"RHS_CH_47F_10" // Chinhook
];

// Enemy rotary-wings that will need to spawn in flight.
opfor_choppers = [
"RHS_UH60M_d", // UH60M
"RHS_UH1Y_d", // UH1Y (Armed)
"RHS_AH64D_wd", // AH64D
"RHS_CH_47F_10" // Chinhook
];

// Enemy fixed-wings that will need to spawn in the air.
opfor_air = [
"RHS_A10", // A10
"rhsuf_f22" // F22
];
Binary file added Missionframework/res/secondary/hum_aid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions Missionframework/scripts/client/remotecall/remote_call_intel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,33 @@ switch (_notiftype) do {
deleteMarkerLocal "secondarymarkerzone";
secondary_objective_position_marker = [];
};
// civ-supplies mission
case 9: {
waitUntil {!isNil "secondary_objective_position_marker"};
waitUntil {count secondary_objective_position_marker > 0};
waitUntil {secondary_objective_position_marker distance zeropos > 1000};
["lib_intel_civ_supplies", [markertext ([10000, secondary_objective_position_marker] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
_secondary_marker = createMarkerLocal ["secondarymarker", secondary_objective_position_marker];
_secondary_marker setMarkerColorLocal "ColorGREEN";
_secondary_marker setMarkerTypeLocal "hd_end";

_secondary_marker_zone = createMarkerLocal ["secondarymarkerzone", secondary_objective_position_marker];
_secondary_marker_zone setMarkerColorLocal "ColorGREEN";
_secondary_marker_zone setMarkerShapeLocal "ELLIPSE";
_secondary_marker_zone setMarkerBrushLocal "FDiagonal";
_secondary_marker_zone setMarkerSizeLocal [50,50];
};
case 10: {
["lib_secondary_civ_supplies_complete"] call BIS_fnc_showNotification;
deleteMarkerLocal "secondarymarker";
deleteMarkerLocal "secondarymarkerzone";
secondary_objective_position_marker = [];
};
case 11: {
//notify there are no friendly towns
["lib_secondary_civ_supplies_no_room"] call BIS_fnc_showNotification;
//return intel points used
resources_intel = resources_intel + ( GRLIB_secondary_missions_costs select 3);
};
default {[format ["remote_call_intel.sqf -> no valid value for _notiftype: %1", _notiftype], "ERROR"] remoteExecCall ["KPLIB_fnc_log", 2];};
};
9 changes: 6 additions & 3 deletions Missionframework/scripts/client/ui/secondary_ui.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,24 @@ waitUntil { dialog };
} foreach [
"STR_SECONDARY_MISSION0",
"STR_SECONDARY_MISSION1",
"STR_SECONDARY_MISSION2"
"STR_SECONDARY_MISSION2",
"STR_SECONDARY_MISSION3"
];

private [ "_oldchoice", "_images", "_briefings", "_missioncost" ];

_images = [
"res\secondary\fob_hunting.jpg",
"res\secondary\convoy_hijack.jpg",
"res\secondary\sar.jpg"
"res\secondary\sar.jpg",
"res\secondary\hum_aid.jpg"
];

_briefings = [
"STR_SECONDARY_BRIEFING0",
"STR_SECONDARY_BRIEFING1",
"STR_SECONDARY_BRIEFING2"
"STR_SECONDARY_BRIEFING2",
"STR_SECONDARY_BRIEFING3"
];

_oldchoice = -1;
Expand Down
1 change: 1 addition & 0 deletions Missionframework/scripts/server/init_server.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ send_paratroopers = compileFinal preprocessFileLineNumbers "scripts\server\patro
fob_hunting = compileFinal preprocessFileLineNumbers "scripts\server\secondary\fob_hunting.sqf";
convoy_hijack = compileFinal preprocessFileLineNumbers "scripts\server\secondary\convoy_hijack.sqf";
search_and_rescue = compileFinal preprocessFileLineNumbers "scripts\server\secondary\search_and_rescue.sqf";
civ_supplies = compileFinal preprocessFileLineNumbers "scripts\server\secondary\civ_supplies.sqf";

// Sector
attack_in_progress_fob = compileFinal preprocessFileLineNumbers "scripts\server\sector\attack_in_progress_fob.sqf";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ resources_intel = resources_intel - ( GRLIB_secondary_missions_costs select _mis
if (_mission_index == 0) then {[] spawn fob_hunting;};
if (_mission_index == 1) then {[] spawn convoy_hijack;};
if (_mission_index == 2) then {[] spawn search_and_rescue;};
if (_mission_index == 3) then {[] spawn civ_supplies;};

GRLIB_secondary_starting = false; publicVariable "GRLIB_secondary_starting";

Expand Down
99 changes: 99 additions & 0 deletions Missionframework/scripts/server/secondary/civ_supplies.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
Creates a secondary objective mission to allow players to bring 2x supply crates to a
random friendly town in order to raise civilian rep.

Configurable options (kp_liberation_config):
GRLIB_secondary_missions_costs select 3 = intel cost for mission (default 5)
KP_liberation_civ_supplies_impact = % increase in civilian rep (default 5)
*/

_supplies_present = false;

//select random blufor owned town (capture)

_blufor_towns = [];

//check if blufor_sectors item is contained within sectors_capture and push into array
{
if (_x in sectors_capture) then {
_blufor_towns pushBack _x;
};
} forEach blufor_sectors;

// Check if town array is empty
if(count _blufor_towns == 0) exitWith {
//if empty, throw error in log and call proper intel notification
["There are no friendly towns to spawn supplies at!", "ERROR"] call KPLIB_fnc_log;
[11] remoteExec ["remote_call_intel"];
};

_objective_town = selectRandom _blufor_towns;


//create 50m radius marker at town
secondary_objective_position = getMarkerPos _objective_town;
secondary_objective_position_marker = secondary_objective_position;
publicVariable "secondary_objective_position_marker";
sleep 1;

//start secondary mission
GRLIB_secondary_in_progress = 3; publicVariable "GRLIB_secondary_in_progress";
[9] remoteExec ["remote_call_intel"];

//create note in log
diag_log format ["Starting Humanitarian Aid objective in %1",_objective_town];

//while loop to wait until 2x supply crates have been brought to within 50m of objective
while {_supplies_present == false} do {

_supplies_in_zone = [];
_objects_to_check = [];

//get list of all objects in marker area
_objects_to_check = vehicles inAreaArray [secondary_objective_position, 50, 50];


{
//loop through all objects and check if they are the correct supply crates and not currently sitting inside vics
if (typeOf _x == KP_liberation_supply_crate && isNull attachedTo _x) then {

//if they are the right crate, add to the supplies array to be counted
_supplies_in_zone pushBack _x;
};

} forEach _objects_to_check;

//if there are 2 or more of the correct crates, delete them and leave the mission while loop
if (count _supplies_in_zone > 1) then {

{
deleteVehicle _x;
} forEach _supplies_in_zone;

_supplies_present = true;

//if not, wait 5 seconds and check again
} else {
sleep 5;
};

};

//add civ rep for a completed mission based on value in kp_liberation_config
[KP_liberation_civ_supplies_impact] spawn F_cr_changeCR;

//display end notificaiton
[10] remoteExec ["remote_call_intel"];

//add +1 completed secondary mission for the campaign end screen
stats_secondary_objectives = stats_secondary_objectives + 1;

//declare secondary mission completed
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";

//execute a save
sleep 1;
[] spawn KPLIB_fnc_doSave;

//create note in log
diag_log format ["Humanitarian Aid secondary objective complete at %1. Increasing civ rep by %2",_objective_town, KP_liberation_civ_supplies_impact];
Loading