V44 Fixes and Tweaks

This commit is contained in:
second_coming 2016-05-31 16:22:42 +01:00
parent 9cfe9a1a1a
commit 40221e8737
21 changed files with 208 additions and 121 deletions

View File

@ -1,3 +1,14 @@
=================================================================================
V44 (31-05-2016)
=================================================================================
Fixed error when real names were disabled
Added a process reporter module which logs server processes every 60 seconds to
the rpt or dedicated log file if using infiSTAR logging (useful for diagnosing
poor server performance)
Fixed map marker removal (including line drawing)
================================================================================= =================================================================================
V43 (26-05-2016) V43 (26-05-2016)
================================================================================= =================================================================================

View File

@ -4,7 +4,7 @@ class CfgPatches
units[] = {}; units[] = {};
weapons[] = {}; weapons[] = {};
requiredVersion = 0.1; requiredVersion = 0.1;
a3_exile_occupation_version = "v43 (26-05-2016)"; a3_exile_occupation_version = "v44 (31-05-2016)";
requiredAddons[] = {"a3_dms"}; requiredAddons[] = {"a3_dms"};
author[]= {"second_coming"}; author[]= {"second_coming"};
}; };

View File

@ -1,11 +1,12 @@
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// //
// Server Occupation script by second_coming // Exile Occupation by second_coming
//
// http://www.exilemod.com/profile/60-second_coming/ // http://www.exilemod.com/profile/60-second_coming/
// //
// This script uses the fantastic DMS by Defent and eraser1 // For support, visit:
// http://www.exilemod.com/topic/12517-release-exile-occupation-roaming-ai-more/
// //
// This script uses the fantastic DMS by Defent and eraser1:
// http://www.exilemod.com/topic/61-dms-defents-mission-system/ // http://www.exilemod.com/topic/61-dms-defents-mission-system/
// //
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -15,6 +16,7 @@
SC_debug = false; // set to true to turn on debug features (not for live servers) SC_debug = false; // set to true to turn on debug features (not for live servers)
SC_extendedLogging = false; // set to true for additional logging SC_extendedLogging = false; // set to true for additional logging
SC_processReporter = true; // log the a list of active server processes every 60 seconds (useful for debugging server problems)
SC_infiSTAR_log = true; // true Use infiSTAR logging, false logs to server rpt SC_infiSTAR_log = true; // true Use infiSTAR logging, false logs to server rpt
SC_maxAIcount = 100; // the maximum amount of AI, if the AI count is above this then additional AI won't spawn SC_maxAIcount = 100; // the maximum amount of AI, if the AI count is above this then additional AI won't spawn
SC_mapMarkers = false; // Place map markers at the occupied areas (occupyPlaces and occupyMilitary only) true/false SC_mapMarkers = false; // Place map markers at the occupied areas (occupyPlaces and occupyMilitary only) true/false
@ -45,16 +47,14 @@ SC_randomSpawnIgnoreCount = true; // true if you want spawn random AI groups
SC_occupyPlaces = true; // true if you want villages,towns,cities patrolled by bandits SC_occupyPlaces = true; // true if you want villages,towns,cities patrolled by bandits
SC_occupyVehicle = true; // true if you want to have roaming AI vehicles SC_occupyVehicle = true; // true if you want to have roaming AI vehicles
SC_occupyVehicleIgnoreCount = true; // true if you want spawn vehicles regardless of overall AI count SC_occupyVehicleIgnoreCount = true; // true if you want spawn vehicles regardless of overall AI count
SC_occupyVehiclesLocked = false; // true if AI vehicles to stay locked until all the linked AI are dead SC_occupyVehiclesLocked = false; // true if AI vehicles to stay locked until all the linked AI are dead
SC_occupyTraders = false; // (WORK IN PROGRESS, NOT WORKING YET) true if you want to create trader camps at positions specified in SC_occupyTraderDetails SC_occupyTraders = false; // (WORK IN PROGRESS, NOT WORKING YET) true if you want to create trader camps at positions specified in SC_occupyTraderDetails
SC_occupyTraderDetails = [ SC_occupyTraderDetails = [
["Test Trader1",[23718,16223,0],"trader1.sqf",true], ["Bubendorf Traders",[3896,14467,0],"trader1.sqf",true],
["Test Trader2",[10666,10262,0],"trader1.sqf",true] ["Schrattendamm Traders",[10584,4975,0],"trader1.sqf",true]
]; //["Name",[x,y,z],"filename",true] trader name, location, safezone true/false ]; //["Name",[x,y,z],"filename",true] trader name, location, safezone true/false
SC_SurvivorsChance = 20; // chance in % to spawn survivors instead of bandits (for places and land vehicles) SC_SurvivorsChance = 20; // chance in % to spawn survivors instead of bandits (for places and land vehicles)
@ -91,42 +91,6 @@ SC_BanditAssignedItems = ["ItemMap","ItemCompass","ItemRadio","ItemWatch"];
SC_BanditLauncher = []; SC_BanditLauncher = [];
SC_BanditBackpack = ["B_HuntingBackpack","B_Kitbag_cbr","B_Kitbag_mcamo","B_Kitbag_sgg","B_OutdoorPack_blk","B_OutdoorPack_blu","B_OutdoorPack_tan","B_TacticalPack_blk","B_TacticalPack_mcamo","B_TacticalPack_ocamo","B_TacticalPack_oli","B_TacticalPack_rgr"]; SC_BanditBackpack = ["B_HuntingBackpack","B_Kitbag_cbr","B_Kitbag_mcamo","B_Kitbag_sgg","B_OutdoorPack_blk","B_OutdoorPack_blu","B_OutdoorPack_tan","B_TacticalPack_blk","B_TacticalPack_mcamo","B_TacticalPack_ocamo","B_TacticalPack_oli","B_TacticalPack_rgr"];
SC_occupyMilitary = false; // true if you want military buildings patrolled
// Array of buildings to add military patrols to
SC_buildings = [ "Land_TentHangar_V1_F","Land_Hangar_F",
"Land_Airport_Tower_F","Land_Cargo_House_V1_F",
"Land_Cargo_House_V3_F","Land_Cargo_HQ_V1_F",
"Land_Cargo_HQ_V2_F","Land_Cargo_HQ_V3_F",
"Land_u_Barracks_V2_F","Land_i_Barracks_V2_F",
"Land_i_Barracks_V1_F","Land_Cargo_Patrol_V1_F",
"Land_Cargo_Patrol_V2_F","Land_Cargo_Tower_V1_F",
"Land_Cargo_Tower_V1_No1_F","Land_Cargo_Tower_V1_No2_F",
"Land_Cargo_Tower_V1_No3_F","Land_Cargo_Tower_V1_No4_F",
"Land_Cargo_Tower_V1_No5_F","Land_Cargo_Tower_V1_No6_F",
"Land_Cargo_Tower_V1_No7_F","Land_Cargo_Tower_V2_F",
"Land_Cargo_Tower_V3_F","Land_MilOffices_V1_F",
"Land_Radar_F","Land_budova4_winter","land_hlaska",
"Land_Vysilac_FM","land_st_vez","Land_ns_Jbad_Mil_Barracks",
"Land_ns_Jbad_Mil_ControlTower","Land_ns_Jbad_Mil_House",
"land_pozorovatelna","Land_vys_budova_p1",
"Land_Vez","Land_Mil_Barracks_i",
"Land_Mil_Barracks_L","Land_Mil_Barracks",
"Land_Hlidac_budka","Land_Ss_hangar",
"Land_Mil_ControlTower","Land_a_stationhouse",
"Land_Farm_WTower","Land_Mil_Guardhouse",
"Land_A_statue01","Land_A_Castle_Gate",
"Land_A_Castle_Donjon","Land_A_Castle_Wall2_30",
"Land_A_Castle_Stairs_A",
"Land_i_Barracks_V1_dam_F","Land_Cargo_Patrol_V3_F",
"Land_Radar_Small_F","Land_Dome_Big_F",
"Land_Dome_Small_F","Land_Army_hut3_long_int",
"Land_Army_hut_int","Land_Army_hut2_int"
];
SC_occupyStatic = false; // true if you want to add AI in specific locations SC_occupyStatic = false; // true if you want to add AI in specific locations
SC_staticBandits = [ //[[pos],ai count,radius,search buildings] SC_staticBandits = [ //[[pos],ai count,radius,search buildings]
@ -139,13 +103,17 @@ SC_occupySky = true; // true if you want to have roaming AI helis
SC_occupySea = false; // true if you want to have roaming AI boats SC_occupySea = false; // true if you want to have roaming AI boats
SC_occupyTransport = true; // true if you want pubic transport (travels between traders) SC_occupyTransport = true; // true if you want pubic transport (travels between traders)
SC_occupyTransportClass = ["Exile_Car_LandRover_Urban","Exile_Chopper_Mohawk_FIA"]; // to always use the same vehicle, specify one option only SC_occupyTransportClass = ["Exile_Car_LandRover_Urban","Exile_Chopper_Mohawk_FIA","Exile_Chopper_Mohawk_FIA"]; // to always use the same vehicle, specify one option only
SC_occupyTransportStartPos = []; // if empty defaults to map centre SC_occupyTransportStartPos = []; // if empty defaults to map centre
SC_occupyTransportAnnounce = true; // true if you want the pilot/driver to talk to passengers in vehicle chat, false if not
SC_occupyTransportGetIn = ["Hello and welcome to Occupation Transport. We hope you enjoy the ride!"];
SC_occupyTransportGetOut = ["Thanks for using Occupation Transport. We hope to see you again!"];
SC_occupyTransportMessages = ["You guys should totally visit our website","No mooning out of the window please!","Scream if you want to go faster!","frrt"];
SC_occupyLootCrates = true; // true if you want to have random loot crates with guards SC_occupyLootCrates = true; // true if you want to have random loot crates with guards
SC_numberofLootCrates = 6; // if SC_occupyLootCrates = true spawn this many loot crates (overrided below for Namalsk) SC_numberofLootCrates = 2; // if SC_occupyLootCrates = true spawn this many loot crates (overrided below for Namalsk)
SC_LootCrateGuards = 4; // number of AI to spawn at each crate SC_LootCrateGuards = 7; // number of AI to spawn at each crate
SC_LootCrateGuardsRandomize = true; // Use a random number of guards up to a maximum = SC_numberofGuards (so between 1 and SC_numberofGuards) SC_LootCrateGuardsRandomize = true; // Use a random number of guards up to a maximum = SC_numberofGuards (so between 1 and SC_numberofGuards)
SC_occupyLootCratesMarkers = true; // true if you want to have markers on the loot crate spawns SC_occupyLootCratesMarkers = true; // true if you want to have markers on the loot crate spawns
@ -180,7 +148,8 @@ SC_LootCrateItems = [
SC_blackListedAreas = [ SC_blackListedAreas = [
[[3810,8887,0],500,"Chernarus"], // Vybor Occupation DMS Static Mission [[3810,8887,0],500,"Chernarus"], // Vybor Occupation DMS Static Mission
[[12571,14337,0],500,"Altis"], // Neochori Occupation DMS Static Mission [[12571,14337,0],500,"Altis"], // Neochori Occupation DMS Static Mission
[[3926,7523,0],500,"Namalsk"] // Norinsk Occupation DMS Static Mission [[3926,7523,0],500,"Namalsk"], // Norinsk Occupation DMS Static Mission
[[3926,7523,0],500,"Napf"] // Lenzburg Occupation DMS Static Mission
]; ];
@ -259,6 +228,40 @@ SC_SurvivorLastNames = ["Smith","Jones","Davids","Johnson","Jobs","Andrews","
SC_BanditFirstNames = ["Alex","Nikita","George","Daniel","Adam","Alexander","Sasha","Sergey","Dmitry","Anton","Jakub","Vlad","Maxim","Oleg","Denis","Wojtek"]; SC_BanditFirstNames = ["Alex","Nikita","George","Daniel","Adam","Alexander","Sasha","Sergey","Dmitry","Anton","Jakub","Vlad","Maxim","Oleg","Denis","Wojtek"];
SC_BanditLastNames = ["Dimitrov","Petrov","Horvat","Novak","Dvorak","Vesely","Horak","Hansen","Larsen","Tamm","Ivanov","Pavlov","Virtanen"]; SC_BanditLastNames = ["Dimitrov","Petrov","Horvat","Novak","Dvorak","Vesely","Horak","Hansen","Larsen","Tamm","Ivanov","Pavlov","Virtanen"];
SC_occupyMilitary = false; // true if you want military buildings patrolled
// Array of buildings to add military patrols to
SC_buildings = [ "Land_TentHangar_V1_F","Land_Hangar_F",
"Land_Airport_Tower_F","Land_Cargo_House_V1_F",
"Land_Cargo_House_V3_F","Land_Cargo_HQ_V1_F",
"Land_Cargo_HQ_V2_F","Land_Cargo_HQ_V3_F",
"Land_u_Barracks_V2_F","Land_i_Barracks_V2_F",
"Land_i_Barracks_V1_F","Land_Cargo_Patrol_V1_F",
"Land_Cargo_Patrol_V2_F","Land_Cargo_Tower_V1_F",
"Land_Cargo_Tower_V1_No1_F","Land_Cargo_Tower_V1_No2_F",
"Land_Cargo_Tower_V1_No3_F","Land_Cargo_Tower_V1_No4_F",
"Land_Cargo_Tower_V1_No5_F","Land_Cargo_Tower_V1_No6_F",
"Land_Cargo_Tower_V1_No7_F","Land_Cargo_Tower_V2_F",
"Land_Cargo_Tower_V3_F","Land_MilOffices_V1_F",
"Land_Radar_F","Land_budova4_winter","land_hlaska",
"Land_Vysilac_FM","land_st_vez","Land_ns_Jbad_Mil_Barracks",
"Land_ns_Jbad_Mil_ControlTower","Land_ns_Jbad_Mil_House",
"land_pozorovatelna","Land_vys_budova_p1",
"Land_Vez","Land_Mil_Barracks_i",
"Land_Mil_Barracks_L","Land_Mil_Barracks",
"Land_Hlidac_budka","Land_Ss_hangar",
"Land_Mil_ControlTower","Land_a_stationhouse",
"Land_Farm_WTower","Land_Mil_Guardhouse",
"Land_A_statue01","Land_A_Castle_Gate",
"Land_A_Castle_Donjon","Land_A_Castle_Wall2_30",
"Land_A_Castle_Stairs_A",
"Land_i_Barracks_V1_dam_F","Land_Cargo_Patrol_V3_F",
"Land_Radar_Small_F","Land_Dome_Big_F",
"Land_Dome_Small_F","Land_Army_hut3_long_int",
"Land_Army_hut_int","Land_Army_hut2_int"
];
// namalsk specific settings (if you want to override settings for specific maps if you run multiple servers) // namalsk specific settings (if you want to override settings for specific maps if you run multiple servers)
if (worldName == 'Namalsk') then if (worldName == 'Namalsk') then
{ {
@ -274,6 +277,7 @@ if (worldName == 'Namalsk') then
if (SC_debug) then if (SC_debug) then
{ {
SC_extendedLogging = true; SC_extendedLogging = true;
SC_processReporter = true;
SC_mapMarkers = true; SC_mapMarkers = true;
SC_occupyPlaces = true; SC_occupyPlaces = true;
SC_occupyVehicle = true; SC_occupyVehicle = true;

View File

@ -65,6 +65,7 @@ SC_occupationVersion = getText (configFile >> "CfgPatches" >> "a3_exile_occupati
SC_fnc_spawnstatics = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\functions\fnc_spawnStatics.sqf"; SC_fnc_spawnstatics = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\functions\fnc_spawnStatics.sqf";
SC_fnc_unstick = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\functions\fnc_unstick.sqf"; SC_fnc_unstick = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\functions\fnc_unstick.sqf";
_logDetail = "============================================================================================================="; _logDetail = "=============================================================================================================";
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_logDetail = format ["[OCCUPATION MOD]:: Occupation %2 Initialised at %1",time,SC_occupationVersion]; _logDetail = format ["[OCCUPATION MOD]:: Occupation %2 Initialised at %1",time,SC_occupationVersion];

View File

@ -1,7 +1,10 @@
// Delete the map marker on a loot crate when a player gets in range
for "_i" from 1 to SC_numberofLootCrates do if (SC_occupyLootCratesMarkers) then
{ {
// Delete the map marker on a loot crate when a player gets in range
for "_i" from 1 to SC_numberofLootCrates do
{
_markerName = format ["loot_marker_%1", _i]; _markerName = format ["loot_marker_%1", _i];
_pos = getMarkerPos _markerName; _pos = getMarkerPos _markerName;
@ -16,8 +19,10 @@ for "_i" from 1 to SC_numberofLootCrates do
}; };
}; };
};
}; };
if(SC_removeUserMapMarkers) then if(SC_removeUserMapMarkers) then
{ {
{ {

View File

@ -38,10 +38,10 @@ if(count units _group > 0) then
if(_deadDriver == _driver) exitWith { [_vehicle] call SC_fnc_vehicleDestroyed; }; if(_deadDriver == _driver) exitWith { [_vehicle] call SC_fnc_vehicleDestroyed; };
_driver disableAI "TARGET"; //_driver disableAI "TARGET";
_driver disableAI "AUTOTARGET"; //_driver disableAI "AUTOTARGET";
_driver disableAI "AUTOCOMBAT"; //_driver disableAI "AUTOCOMBAT";
_driver disableAI "COVER"; //_driver disableAI "COVER";
_driver assignAsDriver _vehicle; _driver assignAsDriver _vehicle;
_driver setVariable ["DMS_AssignedVeh",_vehicle]; _driver setVariable ["DMS_AssignedVeh",_vehicle];

View File

@ -3,6 +3,9 @@
_transport = _this select 0; _transport = _this select 0;
_unit = _this select 2; _unit = _this select 2;
_driver = driver _transport;
_driver vehiclechat SC_occupyTransportGetOut;
if(_transport isKindOf "LandVehicle") then if(_transport isKindOf "LandVehicle") then
{ {
_transport setFuel 0; _transport setFuel 0;

View File

@ -2,3 +2,6 @@
_transport = _this select 0; _transport = _this select 0;
_unit = _this select 2; _unit = _this select 2;
_driver = driver _transport;
_driver vehiclechat SC_occupyTransportGetIn;

View File

@ -8,9 +8,7 @@ _count = _unit ammo _weapon;
if(_count < 1) then if(_count < 1) then
{ {
_logDetail = format ["[OCCUPATION:unitFired]:: unit: %1 out of ammo for weapon %2",_unit,_weapon]; diag_log format ["[OCCUPATION:unitFired]:: unit: %1 out of ammo for weapon %2",_unit,_weapon];
[_logDetail] call SC_fnc_log;
_weaponHolder = nearestObjects [_unit, ["WeaponHolder"], 75]; _weaponHolder = nearestObjects [_unit, ["WeaponHolder"], 75];
_weapons = weapons _unit; _weapons = weapons _unit;
@ -38,8 +36,15 @@ if(_count < 1) then
_unit doMove (position _item); _unit doMove (position _item);
{ {
_unit action ["TakeMagazine", _item, _x]; _unit action ["TakeMagazine", _item, _x];
_logDetail = format ["[OCCUPATION:unitFired]:: unit: %1 took ammo %2",_unit,_x]; diag_log format ["[OCCUPATION:unitFired]:: unit: %1 took ammo %2",_unit,_x];
[_logDetail] call SC_fnc_log;
}forEach _magazinesToAdd; }forEach _magazinesToAdd;
{
diag_log format ["[processReporter] %1 @ %2",_x,time];
} forEach diag_activeSQFScripts;
{
diag_log format ["[processReporter] %1 @ %2",_x,time];
} forEach diag_activeSQSScripts;
}; };
}; };

View File

@ -0,0 +1,21 @@
_logDetail = "=======================================================================================================";
[_logDetail,'A3_EXILE_PROCESSREPORTER'] call SC_fnc_log;
_logDetail = format['[processReporter] Started @ %4 : [FPS: %1|PLAYERS: %2|THREADS: %3]',diag_fps,count allplayers,count diag_activeSQFScripts,time];
[_logDetail,'A3_EXILE_PROCESSREPORTER'] call SC_fnc_log;
_logDetail = "=======================================================================================================";
[_logDetail,'A3_EXILE_PROCESSREPORTER'] call SC_fnc_log;
{
_logDetail = format ["[processReporter] %1 @ %2",_x,time];
[_logDetail,'A3_EXILE_PROCESSREPORTER'] call SC_fnc_log;
} forEach diag_activeSQFScripts;
{
_logDetail = format ["[processReporter] %1 @ %2",_x,time];
[_logDetail,'A3_EXILE_PROCESSREPORTER'] call SC_fnc_log;
} forEach diag_activeSQSScripts;
_logDetail = format ["[processReporter] Ended @ %1",time];
[_logDetail,'A3_EXILE_PROCESSREPORTER'] call SC_fnc_log;

View File

@ -67,7 +67,7 @@ if(_side == "survivor") then { _currentSide = SC_SurvivorSide };
_loadOut = [_side] call SC_fnc_selectGear; _loadOut = [_side] call SC_fnc_selectGear;
_unit = [_initialGroup,_spawnPosition,"custom","random",_side,"soldier",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_initialGroup,_spawnPosition,"custom","random",_side,"soldier",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = [_side] call SC_fnc_selectName; _unitName = [_side] call SC_fnc_selectName;
_unit setName _unitName; if(!isNil "_unitName") then { _unit setName _unitName; };
_unit setVariable ["SC_staticUID",_staticUID]; _unit setVariable ["SC_staticUID",_staticUID];
_unit setVariable ["SC_staticSpawnPos",_spawnPosition]; _unit setVariable ["SC_staticSpawnPos",_spawnPosition];
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_staticUnitMPKilled;"]; _unit addMPEventHandler ["mpkilled", "_this call SC_fnc_staticUnitMPKilled;"];

View File

@ -1,10 +1,13 @@
// Logging function to use either infiSTAR logging function or server RPT // Logging function to use either infiSTAR logging function or server RPT
_logDetail = format["%1 %2",SC_occupationVersion,_this select 0]; _logDetail = format["%1 %2",SC_occupationVersion,_this select 0];
_fileName = _this select 1;
if(SC_infiSTAR_log && !isNil "INFISTARVERSION") then if(isNil "_fileName") then { _fileName = "A3_EXILE_OCCUPATION"; };
if(SC_infiSTAR_log && !(isNil "INFISTARVERSION")) then
{ {
['A3_EXILE_OCCUPATION',_logDetail] call FNC_A3_CUSTOMLOG; [_fileName,_logDetail] call FNC_A3_CUSTOMLOG;
} }
else else
{ {

View File

@ -49,14 +49,16 @@ for "_i" from 1 to SC_numberofLootCrates do
{ {
_spawnPosition = [_position select 0, _position select 1, 0]; _spawnPosition = [_position select 0, _position select 1, 0];
_group = createGroup SC_BanditSide; _initialGroup = createGroup SC_BanditSide;
_initialGroup setCombatMode "BLUE";
_initialGroup setBehaviour "SAFE";
for "_i" from 1 to _AICount do for "_i" from 1 to _AICount do
{ {
_loadOut = ["bandit"] call SC_fnc_selectGear; _loadOut = ["bandit"] call SC_fnc_selectGear;
_unit = [_group,_spawnPosition,"custom","random","bandit","soldier",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_initialGroup,_spawnPosition,"custom","random","bandit","soldier",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = ["bandit"] call SC_fnc_selectName; _unitName = ["bandit"] call SC_fnc_selectName;
_unit setName _unitName; if(!isNil "_unitName") then { _unit setName _unitName; };
reload _unit; reload _unit;
}; };
@ -64,6 +66,20 @@ for "_i" from 1 to SC_numberofLootCrates do
enableSentences false; enableSentences false;
enableRadio false; enableRadio false;
_group = createGroup SC_BanditSide;
_group setVariable ["DMS_LockLocality",nil];
_group setVariable ["DMS_SpawnedGroup",true];
_group setVariable ["DMS_Group_Side", SC_BanditSide];
{
_unit = _x;
[_unit] joinSilent grpNull;
[_unit] joinSilent _group;
_unit setCaptive false;
}foreach units _initialGroup;
[_group, _spawnPosition, 100] call bis_fnc_taskPatrol; [_group, _spawnPosition, 100] call bis_fnc_taskPatrol;
_group setBehaviour "AWARE"; _group setBehaviour "AWARE";
_group setCombatMode "RED"; _group setCombatMode "RED";

View File

@ -149,7 +149,7 @@ _areaToScan = [ false, false ] call SC_fnc_findsafePos;
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
[_unit] joinSilent _group; [_unit] joinSilent _group;
_unitName = ["bandit"] call SC_fnc_selectName; _unitName = ["bandit"] call SC_fnc_selectName;
_unit setName _unitName; if(!isNil "_unitName") then { _unit setName _unitName; };
reload _unit; reload _unit;
if(SC_debug) then if(SC_debug) then
{ {
@ -174,7 +174,7 @@ _areaToScan = [ false, false ] call SC_fnc_findsafePos;
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
[_unit] joinSilent _group; [_unit] joinSilent _group;
_unitName = ["bandit"] call SC_fnc_selectName; _unitName = ["bandit"] call SC_fnc_selectName;
_unit setName _unitName; if(!isNil "_unitName") then { _unit setName _unitName; };
if(SC_debug) then if(SC_debug) then
{ {
_tag = createVehicle ["Sign_Arrow_Blue_F", position _unit, [], 0, "CAN_COLLIDE"]; _tag = createVehicle ["Sign_Arrow_Blue_F", position _unit, [], 0, "CAN_COLLIDE"];

View File

@ -146,12 +146,10 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
{ {
_loadOut = [_side] call SC_fnc_selectGear; _loadOut = [_side] call SC_fnc_selectGear;
_unit = [_group,_spawnPosition,"custom","random",_side,"soldier",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnPosition,"custom","random",_side,"soldier",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = [_side] call SC_fnc_selectName;
_unit setVariable ["SC_unitLocationName", _locationName,true]; _unit setVariable ["SC_unitLocationName", _locationName,true];
_unit setVariable ["SC_unitLocationPosition", _pos,true]; _unit setVariable ["SC_unitLocationPosition", _pos,true];
_unit setVariable ["SC_unitSide", _side,true]; _unit setVariable ["SC_unitSide", _side,true];
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_locationUnitMPKilled;"]; _unit addMPEventHandler ["mpkilled", "_this call SC_fnc_locationUnitMPKilled;"];
_unit setName _unitName;
}; };
DMS_ai_use_launchers = _useLaunchers; DMS_ai_use_launchers = _useLaunchers;
@ -164,6 +162,8 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
_unit = _x; _unit = _x;
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
[_unit] joinSilent _group; [_unit] joinSilent _group;
_unitName = [_side] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
[_side,_unit] call SC_fnc_addMarker; [_side,_unit] call SC_fnc_addMarker;
reload _unit; reload _unit;
}foreach units _group; }foreach units _group;
@ -237,8 +237,6 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
{ {
_loadOut = ["bandit"] call SC_fnc_selectGear; _loadOut = ["bandit"] call SC_fnc_selectGear;
_unit = [_group2,_spawnPosition,"custom","random",_side,"soldier",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_group2,_spawnPosition,"custom","random",_side,"soldier",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = [_side] call SC_fnc_selectName;
_unit setName _unitName;
_unit setVariable ["SC_unitLocationName", _locationName,true]; _unit setVariable ["SC_unitLocationName", _locationName,true];
_unit setVariable ["SC_unitLocationPosition", _pos,true]; _unit setVariable ["SC_unitLocationPosition", _pos,true];
_unit setVariable ["SC_unitSide", _side,true]; _unit setVariable ["SC_unitSide", _side,true];
@ -259,6 +257,8 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
[_unit] joinSilent _group2; [_unit] joinSilent _group2;
[_side,_unit] call SC_fnc_addMarker; [_side,_unit] call SC_fnc_addMarker;
_unitName = [_side] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
reload _unit; reload _unit;
}foreach units _group2; }foreach units _group2;

View File

@ -108,8 +108,6 @@ for "_i" from 1 to _vehiclesToSpawn do
if(_vehicleRole == "Driver") then if(_vehicleRole == "Driver") then
{ {
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
_unitName = ["bandit"] call SC_fnc_selectName;
_unit setName _unitName;
_amountOfCrew = _amountOfCrew + 1; _amountOfCrew = _amountOfCrew + 1;
_unit assignAsDriver _vehicle; _unit assignAsDriver _vehicle;
_unit moveInDriver _vehicle; _unit moveInDriver _vehicle;
@ -119,8 +117,6 @@ for "_i" from 1 to _vehiclesToSpawn do
if(_vehicleRole == "Turret") then if(_vehicleRole == "Turret") then
{ {
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
_unitName = ["bandit"] call SC_fnc_selectName;
_unit setName _unitName;
_amountOfCrew = _amountOfCrew + 1; _amountOfCrew = _amountOfCrew + 1;
_unit moveInTurret [_vehicle, _vehicleSeat]; _unit moveInTurret [_vehicle, _vehicleSeat];
_unit setVariable ["DMS_AssignedVeh",_vehicle]; _unit setVariable ["DMS_AssignedVeh",_vehicle];
@ -129,8 +125,6 @@ for "_i" from 1 to _vehiclesToSpawn do
if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then if(_vehicleRole == "CARGO" && _amountOfCrew < _crewRequired) then
{ {
_unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnLocation,"assault","random","bandit","Vehicle"] call DMS_fnc_SpawnAISoldier;
_unitName = ["bandit"] call SC_fnc_selectName;
_unit setName _unitName;
_amountOfCrew = _amountOfCrew + 1; _amountOfCrew = _amountOfCrew + 1;
_unit assignAsCargo _vehicle; _unit assignAsCargo _vehicle;
_unit moveInCargo _vehicle; _unit moveInCargo _vehicle;
@ -147,6 +141,8 @@ for "_i" from 1 to _vehiclesToSpawn do
{ {
_unit = _x; _unit = _x;
_unitName = ["bandit"] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
[_unit] joinSilent _group; [_unit] joinSilent _group;
}foreach units _group; }foreach units _group;

View File

@ -169,10 +169,14 @@ for "_i" from 1 to _vehiclesToSpawn do
{ {
_unit = _x; _unit = _x;
_unitName = ["bandit"] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
[_unit] joinSilent _group; [_unit] joinSilent _group;
}foreach units _group; }foreach units _group;
_group setVariable ["DMS_AllowFreezing",false,true];
if(SC_extendedLogging && _unitPlaced) then if(SC_extendedLogging && _unitPlaced) then
{ {
_logDetail = format['[OCCUPATION:Sky] %1 spawned @ %2',_VehicleClassToUse,_spawnLocation]; _logDetail = format['[OCCUPATION:Sky] %1 spawned @ %2',_VehicleClassToUse,_spawnLocation];

View File

@ -51,7 +51,7 @@ else
// Create the driver/pilot and ensure he doest react to gunfire or being shot at. // Create the driver/pilot and ensure he doest react to gunfire or being shot at.
_group = createGroup resistance; _group = createGroup resistance;
_group setCombatMode "BLUE"; _group setCombatMode "BLUE";
_group setVariable ["DMS_AllowFreezing",false,true];
// Spawn Vehicle // Spawn Vehicle
@ -94,7 +94,7 @@ else
_group addVehicle _transport; _group addVehicle _transport;
_group setVariable ["DMS_AllowFreezing",false,true];
_transport enableCopilot false; _transport enableCopilot false;
_transportDriver = _group createUnit [DMS_AI_Classname, _spawnLocation, [], 0,"FORM"]; _transportDriver = _group createUnit [DMS_AI_Classname, _spawnLocation, [], 0,"FORM"];
@ -120,6 +120,7 @@ _transport setVariable ["SC_assignedDriver", _transportDriver,true];
_transport setVariable ["SC_transport", true,true]; _transport setVariable ["SC_transport", true,true];
_transport setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true]; _transport setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
_transportDriver setVariable ["DMS_AssignedVeh",_transport]; _transportDriver setVariable ["DMS_AssignedVeh",_transport];
_transportDriver setVariable ["SC_lastSpoke", time, true];
_transport addEventHandler ["getin", "_this call SC_fnc_getOnBus;"]; _transport addEventHandler ["getin", "_this call SC_fnc_getOnBus;"];
_transport addEventHandler ["getout", "_this call SC_fnc_getOffBus;"]; _transport addEventHandler ["getout", "_this call SC_fnc_getOffBus;"];
@ -220,6 +221,14 @@ while {true} do
_transportDriver enableAI "MOVE"; _transportDriver enableAI "MOVE";
}; };
if(!Alive _transportDriver) exitWith {}; if(!Alive _transportDriver) exitWith {};
_transportDriverlastSpoke = _transportDriver getVariable "SC_lastSpoke";
if(time - _transportDriverlastSpoke > 30) then
{
_randomChat = [SC_occupyTransportMessages] call BIS_fnc_selectRandom;
_speech = _randomChat select 0;
_transportDriver vehiclechat _speech;
_transportDriver setVariable ["SC_lastSpoke", time, true];
};
uiSleep 5; uiSleep 5;
}; };
deleteMarker _mk; deleteMarker _mk;

View File

@ -185,8 +185,6 @@ if(_vehiclesToSpawn >= 1) then
{ {
_loadOut = [_side] call SC_fnc_selectGear; _loadOut = [_side] call SC_fnc_selectGear;
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = [_side] call SC_fnc_selectName;
_unit setName _unitName;
_amountOfCrew = _amountOfCrew + 1; _amountOfCrew = _amountOfCrew + 1;
_unit disableAI "FSM"; _unit disableAI "FSM";
_unit disableAI "MOVE"; _unit disableAI "MOVE";
@ -210,8 +208,6 @@ if(_vehiclesToSpawn >= 1) then
{ {
_loadOut = [_side] call SC_fnc_selectGear; _loadOut = [_side] call SC_fnc_selectGear;
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = [_side] call SC_fnc_selectName;
_unit setName _unitName;
_amountOfCrew = _amountOfCrew + 1; _amountOfCrew = _amountOfCrew + 1;
[_side,_unit] call SC_fnc_addMarker; [_side,_unit] call SC_fnc_addMarker;
_unit moveInTurret [_vehicle, _vehicleSeat]; _unit moveInTurret [_vehicle, _vehicleSeat];
@ -223,8 +219,6 @@ if(_vehiclesToSpawn >= 1) then
{ {
_loadOut = [_side] call SC_fnc_selectGear; _loadOut = [_side] call SC_fnc_selectGear;
_unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier; _unit = [_group,_spawnLocation,"custom","random",_side,"Vehicle",_loadOut] call DMS_fnc_SpawnAISoldier;
_unitName = [_side] call SC_fnc_selectName;
_unit setName _unitName;
_amountOfCrew = _amountOfCrew + 1; _amountOfCrew = _amountOfCrew + 1;
[_side,_unit] call SC_fnc_addMarker; [_side,_unit] call SC_fnc_addMarker;
_unit assignAsCargo _vehicle; _unit assignAsCargo _vehicle;
@ -250,9 +244,12 @@ if(_vehiclesToSpawn >= 1) then
sleep 2; sleep 2;
{ {
_x enableAI "FSM"; _unit = _x;
_x enableAI "MOVE"; _unit enableAI "FSM";
reload _x; _unit enableAI "MOVE";
reload _unit;
_unitName = [_side] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
}forEach units _group; }forEach units _group;
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol; [_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;

View File

@ -1,12 +1,26 @@
if (!isServer) exitWith {}; if (!isServer) exitWith {};
if(SC_processReporter) then
{
_logDetail = format ["[processReporter]:: Initialised at %1",time];
[_logDetail] call SC_fnc_log;
fnc_processReporter = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\extras\processReporter.sqf";
[60, fnc_processReporter, [], true] call ExileServer_system_thread_addTask;
};
_logDetail = format ["[OCCUPATION]:: Detected DMS version %1",DMS_Version]; _logDetail = format ["[OCCUPATION]:: Detected DMS version %1",DMS_Version];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_logDetail = format ["[OCCUPATION]:: Occupation %2 Adding modules to Exile system thread manager at %1",time,SC_occupationVersion]; _logDetail = format ["[OCCUPATION]:: Occupation %2 Adding modules to Exile system thread manager at %1",time,SC_occupationVersion];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
[] call ExileClient_system_map_initialize;
if(SC_occupyLootCratesMarkers OR SC_removeUserMapMarkers) then
{
uiSleep 15; // delay the start
fnc_occupationDeleteMapMarker = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\deleteMapMarkers.sqf";
[10, fnc_occupationDeleteMapMarker, [], true] call ExileServer_system_thread_addTask;
};
if(SC_debug) then { SC_refreshTime = 60; }else{ SC_refreshTime = 300; }; if(SC_debug) then { SC_refreshTime = 60; }else{ SC_refreshTime = 300; };
@ -33,12 +47,7 @@ if(SC_occupyTraders) then
if(SC_occupyLootCrates) then if(SC_occupyLootCrates) then
{ {
if(SC_occupyLootCratesMarkers) then
{
uiSleep 15; // delay the start uiSleep 15; // delay the start
fnc_occupationDeleteMapMarker = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\deleteMapMarkers.sqf";
[10, fnc_occupationDeleteMapMarker, [], true] call ExileServer_system_thread_addTask;
};
call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationLootCrates.sqf"; call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationLootCrates.sqf";
}; };