V38 tweaks

This commit is contained in:
second_coming 2016-05-08 12:15:04 +01:00
parent cb56ee0134
commit fe372c4f87
7 changed files with 44 additions and 13 deletions

View File

@ -1,5 +1,11 @@
================================================================================= =================================================================================
V37 (05-05-2016) V38 (08-05-2016)
=================================================================================
Added a check to the transport module to check the transport vehicle class name
is valid and to to make sure there are valid map markers to use for stopping points
=================================================================================
V37 (06-05-2016)
================================================================================= =================================================================================
Added limit checks for the amount of each class of vehicle in Sky, Sea and Vehicle modules Added limit checks for the amount of each class of vehicle in Sky, Sea and Vehicle modules
@ -28,8 +34,13 @@ V27 (26-04-2016)
================================================================================= =================================================================================
Added the option fully control the gear assigned to bandit and survivor units Added the option fully control the gear assigned to bandit and survivor units
Added the option for helicopters as public transport, the heli travels between traders and lands for about 60 seconds. Setting SC_occupyTransportClass to a helicopter classname will switch it over to using a helicopter, if you want to continue using the land vehicle set SC_occupyTransportClass to a land vehicle. Added the option for helicopters as public transport, the heli travels between traders
and lands for about 60 seconds. Setting SC_occupyTransportClass to a helicopter classname
will switch it over to using a helicopter, if you want to continue using the land vehicle
set SC_occupyTransportClass to a land vehicle.
Added the option to set the maximum crew (crew count will be a random number between the max and min). The applies for all AI vehicles. Added the option to set the maximum crew (crew count will be a random number between
the max and min). The applies for all AI vehicles.
Added a separate SC_VehicleClassToUseRare list of vehicles which spawn 10% of the time in place of the standard SC_VehicleClassToUse list. Added a separate SC_VehicleClassToUseRare list of vehicles which spawn 10% of the
time in place of the standard SC_VehicleClassToUse list.

View File

@ -116,8 +116,8 @@ SC_buildings = [ "Land_TentHangar_V1_F","Land_Hangar_F",
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 = [ [[23350,18709,0],12,400,true] ]; //[[pos],ai count,radius,search buildings] SC_staticBandits = [ ]; //[[pos],ai count,radius,search buildings]
SC_staticSurvivors = [ [[23286,18524,0],6,400,true] ]; //[[pos],ai count,radius,search buildings] SC_staticSurvivors = [ [[3770,8791,0],6,400,true] ]; //[[pos],ai count,radius,search buildings]
SC_occupySky = true; // true if you want to have roaming AI helis 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

View File

@ -2,7 +2,7 @@
// //
// Server Occupation script by second_coming // Server Occupation script by second_coming
// //
SC_occupationVersion = "v37 (06-05-2016)"; SC_occupationVersion = "v38 (08-05-2016)";
// //
// http://www.exilemod.com/profile/60-second_coming/ // http://www.exilemod.com/profile/60-second_coming/
// //

View File

@ -1,6 +1,6 @@
// Logging function to use either infiSTAR logging function or server RPT // Logging function to use either infiSTAR logging function or server RPT
_logDetail = _this select 0; _logDetail = format["%1 %2",SC_occupationVersion,_this select 0];
if(SC_infiSTAR_log && !isNil "INFISTARVERSION") then if(SC_infiSTAR_log && !isNil "INFISTARVERSION") then
{ {

View File

@ -68,6 +68,14 @@ else
_transport = createVehicle [SC_occupytransportClass, _spawnLocation, [], 0, "CAN_COLLIDE"]; _transport = createVehicle [SC_occupytransportClass, _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_occupytransportClass];
[_logDetail] call SC_fnc_log;
};
_transport addEventHandler ["handleDamage", { false }]; _transport addEventHandler ["handleDamage", { false }];
_transport allowdamage false; _transport allowdamage false;
@ -112,9 +120,10 @@ _transport setVariable ["ExileIsPersistent", false];
_transport setVariable["vehPos",_spawnLocation,true]; _transport setVariable["vehPos",_spawnLocation,true];
_transport setFuel 1; _transport setFuel 1;
_logDetail = format['[OCCUPATION:transport] Vehicle spawned @ %1',_spawnLocation]; _logDetail = format['[OCCUPATION:transport] Vehicle %1 spawned @ %2',SC_occupytransportClass,_spawnLocation];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_markerCount = 0;
{ {
_markerName = _x; _markerName = _x;
_markerPos = getMarkerPos _markerName; _markerPos = getMarkerPos _markerName;
@ -130,10 +139,20 @@ _logDetail = format['[OCCUPATION:transport] Vehicle spawned @ %1',_spawnLocation
_wp setWaypointBehaviour "SAFE"; _wp setWaypointBehaviour "SAFE";
_wp setWaypointspeed "LIMITED"; _wp setWaypointspeed "LIMITED";
_wp setWaypointTimeout [_transportWaitingTime,_transportWaitingTime,_transportWaitingTime]; _wp setWaypointTimeout [_transportWaitingTime,_transportWaitingTime,_transportWaitingTime];
_markerCount = _markerCount + 1;
}; };
} forEach allMapMarkers; } forEach allMapMarkers;
if(_markerCount == 0) exitWith
{
_logDetail = format ["[OCCUPATION:transport]:: failed to find any 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;
// Add a final CYCLE // Add a final CYCLE
_wp = _group addWaypoint [_spawnLocation, 20]; _wp = _group addWaypoint [_spawnLocation, 20];
_wp setWaypointType "CYCLE"; _wp setWaypointType "CYCLE";

View File

@ -9,6 +9,7 @@ if(isNil "_vehicle") exitWith{};
if(count(crew _vehicle) > 0)then if(count(crew _vehicle) > 0)then
{ {
_vehicleType = TypeOf _vehicle;
_curPos = position _vehicle; _curPos = position _vehicle;
_newPos = _curPos; _newPos = _curPos;
_oldvehPos = _vehicle getVariable["vehPos",[0,0,0]]; _oldvehPos = _vehicle getVariable["vehPos",[0,0,0]];
@ -25,7 +26,7 @@ if(count(crew _vehicle) > 0)then
if(time - _engineTime > 10)then if(time - _engineTime > 10)then
{ {
_logDetail = format ["[OCCUPATION:Unstuck]:: %1 is stuck,attempting to unstick from %2 @ %3",_vehicle,_curPos,time]; _logDetail = format ["[OCCUPATION:Unstuck]:: %1 is stuck,attempting to unstick from %2 @ %3",_vehicleType,_curPos,time];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
_vehicle setVariable["engineTime",-1]; _vehicle setVariable["engineTime",-1];
@ -59,7 +60,7 @@ if(count(crew _vehicle) > 0)then
_group setBehaviour "AWARE"; _group setBehaviour "AWARE";
_group setCombatMode "RED"; _group setCombatMode "RED";
_logDetail = format ["[OCCUPATION:Unstuck]:: %1 was stuck and was moved from %2 to %3 @ %4",_vehicle,_curPos,_newPos, time]; _logDetail = format ["[OCCUPATION:Unstuck]:: %1 was stuck and was moved from %2 to %3 @ %4",_vehicleType,_curPos,_newPos, time];
[_logDetail] call SC_fnc_log; [_logDetail] call SC_fnc_log;
}; };

View File

@ -1,7 +1,7 @@
if (!isServer) exitWith {}; if (!isServer) exitWith {};
_logDetail = format ["[OCCUPATION]:: Occupation %2 Initialised 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; [] call ExileClient_system_map_initialize;