Skip to content

Commit

Permalink
Merge pull request #130 from ArmaOverthrow/dev
Browse files Browse the repository at this point in the history
0.7.4.0
  • Loading branch information
armazac authored May 15, 2017
2 parents 7d5f914 + 1bbf308 commit ac7c967
Show file tree
Hide file tree
Showing 159 changed files with 3,559 additions and 1,836 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,23 @@ A dynamic and persistent revolution campaign mod for ARMA 3 Apex
* Buy and sell just about in any-game item/vehicle/weapon for currency at local shops and gun dealers
* Capture towns and military objectives one by one
* Dynamic economy/Regional pricing/Trade
* Buy, sell and lease real estate with prices affected by regional politics
* Buy, sell and lease real estate with prices affected by regional politics
* Fast travel to any owned real estate or camp
* Manipulate the markets with guns or piles of cash
* Recruit and arm civilians
* Recruit civilians simply just to loot for you
* Designed to work in both single player and multiplayer

# Coming Features
* Recruit and command entire squads
* Player-based economy/production
* Mid and end-game mechanics

# Required DLC
* APEX

# Included Addons
* VCOM AI by genesis92x https://forums.bistudio.com/topic/166374-vcom-ai-v20-ai-overhaul/
* Advanced Towing by Duda http://www.armaholic.com/page.php?id=30575

