V45 Fixes

This commit is contained in:
second_coming
2016-06-05 03:52:03 +01:00
parent 40221e8737
commit 6484c8c488
12 changed files with 125 additions and 67 deletions

View File

@ -1,3 +1,12 @@
=================================================================================
V45 (05-06-2016)
=================================================================================
Helicrash rare loot option added
Fixed the number of Loot crates spawning
Fixed the random public transport selection
Improved vehicle AI (they shouldn't stop patrolling now)
=================================================================================
V44 (31-05-2016)
=================================================================================
@ -7,7 +16,7 @@ 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)

View File

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

View File

@ -17,7 +17,7 @@
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_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_mapMarkers = false; // Place map markers at the occupied areas (occupyPlaces and occupyMilitary only) true/false
SC_minFPS = 5; // any lower than minFPS on the server and additional AI won't spawn
@ -96,23 +96,23 @@ SC_staticBandits = [ //[[pos],ai count,radius,sea
];
SC_staticSurvivors = [ //[[pos],ai count,radius,search buildings]
[[3770,8791,0],8,250,true]
//[[3770,8791,0],8,250,true]
];
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_occupyTransport = true; // true if you want pubic transport (travels between traders)
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_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 = true; // true if you want the pilot/driver to talk to passengers in vehicle chat, false if not
SC_occupyTransportAnnounce = false; // 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_numberofLootCrates = 2; // if SC_occupyLootCrates = true spawn this many loot crates (overrided below for Namalsk)
SC_numberofLootCrates = 6; // if SC_occupyLootCrates = true spawn this many loot crates (overrided below for Namalsk)
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_occupyLootCratesMarkers = true; // true if you want to have markers on the loot crate spawns
@ -161,8 +161,6 @@ SC_numberofHeliCrashes = 5; // if SC_occupyHeliCrashes =
// ["HandGrenade",0,2] this example would add between 0 and 2 HandGrenade to the crate (fixed 0 plus 0-2 random)
// to add a fixed amount make the second number 0
SC_HeliCrashItems = [
["HandGrenade",0,2],
["APERSBoundingMine_Range_Mag",0,2],
["B_Parachute",1,1],
["H_CrewHelmetHeli_B",1,1],
["ItemGPS",0,1],
@ -170,6 +168,13 @@ SC_HeliCrashItems = [
["Exile_Item_PlasticBottleFreshWater",2,2],
["Exile_Item_EMRE",2,2]
];
SC_HeliCrashRareItems = [
["HandGrenade",0,2],
["APERSBoundingMine_Range_Mag",0,2]
];
SC_HeliCrashRareItemChance = 10; // percentage chance to spawn each SC_HeliCrashRareItems
// Array of possible weapons to place in the crate
SC_HeliCrashWeapons = [
"srifle_DMR_02_camo_F",
@ -274,6 +279,12 @@ if (worldName == 'Namalsk') then
SC_occupyTransportClass = "Exile_Car_LandRover_Urban"; // the ikarus bus gets stuck on Namalsk
};
// Napf specific settings (if you want to override settings for specific maps if you run multiple servers)
if (worldName == 'Napf') then
{
SC_occupyTraders = true;
};
if (SC_debug) then
{
SC_extendedLogging = true;

View File

@ -20,15 +20,4 @@ if (SC_occupyLootCratesMarkers) then
};
};
};
if(SC_removeUserMapMarkers) then
{
{
if( (_x find '_USER_DEFINED' > -1) OR (markerShape _x == 'POLYLINE'))then
{
deleteMarker _x;
}
} forEach allMapMarkers;
};

View File

