• 0
MrRenzo

Disable Raid Groups?

Question

Is there a way to disable raid groups? I look everywhere in my servers FTP and found no files that specifies the parameters for raid groups to spawn. If someone knows how to find the file and what lines of that file to delete, that would make my day.

 

Sincerely, Renzo.

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

Disable them in your  a3_exile_Occupation.PBO   located under your Addons Folder in the Arma 3 Root Directory

Edited by Cody0520

Share this post


Link to post
Share on other sites
  • 0
}forEach SC_liveRandomGroups;


if(count(SC_liveRandomGroups) >= SC_randomSpawnMaxGroups) exitWith 
{
    if(SC_extendedLogging) then 
    { 
        _logDetail = format['[OCCUPATION:RandomSpawn] End check %1 groups active (max %2) @ %3',count(SC_liveRandomGroups),SC_randomSpawnMaxGroups,time]; 
        [_logDetail] call SC_fnc_log;
    };   
};

// more than _scaleAI players on the server and the max AI count drops per additional player
_currentPlayerCount = count playableUnits;
if(_currentPlayerCount < SC_randomSPawnMinPlayers OR _currentPlayerCount < count(SC_liveRandomGroups)) exitWith 
{ 
    if(SC_extendedLogging) then 
    { 
        _logDetail = format ["[OCCUPATION:RandomSpawn]:: Held off spawning random AI, not enough players online"]; 
        [_logDetail] call SC_fnc_log; 
    };
};
if(_currentPlayerCount > _scaleAI) then 
{
	_maxAIcount = _maxAIcount - (_currentPlayerCount - _scaleAI) ;
};

// Don't spawn additional AI if the server fps is below _minFPS
if(diag_fps < _minFPS) exitWith 
{ 
    if(SC_extendedLogging) then 
    { 
        _logDetail = format ["[OCCUPATION:RandomSpawn]:: Held off spawning more AI as the server FPS is only %1",diag_fps]; 
        [_logDetail] call SC_fnc_log; 
    };
};

_aiActive = { !isPlayer _x } count allunits;

if(!SC_randomSpawnIgnoreCount) then
{
	if(_aiActive > _maxAIcount) exitWith 
	{ 
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 active AI, so not spawning AI this time",_aiActive]; 
			[_logDetail] call SC_fnc_log;
		};
	};
};

// Get current targets
_huntedPlayers = [];
{
	_group = _x;
	_huntedPlayer = _group getVariable "SC_huntedPlayer";
	_huntedPlayers pushback _huntedPlayer;
}forEach SC_liveRandomGroups;

_livePlayers = [];
{
	if(alive _x) then
	{
		_livePlayers pushBack _x;
	};
}forEach playableUnits;

_livePlayers call BIS_fnc_arrayShuffle;

