HeadlessRocket

NEW A3_DMS STATIC MISSION (defent mission system)

5 posts in this topic

So i created my first static AI mission for DMS mission sytem.  It's called the Military Raid it is a basic military instalation that is spawned in using DMS but can also be occupied by VEMFReloaded, all setings can be configured to your liking.

Download: https://drive.google.com/open?id=0BwnDum6odAHIRDdIWXJ6RldZNTA

Installing.
1.  Copy Military_Raid.sqf into a3_dms.pbo missions/static
2.  Copy Military_Raid_buildings.sqf into a3_dms.pbo objects/static
3.  Extract  map_configs/altis_config.sqf
4. Find
 DMS_StaticMissionTypes append [["saltflats",1],["slums",1]];
 Change to (or add extra)
 DMS_StaticMissionTypes append [["saltflats",1],["slums",1],["Military_Raid",1]];
5. Find
 DMS_BasesToImportOnServerStart append ["saltflatsbase","slums_objects"];
 Change to (or add extra)
 DMS_BasesToImportOnServerStart append ["saltflatsbase","slums_objects","Military_Raid_buildings"];
6. Repack altis_config.sqf into PBO
7.  Put a3_dms.pbo into /@ExileServer/addons/ on server and start.

 

2016-02-09_00001.jpg

2016-02-09_00002.jpg

2016-02-09_00003.jpg

3 people like this

Share this post


Link to post
Share on other sites

We are having a problem with the ammo truck on our server. Everytime the mission is completed by players, as soon as one gets into the ammo truck , they cant get out and they cant access the loot either in the ammo truck. This has been happening since i put it on from the start so its not something that has developed over time. How can we cure it

Share this post


Link to post
Share on other sites
Advertisement

ive noticed that ammo truck has been giving me issues also even if it has been whitelisted and so on . so is there away to change that truck maybe to something else

Share this post


Link to post
Share on other sites
On ‎14‎/‎04‎/‎2016 at 11:48 PM, hogansheroes said:

ive noticed that ammo truck has been giving me issues also even if it has been whitelisted and so on . so is there away to change that truck maybe to something else

I have not added any vehicles into the mapping as there is an issue that although you map in a locked truck, it doesn't stop people getting into it >>> just out again after!

I even removed the sub on an island mission of someone else as it suffered the same issue, the easiest way to put in a truck is via the mission, sorry for treading on toes but I would change it like this.

 

In Military_Raid_Buildings.sqf find and delete this line completely, save and put back into PBO.

Quote

 ["O_Truck_02_Ammo_F",[12809.3,16654.1,0],0,[0,0,1],true],

 

Open Military_Raid.sqf and paste in the following

Spoiler

/*
 "Military Raid" static mission for Altis.
 Created by HeadlessRocket
 Credits to "HeadlessRocket" for creating the base.
*/

private ["_vehicle", "_vehClass"];

// For logging purposes
_num = DMS_MissionCount;


// Set mission side (only "bandit" is supported for now)
_side = "bandit";

_pos = [12796.6,16673.9,0];

if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};


// Set general mission difficulty
_difficulty = "hardcore";


// Define spawn locations for AI Soldiers. These will be used for the initial spawning of AI as well as reinforcements.
// The center spawn location is added 3 times so at least 3 AI will spawn initially at the center location, and so that future reinforcements are more likely to spawn at the center.
_AISoldierSpawnLocations =
[
 [12796.6,16673.9,0],
 [12787,16634.4,0],
 [12786.6,16665.3,0],
 [12816.9,16679.3,0],
 [12798.1,16628,0],
 [12785.6,16649.7,0],
 [12793.2,16615.8,0],
 [12802.9,16689.8,0],
 [12826.6,16638.3,0],
 [12790.7,16616.9,0],
 [12793.6,16650.1,0]
];

// Create AI
_AICount = 20 + (round (random 8));


_group =
[
 _AISoldierSpawnLocations+[_pos,_pos,_pos],   // Pass the regular spawn locations as well as the center pos 3x
 _AICount,
 _difficulty,
 "random",
 _side
] call DMS_fnc_SpawnAIGroup_MultiPos;


_staticGuns =
[
 [
  [12790.6,16618.3,-0.0982742],
  [12800.6,16633.9,0],
  [12795,16637.9,0],
  [12824.1,16681.4,-0.202408],
  [12826.9,16690.7,-0.203194],
  [12801.7,16692.1,-0.0822678],
  [12839.8,16682.2,2.8681],
  [12810.7,16637.3,17.7028],
  [12799.5,16698.7,17.7028]
 ],
 _group,
 "assault",
 _difficulty,
 "bandit",
 "random"
] call DMS_fnc_SpawnAIStaticMG;

 