@ -4,7 +4,7 @@ _transport = _this select 0;
_unit = _this select 2;
_driver = driver _transport;
_driver vehiclechat SC_occupyTransportGetOut;
//_driver vehiclechat SC_occupyTransportGetOut;
if(_transport isKindOf "LandVehicle") then
{

View File

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

View File

@ -54,11 +54,30 @@ if(count(crew _vehicle) > 0)then
{
_newPos = _curPos;
};
_side = side _group;
_group2 = createGroup _side;
_group2 setVariable ["DMS_AllowFreezing",false,true];
_group2 setVariable ["DMS_LockLocality",nil];
_group2 setVariable ["DMS_SpawnedGroup",true];
_group2 setVariable ["DMS_Group_Side", _side];
[_vehicle] joinSilent _group2;
{
_unit = _x;
[_unit] joinSilent grpNull;
[_unit] joinSilent _group2;
_unit enableAI "FSM";
_unit enableAI "MOVE";
reload _unit;
}foreach units _group;
_GroupLeader = leader (group _vehicle);
_GroupLeader doMove _originalSpawnLocation;
[_group, _originalSpawnLocation, 2000] call bis_fnc_taskPatrol;
_group setBehaviour "AWARE";
_group setCombatMode "RED";
_group2 setBehaviour "AWARE";
_group2 setCombatMode "RED";
_logDetail = format ["[OCCUPATION:Unstuck]:: %1 was stuck and was moved from %2 to %3 resetting patrol around point %5 @ %4",_vehicleType,_curPos,_newPos, time,_originalSpawnLocation];
[_logDetail] call SC_fnc_log;

View File

@ -85,7 +85,41 @@ for "_i" from 1 to SC_numberofHeliCrashes do
_box addBackpackCargoGlobal [_item, _amount];
};
}forEach SC_HeliCrashItems;
{
_spawnChance = round (random 100);
if(_spawnChance <= SC_HeliCrashRareItemChance) then
{
_item = _x select 0;
_amount = _x select 1;
_randomAmount = _x select 2;
_amount = _amount + (random _randomAmount);
_itemType = _x call BIS_fnc_itemType;
if((_itemType select 0) == "Weapon") then
{
_box addWeaponCargoGlobal [_item, _amount];
};
if((_itemType select 0) == "Magazine") then
{
_box addMagazineCargoGlobal [_item, _amount];
};
if((_itemType select 0) == "Item") then
{
_box addItemCargoGlobal [_item, _amount];
};
if((_itemType select 0) == "Equipment") then
{
_box addItemCargoGlobal [_item, _amount];
};
if((_itemType select 0) == "Backpack") then
{
_box addBackpackCargoGlobal [_item, _amount];
};
};
}forEach SC_HeliCrashRareItems;
// Add weapons with ammo to the Box
_possibleWeapons = SC_HeliCrashWeapons;
_amountOfWeapons = (SC_HeliCrashWeaponsAmount select 0) + round random (SC_HeliCrashWeaponsAmount select 1);

View File