// Find a player to hunt
{
	_selectedPlayer = _x;
	_suitablePlayer = true;
	_suitablePlayerisBambi = _selectedPlayer getVariable "ExileIsBambi";
	if(isNil "_suitablePlayerisBambi") then { _suitablePlayerisBambi = false; };
	if(_suitablePlayerisBambi && !SC_randomSpawnTargetBambis) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 is still a bambi, awww!",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};	
	
	if(_selectedPlayer in _huntedPlayers) exitWith 
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 is already being hunted",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};
	
	_lastHunted = _x getVariable "SC_lastHunted";	
	if(isNil "_lastHunted") then
	{
		_lastHunted = -5000;
	};
	
	if((time - _lastHunted) < SC_randomSpawnFrequency) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 has been hunted recently, not spawning another group yet",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};
	
	if(vehicle _selectedPlayer != _selectedPlayer) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: selected player %1 is in a vehicle, so not spawning AI this round",_selectedPlayer,_diceRoll,(100 - SC_randomSpawnChance)]; 
			[_logDetail] call SC_fnc_log;
		};	
	};
	
	_diceRoll = random(100);
	if(_diceRoll <= (100 - SC_randomSpawnChance)) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 rolled %2 (%3+ required) so not spawning another group yet",_selectedPlayer,_diceRoll,(100 - SC_randomSpawnChance)]; 
			[_logDetail] call SC_fnc_log;
		};	
	};
	
	// rolled more than the needed amount and not spawned hunters recently
	_playersPosition = position _selectedPlayer;
		
	// Is the player in a suitable place?
	if(_suitablePlayer) then
	{
		_suitablePlayer = [ _playersPosition ] call SC_fnc_isSafePosRandom;	
	};

	_spawnLocation = [0,0,0];
		
	// Suitable player and location found
	if(_suitablePlayer) then
	{
	
		// Find a safe position to spawn
		_suitableLocation = false;
		_attempts = 1;
		while{!_suitableLocation && _attempts < 5} do 
		{		
			_spawnLocation = [_playersPosition,250,350,15,0,20,0] call BIS_fnc_findSafePos;
			_suitableLocation = [ _spawnLocation ] call SC_fnc_isSafePosRandom;
			_attempts = _attempts + 1;
			sleep 1;
		};
		
		if(!_suitableLocation) then 
		{  
			if(SC_extendedLogging) then 
			{ 
				_logDetail = format ["[OCCUPATION:RandomSpawn]:: unable to find safe place near %1",_suitablePlayer]; 
				[_logDetail] call SC_fnc_log;
			};
		}
		else
		{
			_group = createGroup SC_BanditSide;
			_group setVariable ["DMS_AllowFreezing",false];
			_group setVariable ["DMS_LockLocality",true];
			_group setVariable ["DMS_SpawnedGroup",true];
			_group setVariable ["DMS_Group_Side", "bandit"];
			_group setVariable ["SC_huntedPlayer",_selectedPlayer];
			_selectedPlayer setVariable ["SC_lastHunted",time];
			SC_liveRandomGroups = SC_liveRandomGroups + [_group];
			
			_groupSize = random [SC_randomSpawnMinGroupSize, SC_randomSpawnMinGroupSize+(SC_randomSpawnMaxGroupSize-SC_randomSpawnMinGroupSize)/2, SC_randomSpawnMaxGroupSize]; 
			for "_i" from 1 to _groupSize do
			{
				_loadOut = ["cops"] call SC_fnc_selectGear;
				_unit = [_group,_spawnLocation,"custom","random","bandit","soldier",_loadOut] call DMS_fnc_SpawnAISoldier;				
				_unit allowFleeing 0;
				_unit allowDamage false;
				_unit disableAI "AUTOTARGET";
				_unit disableAI "TARGET";
				_unit disableAI "MOVE";
				//_unit disableAI "FSM";
                _unitName = ["survivor"] call SC_fnc_selectName;
                if(!isNil "_unitName") then { _unit setName _unitName; };				
				_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_randomUnitMPKilled;"];
				_unit addeventhandler ["Fired", {(vehicle (_this select 0)) setvehicleammo 1;}];
			};

            {	
                _unit = _x;           
				_unit allowDamage true;
				_unit enableAI "AUTOTARGET";
				_unit enableAI "TARGET";
				_unit enableAI "MOVE";  
				_unit setCaptive false;
				_unit setCombatMode "YELLOW"				
            }foreach units _group; 			
			
			if(SC_randomSpawnAnnounce) then
			{
				["toastRequest", ["InfoTitleAndText", ["Raid group Incoming!", "A squad of Police have been despatched to take out a trouble prisoner."]]] call ExileServer_system_network_send_broadcast;
			};
			
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: Spawning a group of AI @ %2 to hunt player %1",_selectedPlayer,_spawnLocation]; 
			[_logDetail] call SC_fnc_log;

			
			// Hunt the selected player
			_group reveal [_selectedPlayer,1.5];
			_destination = getPos _selectedPlayer;
			_group allowFleeing 0;
			_wp = _group addWaypoint [_destination, 0] ;
			_wp setWaypointFormation "Column";
			_wp setWaypointBehaviour "AWARE";
			_wp setWaypointCombatMode "YELLOW";
			_wp setWaypointCompletionRadius 10;
			_wp setWaypointType "MOVE";
				 
			[_group, _destination, 50] call bis_fnc_taskPatrol;
			_group allowFleeing 0;
			_group setBehaviour "AWARE";  
			_group setCombatMode "YELLOW";			
		};	
	}
	else
	{
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 is not in a safe place to spawn AI",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};  
}forEach _livePlayers;

 

So what lines do I delete to make them stop spawning?

Share this post


Link to post
Share on other sites
Advertisement
  • 0

Open the Occupation PBO, open the config.sqf, search for the term "random", set OccupyRandom to false. (it might not be exactly that name, I'm not at my desk to check right now)

Share this post


Link to post
Share on other sites
  • 0
On 11/25/2016 at 4:13 AM, MrRenzo said:

}forEach SC_liveRandomGroups;


if(count(SC_liveRandomGroups) >= SC_randomSpawnMaxGroups) exitWith 
{
    if(SC_extendedLogging) then 
    { 
        _logDetail = format['[OCCUPATION:RandomSpawn] End check %1 groups active (max %2) @ %3',count(SC_liveRandomGroups),SC_randomSpawnMaxGroups,time]; 
        [_logDetail] call SC_fnc_log;
    };   
};

