diff --git a/addons/overthrow_main.pbo b/addons/overthrow_main.pbo
deleted file mode 100644
index 0d4b35aa..00000000
Binary files a/addons/overthrow_main.pbo and /dev/null differ
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOattack.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOattack.sqf
index 4100dc9c..46b5bebb 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOattack.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOattack.sqf
@@ -91,6 +91,7 @@ while {_count < _numgroups} do {
{
[_x] joinSilent _tgroup;
_x setVariable ["garrison","HQ",false];
+ _x setVariable ["NOAI",true,false];
}foreach(crew _veh);
{
@@ -99,7 +100,7 @@ while {_count < _numgroups} do {
_x setVariable ["garrison","HQ",false];
}foreach(units _group);
- sleep 1;
+ sleep 2;
_moveto = [OT_NATO_HQPos,500,_dir] call SHK_pos;
_wp = _tgroup addWaypoint [_moveto,0];
@@ -161,9 +162,8 @@ while {_count < _numgroups} do {
_townpop = server getVariable [format["population%1",_town],0];
private ["_size","_active","_alive"];
- sleep 20;
_size = count _soldiers;
- _lostat = round(_size * 0.2);
+ _lostat = round(_size * 0.4);
_active = true;
@@ -171,7 +171,7 @@ while {_count < _numgroups} do {
_alive = [];
_inrange = [];
{
- if(alive _x and !(_x call hasOwner)) then {
+ if(alive _x) then {
_alive pushback _x;
if(_x distance _attackpos < 150) then {
_inrange pushback _x;
@@ -179,7 +179,8 @@ while {_count < _numgroups} do {
};
}foreach(_soldiers);
if(count _alive <= _lostat) then {
- _townpop remoteExec ["influence",0,false];
+ _townpop remoteExec ["influenceSilent",0,false];
+ format["NATO has abandoned %1 (+%2 Influence)",_town,_townpop] remoteExec ["notify_good",0,false];
[_tskid, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
_active = false;
}else{
@@ -202,7 +203,7 @@ while {_count < _numgroups} do {
};
};
};
- sleep 10;
+ sleep 2;
};
};
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOcounter.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOcounter.sqf
index 8ea5ae51..0fde65c6 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOcounter.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/QRF/NATOcounter.sqf
@@ -161,23 +161,22 @@ if((_ao select [0,1]) in ["A","E","I","O","a","e","i","o"]) then {_an = "An"};
_tskid = _this select 3;
private ["_size","_active","_alive"];
- sleep 20;
_size = count _soldiers;
- _lostat = round(_size * 0.2);
+ _lostat = round(_size * 0.4);
_active = true;
-
while {_active} do {
_alive = [];
_inrange = [];
{
- if(alive _x and !(_x call hasOwner)) then {
+ if(alive _x) then {
_alive pushback _x;
if(_x distance _attackpos < 150) then {
_inrange pushback _x;
};
};
}foreach(_soldiers);
+
if(count _alive <= _lostat) then {
[_tskid, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
_active = false;
@@ -212,7 +211,7 @@ if((_ao select [0,1]) in ["A","E","I","O","a","e","i","o"]) then {_an = "An"};
};
};
};
- sleep 10;
+ sleep 2;
};
};
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/policePatrol.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/policePatrol.sqf
index f2176081..bd374ce0 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/policePatrol.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/AI/policePatrol.sqf
@@ -1,7 +1,7 @@
_group = _this;
-_start = getpos ((units _group) select 0);
+_start = server getvariable [((units _group) select 0) getvariable "garrison",getpos ((units _group) select 0)];
_wp = _group addWaypoint [getpos (nearestbuilding _start),5];
_wp setWaypointType "MOVE";
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/UI/mainMenu.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/UI/mainMenu.sqf
index 011fd21a..9477c49d 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/UI/mainMenu.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/UI/mainMenu.sqf
@@ -30,11 +30,11 @@ _pm = "";
if(_rep > -1) then {_pm = "+"};
_ctrl ctrlSetStructuredText parseText format["
- %1
- %2
- Standing: %3%4 (Tanoa: %5%6)
- Influence: %9
- Weather: %7 (Forecast: %8)
+ %1
+ %2
+ Standing: %3%4 (Tanoa: %5%6)
+ Influence: %9
+ Weather: %7 (Forecast: %8)
",name player,_town,_plusmin,_standing,_pm,_rep,_weather,server getVariable "forecast",player getVariable ["influence",0]];
sleep 0.1;
@@ -72,8 +72,8 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1610,false];
_buildingTxt = format["
- Camp
- Owned by %1
+ Camp
+ Owned by %1
",_ownername];
};
if(typeof _building == OT_item_Flag) exitWith {
@@ -83,8 +83,8 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1610,false];
_buildingTxt = format["
- %1
- Owned by %2
+ %1
+ Owned by %2
",_building getVariable "name",_ownername];
};
ctrlSetText [1608,format["Sell ($%1)",[_sell, 1, 0, true] call CBA_fnc_formatNumber]];
@@ -94,9 +94,9 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1610,false];
};
_buildingTxt = format["
- %1
- Owned by %2
- Lease Value: $%3/hr
+ %1
+ Owned by %2
+ Lease Value: $%3/hr
",_name,_ownername,[_lease, 1, 0, true] call CBA_fnc_formatNumber];
}else{
@@ -110,8 +110,8 @@ if(typename _b == "ARRAY") then {
_name = _building getVariable "name";
};
_buildingTxt = format["
- %1
- Owned by %2
+ %1
+ Owned by %2
",_name,_ownername];
};
}else{
@@ -119,10 +119,9 @@ if(typename _b == "ARRAY") then {
ctrlEnable [1609,false];
ctrlEnable [1610,false];
_buildingTxt = format["
- %1
- Capacity: %2
- Lease Value: $%3/hr
- ",_name,_totaloccupants,[_lease, 1, 0, true] call CBA_fnc_formatNumber];
+ %1
+ Lease Value: $%2/hr
+ ",_name,[_lease, 1, 0, true] call CBA_fnc_formatNumber];
};
}else{
ctrlEnable [1608,false];
@@ -142,11 +141,14 @@ _civtxtctrl = (findDisplay 8001) displayCtrl 1101;
{
if !(_x call hasOwner or _x == player or side _x == west or side _x == east) then {
//"self" returns true ie for shopkeepers, so double check this civ has no owner
- _owner = _x getVariable "owner";
- if(isNil "_owner" and _x in allunits) then {
+ if(isPlayer _x) then {
_possible pushBack _x;
- };
-
+ }else{
+ _owner = _x getVariable "owner";
+ if(isNil "_owner" and _x in allunits) then {
+ _possible pushBack _x;
+ };
+ };
};
}foreach(_civs);
@@ -169,8 +171,8 @@ if(count _possible > 0) then {
_type = "Player";
};
_civTxt = format["
- %1
- %2
+ %1
+ %2
",_name,_type];
}else{
ctrlEnable [1605,false];
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/VCOMAI/functions/VCOMAI_RearmSelf.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/VCOMAI/functions/VCOMAI_RearmSelf.sqf
index 4882cc0e..ca4f2d38 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/VCOMAI/functions/VCOMAI_RearmSelf.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/VCOMAI/functions/VCOMAI_RearmSelf.sqf
@@ -29,6 +29,7 @@ if (_TC <= 2) then
_mags = [];
_Unit = _x;
if (_Unit isKindOf "Man") then {_mags = magazines _Unit} else {_mags = magazineCargo _Unit};
+ if(isNil "_mags") then {_mags = []};
{if (_x isEqualTo _CM) exitwith {[_this,_Unit] spawn VCOMAI_RearmGo;};_Stop = true;} foreach _mags;
if (_Stop) exitwith {};
} foreach _FB;
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/sell.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/sell.sqf
index 0d2ee3d2..49521709 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/sell.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/sell.sqf
@@ -21,10 +21,14 @@ _standing = (player getVariable format['rep%1',_town]) * -1;
_idx = lbCurSel 1500;
_cls = lbData [1500,_idx];
+if(isNil "_cls" or _cls == "") exitWith {};
+
_price = [_town,_cls,_standing] call getSellPrice;
_done = false;
_mynum = 0;
+if(isNil "_price") exitWith {};
+
{
_c = _x select 0;
if(_c == _cls) exitWith {_mynum = _x select 1};
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferFrom.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferFrom.sqf
index 20d7303b..79c99f4f 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferFrom.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferFrom.sqf
@@ -28,7 +28,7 @@ sleep 5;
if(_cls in OT_allMagazines) exitWith {
_veh addMagazineCargoGlobal [_cls,1];
};
- if(_cls in OT_allBackpacks) exitWith {
+ if(_cls in OT_allBackpacks or _cls in OT_allStaticBackpacks) exitWith {
_veh addBackpackCargoGlobal [_cls,1];
};
_veh addItemCargoGlobal [_cls,1];
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferTo.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferTo.sqf
index 323f0b24..6547c412 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferTo.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/actions/transferTo.sqf
@@ -28,7 +28,7 @@ sleep 5;
if(_cls in OT_allMagazines) exitWith {
_target addMagazineCargoGlobal [_cls,1];
};
- if(_cls in OT_allBackpacks) exitWith {
+ if(_cls in OT_allBackpacks or _cls in OT_allStaticBackpacks) exitWith {
_target addBackpackCargoGlobal [_cls,1];
};
_target addItemCargoGlobal [_cls,1];
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/description.ext b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/description.ext
index 28cdcbf4..369ce178 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/description.ext
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/description.ext
@@ -10,7 +10,7 @@ overviewPicture = "\overthrow_main\campaign\missions\Overthrow.Tanoa\overthrow_t
author="ARMAzac";
briefingName = "Overthrow Tanoa";
OnLoadName = "Overthrow Tanoa";
-OnLoadMission = "v0.5.1 (DEV)";
+OnLoadMission = "v0.5.1";
loadScreen = "\overthrow_main\campaign\missions\Overthrow.Tanoa\pic.jpg";
onLoadMissionTime = 1;
allowSubordinatesTakeWeapons= 1;
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/build.hpp b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/build.hpp
index 8de7609e..2fee6247 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/build.hpp
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/build.hpp
@@ -77,7 +77,6 @@ class OT_dialog_buildbase
// GUI EDITOR OUTPUT END
////////////////////////////////////////////////////////
-
}
};
@@ -254,26 +253,26 @@ class OT_dialog_buildtown
class RscButton_1601: RscButton
{
idc = 1601;
- action = "'Walls' call build";
+ action = "'Workshop' call build";
- text = "Walls"; //--- ToDo: Localize;
+ text = "Workshop"; //--- ToDo: Localize;
x = 0.0204687 * safezoneW + safezoneX;
y = 0.588 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.077 * safezoneH;
- tooltip = "Stop people (or tanks) from getting in"; //--- ToDo: Localize;
+ tooltip = "Repair, rearm and modify vehicles"; //--- ToDo: Localize;
};
class RscButton_1602: RscButton
{
idc = 1602;
- action = "'Observation Post' call build";
+ action = "'House' call build";
- text = "Observation Post"; //--- ToDo: Localize;
+ text = "House"; //--- ToDo: Localize;
x = 0.0204687 * safezoneW + safezoneX;
y = 0.412 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.077 * safezoneH;
- tooltip = "Provides intel about the area"; //--- ToDo: Localize;
+ tooltip = "4 Walls, a roof, maybe a door that opens if you're lucky."; //--- ToDo: Localize;
};
class RscButton_1603: RscButton
{
@@ -290,18 +289,20 @@ class OT_dialog_buildtown
class RscButton_1604: RscButton
{
idc = 1604;
- action = "'Helipad' call build";
+ action = "'Fuel Station' call build";
- text = "Helipad"; //--- ToDo: Localize;
+ text = "Fuel Station"; //--- ToDo: Localize;
x = 0.0204687 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.077 * safezoneH;
- tooltip = "Apparently helicopter pilots need to be told where they are allowed to land"; //--- ToDo: Localize;
+ tooltip = "Refuels stuff"; //--- ToDo: Localize;
};
////////////////////////////////////////////////////////
// GUI EDITOR OUTPUT END
////////////////////////////////////////////////////////
+
+
}
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/stats.hpp b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/stats.hpp
index ef8cf136..406f2ac4 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/stats.hpp
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/dialogs/stats.hpp
@@ -91,7 +91,7 @@ class RscTitles {
x = safezoneX + (0.8 * safezoneW);
y = safezoneY + (0.15 * safezoneH);
w = 0.19 * safezoneW;
- h = 0.1 * safezoneH;
+ h = 0.2 * safezoneH;
size = 0.055;//0.020
colorBackground[] = {0,0,0,0.2};
colorText[] = {0.34,0.33,0.33,0};//{1,1,1,1}
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/cleanup.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/cleanup.sqf
index aadacbb1..4e8e272a 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/cleanup.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/cleanup.sqf
@@ -1,5 +1,5 @@
_vehicle = _this select 0;
-waitUntil {sleep 1;!((getpos _vehicle) call inSpawnDistance)};
+waitUntil {sleep 1;(resistance knowsabout _vehicle) < 1};
{
if !(_x call hasOwner) then {
deleteVehicle _x;
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/nearestObjective.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/nearestObjective.sqf
index b2acfd6c..77ae3077 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/nearestObjective.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/funcs/nearestObjective.sqf
@@ -1,2 +1,2 @@
private _pos = _this;
-([OT_NATOobjectives + OT_NATOcomms,[],{(_x select 0) distance _pos},"ASCEND"] call BIS_fnc_SortBy) select 0
\ No newline at end of file
+([(server getvariable ["NATOobjectives",[]]) + (server getvariable ["NATOcomms",[]]),[],{(_x select 0) distance _pos},"ASCEND"] call BIS_fnc_SortBy) select 0
\ No newline at end of file
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initFuncs.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initFuncs.sqf
index 674669b3..b4b7b276 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initFuncs.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initFuncs.sqf
@@ -142,8 +142,10 @@ unitSeenNATO = compileFinal preProcessFileLineNumbers "funcs\unitSeenNATO.sqf";
wantedSystem = compileFinal preProcessFileLineNumbers "wantedSystem.sqf";
NATOsearch = compileFinal preProcessFileLineNumbers "AI\NATOsearch.sqf";
-//Perk System
+//Other Systems
perkSystem = compileFinal preProcessFileLineNumbers "perkSystem.sqf";
+statsSystem = compileFinal preProcessFileLineNumbers "stats.sqf";
+intelSystem = compileFinal preProcessFileLineNumbers "intelSystem.sqf";
//Key handler
keyHandler = compileFinal preProcessFileLineNumbers "keyHandler.sqf";
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initPlayerLocal.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initPlayerLocal.sqf
index a256184c..2ef33e54 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initPlayerLocal.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initPlayerLocal.sqf
@@ -12,6 +12,7 @@ removeVest player;
player linkItem "ItemMap";
server setVariable [format["name%1",getplayeruid player],name player,true];
+server setVariable [format["uid%1",name player],getplayeruid player,true];
if(isMultiplayer and (!isServer)) then {
call compile preprocessFileLineNumbers "initFuncs.sqf";
@@ -50,33 +51,35 @@ if(isMultiplayer or _startup == "LOAD") then {
waitUntil{sleep 0.5;player getVariable ["OT_loaded",false]};
_newplayer = player getVariable ["OT_newplayer",true];
- _house = player getVariable "home";
-
- _town = (getpos _house) call nearestTown;
- _pos = server getVariable _town;
- _housepos = getpos _house;
-
- _owned = player getVariable "owned";
- {
- _x setVariable ["owner",getPlayerUID player,true];
- _mrkName = format["%1",_x];
- if((markerpos _mrkName) select 0 == 0) then {
- _mrkName = createMarkerLocal [_mrkName,getpos _x];
- _mrkName setMarkerShape "ICON";
- _mrkName setMarkerType "loc_Tourism";
- _mrkName setMarkerColor "ColorWhite";
- _mrkName setMarkerAlpha 0;
- };
- _mrkName setMarkerAlphaLocal 1;
- }foreach(_owned);
-
- {
- if(_x call hasOwner) then {
- if ((_x getVariable "owner" == getPlayerUID player) and !(_x isKindOf "LandVehicle") and !(_x isKindOf "Building")) then {
- _furniture pushback _x
+ if(!_newplayer) then {
+ _house = player getVariable "home";
+ if(isNil "_house") exitWith {_newplayer = true};
+ _town = (getpos _house) call nearestTown;
+ _pos = server getVariable _town;
+ _housepos = getpos _house;
+
+ _owned = player getVariable "owned";
+ {
+ _x setVariable ["owner",getPlayerUID player,true];
+ _mrkName = format["%1",_x];
+ if((markerpos _mrkName) select 0 == 0) then {
+ _mrkName = createMarkerLocal [_mrkName,getpos _x];
+ _mrkName setMarkerShape "ICON";
+ _mrkName setMarkerType "loc_Tourism";
+ _mrkName setMarkerColor "ColorWhite";
+ _mrkName setMarkerAlpha 0;
};
- };
- }foreach(_housepos nearObjects 50);
+ _mrkName setMarkerAlphaLocal 1;
+ }foreach(_owned);
+
+ {
+ if(_x call hasOwner) then {
+ if ((_x getVariable "owner" == getPlayerUID player) and !(_x isKindOf "LandVehicle") and !(_x isKindOf "Building")) then {
+ _furniture pushback _x
+ };
+ };
+ }foreach(_housepos nearObjects 50);
+ };
_recruits = server getVariable ["recruits",[]];
_newrecruits = [];
@@ -212,13 +215,10 @@ player setCaptive true;
player setPos _housepos;
titleText ["", "BLACK IN", 5];
-if (isMultiplayer) then {
- ["InitializePlayer", [player]] call BIS_fnc_dynamicGroups;//Exec on client
-};
-
player addEventHandler ["WeaponAssembled",{
_me = _this select 0;
_wpn = _this select 1;
+ _pos = position _wpn;
if(typeof _wpn in OT_staticMachineGuns) then {
_wpn remoteExec["initStaticMGLocal",0,_wpn];
};
@@ -227,6 +227,9 @@ player addEventHandler ["WeaponAssembled",{
_me setCaptive false;
};
};
+ if(isplayer _me) then {
+ _wpn setVariable ["owner",getplayeruid _me,true];
+ };
}];
player addEventHandler ["GetInMan",{
@@ -238,14 +241,7 @@ player addEventHandler ["GetInMan",{
if(_position == "driver") then {
if !(_veh call hasOwner) then {
_veh setVariable ["owner",getplayeruid player,true];
- _veh setVariable ["stolen",true,true];
- if(_unit call unitSeenNATO) then {
- _notified = true;
- {
- _x setCaptive false;
- }foreach(units _veh);
- _veh spawn revealToNATO;
- };
+ _veh setVariable ["stolen",true,true];
};
};
_g = _v getVariable ["vehgarrison",false];
@@ -254,6 +250,10 @@ player addEventHandler ["GetInMan",{
_vg deleteAt (_vg find (typeof _veh));
server setVariable [format["vehgarrison%1",_g],_vg,false];
_veh setVariable ["vehgarrison",nil,true];
+ {
+ _x setCaptive false;
+ }foreach(units _veh);
+ _veh spawn revealToNATO;
};
_g = _v getVariable ["airgarrison",false];
if(typename _g == "STRING") then {
@@ -261,19 +261,11 @@ player addEventHandler ["GetInMan",{
_vg deleteAt (_vg find (typeof _veh));
server setVariable [format["airgarrison%1",_g],_vg,false];
_veh setVariable ["airgarrison",nil,true];
- };
-
- if !(_notified) then {
- if (!(_veh call hasOwner) or !((typeof _veh) in OT_allVehicles)) then {
- if(_unit call unitSeenNATO) then {
- _notified = true;
- {
- _x setCaptive false;
- }foreach(units _veh);
- _veh spawn revealToNATO;
- };
- };
- };
+ {
+ _x setCaptive false;
+ }foreach(units _veh);
+ _veh spawn revealToNATO;
+ };
}];
if(_newplayer) then {
@@ -285,7 +277,5 @@ if(_newplayer) then {
_introcam cameraEffect ["Terminate", "BACK" ];
_introcam = nil;
-[] execVM "stats.sqf";
[] spawn setupKeyHandler;
-[] execVM "intelSystem.sqf";
[] execVM "setupPlayer.sqf";
\ No newline at end of file
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf
index fe4d618a..8709f1fe 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/initVar.sqf
@@ -29,8 +29,8 @@ OT_item_wrecks = ["Land_Wreck_HMMWV_F","Land_Wreck_Skodovka_F","Land_Wreck_Truck
OT_spawnTowns = ["Rautake","Tavu","Balavu","Muaceba","Katkoula","Savaka"]; //Towns where new players will spawn
OT_spawnHouses = ["Land_Slum_01_F","Land_Slum_02_F","Land_House_Native_02_F"]; //Houses where new players will spawn
-OT_NATOwait = 20; //Half the Average time between NATO orders
-OT_CRIMwait = 200; //Half the Average time between crim changes
+OT_NATOwait = 200; //Half the Average time between NATO orders
+OT_CRIMwait = 300; //Half the Average time between crim changes
//Interactable items that spawn in your house
OT_item_Storage = "B_CargoNet_01_ammo_F"; //Your spawn ammobox
@@ -55,18 +55,6 @@ OT_Placeables = [
["Deploy",500,["B_Boat_Transport_01_F","I_HMG_01_high_F","I_HMG_01_F"],[0,2.3,2]]
];
-OT_Buildables = [
- ["Training Camp",1200,[] call compileFinal preProcessFileLineNumbers "templates\military\trainingCamp.sqf","structures\trainingCamp.sqf",true,"Allows training of recruits and hiring of mercenaries"],
- ["Bunkers",500,["Land_BagBunker_01_small_green_F","Land_HBarrier_01_big_tower_green_F","Land_HBarrier_01_tower_green_F"],"",false,"Small Defensive Structures. Press space to change type."],
- ["Walls",200,["Land_ConcreteWall_01_l_8m_F","Land_ConcreteWall_01_l_gate_F","Land_HBarrier_01_wall_6_green_F","Land_HBarrier_01_wall_4_green_F","Land_HBarrier_01_wall_corner_green_F"],"",false,"Stop people (or tanks) from getting in. Press space to change type."],
- ["Helipad",50,["Land_HelipadCircle_F","Land_HelipadCivil_F","Land_HelipadRescue_F","Land_HelipadSquare_F"],"",false,"Apparently helicopter pilots need to be told where they are allowed to land"],
- ["Observation Post",800,["Land_Cargo_Patrol_V4_F"],"structures\observationPost.sqf",false,"Includes unarmed personnel to keep an eye over the area and provide intel on enemy positions"],
- ["Barracks",5000,["Land_Barracks_01_camo_F","Land_Barracks_01_grey_F"],"",false,"Allows recruiting of squads"],
- ["Guard Tower",15000,["Land_Cargo_Tower_V4_F"],"",false,"It's a huge tower, what else do you need? besides 2 x Static MGs maybe but it comes with those."],
- ["Hangar",3000,["Land_Airport_01_hangar_F"],"",false,"A big empty building, could probably fit a plane inside it."],
- ["Workshop",2500,[] call compileFinal preProcessFileLineNumbers "templates\military\workshop.sqf","structures\workshop.sqf",true,"A place to repair and rearm your vehicles"]
-];
-
OT_churches = ["Land_Church_03_F","Land_Church_01_F","Land_Church_02_F","Land_Temple_Native_01_F"];
@@ -477,7 +465,7 @@ OT_markets = []; //buildings/objects that will spawn local markets (no templates
OT_shops = ["Land_FuelStation_01_shop_F","Land_Shop_Town_01_F","Land_Shop_Town_03_F","Land_Shop_City_02_F","Land_Supermarket_01_F"]; //buildings that will spawn the main shops (must have a template with a cash register)
OT_warehouses = ["Land_Warehouse_03_F"]; //buildings that will spawn local distribution centers
OT_carShops = ["Land_FuelStation_01_workshop_F","Land_FuelStation_02_workshop_F"]; //buildings that will spawn car salesmen (must have a template with a cash register)
-OT_piers = ["Land_PierConcrete_01_steps_F","Land_PierWooden_01_platform_F","Land_PierConcrete_01_end_F","Land_PierWooden_01_hut_F"]; //spawns dudes that sell boats n stuff
+OT_piers = ["Land_PierConcrete_01_steps_F","Land_PierWooden_01_platform_F","Land_PierConcrete_01_end_F","Land_PierWooden_01_hut_F","Land_PierWooden_02_hut_F"]; //spawns dudes that sell boats n stuff
OT_offices = ["Land_MultistoryBuilding_01_F","Land_MultistoryBuilding_04_F"];
OT_portBuildings = ["Land_Warehouse_01_F","Land_Warehouse_02_F","Land_ContainerLine_01_F","Land_ContainerLine_02_F","Land_ContainerLine_03_F"];
OT_airportTerminals = ["Land_Airport_01_terminal_F","Land_Airport_02_terminal_F","Land_Hangar_F"];
@@ -486,6 +474,19 @@ OT_portBuilding = "Land_Warehouse_02_F";
OT_loadingMessages = ["Adding Hidden Agendas","Adjusting Bell Curves","Aesthesizing Industrial Areas","Aligning Covariance Matrices","Applying Feng Shui Shaders","Applying Theatre Soda Layer","Asserting Packed Exemplars","Attempting to Lock Back-Buffer","Binding Sapling Root System","Breeding Fauna","Building Data Trees","Bureacritizing Bureaucracies","Calculating Inverse Probability Matrices","Calculating Llama Expectoration Trajectory","Calibrating Blue Skies","Charging Ozone Layer","Coalescing Cloud Formations","Cohorting Exemplars","Collecting Meteor Particles","Compounding Inert Tessellations","Compressing Fish Files","Computing Optimal Bin Packing","Concatenating Sub-Contractors","Containing Existential Buffer","Debarking Ark Ramp","Debunching Unionized Commercial Services","Deciding What Message to Display Next","Decomposing Singular Values","Decrementing Tectonic Plates","Deleting Ferry Routes","Depixelating Inner Mountain Surface Back Faces","Depositing Slush Funds","Destabilizing Economic Indicators","Determining Width of Blast Fronts","Deunionizing Bulldozers","Dicing Models","Diluting Livestock Nutrition Variables","Downloading Satellite Terrain Data","Exposing Flash Variables to Streak System","Extracting Resources","Factoring Pay Scale","Fixing Election Outcome Matrix","Flood-Filling Ground Water","Flushing Pipe Network","Gathering Particle Sources","Generating Jobs","Gesticulating Mimes","Graphing Whale Migration","Hiding Willio Webnet Mask","Implementing Impeachment Routine","Increasing Accuracy of RCI Simulators","Increasing Magmafacation","Initializing Rhinoceros Breeding Timetable","Initializing Robotic Click-Path AI","Inserting Sublimated Messages","Integrating Curves","Integrating Illumination Form Factors","Integrating Population Graphs","Iterating Cellular Automata","Lecturing Errant Subsystems","Mixing Genetic Pool","Modeling Object Components","Mopping Occupant Leaks","Normalizing Power","Obfuscating Quigley Matrix","Overconstraining Dirty Industry Calculations","Partitioning City Grid Singularities","Perturbing Matrices","Pixellating Nude Patch","Polishing Water Highlights","Populating Lot Templates","Preparing Sprites for Random Walks","Prioritizing Landmarks","Projecting Law Enforcement Pastry Intake","Realigning Alternate Time Frames","Reconfiguring User Mental Processes","Relaxing Splines","Removing Road Network Speed Bumps","Removing Texture Gradients","Removing Vehicle Avoidance Behavior","Resolving GUID Conflict","Reticulating Splines","Retracting Phong Shader","Retrieving from Back Store","Reverse Engineering Image Consultant","Routing Neural Network Infanstructure","Scattering Rhino Food Sources","Scrubbing Terrain","Searching for Llamas","Seeding Architecture Simulation Parameters","Sequencing Particles","Setting Advisor ","Setting Inner Deity ","Setting Universal Physical Constants","Sonically Enhancing Occupant-Free Timber","Speculating Stock Market Indices","Splatting Transforms","Stratifying Ground Layers","Sub-Sampling Water Data","Synthesizing Gravity","Synthesizing Wavelets","Time-Compressing Simulator Clock","Unable to Reveal Current Activity","Weathering Buildings","Zeroing Crime Network"];
OT_allBuyableBuildings = OT_lowPopHouses + OT_medPopHouses + OT_highPopHouses + OT_hugePopHouses + OT_mansions + [OT_item_Tent,OT_item_Flag];
+OT_Buildables = [
+ ["Training Camp",1200,[] call compileFinal preProcessFileLineNumbers "templates\military\trainingCamp.sqf","structures\trainingCamp.sqf",true,"Allows training of recruits and hiring of mercenaries"],
+ ["Bunkers",500,["Land_BagBunker_01_small_green_F","Land_HBarrier_01_big_tower_green_F","Land_HBarrier_01_tower_green_F"],"",false,"Small Defensive Structures. Press space to change type."],
+ ["Walls",200,["Land_ConcreteWall_01_l_8m_F","Land_ConcreteWall_01_l_gate_F","Land_HBarrier_01_wall_6_green_F","Land_HBarrier_01_wall_4_green_F","Land_HBarrier_01_wall_corner_green_F"],"",false,"Stop people (or tanks) from getting in. Press space to change type."],
+ ["Helipad",50,["Land_HelipadCircle_F","Land_HelipadCivil_F","Land_HelipadRescue_F","Land_HelipadSquare_F"],"",false,"Apparently helicopter pilots need to be told where they are allowed to land"],
+ ["Observation Post",800,["Land_Cargo_Patrol_V4_F"],"structures\observationPost.sqf",false,"Includes unarmed personnel to keep an eye over the area and provide intel on enemy positions"],
+ ["Barracks",5000,["Land_Barracks_01_camo_F","Land_Barracks_01_grey_F"],"",false,"Allows recruiting of squads"],
+ ["Guard Tower",15000,["Land_Cargo_Tower_V4_F"],"",false,"It's a huge tower, what else do you need? besides 2 x Static MGs maybe but it comes with those."],
+ ["Hangar",3000,["Land_Airport_01_hangar_F"],"",false,"A big empty building, could probably fit a plane inside it."],
+ ["Workshop",2500,[] call compileFinal preProcessFileLineNumbers "templates\military\workshop.sqf","structures\workshop.sqf",true,"A place to repair and rearm your vehicles"],
+ ["House",1100,["Land_House_Small_06_F","Land_House_Small_02_F","Land_House_Small_03_F","Land_GarageShelter_01_F","Land_Slum_04_F"],"",false,"4 walls, a roof, and if you're lucky a door that opens."]
+];
+
{
_istpl = _x select 4;
if(_istpl) then {
@@ -528,3 +529,4 @@ OT_allAirports = [];
{
OT_allAirports pushBack text _x;
}foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Airport"], 50000]);
+
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/intelSystem.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/intelSystem.sqf
index c5f7e1b2..90ff7374 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/intelSystem.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/intelSystem.sqf
@@ -174,9 +174,30 @@ _handler = {
};
}foreach(allGroups);
+
+ {
+ if(side _x == resistance or side _x == civilian) then {
+ if(_x isKindOf "StaticWeapon") then {
+ _i = "\A3\ui_f\data\map\markers\nato\o_art.paa";
+ if(_x isKindOf "StaticMortar") then {_i = "\A3\ui_f\data\map\markers\nato\o_mortar.paa"};
+ (_this select 0) drawIcon [
+ _i,
+ [0,0.5,0,1],
+ position _x,
+ 30,
+ 30,
+ 0
+ ];
+ };
+ };
+ }foreach(vehicles);
+};
+
+if(!isNil "OT_OnDraw") then {
+ ((findDisplay 12) displayCtrl 51) ctrlRemoveEventHandler ["Draw",OT_OnDraw];
};
-_eh = ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", _handler];
+OT_OnDraw = ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", _handler];
[_handler] spawn {
private ['_gps',"_handler"];
@@ -191,7 +212,10 @@ _eh = ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", _handler];
} count (uiNamespace getVariable 'IGUI_Displays');
uiSleep 1;
if (!isNull _gps) exitWith {
- _gps ctrlAddEventHandler ['Draw',_handler];
+ if(!isNil "OT_GPSOnDraw") then {
+ _gps ctrlRemoveEventHandler ['Draw',OT_GPSOnDraw];
+ };
+ OT_GPSOnDraw = _gps ctrlAddEventHandler ['Draw',_handler];
};
uiSleep 0.25;
};
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/mission.sqm b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/mission.sqm
index 2339779e..3bafbe4f 100644
Binary files a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/mission.sqm and b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/mission.sqm differ
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/setupPlayer.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/setupPlayer.sqf
index a152de9d..69106c27 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/setupPlayer.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/setupPlayer.sqf
@@ -1,5 +1,7 @@
+player spawn statsSystem;
player spawn wantedSystem;
player spawn perkSystem;
+player spawn intelSystem;
_clothes = player getVariable ["uniform",(OT_clothes_guerilla call BIS_fnc_selectRandom)];
player forceAddUniform _clothes;
player setVariable ["uniform",_clothes,true];
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/spawners/insertion/reGarrisonTown.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/spawners/insertion/reGarrisonTown.sqf
index 8cfb2dac..4025f2a7 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/spawners/insertion/reGarrisonTown.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/spawners/insertion/reGarrisonTown.sqf
@@ -26,16 +26,24 @@ _closest = "";
if(!isNil "_close") then {
_start = [_close,0,200, 1, 0, 0, 0] call BIS_fnc_findSafePos;
_group = creategroup blufor;
+ _tgroup = creategroup blufor;
_spawnpos = _start findEmptyPosition [0,100,OT_NATO_Vehicle_Police];
_veh = OT_NATO_Vehicle_Police createVehicle _spawnpos;
_veh setDir 180;
- _group addVehicle _veh;
+ _tgroup addVehicle _veh;
+
+ createVehicleCrew _veh;
+ {
+ [_x] joinSilent _tgroup;
+ _x setVariable ["garrison","HQ",false];
+ }foreach(crew _veh);
_police pushBack _veh;
_civ = _group createUnit [OT_NATO_Unit_PoliceCommander, _start, [],0, "NONE"];
_police pushBack _civ;
+ _civ moveInCargo _veh;
[_civ,_town] call initPolice;
_civ setBehaviour "SAFE";
sleep 0.01;
@@ -45,30 +53,37 @@ if(!isNil "_close") then {
_police pushBack _civ;
[_civ,_town] call initPolice;
_civ setBehaviour "SAFE";
- _count = _count + 2;
+ _civ moveInCargo _veh;
_group setVariable ["veh",_veh];
_group setVariable ["transport",_police];
+ sleep 5;
- _drop = (([_townPos, 100, 500, 1, 0, 0, 0] call BIS_fnc_findSafePos) nearRoads 200) select 0;
-
- _move = _group addWaypoint [_spawnpos,0];
- _move setWaypointType "GETIN";
- _move setWaypointSpeed "FULL";
-
- _move = _group addWaypoint [_drop,0];
+ _drop = (([_townPos, 50, 350, 1, 0, 0, 0] call BIS_fnc_findSafePos) nearRoads 200) select 0;
+
+ _move = _tgroup addWaypoint [_drop,0];
_move setWaypointType "MOVE";
_move setWaypointSpeed "FULL";
- _move = _group addWaypoint [_drop,0];
- _move setWaypointType "GETOUT";
- _move setWaypointStatements ["true","(group this) call initPolicePatrol;"];
+ _move = _tgroup addWaypoint [_drop,0];
+ _move setWaypointType "TR UNLOAD";
+
+ _wp = _tgroup addWaypoint [_spawnpos,0];
+ _wp setWaypointType "MOVE";
+ _wp setWaypointSpeed "LIMITED";
+ _wp setWaypointCompletionRadius 25;
+
+ _wp = _tgroup addWaypoint [_spawnpos,0];
+ _wp setWaypointType "SCRIPTED";
+ _wp setWaypointStatements ["true","[vehicle this] execVM 'funcs\cleanup.sqf'"];
+
+ _group call initPolicePatrol;
{
_x addCuratorEditableObjects [_police+_support,true];
} forEach allCurators;
};
-[3,_townPos,format["%1 Reinforcements",_town],format["Intelligence reports that NATO is reinforcing the garrison in %1. %2 personnel were spotted departing %3 in an offroad.",_town,count units _group,_closest]] remoteExec ["intelEvent",0,false];
+[3,_townPos,format["%1 Reinforcements",_town],format["Intelligence reports that NATO is reinforcing the garrison in %1. %2 personnel were spotted departing %3 in an offroad.",_town,2,_closest]] remoteExec ["intelEvent",0,false];
_police+_support;
\ No newline at end of file
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/stats.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/stats.sqf
index 90c3567d..c213df1d 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/stats.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/stats.sqf
@@ -1,7 +1,4 @@
private ["_txt","_currentTxt","_display","_setText"];
-showStatistics = false;
-sleep 3;
-showStatistics = true;
disableSerialization;
//1 cutRsc ["H8erHUD","PLAIN",0,false];
_layer = ["stats"] call bis_fnc_rscLayer;
@@ -14,7 +11,7 @@ _setText ctrlSetBackgroundColor [0,0,0,0];
_currentTxt = "";
-while {true} do {
+while {alive player} do {
_wanted = "
";
if !(captive player) then {
_hiding = player getVariable "hiding";
@@ -46,11 +43,10 @@ while {true} do {
};
};
};
- _txt = format ["$%1
%2
%3", [player getVariable "money", 1, 0, true] call CBA_fnc_formatNumber,_seen,_wanted];
- if (_txt != _currentTxt) then {
- _setText ctrlSetStructuredText (parseText format ["%1", _txt]);
- _setText ctrlCommit 0;
- _currentTxt = _txt;
- };
+ _txt = format ["$%1
%2
%3", [player getVariable "money", 1, 0, true] call CBA_fnc_formatNumber,_seen,_wanted];
+ _setText ctrlSetStructuredText (parseText format ["%1", _txt]);
+ _setText ctrlCommit 0;
+ _currentTxt = _txt;
+
sleep 1;
}
\ No newline at end of file
diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/wantedSystem.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/wantedSystem.sqf
index 762dde22..d4ff994b 100644
--- a/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/wantedSystem.sqf
+++ b/addons/overthrow_main/campaign/missions/Overthrow.Tanoa/wantedSystem.sqf
@@ -54,7 +54,6 @@ _unit addEventHandler ["Fired", {
while {alive _unit} do {
sleep 3;
-
//check wanted status
if !(captive _unit) then {
//CURRENTLY WANTED
diff --git a/mod.cpp b/mod.cpp
index 21d5f82e..5421ac26 100644
--- a/mod.cpp
+++ b/mod.cpp
@@ -1,10 +1,10 @@
-name = "Overthrow 0.5.0"; //This name will be displayed only in game , specifically the expansion menu
+name = "Overthrow 0.5.2"; //This name will be displayed only in game , specifically the expansion menu
picture = "logo_overthrow.paa"; //Location of your addon's icon
logo = "logo_overthrow.paa";
logoOver = "logo_overthrow.paa";
actionName = "Github"; //The name of the action
action = "https://github.com/armazac/Overthrow.Tanoa"; //The action , "Authors Website Link"
-description = "Overthrow - Version 0.5.0"; // Addon Description
+description = "Overthrow - Version 0.5.2"; // Addon Description
overview = "A Revolution Simulator for Arma 3";
author = "ARMAzac";
overviewPicture = "logo_overthrow.paa";
\ No newline at end of file