Skip to content

Commit

Permalink
Version 2.0.21
Browse files Browse the repository at this point in the history
New Features:
- New objective POW and reporter rescue (pow can be shot by enemy when rescued, reporter will not be shot at by enemy
- Events added: These events are optional, and you may not even encounter them.  Helping out at an event will increase your rep (making it easier to maintain your rep, or if campaign mode, then will help you move up the ranks!)
    - Event: Medical Assistance (talk to the paramedics to assist and increase rep)
    - Event: Pilot or Press Rescue (get him back to base to increase rep)
    - Event: Civilian brakdown assist (could be a trap/ambush!)
    - Event: Ambushed Convoy, needs wounded extracted (enemy may be hidden ready to ambush)
- New mode, "Main, with two unmarked optional sides"
- New mode "Three hidden missions"

Possible Event Outcomes
- VBIED (Vehicle-Borne Improvised Explosive Device)
- Enemy Ambush
- Suicide Bombers
- Simply Nothing!(edited)
Other Tweaks
- can now get intel from comms tower
- civs are no longer all the same
- UAV option will now constantly show once you get to the main marker building of a main AO, also, will fail task if target dead or escaped
- maintain rep task harder to fulfil now, however, you can assist in side or events to increase rep to help maintain this task
- Added playable civilian cameramen (invisible civs that can move fast and teleport, kind of like a spectator, but with TFAR or other radio mod, you can hear comms!)
- rhs F22 CHANGE A10 (CAS)
- smoke rounds added for all factions (in ammo crate)
- Tank DLC sound tracks added to intro music

Bug Fixes
Fixed: Campaign didn’t have option to end and debrief (future version will have some closing credits and report data)
Fixed: Issue that would not always allow to call transport chopper inside an AO after task completed
Fixed: Bug when trying to set sandstorm to endless
Fixed: Warning message for friendly and enemy faction changes were around the wrong way
Fixed - Saving campaign on server wasn’t working correctly
Fixed - rep increase reason didn’t show when killed weapon dealer
  • Loading branch information
treendy authored and treendy committed Apr 12, 2018
1 parent 9377beb commit 2899c48
Show file tree
Hide file tree
Showing 40 changed files with 3,851 additions and 620 deletions.
4 changes: 4 additions & 0 deletions RandFramework/AdjustMaxBadPoints.sqf
@@ -1,3 +1,5 @@
//example: [0.3, _PointsAdjustMessage] execVM "RandFramework\AdjustMaxBadPoints.sqf";

#include "../setUnitGlobalVars.sqf";

//if (bDebugMode) then {hint format["Points adjusting: %1", TRGM_Logic getVariable "PointsUpdating"]};
Expand All @@ -17,3 +19,5 @@ BadPointsReason = BadPointsReason + format["<br /><t color='#00ff00'>%1 (+%2)</t
publicVariable "BadPointsReason";

TRGM_Logic setVariable ["PointsUpdating", false, true];


8 changes: 6 additions & 2 deletions RandFramework/Campaign/ServerSave.sqf
@@ -1,12 +1,16 @@
//Note: this will always save on the server, if local or single player, will save on client, otherwise, if dedicated, will save on dedicated server, reason, if player who has saved the mission
// disconnects, we will not be able to save it to the client, so we store that players ID and store it on the server (I think i have disabled this for single player... as they can save/load anyway)
// future update may allow this to be saved on single player, incase they want to run campaign on mixed maps

params["_SaveType","_IsFirstSave"];

//sInitialSLPlayerID
_SaveVersion = "";
if (_SaveType == 1) then {
_SaveVersion = "LOCAL"
_SaveVersion = worldName;
};
if (_SaveType == 2) then {
_SaveVersion = worldName
_SaveVersion = "GLOBAL";
};


Expand Down
37 changes: 18 additions & 19 deletions RandFramework/Campaign/SetMissionBoardOptions.sqf
Expand Up @@ -4,7 +4,7 @@ _option = _this select 0;


//all players will have this run, need to make sure only show for commander

_dCurrentRep = [MaxBadPoints - BadPoints,1] call BIS_fnc_cutDecimals;

switch (_option) do {
case "INIT": {
Expand Down Expand Up @@ -62,42 +62,42 @@ switch (_option) do {
[endMissionBoard, ["Recruit Medic","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitMedic,"Medic"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Medic","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitMedic,"Medic"]]] remoteExec ["addAction", 0];

if (MaxBadPoints == 3) then {
if (_dCurrentRep == 3) then {
[endMissionBoard, ["**Recruit Automatic Rifleman**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit Automatic Rifleman**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints > 3) then {
if (_dCurrentRep > 3) then {
[endMissionBoard, ["Recruit Automatic Rifleman","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Automatic Rifleman","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints == 5) then {
if (_dCurrentRep == 5) then {
[endMissionBoard, ["**Recruit Sniper**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit Sniper**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];

[endMissionBoard, ["**Recruit Spotter**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit Spotter**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints > 5) then {
if (_dCurrentRep > 5) then {
[endMissionBoard, ["Recruit Sniper","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Sniper","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];

[endMissionBoard, ["Recruit Spotter","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter,"Spotter"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Spotter","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter,"Spotter"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints == 7) then {
if (_dCurrentRep == 7) then {
[endMissionBoard, ["**Recruit UAV Operator**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit UAV Operator**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints > 7) then {
if (_dCurrentRep > 7) then {
[endMissionBoard, ["Recruit UAV Operator","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit UAV Operator","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
};
};
case "MISSION_COMPLETE": {
endMissionBoard remoteExec ["removeAllActions"];
endMissionBoard remoteExec ["removeAllActions"];
if (MaxBadPoints >= 10) then {
[endMissionBoard, ["!!Request Final Assignment!!","[[],""RandFramework\Campaign\StartMission.sqf""] remoteExec [""BIS_fnc_execVM"",0,true];"]] remoteExec ["addAction", 0];
if (_dCurrentRep >= 10) then {
[endMissionBoard, ["!!Request Final Assignment!!","FinalMissionStarted=true;publicVariable ""FinalMissionStarted""; [[],""RandFramework\Campaign\StartMission.sqf""] remoteExec [""BIS_fnc_execVM"",0,true];"]] remoteExec ["addAction", 0];
//[endMissionBoard2, ["!!Request Final Assignment!!","[[],""RandFramework\Campaign\StartMission.sqf""] remoteExec [""BIS_fnc_execVM"",0,true];"]] remoteExec ["addAction", 0];
} else {
[endMissionBoard, ["!!Request Next Mission!!","[[],""RandFramework\Campaign\StartMission.sqf""] remoteExec [""BIS_fnc_execVM"",0,true];"]] remoteExec ["addAction", 0];
Expand All @@ -124,33 +124,33 @@ switch (_option) do {
[endMissionBoard, ["Recruit Medic","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitMedic,"Medic"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Medic","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitMedic,"Medic"]]] remoteExec ["addAction", 0];

if (MaxBadPoints == 3) then {
if (_dCurrentRep == 3) then {
[endMissionBoard, ["**Recruit Automatic Rifleman**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit Automatic Rifleman**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints > 3) then {
if (_dCurrentRep > 3) then {
[endMissionBoard, ["Recruit Automatic Rifleman","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Automatic Rifleman","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitAuto,"Autorifleman"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints == 5) then {
if (_dCurrentRep == 5) then {
[endMissionBoard, ["**Recruit Sniper**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit Sniper**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];

[endMissionBoard, ["**Recruit Spotter**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter,"Spotter"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit Spotter**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter,"Spotter"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints > 5) then {
if (_dCurrentRep > 5) then {
[endMissionBoard, ["Recruit Sniper","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Sniper","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSniper,"Sniper"]]] remoteExec ["addAction", 0];

[endMissionBoard, ["Recruit Spotter","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter,"Spotter"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit Spotter","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitSpotter,"Spotter"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints == 7) then {
if (_dCurrentRep == 7) then {
[endMissionBoard, ["**Recruit UAV Operator**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["**Recruit UAV Operator**","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
};
if (MaxBadPoints > 7) then {
if (_dCurrentRep > 7) then {
[endMissionBoard, ["Recruit UAV Operator","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Recruit UAV Operator","RandFramework\Campaign\RecruiteInf.sqf",[CampaignRecruitUnitUAV,"UAVOperator"]]] remoteExec ["addAction", 0];
};
Expand All @@ -166,10 +166,9 @@ switch (_option) do {
[endMissionBoard, ["Show Rep Report","RandFramework\Campaign\ShowRepReport.sqf"]] remoteExec ["addAction", 0];
[endMissionBoard2, ["Show Rep Report","RandFramework\Campaign\ShowRepReport.sqf"]] remoteExec ["addAction", 0];

if (isMultiplayer) then {
[endMissionBoard, ["End Mission","RandFramework\attemptEndMission.sqf"]] remoteExec ["addAction", 0];
//[endMissionBoard2, ["End Mission","RandFramework\attemptEndMission.sqf"]] remoteExec ["addAction", 0];
};
[endMissionBoard, ["End Campaign","RandFramework\attemptEndMission.sqf"]] remoteExec ["addAction", 0];
//[endMissionBoard2, ["End Mission","RandFramework\attemptEndMission.sqf"]] remoteExec ["addAction", 0];

};
};
if (!isMultiplayer) then {
Expand Down
14 changes: 10 additions & 4 deletions RandFramework/Campaign/StartMission.sqf
Expand Up @@ -46,13 +46,18 @@ if (_bAllowStart) then {

if (_isCampaign) then {
[["NEW_MISSION"],"RandFramework\Campaign\SetMissionBoardOptions.sqf"] remoteExec ["BIS_fnc_execVM",0,true];
if ((Player getVariable ["calUAVActionID", -1]) != -1) then {
player removeAction (Player getVariable ["calUAVActionID", -1]);
player setVariable ["calUAVActionID", nil];
//hint "UAV no longer available";
};
};

//"Marker1" setMarkerPos getMarkerPos "mrkHQ";





if (isServer && _isCampaign) then {

Expand Down Expand Up @@ -120,9 +125,10 @@ if (_bAllowStart) then {
publicVariable "NewMissionMusic";


if (SaveType != 0) then {
[SaveType,false] execVM "RandFramework\Campaign\ServerSave.sqf";
};
//not saving when new day starts, we will save when points change (just incase day starts, but players exit anyway and nothing done on that day)
//if (SaveType != 0) then {
// [SaveType,false] execVM "RandFramework\Campaign\ServerSave.sqf";
//};

};

Expand Down
163 changes: 163 additions & 0 deletions RandFramework/CarryAndJoinWounded.sqf
@@ -0,0 +1,163 @@
_civ=_this select 0;
_player=_this select 1;

//Add other params here so can pass in rep reward reason (so can use for other events, or for bringing back dead players)

if (alive _civ) then {
{
[_x, "Acts_CivilListening_2"] remoteExec ["switchMove", 0];
detach _x;
} forEach attachedObjects _civ;
//_civ setUnconscious true;


_civ disableAI "anim";
_civ disableAI "MOVE";

/*
_civ attachTo [_player, [0.5,0,0]];
_civ setDir 180;
[_civ] spawn {_this select 0 switchMove ""; [_this select 0, "grabCarried"] remoteExec ["playActionNow", 0, false]};
sleep 4;
[_player] spawn {_this select 0 switchMove "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon"; };
*/
//_civ switchMove "";
//sleep 0.1;
//hint "AAAAA";
disableUserInput true;
_pos = _player ModelToWorld [0,1.8,0];
_civ setPos _pos;
//_civ attachTo [_player, [-0.6, 0.28, -0.05]];
_civ attachTo [_player, [0.5,0,0]];
[_civ, 180] remoteExec ["setDir", 0, false];
//_civ attachTo [_player, [0.5,0,0]];
//_civ setDir 180;
[_civ] spawn {_this select 0 switchMove ""; [_this select 0, "grabCarried"] remoteExec ["playActionNow", 0, false]};
sleep 4;
[_player] spawn {_this select 0 switchMove "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon"; };

disableUserInput false;
disableUserInput true;
disableUserInput false;

[_civ,_player] spawn {
_civ = _this select 0;
_player = _this select 1;
_doLoop = true;
while {_doLoop} do {
sleep 0.1;
if (!(alive _player)) then {
_doLoop = false;
[_player, ""] remoteExec ["switchMove", 0, false];
{
if ( _x isKindOf "Man") then {
[_x, "Acts_CivilInjuredGeneral_1"] remoteExec ["switchMove", 0];
detach _x;
};
} forEach attachedObjects _player;
};
if (!(alive _civ)) then {
_doLoop
};

};
};

/*
[_civ,_player] spawn {
_target = _this select 0;
_unit = _this select 1;
detach _unit;
detach _target;
_pos = _unit ModelToWorld [0,1.8,0];
_target setPos _pos;
[_target, "grabCarried"] remoteExec ["playActionNow", 0, false];
disableUserInput true;
sleep 2.5;
if (!isPlayer _target) then {_target disableAI "ANIM"};
[_unit, "grabCarry"] remoteExec ["playActionNow", 0, false];
_unit playActionNow "grabCarry";
disableUserInput false;
disableUserInput true;
disableUserInput false;
_target attachTo [_unit, [-0.6, 0.28, -0.05]];
[_target, 0] remoteExec ["setDir", 0, false];
_doLoop = true;
while {_doLoop} do {
sleep 0.1;
if (!(alive _unit)) then {
_doLoop = false;
[_unit, ""] remoteExec ["switchMove", 0, false];
{
if ( _x isKindOf "Man") then {
[_x, "Acts_CivilInjuredGeneral_1"] remoteExec ["switchMove", 0];
detach _x;
};
} forEach attachedObjects _player;
};
};
};
*/



_iDropActionIndex = _player addAction ["drop", {
_player=_this select 0;
{
if ( _x isKindOf "Man") then {
[_x, "Acts_CivilInjuredGeneral_1"] remoteExec ["switchMove", 0];
detach _x;
};
} forEach attachedObjects _player;
_player switchMove "";
_dropIndex = _player getVariable ["dropActionIndex",-1];
_player removeAction _dropIndex;
_loadIndex = _player getVariable ["loadActionIndex",-1];
_player removeAction _loadIndex;
},nil,10];
_player setVariable ["dropActionIndex",_iDropActionIndex];

_iLoadActionIndex = player addAction ["load wounded in vehicle", {
_player=_this select 0;
_nearestVeh = nearestObjects [_player, ["Car","Tank","Truck","Helicopter"], 10];
if (count _nearestVeh > 0) then {
{
if ( _x isKindOf "Man") then {
detach _x;
_x enableAI "anim";
_x setHitPointDamage ["hitLegs", 1];
[_x] join (group _player);
_x enableAI "MOVE";
[_x, ""] remoteExec ["switchMove", 0, false];
sleep 1;
[_x, (_nearestVeh select 0)] remoteExec ["moveInCargo", 0, false];
[_x, (_nearestVeh select 0)] remoteExec ["assignAsCargo", 0, false];
[_x, (_nearestVeh select 0)] remoteExec ["moveInCargo", 0, false];
[_x, (_nearestVeh select 0)] remoteExec ["assignAsCargo", 0, false];
};
} forEach attachedObjects _player;
_player switchMove "";
_dropIndex = _player getVariable ["dropActionIndex",-1];
_player removeAction _dropIndex;
_loadIndex = _player getVariable ["loadActionIndex",-1];
_player removeAction _loadIndex;
}
else {
hint "No vehicle near"
};
},nil,9];
_player setVariable ["loadActionIndex",_iLoadActionIndex];




}
else
{hint "It's too late. this guy is dead"};
3 changes: 2 additions & 1 deletion RandFramework/GUI/MissionTypeSelection.sqf
Expand Up @@ -12,8 +12,9 @@ if (isNil "AllowMissionTypeCampaign") then {
AllowMissionTypeCampaign = false;
publicVariable "AllowMissionTypeCampaign";
};
_selectedTypeID = MissionParamTypesValues select _selectedIndex;

if (_selectedIndex == 5) then {
if (_selectedTypeID == 5) then {
if (!AllowMissionTypeCampaign) then {
_ctrlTypes = (findDisplay 5000) displayCtrl 5104;
_ctrlTypes ctrlEnable false;
Expand Down
4 changes: 2 additions & 2 deletions RandFramework/GUI/SetParamsAndBegin.sqf
Expand Up @@ -58,10 +58,10 @@ sleep 0.1;

_LoadVersion = "";
if (_SaveType == 1) then {
_LoadVersion = "LOCAL";
_LoadVersion = worldName;
};
if (_SaveType == 2) then {
_LoadVersion = worldName;
_LoadVersion = "GLOBAL";
};

//_ctrl = (findDisplay 5000) displayCtrl 5001;
Expand Down
4 changes: 2 additions & 2 deletions RandFramework/GUI/openDialogAdvancedMissionSettings.sqf
Expand Up @@ -109,15 +109,15 @@ if (EnemyFactionData != "") then {
_lblctrlWarn1 = _display displayCtrl 6996;
_lblctrlWarn1 ctrlSetPosition [0.3 * safezoneW + safezoneX, (0.70 + 0) * safezoneH + safezoneY,1 * safezoneW,0.02 * safezoneH];
_lblctrlWarn1 ctrlSetTextColor [1, 0, 0, 1];
ctrlSetText [6996, "You have friendly class names active, this will overright friendly faction settings you have selected above"];
ctrlSetText [6996, "You have enemy class names active, this will overright enemy faction settings you have selected above"];
_lblctrlWarn1 ctrlCommit 0;
};
if (LoadoutData != "") then {
_display ctrlCreate ["RscText", 6995];
_lblctrlWarn2 = _display displayCtrl 6995;
_lblctrlWarn2 ctrlSetPosition [0.3 * safezoneW + safezoneX, (0.72 + 0) * safezoneH + safezoneY,1 * safezoneW,0.02 * safezoneH];
_lblctrlWarn2 ctrlSetTextColor [1, 0, 0, 1];
ctrlSetText [6995, "You have enemy class names active, this will overright enemy faction settings you have selected above"];
ctrlSetText [6995, "You have friendly class names active, this will overright friendly faction settings you have selected above"];
_lblctrlWarn2 ctrlCommit 0;
};

Expand Down

0 comments on commit 2899c48

Please sign in to comment.