minor stuff

This commit is contained in:
eraser1
2016-06-25 17:04:12 -05:00
parent 77249742c3
commit 26d1da80ff
14 changed files with 35 additions and 99 deletions

View File

@ -4,7 +4,7 @@ class CfgPatches
{
units[] = {};
weapons[] = {};
a3_DMS_version = "June 24, 2016";
a3_DMS_version = "June 25, 2016";
requiredVersion = 1.36;
requiredAddons[] = {"exile_client","exile_server_config"};
};

View File

@ -236,13 +236,8 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
DMS_findSafePosBlacklist = [ // For position blacklist info refer to: http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=31190
// An example is given in the altis_config.sqf (it blacklists the salt flats).
/*
// Blacklists most of the Northern Taviana Volcano
[[11375,16170],[14302,18600]],
[[13300,14670],[14875,16170]]
*/
DMS_findSafePosBlacklist = [ // This list defines areas where missions WILL NOT spawn. For position blacklist info refer to: http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=31190
// There are examples in the altis map config (it blacklists the salt flats) and in the tavi/taviana map configs.
//[[2350,4680],100] // This random example blacklists any position within 100 meters of coordinates "[2350,4680]"
];

View File

@ -6,9 +6,9 @@
Explanations to all of these configs also exist in the main config.
*/
DMS_findSafePosBlacklist =
DMS_findSafePosBlacklist append
[
[[22500,19420],[24870,16725]] // Salt flats are blacklisted for Altis by default.
[[23600,18200],1500] // Salt flats are blacklisted for Altis by default.
];
// These configs are the default values from the main config. Just included here as an example.
@ -34,4 +34,4 @@ DMS_MinDistFromNorthBorder = 5200; // There's around 5km of ocean from the nor
DMS_StaticMissionTypes append [["saltflats",1],["slums",1]];
// Add the "salt flats base" and "slums" to the "bases" to spawn on server startup. NOTE: "append" and "pushback" are NOT the same.
DMS_BasesToImportOnServerStart append ["saltflatsbase","slums_objects"];
DMS_BasesToImportOnServerStart append ["saltflatsbase","slums_objects"];

View File

@ -6,11 +6,6 @@
Explanations to all of these configs also exist in the main config.
*/
DMS_findSafePosBlacklist =
[
//Insert position blacklists here.
];
// These configs are the default values from the main config. Just included here as an example.
DMS_PlayerNearBlacklist = 2000;
DMS_SpawnZoneNearBlacklist = 2500;
@ -27,4 +22,4 @@ DMS_MinSurfaceNormal = 0.95;
DMS_MinDistFromWestBorder = 1000; // About 1km of plain ocean to the west
DMS_MinDistFromEastBorder = 4000; // Just about 4km of ocean to the east
DMS_MinDistFromSouthBorder = 1000; // We get the proper landmass at about 1km from the south
DMS_MinDistFromNorthBorder = 1500; // Avoid getting missions at the northern "tip"
DMS_MinDistFromNorthBorder = 1500; // Avoid getting missions at the northern "tip"

View File

@ -3,12 +3,6 @@
Created by Hollow (slight edits by eraser1).
*/
DMS_findSafePosBlacklist =
[
//Insert position blacklists here.
];
// Making these configs below as strict as possible will help in reducing the number of attempts taken to find a valid position, and as a result, improve performance.
DMS_MinDistFromWestBorder = 750;

View File

@ -7,14 +7,9 @@
Explanations to all of these configs also exist in the main config.
*/
DMS_findSafePosBlacklist =
[
//Insert position blacklists here.
];
// Reduce the blacklist range since Esseker is a smaller map.
DMS_PlayerNearBlacklist = 750;
DMS_SpawnZoneNearBlacklist = 1250;
DMS_TraderZoneNearBlacklist = 1250;
DMS_MissionNearBlacklist = 1250;
DMS_WaterNearBlacklist = 250;
DMS_WaterNearBlacklist = 250;

View File

@ -5,15 +5,10 @@
All of these configs exist in the main config. The configs below will simply override any config from the main config.
*/
DMS_findSafePosBlacklist =
[
];
// Kerama is a pretty small island
DMS_WaterNearBlacklist = 100;
// Kerama is not super flat
// Kerama is not super flat
DMS_MinSurfaceNormal = 0.75;
DMS_SpawnZoneNearBlacklist = 500;

View File

@ -5,7 +5,7 @@
All of these configs exist in the main config. The configs below will simply override any config from the main config.
*/
DMS_findSafePosBlacklist =
DMS_findSafePosBlacklist append
[
[[4866.21,7962.4],[5085.27,8157.23]], // Sebjan Trader
[[4890.65,6535.2],[5090.37,6714.44]], // Object A2

View File

@ -3,15 +3,9 @@
Created by Hollow (slight edits by eraser1)
*/
DMS_findSafePosBlacklist =
[
//Insert position blacklists here.
];
// Making these configs below as strict as possible will help in reducing the number of attempts taken to find a valid position, and as a result, improve performance.
DMS_MinDistFromWestBorder = 1000;
DMS_MinDistFromEastBorder = 1000;
DMS_MinDistFromSouthBorder = 1800;
DMS_MinDistFromNorthBorder = 250;
DMS_MinDistFromNorthBorder = 250;

View File

@ -6,11 +6,6 @@
Explanations to all of these configs also exist in the main config.
*/
DMS_findSafePosBlacklist =
[
//Insert position blacklists here.
];
// Let missions spawn closer to water, since we aren't spoiled for choice with all of the steep terrain.
DMS_WaterNearBlacklist = 200;
@ -28,4 +23,4 @@ DMS_TraderZoneNearBlacklist = 1500;
DMS_MinDistFromWestBorder = 1500;
DMS_MinDistFromEastBorder = 1000;
DMS_MinDistFromSouthBorder = 1500;
DMS_MinDistFromNorthBorder = 2500;
DMS_MinDistFromNorthBorder = 2500;

View File

@ -6,9 +6,10 @@
Explanations to all of these configs also exist in the main config.
*/
DMS_findSafePosBlacklist =
DMS_findSafePosBlacklist append
[
//Insert position blacklists here.
[[11375,16170],[14302,18600]],
[[13300,14670],[14875,16170]]
];
// These configs are the default values from the main config. Just included here as an example.
@ -24,4 +25,4 @@ DMS_WaterNearBlacklist = 500;
DMS_MinDistFromWestBorder = 500; // The western island is pretty close to the western border.
DMS_MinDistFromEastBorder = 4500; // About 4.5km of ocean from the eastern border to the edge of the main east island. Set to 6000 if you want to "cut off" most of the Taviana Zoo area.
DMS_MinDistFromSouthBorder = 100; // The western island almost touches the southern border so this one is tiny...
DMS_MinDistFromNorthBorder = 3000; // About 3km from the northern tip of the east island to the edge.
DMS_MinDistFromNorthBorder = 3000; // About 3km from the northern tip of the east island to the edge.

View File

@ -6,9 +6,10 @@
Explanations to all of these configs also exist in the main config.
*/
DMS_findSafePosBlacklist =
DMS_findSafePosBlacklist append
[
//Insert position blacklists here.
[[11375,16170],[14302,18600]],
[[13300,14670],[14875,16170]]
];
// These configs are the default values from the main config. Just included here as an example.
@ -24,4 +25,4 @@ DMS_WaterNearBlacklist = 500;
DMS_MinDistFromWestBorder = 500; // The western island is pretty close to the western border.
DMS_MinDistFromEastBorder = 4500; // About 4.5km of ocean from the eastern border to the edge of the main east island. Set to 6000 if you want to "cut off" most of the Taviana Zoo area.
DMS_MinDistFromSouthBorder = 100; // The western island almost touches the southern border so this one is tiny...
DMS_MinDistFromNorthBorder = 3000; // About 3km from the northern tip of the east island to the edge.
DMS_MinDistFromNorthBorder = 3000; // About 3km from the northern tip of the east island to the edge.

View File

@ -51,88 +51,55 @@ else
};
if (!(DMS_findSafePosBlacklist isEqualTo []) && {([_pos, DMS_findSafePosBlacklist] call DMS_fnc_IsPosBlacklisted)}) then
{
throw ("a blacklisted position");
};
if ([_pos, DMS_findSafePosBlacklist] call DMS_fnc_IsPosBlacklisted) throw "a blacklisted position";
// Check for nearby water
if ((_waterNearLimit>0) && {[_pos,_waterNearLimit] call DMS_fnc_isNearWater}) then
{
throw ("water");
};
if ((_waterNearLimit>0) && {[_pos,_waterNearLimit] call DMS_fnc_isNearWater}) throw "water";
// Terrain steepness check
// 0 surfacenormal means completely vertical, 1 surfaceNormal means completely flat and horizontal.
// Take the arccos of the surfaceNormal to determine how many degrees it is from the horizontal. In SQF: {acos ((surfaceNormal _pos) select 2)}. Don't forget to define _pos.
if ((_minSurfaceNormal>0) && {_minSurfaceNormal<=1}) then
{
if (((surfaceNormal _pos) select 2)<_minSurfaceNormal) then
{
throw ("a steep location");
};
if (((surfaceNormal _pos) select 2)<_minSurfaceNormal) throw "a steep location";
// Check the surrounding area (within 5 meters)
private "_dir";
for "_dir" from 0 to 359 step 45 do
{
if (((surfaceNormal (_pos getPos [5,_dir])) select 2)<_minSurfaceNormal) then
{
throw ("a nearby steep location");
};
if (((surfaceNormal (_pos getPos [5,_dir])) select 2)<_minSurfaceNormal) throw "a nearby steep location";
};
};
{
if (((getMarkerPos _x) distance2D _pos)<=_missionNearLimit) then
{
throw ("an A3XAI mission");
};
if (((getMarkerPos _x) distance2D _pos)<=_missionNearLimit) throw "an A3XAI mission";
} forEach (missionNamespace getVariable ["A3XAI_mapMarkerArray",[]]);
{
// Check for nearby spawn points
if ((_spawnZoneNearLimit>0) && {((markertype _x) in DMS_SpawnZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_spawnZoneNearLimit}}) then
{
throw ("a spawn zone");
};
if ((_spawnZoneNearLimit>0) && {((markertype _x) in DMS_SpawnZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_spawnZoneNearLimit}}) throw "a spawn zone";
// Check for nearby trader zones
if ((_traderZoneNearLimit>0) && {((markertype _x) in DMS_TraderZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_traderZoneNearLimit}}) then
{
throw ("a trader zone");
};
if ((_traderZoneNearLimit>0) && {((markertype _x) in DMS_TraderZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_traderZoneNearLimit}}) throw "a trader zone";
// Check for nearby missions
if (_missionNearLimit>0) then
{
_missionPos = missionNamespace getVariable [format ["%1_pos",_x], []];
if (!(_missionPos isEqualTo []) && {(_missionPos distance2D _pos)<=_missionNearLimit}) then
{
throw ("a mission");
};
if (!(_missionPos isEqualTo []) && {(_missionPos distance2D _pos)<=_missionNearLimit}) throw "a mission";
if (((_x find "VEMFr_DynaLocInva_ID")>0) && {((getMarkerPos _x) distance2D _pos)<=_missionNearLimit}) then
{
throw ("a VEMF mission");
};
if (((_x find "VEMFr_DynaLocInva_ID")>0) && {((getMarkerPos _x) distance2D _pos)<=_missionNearLimit}) throw "a VEMF mission";
};
} forEach allMapMarkers;
// Check for nearby players
// This is done last because it is likely to be the most resource intensive.
if ((_playerNearLimit>0) && {[_pos,_playerNearLimit] call DMS_fnc_IsPlayerNearby}) then
{
throw ("a player");
};
if ((_playerNearLimit>0) && {[_pos,_playerNearLimit] call DMS_fnc_IsPlayerNearby}) throw "a player";
if ((_territoryNearLimit>0) && {[_pos,_territoryNearLimit] call ExileClient_util_world_isTerritoryInRange}) then
{
throw ("a territory");
};
if ((_territoryNearLimit>0) && {[_pos,_territoryNearLimit] call ExileClient_util_world_isTerritoryInRange}) throw "a territory";

View File

@ -150,6 +150,10 @@ ___
# Changelog:
### Main Branch
#### June 25, 2016 (5:00 PM CST-America):
* Updated almost all map configs in regards to "DMS_findSafePosBlacklist"; they should no longer overwrite main config settings.
* Optimized "fn_isValidPosition" with the "new" throw functionality (forgot to do it earlier lol).
#### June 24, 2016 (6:00 PM CST-America):
* **NEW CONFIG VALUES**
DMS_AI_UseRealNames