SC submit v1

This commit is contained in:
second_coming 2016-05-12 12:29:02 +01:00
parent e3d11a0aa5
commit 04d263fb8c
4 changed files with 291 additions and 3 deletions

View File

@ -4,7 +4,7 @@ class CfgPatches
{
units[] = {};
weapons[] = {};
a3_DMS_version = "May 6, 2016 (TEST)";
a3_DMS_version = "May 12, 2016 (TEST)";
requiredVersion = 1.36;
requiredAddons[] = {"exile_client","exile_server_config"};
};

View File

@ -0,0 +1,288 @@
/*
"Occupation" static mission for Altis, Chernarus, Namalsk and Taviana
Created by second_coming
*/
private["_wp","_wp2","_wp3"];
// For logging purposes
_num = DMS_MissionCount;
// Set mission side (only "bandit" is supported for now)
_side = "bandit";
// Default config is for 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..."];
if (worldName == 'Altis') then
{
_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..."];
};
if (worldName == 'Taviana') then
{
_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..."];
};
if (worldName == 'Namalsk') then
{
_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..."];
};
diag_log text "[DMS]: Town Occupation Mission Started";
_sc_xpos = _pos select 0;
_sc_ypos = _pos select 1;
if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
// 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;

View File

@ -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;

View File

@ -129,7 +129,7 @@ else
};
// Unit name
_unit setName format["[DMS %1 %2 %3]",toUpper _side,_class,floor(random 1000)];
//_unit setName format["[DMS %1 %2 %3]",toUpper _side,_class,floor(random 1000)];
if (_customGearSet isEqualTo []) then
{