mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Resolve conflicts, fix typos, optimize Occupation
# Conflicts: # @ExileServer/addons/a3_dms/config.cpp
This commit is contained in:
commit
cd744e3759
@ -14,7 +14,7 @@ DMS_Use_Map_Config = true; // Whether or not to use config overwrites specific t
|
||||
For any questions regarding map-specific configs, please leave a reply in the DMS thread on the Exile forums.
|
||||
*/
|
||||
|
||||
DMS_Enable_RankChange = false; // Whether or not to use Rank Changes.
|
||||
DMS_Enable_RankChange = false; // Whether or not to use Rank Changes. (Required 'true' if using Occupation)
|
||||
/*
|
||||
I am sharing this upgrade to all. If you utilize GR8 Humanity (fully compatible) or a custom version of a ranking system(simple variable changes), this will allow your players to score +/- for Bandit and Hero kills as well as a custom Survivor Faction added to DMS as well. You can still utilize the HERO / BANDIT / SURVIVOR respect and poptab settings for gameplay :) ENJOY! DONKEYPUNCH.INFO!
|
||||
*/
|
||||
@ -208,26 +208,26 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
];
|
||||
|
||||
|
||||
DMS_StaticMissionTypes = [ // List of STATIC missions with spawn chances.
|
||||
//["saltflats",1], //<--Example (already imported by default on Altis in map configs)
|
||||
//["slums",1] //<--Example (already imported by default on Altis in map configs)
|
||||
|
||||
DMS_StaticMissionTypes = [ // List of STATIC missions with spawn chances.
|
||||
//["saltflats",1] //<--Example (already imported by default on Altis in map configs)
|
||||
//["slums",1] //<--Example (already imported by default on Altis in map configs)
|
||||
//["occupation",1] //<--Example
|
||||
//["sectorB",1] //<--Example for Taviana
|
||||
];
|
||||
|
||||
DMS_BasesToImportOnServerStart = [ // List of static bases to import on server startup (spawned post-init). This will reduce the amount of work the server has to do when it actually spawns static missions, and players won't be surprised when a base suddenly pops up. You can also include any other M3E-exported bases to spawn here.
|
||||
DMS_BasesToImportOnServerStart = [ // List of static bases to import on server startup (spawned post-init). This will reduce the amount of work the server has to do when it actually spawns static missions, and players won't be surprised when a base suddenly pops up. You can also include any other M3E-exported bases to spawn here.
|
||||
//"saltflatsbase", //<--Example (already imported by default on Altis)
|
||||
//"slums_objects" //<--Example (already imported by default on Altis)
|
||||
//"slums_objects" //<--Example (already imported by default on Altis)
|
||||
];
|
||||
|
||||
DMS_BanditMissionsOnServerStart = [
|
||||
//"construction" //<-- Example
|
||||
];
|
||||
|
||||
DMS_StaticMissionsOnServerStart = [ // List of STATIC missions with spawn chances.
|
||||
//"saltflats", //<--Example
|
||||
//"slums //<--Example
|
||||
|
||||
DMS_StaticMissionsOnServerStart = [ // List of STATIC missions with spawn chances.
|
||||
//"saltflats" //<--Example
|
||||
//"slums" //<--Example
|
||||
//"occupation" //<--Example
|
||||
//"sectorB" //<--Example for Taviana
|
||||
];
|
||||
|
||||
@ -246,6 +246,7 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
|
||||
/* AI Settings */
|
||||
DMS_AI_Classname = "O_recon_F"; // Since some of you wanted this...
|
||||
DMS_AI_UseRealNames = true; // true if you want Arma assigned real names, false if you want random DMS assigned unit numbers
|
||||
|
||||
DMS_Show_Kill_Poptabs_Notification = true; // Whether or not to show the poptabs gained/lost message on the player's screen when killing an AI. (It will still change the player's money, it just won't show the "Money Received" notification)
|
||||
DMS_Show_Kill_Respect_Notification = true; // Whether or not to show the "Frag Message" on the player's screen when killing an AI. (It will still change the player's respect, it just won't show the "AI Killed" frag message)
|
||||
|
295
@ExileServer/addons/a3_dms/missions/static/occupation.sqf
Normal file
295
@ExileServer/addons/a3_dms/missions/static/occupation.sqf
Normal file
@ -0,0 +1,295 @@
|
||||
/*
|
||||
"Occupation" static mission for Altis, Chernarus, Namalsk and Taviana
|
||||
Created by second_coming
|
||||
*/
|
||||
|
||||
private["_wp","_wp2","_wp3","_pos","_missionName","_msgStart","_msgWIN","_msgLOSE"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
switch (toLower worldName) do
|
||||
{
|
||||
case "chernarus":
|
||||
{
|
||||
_pos = [3810,8887,0];
|
||||
_missionName = "Vybor Occupation";
|
||||
_msgStart = ['#FFFF00',"Vybor is under martial law! There are reports they have a large weapon cache..."];
|
||||
_msgWIN = ['#0080FF',"Convicts have successfully assaulted the town of Vybor and secured the cache!"];
|
||||
_msgLOSE = ['#FF0000',"The troops have left Vybor, taking the cache with them..."];
|
||||
};
|
||||
|
||||
case "altis":
|
||||
{
|
||||
_pos = [12571,14337,0];
|
||||
_missionName = "Neochori Occupation";
|
||||
_msgStart = ['#FFFF00',"Neochori is under martial law! There are reports they have a large weapon cache..."];
|
||||
_msgWIN = ['#0080FF',"Convicts have successfully assaulted the town of Neochori and secured the cache!"];
|
||||
_msgLOSE = ['#FF0000',"The troops have left Neochori, taking the cache with them..."];
|
||||
};
|
||||
|
||||
case "taviana":
|
||||
{
|
||||
_pos = [14000,12220,0];
|
||||
_missionName = "Solibor Occupation";
|
||||
_msgStart = ['#FFFF00',"Solibor is under martial law! There are reports they have a large weapon cache..."];
|
||||
_msgWIN = ['#0080FF',"Convicts have successfully assaulted the town of Solibor and secured the cache!"];
|
||||
_msgLOSE = ['#FF0000',"The troops have left Solibor, taking the cache with them..."];
|
||||
};
|
||||
|
||||
case "namalsk":
|
||||
{
|
||||
_pos = [3926,7523,0];
|
||||
_missionName = "Norinsk Occupation";
|
||||
_msgStart = ['#FFFF00',"Norinsk is under martial law! There are reports they have a large weapon cache..."];
|
||||
_msgWIN = ['#0080FF',"Convicts have successfully assaulted the town of Norinsk and secured the cache!"];
|
||||
_msgLOSE = ['#FF0000',"The troops have left Norinsk, taking the cache with them..."];
|
||||
};
|
||||
|
||||
default
|
||||
{
|
||||
diag_log format["DMS ERROR :: Attempting to run occupation with unsupported map: %1",worldName];
|
||||
};
|
||||
};
|
||||
|
||||
if (isNil "_pos") exitWith {};
|
||||
|
||||
if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
|
||||
|
||||
diag_log text "[DMS]: Town Occupation Mission Started";
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
_difficulty = "hardcore";
|
||||
|
||||
|
||||
// Create AI
|
||||
_AICount = 27;
|
||||
_group1Count = ceil(_AICount/3);
|
||||
_group2Count = ceil(_AICount/3);
|
||||
_group3Count = ceil(_AICount/3);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Get AI to defend the position
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
_group = [_pos, _group1Count, _difficulty, "random", _side] call DMS_fnc_SpawnAIGroup;
|
||||
[ _group,_pos,_difficulty,"COMBAT" ] call DMS_fnc_SetGroupBehavior;
|
||||
|
||||
_buildings = _pos nearObjects ["building", 200];
|
||||
{
|
||||
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions;
|
||||
if(count _buildingPositions > 0) then
|
||||
{
|
||||
_y = _x;
|
||||
// Find Highest Point
|
||||
_highest = [0,0,0];
|
||||
{
|
||||
if(_x select 2 > _highest select 2) then
|
||||
{
|
||||
_highest = _x;
|
||||
};
|
||||
|
||||
} foreach _buildingPositions;
|
||||
_spawnPosition = _highest;
|
||||
|
||||
_i = _buildingPositions find _spawnPosition;
|
||||
_wp = _group addWaypoint [_spawnPosition,0] ;
|
||||
_wp setWaypointFormation "Column";
|
||||
_wp setWaypointBehaviour "AWARE";
|
||||
_wp setWaypointCombatMode "RED";
|
||||
_wp setWaypointCompletionRadius 1;
|
||||
_wp waypointAttachObject _y;
|
||||
_wp setwaypointHousePosition _i;
|
||||
_wp setWaypointType "MOVE";
|
||||
|
||||
};
|
||||
|
||||
} foreach _buildings;
|
||||
if(count _buildings > 0 ) then
|
||||
{
|
||||
_wp setWaypointType "CYCLE";
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
_group2 = [ _pos, _group2Count, _difficulty, "random", _side] call DMS_fnc_SpawnAIGroup;
|
||||
[ _group2,_pos,_difficulty,"COMBAT" ] call DMS_fnc_SetGroupBehavior;
|
||||
|
||||
_buildings = _pos nearObjects ["building", 100];
|
||||
{
|
||||
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions;
|
||||
if(count _buildingPositions > 0) then
|
||||
{
|
||||
_y = _x;
|
||||
// Find Highest Point
|
||||
_highest = [0,0,0];
|
||||
{
|
||||
if(_x select 2 > _highest select 2) then
|
||||
{
|
||||
_highest = _x;
|
||||
};
|
||||
|
||||
} foreach _buildingPositions;
|
||||
_spawnPosition = _highest;
|
||||
|
||||
_i = _buildingPositions find _spawnPosition;
|
||||
_wp2 = _group2 addWaypoint [_spawnPosition,0] ;
|
||||
_wp2 setWaypointFormation "Column";
|
||||
_wp2 setWaypointBehaviour "AWARE";
|
||||
_wp2 setWaypointCombatMode "RED";
|
||||
_wp2 setWaypointCompletionRadius 1;
|
||||
_wp2 waypointAttachObject _y;
|
||||
_wp2 setwaypointHousePosition _i;
|
||||
_wp2 setWaypointType "MOVE";
|
||||
};
|
||||
|
||||
} foreach _buildings;
|
||||
if(count _buildings > 0 ) then
|
||||
{
|
||||
_wp2 setWaypointType "CYCLE";
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
_group3 = [_pos, _group3Count, _difficulty, "random", _side] call DMS_fnc_SpawnAIGroup;
|
||||
[ _group3,_pos,_difficulty,"COMBAT" ] call DMS_fnc_SetGroupBehavior;
|
||||
|
||||
_buildings = _pos nearObjects ["building", 100];
|
||||
{
|
||||
_buildingPositions = [_x, 10] call BIS_fnc_buildingPositions;
|
||||
if(count _buildingPositions > 0) then
|
||||
{
|
||||
_y = _x;
|
||||
// Find Highest Point
|
||||
_highest = [0,0,0];
|
||||
{
|
||||
if(_x select 2 > _highest select 2) then
|
||||
{
|
||||
_highest = _x;
|
||||
};
|
||||
|
||||
} foreach _buildingPositions;
|
||||
_spawnPosition = _highest;
|
||||
|
||||
_i = _buildingPositions find _spawnPosition;
|
||||
_wp3 = _group2 addWaypoint [_spawnPosition,0] ;
|
||||
_wp3 setWaypointFormation "Column";
|
||||
_wp3 setWaypointBehaviour "AWARE";
|
||||
_wp3 setWaypointCombatMode "RED";
|
||||
_wp3 setWaypointCompletionRadius 1;
|
||||
_wp3 waypointAttachObject _y;
|
||||
_wp3 setwaypointHousePosition _i;
|
||||
_wp3 setWaypointType "MOVE";
|
||||
|
||||
};
|
||||
|
||||
} foreach _buildings;
|
||||
if(count _buildings > 0 ) then
|
||||
{
|
||||
_wp3 setWaypointType "CYCLE";
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Get the AI to shut the fuck up :)
|
||||
enableSentences false;
|
||||
enableRadio false;
|
||||
|
||||
// Create Crate
|
||||
_crate = ["I_CargoNet_01_ammo_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
[_group,_group2,_group3]
|
||||
];
|
||||
|
||||
// Define the group reinforcements
|
||||
_groupReinforcementsInfo = [];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
[_missionAIUnits], // armed AI vehicle and static gun(s). Note, we don't add the base itself because we don't want to delete it and respawn it if the mission respawns.
|
||||
[],
|
||||
[[_crate,[30 + (random 20),100 + (random 40),15 + (random 5)]]] // weapons,items,backpacks
|
||||
];
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
(_markers select 1) setMarkerSize [500,500];
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
[_group,_group2,_group3]
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,100]
|
||||
]
|
||||
],
|
||||
_groupReinforcementsInfo,
|
||||
[
|
||||
_time,
|
||||
DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[[],[]]
|
||||
] call DMS_fnc_AddMissionToMonitor_Static;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
@ -97,7 +97,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
|
||||
{
|
||||
// Change message for players when they're actually LOSING poptabs
|
||||
_msgType = "notificationRequest";
|
||||
_msgParams = ["Whoops",[format ["Lost %1 poptabs from running over a %2 AI!",abs _moneyChange,_AIType]]];
|
||||
_msgParams = ["Whoops",[format ["Lost %1 poptabs for killing %2 AI!",abs _moneyChange,_AIType]]]; //changed wording, negative result is not necessarily a roadkill
|
||||
|
||||
// With the error message the money value won't be updated on the client, so I just directly PVC the value.
|
||||
ExileClientPlayerMoney = _playerMoney;
|
||||
|
@ -46,7 +46,7 @@ if (diag_fps >= DMS_MinServerFPS && {(count allPlayers) >= DMS_MinPlayerCount})
|
||||
|
||||
if (_availableMissions isEqualTo []) exitWith
|
||||
{
|
||||
DMS_StaticMissionLastStar
|
||||
DMS_StaticMissionLastStart = _time;
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
(format ["SelectMission :: No available missions! Running missions: %1", DMS_RunningStaticMissions]) call DMS_fnc_DebugLog;
|
||||
|
@ -128,8 +128,11 @@ else
|
||||
};
|
||||
};
|
||||
|
||||
// Unit name
|
||||
_unit setName format["[DMS %1 %2 %3]",toUpper _side,_class,floor(random 1000)];
|
||||
// Set random DMS unit names if you don't want Arma assigned (real names)
|
||||
if !(DMS_AI_UseRealNames) then
|
||||
{
|
||||
_unit setName format["[DMS %1 %2 %3]",toUpper _side,_class,floor(random 1000)];
|
||||
};
|
||||
|
||||
if (_customGearSet isEqualTo []) then
|
||||
{
|
||||
|
@ -155,8 +155,12 @@ ___
|
||||
|
||||
### Test Branch:
|
||||
#### May 14, 2016 (2:00 PM CST-America):
|
||||
* **NEW CONFIG VALUES:**
|
||||
|
||||
DMS_AI_UseRealNames
|
||||
* More Micro-optimizations.
|
||||
* Fixed a lot of various errors from the last test branch update.
|
||||
* Integrated Exile Occupation by second coming :)
|
||||
|
||||
|
||||
#### May 6, 2016 (10:45 PM CST-America):
|
||||
|
Loading…
Reference in New Issue
Block a user