# Recommended Addons
# Required Addons
* ACE3 (Fully integrated) [(Steam Workshop)](https://steamcommunity.com/sharedfiles/filedetails/?id=463939057)

# To install
Overthrow is available on the [Steam Workshop](http://steamcommunity.com/sharedfiles/filedetails/?id=774201744)

* Overthrow is available on the [Steam Workshop](http://steamcommunity.com/sharedfiles/filedetails/?id=774201744)
* or from [Github](https://github.com/ArmaOverthrow/Overthrow.Tanoa/releases/latest)
61 changes: 61 additions & 0 deletions addons/overthrow_main/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class CfgFunctions
class spawnTemplate {};
class spawnTemplateAttached {};
class unitStock {};
class saveGame {};
class loadGame {};
class setOwner {};
class getOwner {};
};

class Events
Expand All @@ -21,6 +25,61 @@ class CfgFunctions
class postInit {postInit = 1};
};

class UI
{
file = "\ot\functions\UI";
class notifyMinor {};
class notifyBig {};
class notifyGood {};
class notifyVehicle {};
};

/*
* User actions
*/
class Actions
{
file = "\ot\functions\actions";

/* Main Menu */
class salvageWreck {};
class buyBuilding {};
class fastTravel {};
class talkToCiv {};
class recruitCiv {};

/* Vehicle */
class transferTo {};
class transferFrom {};
class transferLegit {};
class takeLegit {};
class warehouseTake {};

/* Workshop */
class workshopAdd {};

/* Shop */
class buy {};
class sell {};
class sellAll {};

/* Gun Dealer */
class getLocalMission {};
class getMission {};

/* Factory */
class factoryRefresh {};
class factorySet {};

/* Resistance Screen */
class showMemberInfo {};
class showBusinessInfo {};
class makeGeneral {};
class giveFunds {};
class takeFunds {};
class transferFunds {};
}

/*
* Locations, positions etc.
*/
Expand Down Expand Up @@ -151,6 +210,8 @@ class CfgFunctions
class NATO
{
file = "\ot\functions\factions\NATO";
class initNATO {};

class NATOQRF {};
class NATOGroundForces {};
class CTRGSupport {};
Expand Down
10 changes: 10 additions & 0 deletions addons/overthrow_main/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,14 @@ class CfgWeapons {
mass = 30;
};
};
class OT_Fertilizer: OT_ItemCore {
scope = 2;
picture = "\ot\ui\items\fertilizer_x_ca.paa";
displayName = "Fertilizer";
descriptionShort = "A material of natural or synthetic origin that is applied to soils or to plant tissues (usually leaves) to supply one or more plant nutrients essential to the growth of plants.";
descriptionUse = "";
class ItemInfo: InventoryItem_Base_F {
mass = 80;
};
};
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
params ["_vehtypes","_hvts","_from","_to"];

private _abandoned = server getvariable ["NATOabandoned",[]];
if(_from in _abandoned) exitWith {};

private _frompos = server getvariable _from;
private _fromregion = _frompos call OT_fnc_getRegion;
Expand All @@ -8,25 +10,38 @@ private _topos = server getvariable _to;
private _dir = [_frompos,_topos] call BIS_fnc_dirTo;

private _group = creategroup blufor;
_group setBehaviour "CARELESS";
private _track = objNull;

if ([_topos,_fromregion] call OT_fnc_regionIsConnected) then {
_convoypos = _frompos;
_convoypos = [_frompos,random 360,120] call SHK_pos;
private _road = [_convoypos] call BIS_fnc_nearestRoad;
if (!isNull _road) then {
_roadscon = roadsConnectedto _road;
if (count _roadscon == 2) then {
_posVeh = (getpos _road) findEmptyPosition [0,15,_vehtypes select 0];
if(count _posVeh > 0) then {
_convoypos = _posVeh;
_dir = [_road, _roadscon select 0] call BIS_fnc_DirTo;
};
};
};
{
_pos = [_convoypos,0,120,false,[0,0],[250,_x]] call SHK_pos;
_pos = _convoypos;
_veh = createVehicle [_x, _pos, [], 0,""];
_veh setVariable ["garrison","HQ",false];

_veh setDir (_dir);
_group addVehicle _veh;
createVehicleCrew _veh;
_driver = driver _veh;
_driver disableAI "AUTOCOMBAT";
{
[_x] joinSilent _group;
_x setVariable ["garrison","HQ",false];
_x setVariable ["NOAI",true,false];
_x disableAI "AUTOCOMBAT";
}foreach(crew _veh);
_convoypos = [_convoypos,20,-_dir] call BIS_fnc_relPos;
_driver assignAsCommander _veh;
_convoypos = [_convoypos,20,_dir+180] call BIS_fnc_relPos;
sleep 0.1;
}foreach(_vehtypes);

Expand All @@ -38,51 +53,53 @@ if ([_topos,_fromregion] call OT_fnc_regionIsConnected) then {
_veh setDir (_dir);
_group addVehicle _veh;
createVehicleCrew _veh;

_driver = driver _veh;
_driver disableAI "AUTOCOMBAT";
{
[_x] joinSilent _group;
_x setVariable ["garrison","HQ",false];
_x setVariable ["NOAI",true,false];
_x disableAI "AUTOCOMBAT";
}foreach(crew _veh);

_lead = leader _veh;
_lead setVariable ["hvt",true,true];
_lead setVariable ["hvt_id",_x select 0,true];
_lead setRank "COLONEL";
_driver assignAsCommander _veh;
_driver setVariable ["hvt",true,true];
_driver setVariable ["hvt_id",_x select 0,true];
_driver setRank "COLONEL";
if(isNull _track) then {_track = _lead};

_convoypos = [_convoypos,20,-_dir] call BIS_fnc_relPos;
_convoypos = [_convoypos,20,_dir] call BIS_fnc_relPos;

sleep 0.1;
_x set [2,"CONVOY"];
}foreach(_hvts);

private _numsupport = 2;

private _count = 0;
while {_count < _numsupport} do {
_vehtype = selectRandom OT_NATO_Vehicles_GroundSupport;
_pos = [_convoypos,0,120,false,[0,0],[250,_vehtype]] call SHK_pos;
_veh = createVehicle [_vehtype, _pos, [], 0,""];
_veh setVariable ["garrison","HQ",false];

_veh setDir (_dir);
_group addVehicle _veh;
createVehicleCrew _veh;
{
[_x] joinSilent _group;
_x setVariable ["garrison","HQ",false];
_x setVariable ["NOAI",true,false];
_x disableAI "AUTOCOMBAT";
}foreach(crew _veh);
_convoypos = [_convoypos,20,-_dir] call BIS_fnc_relPos;
_count = _count + 1;
sleep 0.1;
if(count _hvts > 0) then {
private _count = 0;
while {_count < _numsupport} do {
_vehtype = selectRandom OT_NATO_Vehicles_GroundSupport;
_pos = [_convoypos,0,120,false,[0,0],[250,_vehtype]] call SHK_pos;
_veh = createVehicle [_vehtype, _pos, [], 0,""];
_veh setVariable ["garrison","HQ",false];
_veh setDir (_dir);
_group addVehicle _veh;
createVehicleCrew _veh;
_driver = driver _veh;
_driver disableAI "AUTOCOMBAT";
{
[_x] joinSilent _group;
_x setVariable ["garrison","HQ",false];
}foreach(crew _veh);
_driver assignAsCommander _veh;
_convoypos = [_convoypos,20,-_dir] call BIS_fnc_relPos;
_count = _count + 1;
sleep 0.1;
};
};
sleep 5;
_wp = _group addWaypoint [asltoatl _topos,50];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointBehaviour "CARELESS";
_wp setWaypointSpeed "LIMITED";
_wp setWaypointTimeout [60,60,60];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
_leader = _this;

_group = group _leader;
private _targetPos = _leader getVariable ["OT_targetPos",objNull];
private _veh = vehicle _leader;

_near = false;

{
unassignVehicle _x;
}foreach(units _group);
(units _group) allowGetIn false;

sleep 10;
if(({alive _x} count (units _group)) == 0) exitWith {};

if(!isNull _veh) then {deleteVehicle _veh};

private _fobs = server getVariable ["NATOfobs",[]];

{
_pb = _x select 0;
if(_pb distance _targetPos < 500) then {
_near = true;
};
}foreach(_fobs);
if(_near) exitWith {};

_flag = OT_flag_NATO createVehicle _targetPos;

_fobs pushback [_targetPos,count units _group,[]];
server setVariable ["NATOfobs",_fobs,true];
_group call OT_fnc_initMilitaryPatrol;
Loading

0 comments on commit ac7c967

Please sign in to comment.