// Define the classnames and locations where the crates can spawn (at least 2, since we're spawning 2 crates)
_crateClasses_and_Positions =
[
 [[12796.6,16673.9,0],"I_CargoNet_01_ammo_F"],
 [[12795.6,16671.9,0],"I_CargoNet_01_ammo_F"]
];

{
 deleteVehicle (nearestObject _x);  // Make sure to remove any previous crates.
} forEach _crateClasses_and_Positions;

// Shuffle the list
_crateClasses_and_Positions = _crateClasses_and_Positions call ExileClient_util_array_shuffle;


// Create Crates
_crate0 = [_crateClasses_and_Positions select 0 select 1, _crateClasses_and_Positions select 0 select 0] call DMS_fnc_SpawnCrate;
_crate1 = [_crateClasses_and_Positions select 1 select 1, _crateClasses_and_Positions select 1 select 0] call DMS_fnc_SpawnCrate;

// Disable smoke on the crates so that the players have to search for them >:D
{
 _x setVariable ["DMS_AllowSmoke", false];
} forEach [_crate0,_crate1];

/*
// Don't think an armed AI vehicle fit the idea behind the mission. You're welcome to uncomment this if you want.
_veh =
[
 [
  [_pos,100,random 360] call DMS_fnc_SelectOffsetPos,
  _pos
 ],
 _group,
 "assault",
 _difficulty,
 _side
] call DMS_fnc_SpawnAIVehicle;
*/


// Define mission-spawned AI Units
_missionAIUnits =
[
 _group   // We only spawned the single group for this mission
];

// Define the group reinforcements
_groupReinforcementsInfo =
[
 [
  _group,   // pass the group
  [
   [
    0,  // Let's limit number of units instead...
    0
   ],
   [
    100, // Maximum 100 units can be given as reinforcements.
    0
   ]
  ],
  [
   240,  // About a 4 minute delay between reinforcements.
   diag_tickTime
  ],
  _AISoldierSpawnLocations,
  "random",
  _difficulty,
  _side,
  "reinforce",
  [
   10,   // Reinforcements will only trigger if there's fewer than 10 members left in the group
   7   // 7 reinforcement units per wave.
  ]
 ]
];

// Load in non-persistent vehicle
_vehClass = "O_Truck_02_Ammo_F";
_vehicle = [_vehClass, [[12809.3,16654.1,0],0] call DMS_fnc_SelectOffsetPos] call DMS_fnc_SpawnNonPersistentVehicle;

// Define mission-spawned objects and loot values
_missionObjs =
[
 _staticGuns,   // static gun(s). Note, we don't add the base itself because it already spawns on server start.
 _vehicle1,    // non persistent vehicle
 [[_crate0,[50,100,2]],[_crate1,[3,150,15]]]
];

// Define Mission Start message
_msgStart = ['#FFFF00', "A small military base has been Raided KILL the raiders and claim their loot!..."];

// Define Mission Win message
_msgWIN = ['#0080ff',"Convicts have successfully rooted out the raiders and claimed the loot for themselves!"];

// Define Mission Lose message
_msgLOSE = ['#FF0000',"The raiders found what they were looking for and left..."];

// Define mission name (for map marker and logging)
_missionName = "Military Raid";

// Create Markers
_markers =
[
 _pos,
 _missionName,
 _difficulty
] call DMS_fnc_CreateMarker;

_circle = _markers select 1;
_circle setMarkerDir 20;
_circle setMarkerSize [150,150];


_time = diag_tickTime;

// Parse and add mission info to missions monitor
_added =
[
 _pos,
 [
  [
   "kill",
   _group
  ],
  [
   "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;

 

if (DMS_DEBUG) then
{
 (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;
};

not tested but should work something like this:

define some variables just to be used in this mission with:

private ["_vehicle", "_vehClass"];

 

then define the vehicle type and load position with (used cords from buildings file):

_vehClass = "O_Truck_02_Ammo_F";
_vehicle = [_vehClass, [[12809.3,16654.1,0],0] call DMS_fnc_SelectOffsetPos] call DMS_fnc_SpawnNonPersistentVehicle;

 

Then add into the mission objects so it would get cleaned if mission despawned with:

_missionObjs =
[
 _staticGuns,   // static gun(s). Note, we don't add the base itself because it already spawns on server start.
 _vehicle1,    // non persistent vehicle
 [[_crate0,[50,100,2]],[_crate1,[3,150,15]]]
];

 

I would suggest either doing it this way or just remove the  ["O_Truck_02_Ammo_F",[12809.3,16654.1,0],0,[0,0,1],true], line and have no vehicle if you want an easy life.

 

hope that helps

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.