This commit is contained in:
second_coming
2016-06-16 11:44:08 +01:00
parent d131498a0f
commit c631dcf442
5 changed files with 217 additions and 179 deletions

View File

@ -1,3 +1,17 @@
=================================================================================
V48 (16-06-2016)
=================================================================================
Added the setting SC_useMapOverrides, setting to true activates the map specific
overrides at the bottom of the config.sqf, false ignores the settings
Removed the over write for DMS_Enable_RankChange
Added in checks for the transport module to only spawn the public transport if there
are more than 1 destination map markers (in the dev branch map markers are not
displaying correctly intermittently which is causing issues). Check the server rpt
if your transport is not spawning and you have activated it.
=================================================================================
V47 (13-06-2016)
=================================================================================

View File

@ -4,7 +4,7 @@ class CfgPatches
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
a3_exile_occupation_version = "v47 (13-06-2016)";
a3_exile_occupation_version = "v48 (16-06-2016)";
requiredAddons[] = {"a3_dms"};
author[]= {"second_coming"};
};

View File

@ -15,6 +15,7 @@
SC_debug = false; // set to true to turn on debug features (not for live servers)
SC_useMapOverrides = false; // set to true to enable over riding options per map (see the bottom of this file for examples)
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
@ -105,6 +106,7 @@ 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_occupyTransportClass = ["Exile_Chopper_Mohawk_FIA","Exile_Chopper_Mohawk_FIA","Exile_Car_LandRover_Urban"]; // to always use the same vehicle, specify one option only
SC_occupyTransportStartPos = []; // if empty defaults to map centre
SC_occupyTransportAnnounce = false; // true if you want the pilot/driver to talk to passengers in vehicle chat, false if not
SC_occupyTransportGetIn = [];
@ -196,7 +198,7 @@ SC_maxNumberofVehicles = 4;
// Array of arrays of ground vehicles 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_VehicleClassToUse = [
["Exile_Car_LandRover_Green",0],
["Exile_Car_LandRover_Green",0],
["Exile_Bike_QuadBike_Black",2],
["Exile_Car_UAZ_Open_Green",2]
];
@ -269,7 +271,7 @@ SC_buildings = [ "Land_TentHangar_V1_F","Land_Hangar_F",
];
// namalsk specific settings (if you want to override settings for specific maps if you run multiple servers)
if (worldName == 'Namalsk') then
if (worldName == 'Namalsk' AND SC_useMapOverrides) then
{
SC_maxAIcount = 80;
SC_occupySky = false;
@ -281,15 +283,26 @@ if (worldName == 'Namalsk') then
};
// Napf specific settings (if you want to override settings for specific maps if you run multiple servers)
if (worldName == 'Napf') then
if (worldName == 'Napf' AND SC_useMapOverrides) then
{
SC_occupyTraders = true;
};
// Napf specific settings (if you want to override settings for specific maps if you run multiple servers)
if (worldName == 'Tanoa') then
if (worldName == 'Tanoa' AND SC_useMapOverrides) then
{
SC_occupyTraders = true;
SC_BanditWeapon = [ "arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MX_SW_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F","arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F",
"arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F",
"arifle_SPAR_01_snd_F","arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F",
"arifle_SPAR_03_blk_F","arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F"];
SC_BanditUniforms = [ "U_I_C_Soldier_Para_1_F","U_I_C_Soldier_Para_2_F","U_I_C_Soldier_Para_3_F","U_I_C_Soldier_Para_4_F","U_I_C_Soldier_Para_5_F","U_I_C_Soldier_Bandit_1_F","U_I_C_Soldier_Bandit_2_F",
"U_I_C_Soldier_Bandit_3_F","U_I_C_Soldier_Bandit_4_F","U_I_C_Soldier_Bandit_5_F","U_I_C_Soldier_Camo_F","U_B_CTRG_Soldier_urb_1_F","U_B_CTRG_Soldier_urb_2_F","U_B_CTRG_Soldier_urb_3_F"];
SC_VehicleClassToUse = [
["B_GEN_Offroad_01_gen_F",0],
["C_Offroad_02_unarmed_F",0],
["I_C_Offroad_02_unarmed_F",0]
];
};
if (SC_debug) then
@ -297,15 +310,15 @@ if (SC_debug) then
SC_extendedLogging = true;
SC_processReporter = true;
SC_mapMarkers = true;
//SC_occupyPlaces = true;
//SC_occupyVehicle = true;
//SC_occupyMilitary = true;
//SC_occupyStatic = true;
//SC_occupySky = true;
//SC_occupySea = true;
//SC_occupyTransport = true;
//SC_occupyLootCrates = true;
//SC_occupyHeliCrashes = true;
SC_occupyPlaces = true;
SC_occupyVehicle = true;
SC_occupyMilitary = true;
SC_occupyStatic = true;
SC_occupySky = true;
SC_occupySea = true;
SC_occupyTransport = true;
SC_occupyLootCrates = true;
SC_occupyHeliCrashes = true;
SC_maxNumberofVehicles = 4;
SC_maxNumberofBoats = 1;
SC_maxNumberofHelis = 1;