// more than _scaleAI players on the server and the max AI count drops per additional player
_currentPlayerCount = count playableUnits;
if(_currentPlayerCount < SC_randomSPawnMinPlayers OR _currentPlayerCount < count(SC_liveRandomGroups)) exitWith 
{ 
    if(SC_extendedLogging) then 
    { 
        _logDetail = format ["[OCCUPATION:RandomSpawn]:: Held off spawning random AI, not enough players online"]; 
        [_logDetail] call SC_fnc_log; 
    };
};
if(_currentPlayerCount > _scaleAI) then 
{
	_maxAIcount = _maxAIcount - (_currentPlayerCount - _scaleAI) ;
};

// Don't spawn additional AI if the server fps is below _minFPS
if(diag_fps < _minFPS) exitWith 
{ 
    if(SC_extendedLogging) then 
    { 
        _logDetail = format ["[OCCUPATION:RandomSpawn]:: Held off spawning more AI as the server FPS is only %1",diag_fps]; 
        [_logDetail] call SC_fnc_log; 
    };
};

_aiActive = { !isPlayer _x } count allunits;

if(!SC_randomSpawnIgnoreCount) then
{
	if(_aiActive > _maxAIcount) exitWith 
	{ 
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 active AI, so not spawning AI this time",_aiActive]; 
			[_logDetail] call SC_fnc_log;
		};
	};
};

// Get current targets
_huntedPlayers = [];
{
	_group = _x;
	_huntedPlayer = _group getVariable "SC_huntedPlayer";
	_huntedPlayers pushback _huntedPlayer;
}forEach SC_liveRandomGroups;

_livePlayers = [];
{
	if(alive _x) then
	{
		_livePlayers pushBack _x;
	};
}forEach playableUnits;

_livePlayers call BIS_fnc_arrayShuffle;