@ -206,7 +206,7 @@ _locations = (nearestLocations [_spawnCenter, ["NameVillage","NameCity", "NameCi
_i = _buildingPositions find _wpPosition;
_wp = _group addWaypoint [_wpPosition, 0] ;
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointBehaviour "AWARE";
_wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 1;
_wp waypointAttachObject _y;

View File

@ -1,11 +1,12 @@
_logDetail = format['[OCCUPATION:Traders] starting @ %1',time];
[_logDetail] call SC_fnc_log;
{
_traderName = _x select 0;
_traderPos = _x select 1;
_createSafezone = _x select 2;
_traderBaseFile = call compile preprocessFileLineNumbers "x\addons\a3_exile_occupation\trader\trader.sqf";
_traderName = _x select 0;
_traderPos = _x select 1;
_fileName = _x select 2;
_createSafezone = _x select 3;
_filePath = format ["x\addons\a3_exile_occupation\trader\%1",_fileName];
_traderBaseFile = call compile preprocessFileLineNumbers _filePath;
_traderObjects = _traderBaseFile apply
{
@ -57,54 +58,51 @@ _logDetail = format['[OCCUPATION:Traders] starting @ %1',time];
_group = createGroup resistance;
_group setCombatMode "BLUE";
{
}forEach tradersToAdd;
// Weapon Trader
_traderPosition = _traderPos findEmptyPosition [0,25];
"Exile_Trader_CommunityCustoms" createUnit [_traderPosition, _group, "trader = this;"];
trader setVariable ["ExileTraderType", "Exile_Trader_CommunityCustoms",true];
trader allowDamage false;
trader disableAI 'AUTOTARGET';
trader disableAI 'TARGET';
trader disableAI 'SUPPRESSION';
trader disableAI "MOVE";
removeGoggles trader;
trader forceAddUniform "U_IG_Guerilla3_1";
trader addWeapon "srifle_DMR_06_olive_F";
trader addVest "V_TacVest_blk_POLICE";
trader addBackpack "B_FieldPack_oli";
trader addHeadgear "H_Cap_blk";
trader addGoggles "TRYK_TAC_SET_OD";
trader setCaptive true;
_traderDir = trader getDir _traderPos;
trader setDir _traderDir;
[trader,"HubStandingUA_idle2"] call BIS_fnc_ambientAnim;
// Equipment Trader
_traderPosition = _traderPos findEmptyPosition [0,25];
"Exile_Trader_CommunityCustoms" createUnit [_traderPosition, _group, "trader = this;"];
trader setVariable ["ExileTraderType", "Exile_Trader_CommunityCustoms",true];
trader allowDamage false;
trader disableAI 'AUTOTARGET';
trader disableAI 'TARGET';
trader disableAI 'SUPPRESSION';
trader disableAI "MOVE";
removeGoggles trader;
trader forceAddUniform "U_IG_Guerilla3_1";
trader addWeapon "srifle_DMR_06_olive_F";
trader addVest "V_TacVest_blk_POLICE";
trader addBackpack "B_FieldPack_oli";
trader addHeadgear "H_Cap_blk";
trader addGoggles "TRYK_TAC_SET_OD";
trader setCaptive true;
_traderDir = trader getDir _traderPos;
trader setDir _traderDir;
[trader,"HubStanding_idle1"] call BIS_fnc_ambientAnim;
{
_unit = _x;
_unitName = ["bandit"] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
_unit allowDamage false;
_unit disableAI 'AUTOTARGET';
_unit disableAI 'TARGET';
_unit disableAI 'SUPPRESSION';
_unit disableAI "MOVE";
removeGoggles _unit;
_uniform = SC_BanditUniforms call BIS_fnc_selectRandom;
_vest = SC_BanditVests call BIS_fnc_selectRandom;
_headgear = SC_BanditHeadgear call BIS_fnc_selectRandom;
_weapon = SC_BanditWeapon call BIS_fnc_selectRandom;
_backpack = SC_BanditBackpack call BIS_fnc_selectRandom;
_unit forceAddUniform _uniform;
_unit addWeapon _weapon";
_unit addVest _vest;
_unit addBackpack _backpack;
_unit addHeadgear _headgear;
_unit setCaptive true;
}foreach units _group;
} foreach SC_occupyTraderDetails;

View File

@ -12,8 +12,7 @@ if( count SC_occupyTransportStartPos == 0) then
SC_occupyTransportStartPos = _spawnCenter;
};
_transportVehicle = [SC_occupyTransportClass] call BIS_fnc_selectRandom;
SC_occupyTransportClassToUse = _transportVehicle select 0;
SC_occupyTransportClassToUse = SC_occupyTransportClass call BIS_fnc_selectRandom;
if!(SC_occupyTransportClassToUse isKindOf "LandVehicle" OR SC_occupyTransportClassToUse isKindOf "Air") exitWith
{

View File

@ -15,7 +15,7 @@ _logDetail = format ["[OCCUPATION]:: Occupation %2 Adding modules to Exile syste
[_logDetail] call SC_fnc_log;
if(SC_occupyLootCratesMarkers OR SC_removeUserMapMarkers) then
if(SC_occupyLootCratesMarkers) then
{
uiSleep 15; // delay the start
fnc_occupationDeleteMapMarker = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\deleteMapMarkers.sqf";