View File

@ -16,11 +16,6 @@ _scaleAI = SC_scaleAI;
_side = "bandit";
_okToSpawn = true;
if(SC_occupyPlacesSurvivors) then
{
if(!isNil "DMS_Enable_RankChange") then { DMS_Enable_RankChange = true; };
};
// more than _scaleAI players on the server and the max AI count drops per additional player
_currentPlayerCount = count playableUnits;

View File

@ -34,7 +34,7 @@ if(SC_occupyTransportClassToUse isKindOf "LandVehicle") then
_nearestRoadPos = position (_nearRoads select 0);
_spawnLocation = [_nearestRoadPos select 0, _nearestRoadPos select 1, 0];
_transportSpeed = "LIMITED";
_transportBehaviour = "CARELESS";
_transportBehaviour = "SAFE";
_transportWaitingTime = 10;
}
else
@ -47,182 +47,198 @@ else
};
// Create the driver/pilot and ensure he doest react to gunfire or being shot at.
_group = createGroup resistance;
_group setCombatMode "BLUE";
_group setVariable ["DMS_AllowFreezing",false,true];
// Spawn Vehicle
if(_transportType == "heli") then
{
_transport = createVehicle [SC_occupyTransportClassToUse, _spawnLocation, [], 0, "NONE"];
_transport setVehiclePosition [_spawnLocation, [], 0, "FLY"];
_transport setVariable ["vehicleID", _spawnLocation, true];
_transport setFuel 1;
_transport setDamage 0;
_transport engineOn true;
_transport flyInHeight 100;
}
else
{
_transport = createVehicle [SC_occupyTransportClassToUse, _spawnLocation, [], 0, "CAN_COLLIDE"];
};
sleep 0.2;
if(isNull _transport) exitWith
{
_logDetail = format ["[OCCUPATION:transport]:: %1 failed to spawn, check it is a valid vehicle class name",SC_occupyTransportClassToUse];
[_logDetail] call SC_fnc_log;
};
_transport addEventHandler ["handleDamage", { false }];
_transport allowdamage false;
if( _transportType == "land") then
{
//_transport setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
}
else
{
_transport setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
_transport setObjectTextureGlobal [1,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
_transport setObjectTextureGlobal [2,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
};
_group addVehicle _transport;
_transport enableCopilot false;
_transportDriver = _group createUnit [DMS_AI_Classname, _spawnLocation, [], 0,"FORM"];
removeGoggles _transportDriver;
_transportDriver forceAddUniform "U_IG_Guerilla3_1";
_transportDriver addVest "V_TacVest_blk_POLICE";
_transportDriver addHeadgear "H_Cap_blk";
removeBackpackGlobal _transportDriver;
_transportDriver addBackpackGlobal "B_Parachute";
_transportDriver disableAI 'AUTOTARGET';
_transportDriver disableAI 'TARGET';
_transportDriver disableAI 'SUPPRESSION';
_transportDriver setCaptive true;
_transportDriver allowDamage false;
_transportDriver assignasdriver _transport;
_transportDriver moveInDriver _transport;
[_transportDriver] orderGetin true;
_transport lockDriver true;
_transport lockTurret [[0],true];
SC_transportArray = SC_transportArray + [_transport];
_transport setVariable ["SC_assignedDriver", _transportDriver,true];
_transport setVariable ["SC_transport", true,true];
_transport setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
_transportDriver setVariable ["DMS_AssignedVeh",_transport];
_transportDriver setVariable ["SC_lastSpoke", time, true];
_transport addEventHandler ["getin", "_this call SC_fnc_getOnBus;"];
_transport addEventHandler ["getout", "_this call SC_fnc_getOffBus;"];
clearBackpackCargoGlobal _transport;
clearItemCargoGlobal _transport;
clearMagazineCargoGlobal _transport;
clearWeaponCargoGlobal _transport;
_transport setVariable ["ExileIsPersistent", false];
_transport setVariable["vehPos",_spawnLocation,true];
_transport setFuel 1;
_logDetail = format['[OCCUPATION:transport] Vehicle %1 spawned @ %2',SC_occupyTransportClassToUse,_spawnLocation];
[_logDetail] call SC_fnc_log;
// Check there are enough waypoints to use
_markerCount = 0;
{
_markerName = _x;
_markerPos = getMarkerPos _markerName;
if (markerType _markerName == "ExileTraderZone" OR markerType _markerName == "o_unknown") then
{
_wp = _group addWaypoint [_markerPos, 100];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour _transportBehaviour;
_wp setWaypointspeed _transportSpeed;
_wp = _group addWaypoint [_markerPos, 25];
_wp setWaypointType "TR UNLOAD";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointspeed "LIMITED";
_wp setWaypointTimeout [_transportWaitingTime,_transportWaitingTime,_transportWaitingTime];
_markerName = _x;
_markerPos = getMarkerPos _markerName;
if (markerType _markerName == "ExileTraderZone" OR markerType _markerName == "o_unknown") then
{
_markerCount = _markerCount + 1;
};
};
} forEach allMapMarkers;
if(_markerCount == 0) exitWith
if(_markerCount < 2) then
{
_logDetail = format ["[OCCUPATION:transport]:: failed to find any ExileTraderZone or o_unknown map markers @ %1",time];
_logDetail = format ["[OCCUPATION:transport]:: failed to find more than 1 ExileTraderZone or o_unknown map markers @ %1",time];
[_logDetail] call SC_fnc_log;
};
_logDetail = format ["[OCCUPATION:transport]:: Found %1 markers to use as pickup points @ %2",_markerCount,time];
[_logDetail] call SC_fnc_log;
_textures = getObjectTextures _transport;
_logDetail = format ["[OCCUPATION:transport]:: textures for vehicle are: %1",_textures];
[_logDetail] call SC_fnc_log;
// Add a final CYCLE
_wp = _group addWaypoint [_spawnLocation, 20];
_wp setWaypointType "CYCLE";
_wp setWaypointBehaviour _transportBehaviour;
_wp setWaypointspeed _transportSpeed;
_wp setWaypointTimeout [_transportWaitingTime,_transportWaitingTime,_transportWaitingTime];
_transportPos = position _transport;
_mk = createMarker ["transportLocation",_transportPos];
if(_transportType == "land") then
{
"transportLocation" setMarkerType "loc_BusStop";
"transportLocation" setMarkerText "Occupation Public Bus";
}
else
{
"transportLocation" setMarkerType "c_air";
"transportLocation" setMarkerText "Occupation Airlines";
"transportLocation" setMarkerColor "ColorBLUFOR";
};
// Create the driver/pilot and ensure he doest react to gunfire or being shot at.
_group = createGroup resistance;
_group setCombatMode "BLUE";
_group setVariable ["DMS_AllowFreezing",false,true];
// Spawn Vehicle
diag_log format['[OCCUPATION:transport] Running'];
_transportDriver = _transport getVariable "SC_assignedDriver";
// Make _transportDriver stop when players near him.
while {true} do
{
_pos = position _transport;
_mk setMarkerPos _pos;
_nearPlayers = (count (_pos nearEntities [['Exile_Unit_Player'],25]));
if (_nearPlayers >= 1 && _transportType == "land") then
if(_transportType == "heli") then
{
uiSleep 0.5;
_transport = createVehicle [SC_occupyTransportClassToUse, _spawnLocation, [], 0, "NONE"];
_transport setVehiclePosition [_spawnLocation, [], 0, "FLY"];
_transport setVariable ["vehicleID", _spawnLocation, true];
_transport setFuel 1;
_transport setVehicleAmmo 1;
_transportDriver disableAI "MOVE";
uiSleep 3;
_transport setDamage 0;
_transport engineOn true;
_transport flyInHeight 100;
}
else
{
_transport setFuel 1;
_transport setVehicleAmmo 1;
uiSleep 3;
_transportDriver enableAI "MOVE";
{
_transport = createVehicle [SC_occupyTransportClassToUse, _spawnLocation, [], 0, "CAN_COLLIDE"];
};
if(!Alive _transportDriver) exitWith {};
uiSleep 5;
};
deleteMarker _mk;
sleep 0.2;
if(isNull _transport) exitWith
{
_logDetail = format ["[OCCUPATION:transport]:: %1 failed to spawn, check it is a valid vehicle class name",SC_occupyTransportClassToUse];
[_logDetail] call SC_fnc_log;
};
_transport addEventHandler ["handleDamage", { false }];
_transport allowdamage false;
if( _transportType == "land") then
{
//_transport setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
}
else
{
_transport setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
_transport setObjectTextureGlobal [1,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
_transport setObjectTextureGlobal [2,"#(argb,8,8,3)color(0.518,0.519,0.7,0.2)"];
};
_group addVehicle _transport;
_transport enableCopilot false;
_transportDriver = _group createUnit [DMS_AI_Classname, _spawnLocation, [], 0,"FORM"];
removeGoggles _transportDriver;
_transportDriver forceAddUniform "U_IG_Guerilla3_1";
_transportDriver addVest "V_TacVest_blk_POLICE";
_transportDriver addHeadgear "H_Cap_blk";
removeBackpackGlobal _transportDriver;
_transportDriver addBackpackGlobal "B_Parachute";
_transportDriver disableAI 'AUTOTARGET';
_transportDriver disableAI 'TARGET';
_transportDriver disableAI 'SUPPRESSION';
_transportDriver setCaptive true;
_transportDriver allowDamage false;
_transportDriver assignasdriver _transport;
_transportDriver moveInDriver _transport;
[_transportDriver] orderGetin true;
_transport lockDriver true;
_transport lockTurret [[0],true];
SC_transportArray = SC_transportArray + [_transport];
_transport setVariable ["SC_assignedDriver", _transportDriver,true];
_transport setVariable ["SC_transport", true,true];
_transport setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
_transportDriver setVariable ["DMS_AssignedVeh",_transport];
_transportDriver setVariable ["SC_lastSpoke", time, true];
_transport addEventHandler ["getin", "_this call SC_fnc_getOnBus;"];
_transport addEventHandler ["getout", "_this call SC_fnc_getOffBus;"];
clearBackpackCargoGlobal _transport;
clearItemCargoGlobal _transport;
clearMagazineCargoGlobal _transport;
clearWeaponCargoGlobal _transport;
_transport setVariable ["ExileIsPersistent", false];
_transport setVariable["vehPos",_spawnLocation,true];
_transport setFuel 1;
_logDetail = format['[OCCUPATION:transport] Vehicle %1 spawned @ %2',SC_occupyTransportClassToUse,_spawnLocation];
[_logDetail] call SC_fnc_log;
_logDetail = format ["[OCCUPATION:transport]:: Found %1 markers to use as pickup points @ %2",_markerCount,time];
[_logDetail] call SC_fnc_log;
_textures = getObjectTextures _transport;
_logDetail = format ["[OCCUPATION:transport]:: textures for vehicle are: %1",_textures];
[_logDetail] call SC_fnc_log;
_markerCount = 0;
{
_markerName = _x;
_markerPos = getMarkerPos _markerName;
if (markerType _markerName == "ExileTraderZone" OR markerType _markerName == "o_unknown") then
{
_wp = _group addWaypoint [_markerPos, 100];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour _transportBehaviour;
_wp setWaypointspeed _transportSpeed;
_wp = _group addWaypoint [_markerPos, 25];
_wp setWaypointType "TR UNLOAD";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointspeed "LIMITED";
_wp setWaypointTimeout [_transportWaitingTime,_transportWaitingTime,_transportWaitingTime];
_markerCount = _markerCount + 1;
};
} forEach allMapMarkers;
// Add a final CYCLE
_wp = _group addWaypoint [_spawnLocation, 20];
_wp setWaypointType "CYCLE";
_wp setWaypointBehaviour _transportBehaviour;
_wp setWaypointspeed _transportSpeed;
_wp setWaypointTimeout [_transportWaitingTime,_transportWaitingTime,_transportWaitingTime];
_transportPos = position _transport;
_mk = createMarker ["transportLocation",_transportPos];
if(_transportType == "land") then
{
"transportLocation" setMarkerType "loc_BusStop";
"transportLocation" setMarkerText "Occupation Public Bus";
}
else
{
"transportLocation" setMarkerType "c_air";
"transportLocation" setMarkerText "Occupation Airlines";
"transportLocation" setMarkerColor "ColorBLUFOR";
};
diag_log format['[OCCUPATION:transport] Running'];
_transportDriver = _transport getVariable "SC_assignedDriver";
// Make _transportDriver stop when players near him.
while {true} do
{
_pos = position _transport;
_mk setMarkerPos _pos;
_nearPlayers = (count (_pos nearEntities [['Exile_Unit_Player'],25]));
if (_nearPlayers >= 1 && _transportType == "land") then
{
uiSleep 0.5;
_transport setFuel 1;
_transport setVehicleAmmo 1;
_transportDriver disableAI "MOVE";
uiSleep 3;
}
else
{
_transport setFuel 1;
_transport setVehicleAmmo 1;
uiSleep 3;
_transportDriver enableAI "MOVE";
};
if(!Alive _transportDriver) exitWith {};
uiSleep 5;
};
deleteMarker _mk;
};
_logDetail = format ["[OCCUPATION:transport]:: Ended @ %1",time];
[_logDetail] call SC_fnc_log;