// Find a player to hunt
{
	_selectedPlayer = _x;
	_suitablePlayer = true;
	_suitablePlayerisBambi = _selectedPlayer getVariable "ExileIsBambi";
	if(isNil "_suitablePlayerisBambi") then { _suitablePlayerisBambi = false; };
	if(_suitablePlayerisBambi && !SC_randomSpawnTargetBambis) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 is still a bambi, awww!",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};	
	
	if(_selectedPlayer in _huntedPlayers) exitWith 
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 is already being hunted",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};
	
	_lastHunted = _x getVariable "SC_lastHunted";	
	if(isNil "_lastHunted") then
	{
		_lastHunted = -5000;
	};
	
	if((time - _lastHunted) < SC_randomSpawnFrequency) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 has been hunted recently, not spawning another group yet",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};
	
	if(vehicle _selectedPlayer != _selectedPlayer) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: selected player %1 is in a vehicle, so not spawning AI this round",_selectedPlayer,_diceRoll,(100 - SC_randomSpawnChance)]; 
			[_logDetail] call SC_fnc_log;
		};	
	};
	
	_diceRoll = random(100);
	if(_diceRoll <= (100 - SC_randomSpawnChance)) exitWith
	{
		_suitablePlayer = false;
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 rolled %2 (%3+ required) so not spawning another group yet",_selectedPlayer,_diceRoll,(100 - SC_randomSpawnChance)]; 
			[_logDetail] call SC_fnc_log;
		};	
	};
	
	// rolled more than the needed amount and not spawned hunters recently
	_playersPosition = position _selectedPlayer;
		
	// Is the player in a suitable place?
	if(_suitablePlayer) then
	{
		_suitablePlayer = [ _playersPosition ] call SC_fnc_isSafePosRandom;	
	};

	_spawnLocation = [0,0,0];
		
	// Suitable player and location found
	if(_suitablePlayer) then
	{
	
		// Find a safe position to spawn
		_suitableLocation = false;
		_attempts = 1;
		while{!_suitableLocation && _attempts < 5} do 
		{		
			_spawnLocation = [_playersPosition,250,350,15,0,20,0] call BIS_fnc_findSafePos;
			_suitableLocation = [ _spawnLocation ] call SC_fnc_isSafePosRandom;
			_attempts = _attempts + 1;
			sleep 1;
		};
		
		if(!_suitableLocation) then 
		{  
			if(SC_extendedLogging) then 
			{ 
				_logDetail = format ["[OCCUPATION:RandomSpawn]:: unable to find safe place near %1",_suitablePlayer]; 
				[_logDetail] call SC_fnc_log;
			};
		}
		else
		{
			_group = createGroup SC_BanditSide;
			_group setVariable ["DMS_AllowFreezing",false];
			_group setVariable ["DMS_LockLocality",true];
			_group setVariable ["DMS_SpawnedGroup",true];
			_group setVariable ["DMS_Group_Side", "bandit"];
			_group setVariable ["SC_huntedPlayer",_selectedPlayer];
			_selectedPlayer setVariable ["SC_lastHunted",time];
			SC_liveRandomGroups = SC_liveRandomGroups + [_group];
			
			_groupSize = random [SC_randomSpawnMinGroupSize, SC_randomSpawnMinGroupSize+(SC_randomSpawnMaxGroupSize-SC_randomSpawnMinGroupSize)/2, SC_randomSpawnMaxGroupSize]; 
			for "_i" from 1 to _groupSize do
			{
				_loadOut = ["cops"] call SC_fnc_selectGear;
				_unit = [_group,_spawnLocation,"custom","random","bandit","soldier",_loadOut] call DMS_fnc_SpawnAISoldier;				
				_unit allowFleeing 0;
				_unit allowDamage false;
				_unit disableAI "AUTOTARGET";
				_unit disableAI "TARGET";
				_unit disableAI "MOVE";
				//_unit disableAI "FSM";
                _unitName = ["survivor"] call SC_fnc_selectName;
                if(!isNil "_unitName") then { _unit setName _unitName; };				
				_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_randomUnitMPKilled;"];
				_unit addeventhandler ["Fired", {(vehicle (_this select 0)) setvehicleammo 1;}];
			};

            {	
                _unit = _x;           
				_unit allowDamage true;
				_unit enableAI "AUTOTARGET";
				_unit enableAI "TARGET";
				_unit enableAI "MOVE";  
				_unit setCaptive false;
				_unit setCombatMode "YELLOW"				
            }foreach units _group; 			
			
			if(SC_randomSpawnAnnounce) then
			{
				["toastRequest", ["InfoTitleAndText", ["Raid group Incoming!", "A squad of Police have been despatched to take out a trouble prisoner."]]] call ExileServer_system_network_send_broadcast;
			};
			
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: Spawning a group of AI @ %2 to hunt player %1",_selectedPlayer,_spawnLocation]; 
			[_logDetail] call SC_fnc_log;

			
			// Hunt the selected player
			_group reveal [_selectedPlayer,1.5];
			_destination = getPos _selectedPlayer;
			_group allowFleeing 0;
			_wp = _group addWaypoint [_destination, 0] ;
			_wp setWaypointFormation "Column";
			_wp setWaypointBehaviour "AWARE";
			_wp setWaypointCombatMode "YELLOW";
			_wp setWaypointCompletionRadius 10;
			_wp setWaypointType "MOVE";
				 
			[_group, _destination, 50] call bis_fnc_taskPatrol;
			_group allowFleeing 0;
			_group setBehaviour "AWARE";  
			_group setCombatMode "YELLOW";			
		};	
	}
	else
	{
		if(SC_extendedLogging) then 
		{ 
			_logDetail = format ["[OCCUPATION:RandomSpawn]:: %1 is not in a safe place to spawn AI",_selectedPlayer]; 
			[_logDetail] call SC_fnc_log;
		};		
	};  
}forEach _livePlayers;

 

So what lines do I delete to make them stop spawning?

did u disabled it ? the raid group police inbound

Share this post


Link to post
Share on other sites
  • 0

As kuplion said, in the config change the SC_occupyRandomSpawn            = true;    to false like below, that will stop the raid group's

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//    Turn Modules On or Off (can be overridden in the map overrides section)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

              SC_processReporter           = true;     // log the a list of active server processes every 60 seconds 
              SC_fastNights                   = false;              // true if you want night time to go faster than daytime
              SC_occupyPlaces                 = true;             // true if you want villages,towns,cities patrolled by bandits
              SC_occupyTraders                = true;         // true if you want to create trader camps at positions specified in SC_occupyTraderDetails
              SC_occupyStatic                     = false;           // true if you want to add AI in specific locations
              SC_occupyTransport                 = false;         // true if you want pubic transport (travels between traders)
              SC_occupyLootCrates                = true;               // true if you want to have random loot crates with guards
>>>>>> SC_occupyRandomSpawn            = false;     // (IN PROGRESS) true if you want random spawning AI that hunt for nearby players
              SC_occupyMilitary                 = false;              // true if you want military buildings patrolled
              SC_occupyVehicle                = true;                // true if you want to have roaming AI land vehicles
              SC_occupySky                    = false;             // true if you want to have roaming AI helis
              SC_occupySea                    = false;           // true if you want to have roaming AI boats

Edited by DavieReid88

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.