diff --git a/README.md b/README.md index 9c1d094..83e6896 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Exile Occupation (a3_exile_occupation) -![v66 New Features](https://img.shields.io/badge/v66-New%20Features-red.svg) ![Arma 1.68](https://img.shields.io/badge/Arma-1.68-blue.svg) ![Exile 1.0.2 Sweet Potato](https://img.shields.io/badge/Exile-1.0.2%20Sweet%20Potato-C72651.svg) +![v69 New Features](https://img.shields.io/badge/v69-New%20Features-red.svg) ![Arma 1.72](https://img.shields.io/badge/Arma-1.72-blue.svg) ![Exile 1.0.3 Lemon](https://img.shields.io/badge/Exile-1.0.3%20Lemon-C72651.svg) WTF is Occupation? An AI spawner and monitor to be used in conjunction with DMS and will not work without it: @@ -16,13 +16,13 @@ http://www.armaholic.com/page.php?id=16369 - (Please note, only use the x64 vers For more info: http://www.exilemod.com/topic/12517-release-exile-occupation-roaming-ai -###License Overview: +## License Overview: This work is protected by [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](http://creativecommons.org/licenses/by-nc-sa/4.0/). By using, downloading, or copying any of the work contained, you agree to the license included. Creative Commons License
Exile Occupation by second_coming is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. -### Donations: +## Donations: Anyone wishing to donate can do so here http://exileyorkshire.co.uk/ All donations go towards coffee to keep me awake :) -###Updated and modified by [FPS]kuplion \ No newline at end of file +### Updated and modified by [FPS]kuplion \ No newline at end of file diff --git a/pre-packaged pbo/a3_exile_occupation.pbo b/pre-packaged pbo/a3_exile_occupation.pbo index cb1a062..306c75e 100644 Binary files a/pre-packaged pbo/a3_exile_occupation.pbo and b/pre-packaged pbo/a3_exile_occupation.pbo differ diff --git a/source/a3_exile_occupation/README.md b/source/a3_exile_occupation/README.md deleted file mode 100644 index 517455c..0000000 --- a/source/a3_exile_occupation/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Exile Occupation (a3_exile_occupation) - -![v65a Bug Fix](https://img.shields.io/badge/v65a-Bug%20Fix-red.svg) ![Arma 1.66](https://img.shields.io/badge/Arma-1.66-blue.svg) ![Exile 1.0.2 Sweet Potato](https://img.shields.io/badge/Exile-1.0.2%20Sweet%20Potato-C72651.svg) - -WTF is Occupation? -An AI spawner and monitor to be used in conjunction with DMS and will not work without it: -http://www.exilemod.com/topic/61-dms-defents-mission-system/ - -How to install? -To install place the pbo into the @ExileServer/addons folder - -How edit and compile? -You'll find the files in the source folder. Edit the config as you need and then compile the PBO with PBO Manager 1.4b: -http://www.armaholic.com/page.php?id=16369 - (Please note, only use the x64 version) - -For more info: -http://www.exilemod.com/topic/12517-release-exile-occupation-roaming-ai - -###License Overview: -This work is protected by [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](http://creativecommons.org/licenses/by-nc-sa/4.0/). By using, downloading, or copying any of the work contained, you agree to the license included. - -Creative Commons License
Exile Occupation by second_coming is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. - -### Donations: -Anyone wishing to donate can do so here http://exileyorkshire.co.uk/ -All donations go towards coffee to keep me awake :) - -###Updated and modified by [FPS]kuplion \ No newline at end of file diff --git a/source/a3_exile_occupation/config.cpp b/source/a3_exile_occupation/config.cpp index 65c5cf9..9d41155 100644 --- a/source/a3_exile_occupation/config.cpp +++ b/source/a3_exile_occupation/config.cpp @@ -1,18 +1,22 @@ class CfgPatches { - class a3_exile_occupation { + class a3_exile_occupation + { units[] = {}; weapons[] = {}; requiredVersion = 0.1; - a3_exile_occupation_version = "V66 (23-03-2017)"; + a3_exile_occupation_version = "V69 (21-07-2017)"; requiredAddons[] = {"a3_dms"}; - author[]= {"second_coming - modified by [FPS]kuplion"}; + author[]= {"second_coming - updated/modified by [FPS]kuplion"}; }; }; -class CfgFunctions { - class yorkshire { - class main { +class CfgFunctions +{ + class yorkshire + { + class main + { class YORKS_init { postInit = 1; diff --git a/source/a3_exile_occupation/config.sqf b/source/a3_exile_occupation/config.sqf index 5a1a9d1..473a6d0 100644 --- a/source/a3_exile_occupation/config.sqf +++ b/source/a3_exile_occupation/config.sqf @@ -210,6 +210,7 @@ SC_SpawnHeliCrashGuards = true; // true if you want to enable AI guards SC_numberofHeliCrashes = 5; // if SC_occupyHeliCrashes = true spawn this many Heli Crashes SC_HeliCrashGuards = 6; // number of AI to spawn at each crate SC_HeliCrashGuardsRandomize = true; // Use a random number of guards up to a maximum = SC_HeliCrashGuards (so between 1 and SC_HeliCrashGuards) +SC_HeliCrashMarkers = true; // true if you want to have markers on the Heli Crashes // Array of possible common items to go in heli crash crates ["classname",fixed amount,random amount] NOT INCLUDING WEAPONS // ["HandGrenade",0,2] this example would add between 0 and 2 HandGrenade to the crate (fixed 0 plus 0-2 random) @@ -327,6 +328,7 @@ SC_occupyHeliFixedPositions = [ // Settings for roaming seaborne AI (non armed boats will just sail around) SC_maxNumberofBoats = 1; +SC_occupySeaVehicleIgnoreCount = false; // true if you want spawn vehicles regardless of overall AI count // Array of boats which can be used by AI patrols (the number next to next vehicle is the maximum amount of that class allowed, 0 for no limit) SC_BoatClassToUse = [ @@ -338,7 +340,7 @@ SC_BoatClassToUse = [ SC_occupyBoatUseFixedPos = false; // True if you want to specify the patrol positions and radius of the area to patrol / false for random - // if you set SC_maxNumberofHelis higher than the number of static positions, the remainder will be random + // if you set SC_maxNumberofBoats higher than the number of static positions, the remainder will be random // they will also ignore any blacklisted areas SC_occupyBoatFixedPositions = [ [[200,200,0],2000,"Tanoa"], // [[x,y,z],radius,"mapname"] leave no spaces between @@ -454,11 +456,18 @@ if (worldName == 'Chernarus' AND SC_useMapOverrides) then if (worldName == 'Tanoa' AND SC_useMapOverrides) then { - SC_useApexClasses = true; - SC_maxAIcount = 80; + SC_maxAIcount = 80; + SC_useApexClasses = true; }; +if (worldName == 'Malden' AND SC_useMapOverrides) then +{ + SC_maxAIcount = 70; + SC_useApexClasses = false; + +}; + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Apex Specific Settings (only used if SC_useApexClasses = true) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf b/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf index 8b8e6aa..debe2e2 100644 --- a/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf +++ b/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf @@ -57,7 +57,7 @@ while{!_validspot} do { _nearestRoad = _nearRoads select 0; _position = position _nearestRoad; - _isEmpty = !(_position isFlatEmpty [15, -1, -1, -1, -1, false, player] isEqualTo []); // Check if there is 15m space around the road position to try and stop vehicles spawning on dirt tracks on Tanoa + _isEmpty = !(_position isFlatEmpty [10, -1, -1, -1, -1, false, player] isEqualTo []); // Check if there is 15m space around the road position to try and stop vehicles spawning on dirt tracks on Tanoa if(!_isEmpty) then { _validspot = false; diff --git a/source/a3_exile_occupation/scripts/functions/fnc_selectName.sqf b/source/a3_exile_occupation/scripts/functions/fnc_selectName.sqf index 607045c..b9b7b01 100644 --- a/source/a3_exile_occupation/scripts/functions/fnc_selectName.sqf +++ b/source/a3_exile_occupation/scripts/functions/fnc_selectName.sqf @@ -9,13 +9,13 @@ if(SC_useRealNames) then { case "survivor": { - _firstName = SC_SurvivorFirstNames call BIS_fnc_selectRandom; - _lastName = SC_SurvivorLastNames call BIS_fnc_selectRandom; + _firstName = selectRandom SC_SurvivorFirstNames; + _lastName = selectRandom SC_SurvivorLastNames; }; case "bandit": { - _firstName = SC_BanditFirstNames call BIS_fnc_selectRandom; - _lastName = SC_BanditLastNames call BIS_fnc_selectRandom; + _firstName = selectRandom SC_BanditFirstNames; + _lastName = selectRandom SC_BanditLastNames; }; }; _name = format["%1 %2",_firstName,_lastName]; diff --git a/source/a3_exile_occupation/scripts/occupationHeliCrashes.sqf b/source/a3_exile_occupation/scripts/occupationHeliCrashes.sqf index aff83a4..5503442 100644 --- a/source/a3_exile_occupation/scripts/occupationHeliCrashes.sqf +++ b/source/a3_exile_occupation/scripts/occupationHeliCrashes.sqf @@ -35,11 +35,23 @@ for "_i" from 1 to SC_numberofHeliCrashes do _validspot = true; //Check if near another heli crash site - _nearOtherCrash = (nearestObjects [_position,["Land_UWreck_MV22_F"],750]) select 0; + _nearOtherCrash = (nearestObjects [_position,[ + // Trucks + "Land_Wreck_BMP2_F", + "Land_Wreck_HMMWV_F", + "Land_Wreck_BRDM2_F", + "Land_Wreck_Ural_F", + // Tanks + "Land_Wreck_Slammer_F", + // Helis + "Land_Wreck_Heli_Attack_02_F", + "Land_UWreck_Heli_Attack_02_F", + // VTOL + "Land_UWreck_MV22_F"],750]) select 0; if (!isNil "_nearOtherCrash") then { _validspot = false; }; //Check if near another loot crate site - _nearOtherCrate = (nearestObjects [_position,["CargoNet_01_box_F"],500]) select 0; + _nearOtherCrate = (nearestObjects [_position,["Exile_Container_SupplyBox"],500]) select 0; if (!isNil "_nearOtherCrate") then { _validspot = false; }; }; @@ -47,7 +59,20 @@ for "_i" from 1 to SC_numberofHeliCrashes do _logDetail = format['[OCCUPATION:HeliCrashes] Crash %1 : Location %2',_i,_position]; [_logDetail] call SC_fnc_log; - _helicopter = "Land_UWreck_MV22_F"; + _helicopter = selectRandom [ + // Trucks + "Land_Wreck_BMP2_F", + "Land_Wreck_HMMWV_F", + "Land_Wreck_BRDM2_F", + "Land_Wreck_Ural_F", + // Tanks + "Land_Wreck_Slammer_F", + // Helis + "Land_Wreck_Heli_Attack_02_F", + "Land_UWreck_Heli_Attack_02_F", + // VTOL + "Land_UWreck_MV22_F" + ]; _vehHeli = _helicopter createVehicle [0,0,0]; _effect = "test_EmptyObjectForSmoke"; @@ -60,6 +85,7 @@ for "_i" from 1 to SC_numberofHeliCrashes do _heliFire = _effect createVehicle (position _vehHeli); _heliFire attachto [_vehHeli, [0,0,-1]]; _vehHeli setPos _position; + _vehHeli setVectorUp surfaceNormal position _vehHeli; if (SC_SpawnHeliCrashGuards) then { @@ -106,7 +132,7 @@ for "_i" from 1 to SC_numberofHeliCrashes do }foreach units _initialGroup; deleteGroup _initialGroup; - [_group, _spawnPosition, 100] call bis_fnc_taskPatrol; + [_group, _spawnPosition, 25] call bis_fnc_taskPatrol; _group setBehaviour "STEALTH"; _group setCombatMode "RED"; @@ -119,6 +145,19 @@ for "_i" from 1 to SC_numberofHeliCrashes do _logDetail = format ["[OCCUPATION:HeliCrash]:: Creating HeliCrash %2 at %1 with no guards",_position,_i]; [_logDetail] call SC_fnc_log; }; + + _mapMarkerName = format ["SC_helicrash_marker_%1", _i]; + + if (SC_HeliCrashMarkers) then + { + _heli_marker = createMarker [ format ["SC_helicrash_marker_%1", _i], _position]; + _heli_marker setMarkerColor "ColorOrange"; + _heli_marker setMarkerAlpha 1; + _heli_marker setMarkerText "Heli Crash"; + _heli_marker setMarkerType "c_air"; + _heli_marker setMarkerBrush "Vertical"; + _heli_marker setMarkerSize [(1), (1)]; + }; _positionOfBox = [_position,3,10,1,0,10,0] call BIS_fnc_findSafePos; _box = "Box_NATO_Ammo_F" createvehicle _positionOfBox; @@ -218,4 +257,4 @@ for "_i" from 1 to SC_numberofHeliCrashes do _event_marker setMarkerBrush "Vertical"; _event_marker setMarkerSize [(3), (3)]; }; -}; \ No newline at end of file +}; diff --git a/source/a3_exile_occupation/scripts/occupationLog.sqf b/source/a3_exile_occupation/scripts/occupationLog.sqf index 3d22424..4d245cb 100644 --- a/source/a3_exile_occupation/scripts/occupationLog.sqf +++ b/source/a3_exile_occupation/scripts/occupationLog.sqf @@ -12,4 +12,4 @@ if(SC_infiSTAR_log && !(isNil "INFISTARVERSION")) then else { diag_log _logDetail; -}; +}; \ No newline at end of file diff --git a/source/a3_exile_occupation/scripts/occupationLootCrates.sqf b/source/a3_exile_occupation/scripts/occupationLootCrates.sqf index 83b80af..41743a0 100644 --- a/source/a3_exile_occupation/scripts/occupationLootCrates.sqf +++ b/source/a3_exile_occupation/scripts/occupationLootCrates.sqf @@ -32,7 +32,7 @@ for "_i" from 1 to SC_numberofLootCrates do _validspot = true; //Check if near another crate site - _nearOtherCrate = (nearestObjects [_position,["CargoNet_01_box_F"],500]) select 0; + _nearOtherCrate = (nearestObjects [_position,["Exile_Container_SupplyBox"],500]) select 0; if (!isNil "_nearOtherCrate") then { _validspot = false; }; }; @@ -41,12 +41,10 @@ for "_i" from 1 to SC_numberofLootCrates do if (SC_occupyLootCratesMarkers) then { _event_marker = createMarker [ format ["SC_loot_marker_%1", _i], _position]; - _event_marker setMarkerColor "ColorGreen"; + _event_marker setMarkerColor "ColorWhite"; _event_marker setMarkerAlpha 1; _event_marker setMarkerText "Gear Crate"; - _event_marker setMarkerType "loc_Tree"; - _event_marker setMarkerBrush "Vertical"; - _event_marker setMarkerSize [(3), (3)]; + _event_marker setMarkerType "ExileMissionStrongholdIcon"; }; if (SC_SpawnLootCrateGuards) then @@ -94,7 +92,7 @@ for "_i" from 1 to SC_numberofLootCrates do }foreach units _initialGroup; deleteGroup _initialGroup; - [_group, _spawnPosition, 100] call bis_fnc_taskPatrol; + [_group, _spawnPosition, 25] call bis_fnc_taskPatrol; _group setBehaviour "STEALTH"; _group setCombatMode "RED"; @@ -110,7 +108,7 @@ for "_i" from 1 to SC_numberofLootCrates do - _box = "CargoNet_01_box_F" createvehicle _position; + _box = "Exile_Container_SupplyBox" createvehicle _position; clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box; clearItemCargoGlobal _box; @@ -147,6 +145,38 @@ for "_i" from 1 to SC_numberofLootCrates do { _box addBackpackCargoGlobal [_item, _amount]; }; - }forEach SC_LootCrateItems; + }forEach SC_LootCrateItems; + // Add a wreck for defensive purposes + _wrecks = selectRandom [ + // Trucks + "Land_Wreck_BMP2_F", + "Land_Wreck_HMMWV_F", + "Land_Wreck_BRDM2_F", + "Land_Wreck_Ural_F", + // Tanks + "Land_Wreck_Slammer_F", + // Helis + "Land_Wreck_Heli_Attack_02_F", + "Land_UWreck_Heli_Attack_02_F", + // VTOL + "Land_UWreck_MV22_F" + ]; + + _vehWreck = _wrecks createVehicle [0,0,0]; + + /* + _effect = "test_EmptyObjectForSmoke"; + if(SC_HeliCrashesOnFire) then + { + _effect = "test_EmptyObjectForFireBig"; + }; + _wreckFire = _effect createVehicle (position _vehWreck); + _wreckFire attachto [_vehWreck, [0,0,-1]]; + */ + + _vehWreckRelPos = _box getRelPos [(10 + (ceil random 15)), (random 360)]; + _vehWreck setPos _vehWreckRelPos; + _vehWreck setDir (random 360); + _vehWreck setVectorUp surfaceNormal position _vehWreck; }; \ No newline at end of file diff --git a/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf b/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf index 1262b1d..62ec02a 100644 --- a/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf +++ b/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf @@ -310,7 +310,8 @@ _livePlayers = []; }; }forEach playableUnits; -_livePlayers call BIS_fnc_arrayShuffle; +//_livePlayers call BIS_fnc_arrayShuffle; //Apparently this is broken in Arma.. +_livePlayers = _livePlayers call ExileClient_util_array_shuffle; // But Exile can still work it's magic!! // Find a player to hunt { @@ -341,7 +342,9 @@ _livePlayers call BIS_fnc_arrayShuffle; _lastHunted = _x getVariable "SC_lastHunted"; if(isNil "_lastHunted") then { - _lastHunted = -5000; + //_lastHunted = -5000; + _lastHunted = time; + _selectedPlayer setVariable ["SC_lastHunted",time]; }; if((time - _lastHunted) < SC_randomSpawnFrequency) exitWith diff --git a/source/a3_exile_occupation/scripts/occupationSea.sqf b/source/a3_exile_occupation/scripts/occupationSea.sqf index 46b7ed3..717e9e1 100644 --- a/source/a3_exile_occupation/scripts/occupationSea.sqf +++ b/source/a3_exile_occupation/scripts/occupationSea.sqf @@ -20,13 +20,16 @@ if(diag_fps < SC_minFPS) exitWith [_logDetail] call SC_fnc_log; }; -_aiActive = {alive _x && (side _x == SC_BanditSide OR side _x == SC_SurvivorSide)} count allUnits; -if(_aiActive > _maxAIcount) exitWith +//_aiActive = {alive _x && (side _x == SC_BanditSide OR side _x == SC_SurvivorSide)} count allUnits; +_aiActive = { !isPlayer _x } count allunits; +if((_aiActive > _maxAIcount) && !SC_occupySeaVehicleIgnoreCount) exitWith { _logDetail = format ["[OCCUPATION:Sea]:: %1 active AI, so not spawning AI this time",_aiActive]; [_logDetail] call SC_fnc_log; }; +SC_liveBoats = count(SC_liveBoatsArray); + if(SC_liveBoats >= SC_maxNumberofBoats) exitWith { if(SC_extendedLogging) then @@ -133,6 +136,9 @@ for "_i" from 1 to _vehiclesToSpawn do _vehicle setVariable ["ExileIsLocked", 0, true]; _vehicle setVariable ["ExileIsPersistent", false]; _vehicle action ["LightOn", _vehicle]; + // Limit boat speed to help stop beaching + _vehicle setSpeedMode "LIMITED"; + _vehicle limitSpeed 60; sleep 0.2; _group addVehicle _vehicle; diff --git a/source/a3_exile_occupation/scripts/occupationTransport.sqf b/source/a3_exile_occupation/scripts/occupationTransport.sqf index 8fd0424..6d0207a 100644 --- a/source/a3_exile_occupation/scripts/occupationTransport.sqf +++ b/source/a3_exile_occupation/scripts/occupationTransport.sqf @@ -119,7 +119,7 @@ while {true} do _transport setFuel 1; _transport setDamage 0; _transport engineOn true; - _transport flyInHeight 300; + _transport flyInHeight 500; } else { diff --git a/source/a3_exile_occupation/scripts/occupationVehicle.sqf b/source/a3_exile_occupation/scripts/occupationVehicle.sqf index a744ccc..49d9d99 100644 --- a/source/a3_exile_occupation/scripts/occupationVehicle.sqf +++ b/source/a3_exile_occupation/scripts/occupationVehicle.sqf @@ -30,7 +30,7 @@ if((_aiActive > _maxAIcount) && !SC_occupyLandVehicleIgnoreCount) exitWith SC_liveVehicles = count(SC_liveVehiclesArray); -if(SC_liveVehicles >= SC_maxNumberofVehicles) exitWith +if (SC_liveVehicles >= SC_maxNumberofVehicles) exitWith { _logDetail = format['[OCCUPATION:Vehicle] End check %1 currently active (max %2) @ %3',SC_liveVehicles,SC_maxNumberofVehicles,time]; [_logDetail] call SC_fnc_log; @@ -186,7 +186,7 @@ if(_vehiclesToSpawn > 0) then if(SC_occupyVehiclesLocked) then { - _vehicle lock 2; + _vehicle lock 3; _vehicle setVehicleLock "LOCKED"; _vehicle setVariable ["ExileIsLocked", 1, true]; }