v15 fixes
This commit is contained in:
parent
f48e02f403
commit
0f4b922a46
34
config.sqf
34
config.sqf
@ -39,15 +39,37 @@ SC_SurvivorsChance = 33; // chance in % to spawn surv
|
|||||||
// Occupation Military (roaming AI near military buildings)
|
// Occupation Military (roaming AI near military buildings)
|
||||||
SC_occupyMilitary = true; // true if you want military buildings patrolled (specify which types of building below)
|
SC_occupyMilitary = true; // true if you want military buildings patrolled (specify which types of building below)
|
||||||
|
|
||||||
SC_buildings = [ "Land_Cargo_Patrol_V1_F","Land_i_Barracks_V1_F","Land_i_Barracks_V1_dam_F", "Land_i_Barracks_V2_F",
|
SC_buildings = [ "Land_TentHangar_V1_F","Land_Hangar_F",
|
||||||
"Land_Cargo_House_V1_F","Land_Cargo_HQ_V1_F","Land_Cargo_HQ_V2_F","Land_Cargo_HQ_V3_F","Land_Cargo_Patrol_V2_F",
|
"Land_Airport_Tower_F","Land_Cargo_House_V1_F",
|
||||||
"Land_Cargo_Patrol_V3_F","Land_Cargo_Tower_V1_F","Land_Cargo_Tower_V1_No1_F","Land_Cargo_Tower_V1_No2_F",
|
"Land_Cargo_House_V3_F","Land_Cargo_HQ_V1_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_HQ_V2_F","Land_Cargo_HQ_V3_F",
|
||||||
"Land_Cargo_Tower_V1_No7_F","Land_Cargo_Tower_V2_F","Land_Cargo_Tower_V3_F","Land_MilOffices_V1_F",
|
"Land_u_Barracks_V2_F","Land_i_Barracks_V2_F",
|
||||||
"Land_Radar_F","Land_Radar_Small_F","Land_Dome_Big_F","Land_Dome_Small_F","Land_Army_hut3_long_int",
|
"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"
|
"Land_Army_hut_int","Land_Army_hut2_int"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
SC_occupyStatic = false; // true if you want to garrison AI in specific locations
|
SC_occupyStatic = false; // true if you want to garrison AI in specific locations
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Server Occupation script by second_coming
|
// Server Occupation script by second_coming
|
||||||
//
|
//
|
||||||
SC_occupationVersion = "v13 (13-04-2016)";
|
SC_occupationVersion = "v15 (14-04-2016)";
|
||||||
//
|
//
|
||||||
// http://www.exilemod.com/profile/60-second_coming/
|
// http://www.exilemod.com/profile/60-second_coming/
|
||||||
//
|
//
|
||||||
|
@ -4,6 +4,7 @@ private["_wp","_wp2","_wp3"];
|
|||||||
_logDetail = format ["[OCCUPATION Military]:: Starting Monitor"];
|
_logDetail = format ["[OCCUPATION Military]:: Starting Monitor"];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
|
|
||||||
|
_maxDistance = 500; // Max radius to scan
|
||||||
_maxAIcount = SC_maxAIcount;
|
_maxAIcount = SC_maxAIcount;
|
||||||
_minFPS = SC_minFPS;
|
_minFPS = SC_minFPS;
|
||||||
_useLaunchers = DMS_ai_use_launchers;
|
_useLaunchers = DMS_ai_use_launchers;
|
||||||
@ -18,9 +19,6 @@ if(_currentPlayerCount > _scaleAI) then
|
|||||||
_maxAIcount = _maxAIcount - (_currentPlayerCount - _scaleAI) ;
|
_maxAIcount = _maxAIcount - (_currentPlayerCount - _scaleAI) ;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Select an area to scan as nearObjects on the entire map is slooooooooow
|
|
||||||
_areaToScan = [ 0, 900, 1, 500, 500, 0, 0, 0, true, false ] call DMS_fnc_findSafePos;
|
|
||||||
|
|
||||||
// Don't spawn additional AI if the server fps is below 8
|
// Don't spawn additional AI if the server fps is below 8
|
||||||
if(diag_fps < _minFPS) exitWith
|
if(diag_fps < _minFPS) exitWith
|
||||||
{
|
{
|
||||||
@ -36,13 +34,15 @@ if(_aiActive > _maxAIcount) exitWith
|
|||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Select an area to scan as nearObjects on the entire map is slooooooooow
|
||||||
|
_areaToScan = [ 0, 900, 1, 500, 500, 0, 0, 0, true, false ] call DMS_fnc_findSafePos;
|
||||||
|
|
||||||
{
|
{
|
||||||
_logDetail = format ["[OCCUPATION Military]:: scanning buildings around %2 started at %1",time,_areaToScan];
|
_logDetail = format ["[OCCUPATION Military]:: scanning buildings around %2 started at %1",time,_areaToScan];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
|
|
||||||
_currentBuilding = _x;
|
_currentBuilding = _x;
|
||||||
_building = _areaToScan nearObjects [_currentBuilding, 750];
|
_building = _areaToScan nearObjects [_currentBuilding, _maxDistance];
|
||||||
|
|
||||||
_logDetail = format ["[OCCUPATION Military]:: scan for %2 building finished at %1",time,_currentBuilding];
|
_logDetail = format ["[OCCUPATION Military]:: scan for %2 building finished at %1",time,_currentBuilding];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
@ -63,9 +63,9 @@ if(_aiActive > _maxAIcount) exitWith
|
|||||||
|
|
||||||
while{_okToSpawn} do
|
while{_okToSpawn} do
|
||||||
{
|
{
|
||||||
// Percentage chance to spawn (roll 60 or more to spawn AI)
|
// Percentage chance to spawn (roll 70 or more to spawn AI)
|
||||||
_spawnChance = round (random 100);
|
_spawnChance = round (random 100);
|
||||||
if(_spawnChance < 60) exitWith
|
if(_spawnChance < 70) exitWith
|
||||||
{
|
{
|
||||||
_okToSpawn = false;
|
_okToSpawn = false;
|
||||||
if(SC_extendedLogging) then
|
if(SC_extendedLogging) then
|
||||||
@ -128,7 +128,7 @@ if(_aiActive > _maxAIcount) exitWith
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Get AI to patrol the area
|
// Get AI to patrol the area
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
_aiCount = 2 + (round (random 3));
|
_aiCount = 2 + (round (random 1));
|
||||||
_groupRadius = 100;
|
_groupRadius = 100;
|
||||||
_difficulty = "random";
|
_difficulty = "random";
|
||||||
_side = "bandit";
|
_side = "bandit";
|
||||||
@ -159,6 +159,11 @@ if(_aiActive > _maxAIcount) exitWith
|
|||||||
_unit = _x;
|
_unit = _x;
|
||||||
[_unit] joinSilent grpNull;
|
[_unit] joinSilent grpNull;
|
||||||
[_unit] joinSilent _group;
|
[_unit] joinSilent _group;
|
||||||
|
if(SC_debug) then
|
||||||
|
{
|
||||||
|
_tag = createVehicle ["Sign_Arrow_Blue_F", position _unit, [], 0, "CAN_COLLIDE"];
|
||||||
|
_tag attachTo [_unit,[0,0,0.6],"Head"];
|
||||||
|
};
|
||||||
}foreach units _group;
|
}foreach units _group;
|
||||||
|
|
||||||
[ _group,_pos,_difficulty,"COMBAT" ] call DMS_fnc_SetGroupBehavior;
|
[ _group,_pos,_difficulty,"COMBAT" ] call DMS_fnc_SetGroupBehavior;
|
||||||
|
@ -3,7 +3,7 @@ if (!isServer) exitWith {};
|
|||||||
_logDetail = format ["[OCCUPATION:publicBus]:: Starting @ %1",time];
|
_logDetail = format ["[OCCUPATION:publicBus]:: Starting @ %1",time];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
|
|
||||||
_position = [ 0, 50, 1, 500, 500, 200, 200, 200, true, false ] call DMS_fnc_findSafePos;
|
_position = [ 0, 5000, 1, 500, 500, 200, 200, 200, true, false ] call DMS_fnc_findSafePos;
|
||||||
|
|
||||||
// Get position of nearest roads
|
// Get position of nearest roads
|
||||||
_nearRoads = _position nearRoads 2000;
|
_nearRoads = _position nearRoads 2000;
|
||||||
@ -42,12 +42,15 @@ _publicBus setVariable ["ExileIsPersistent", false];
|
|||||||
_publicBus setVariable["vehPos",_spawnLocation,true];
|
_publicBus setVariable["vehPos",_spawnLocation,true];
|
||||||
_publicBus setFuel 1;
|
_publicBus setFuel 1;
|
||||||
|
|
||||||
diag_log format['[OCCUPATION:publicBus] Vehicle spawned @ %1',_spawnLocation];
|
_logDetail = format['[OCCUPATION:publicBus] Vehicle spawned @ %1',_spawnLocation];
|
||||||
|
[_logDetail] call SC_fnc_log;
|
||||||
|
|
||||||
_publicBus addEventHandler ["HandleDamage", { _amountOfDamage = 0; _amountOfDamage }];
|
_publicBus addEventHandler ["HandleDamage", { _amountOfDamage = 0; _amountOfDamage }];
|
||||||
|
|
||||||
busDriver assignasdriver _publicBus;
|
busDriver assignasdriver _publicBus;
|
||||||
|
busDriver moveInDriver _publicBus;
|
||||||
[busDriver] orderGetin true;
|
[busDriver] orderGetin true;
|
||||||
|
_publicBus lockDriver true;
|
||||||
|
|
||||||
{
|
{
|
||||||
_markerName = _x;
|
_markerName = _x;
|
||||||
@ -89,31 +92,27 @@ while {true} do
|
|||||||
{
|
{
|
||||||
uiSleep 0.5;
|
uiSleep 0.5;
|
||||||
_publicBus setFuel 0;
|
_publicBus setFuel 0;
|
||||||
busDriver action ["salute", busDriver];
|
|
||||||
busDriver disableAI "MOVE";
|
busDriver disableAI "MOVE";
|
||||||
uiSleep 3;
|
uiSleep 3;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_currentDriver = driver _publicBus;
|
|
||||||
if(_currentDriver != busDriver) then
|
|
||||||
{
|
|
||||||
_publicBus setFuel 0;
|
|
||||||
[_currentDriver] orderGetin false;
|
|
||||||
_currentDriver action ["eject", _publicBus];
|
|
||||||
};
|
|
||||||
|
|
||||||
if(isnull _currentDriver) then
|
|
||||||
{
|
|
||||||
sleep 0.1;
|
|
||||||
busDriver assignAsDriver _publicBus;
|
|
||||||
busDriver moveInDriver _publicBus;
|
|
||||||
[busDriver] orderGetin true;
|
|
||||||
_publicBus lockDriver true;
|
|
||||||
};
|
|
||||||
_publicBus setFuel 1;
|
_publicBus setFuel 1;
|
||||||
uiSleep 3;
|
uiSleep 3;
|
||||||
busDriver enableAI "MOVE";
|
busDriver enableAI "MOVE";
|
||||||
if(!Alive busDriver) exitWith {};
|
if(!Alive busDriver) exitWith {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check for nearby missions
|
||||||
|
_missionPos = missionNamespace getVariable [format ["%1_pos",_x], []];
|
||||||
|
_missionDistance = _missionPos distance2D _pos;
|
||||||
|
if (_missionDistance<=500) then
|
||||||
|
{
|
||||||
|
// DMS Mission in range
|
||||||
|
_logDetail = format['[OCCUPATION:publicBus] Vehicle near DMS Mission @ %1 (%2 metres away)',_missionPos,(_missionPos distance2D _pos)];
|
||||||
|
[_logDetail] call SC_fnc_log;
|
||||||
|
};
|
||||||
|
} forEach allMapMarkers;
|
@ -72,16 +72,16 @@ _maxDistance = _middle;
|
|||||||
|
|
||||||
if(_vehiclesToSpawn >= 1) then
|
if(_vehiclesToSpawn >= 1) then
|
||||||
{
|
{
|
||||||
|
if(SC_occupyVehicleSurvivors) then
|
||||||
|
{
|
||||||
// decide which side to spawn
|
// decide which side to spawn
|
||||||
_sideToSpawn = random 100;
|
_sideToSpawn = random 100;
|
||||||
if(_sideToSpawn <= SC_SurvivorsChance) then
|
if(_sideToSpawn <= SC_SurvivorsChance) then
|
||||||
{
|
{
|
||||||
_side = "survivor";
|
_side = "survivor";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_side = "bandit";
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
_useLaunchers = DMS_ai_use_launchers;
|
_useLaunchers = DMS_ai_use_launchers;
|
||||||
_locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCityCapital"], _maxDistance]);
|
_locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCityCapital"], _maxDistance]);
|
||||||
@ -232,7 +232,7 @@ if(_vehiclesToSpawn >= 1) then
|
|||||||
|
|
||||||
_logDetail = format['[OCCUPATION:Vehicle] %3 vehicle %1 spawned @ %2',_VehicleClassToUse,_spawnLocation,_side];
|
_logDetail = format['[OCCUPATION:Vehicle] %3 vehicle %1 spawned @ %2',_VehicleClassToUse,_spawnLocation,_side];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
|
sleep 15;
|
||||||
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
||||||
_group setBehaviour "SAFE";
|
_group setBehaviour "SAFE";
|
||||||
_group setCombatMode "RED";
|
_group setCombatMode "RED";
|
||||||
|
@ -53,11 +53,11 @@ if(_heliDamage > 0.2 && _damagedEssentials > 0 && !_crewEjected && _ejectChance
|
|||||||
_logDetail = format ["[OCCUPATION:Sky]:: Air unit %2 ejecting passengers at %3 (time: %1)",time,_veh,_heliPosition];
|
_logDetail = format ["[OCCUPATION:Sky]:: Air unit %2 ejecting passengers at %3 (time: %1)",time,_veh,_heliPosition];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
};
|
};
|
||||||
|
_cargo = assignedCargo _veh;
|
||||||
{
|
{
|
||||||
_unit = _x;
|
_x joinSilent _group2;
|
||||||
_unit joinSilent _group2;
|
_x action ["EJECT", _veh];
|
||||||
_unit action ["EJECT", _veh];
|
} forEach _cargo;
|
||||||
} forEach (assignedCargo _veh);
|
|
||||||
|
|
||||||
_target = _this select 1;
|
_target = _this select 1;
|
||||||
_group2 reveal [_target,1.5];
|
_group2 reveal [_target,1.5];
|
||||||
|
@ -8,10 +8,11 @@ _unit removeAllMPEventHandlers "mphit";
|
|||||||
|
|
||||||
if (side _aggressor == RESISTANCE) then
|
if (side _aggressor == RESISTANCE) then
|
||||||
{
|
{
|
||||||
// Make victim and his group aggressive to players
|
// Make victim and his group aggressive to their attacker
|
||||||
_group = group _unit;
|
_group = group _unit;
|
||||||
_group reveal [_aggressor, 2.5];
|
_group reveal [_aggressor, 2.5];
|
||||||
_group moveTo (position _aggressor);
|
_group move (position _aggressor);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if(alive _unit) then
|
if(alive _unit) then
|
||||||
|
Loading…
Reference in New Issue
Block a user