[Support] DZMS DayZ Mission System

For the choosing of worldspace cords its a function built in that looks within a radius of a set center. What I've done in my mission is pick several centers and called the function so that my missions will spawn in areas closer to the shore. What I ended up making for having missions spawning closer to the shore was this (it doesn't have the extra checks included in the DZMS function):
Code:
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
// _pos <- several different centers chosen along the southern shore. Each time the mission pops up a center is chosen randomly (for variation).
_pos = [[8626.8311, 2361.7764, 0],[8278.9824, 2783.2297, 0],[6493.5347, 2239.1804, 0],[5997.4668, 2085.5015, 0],[3985.1863, 2372.7046, 0],[3248.1956, 2063.8767, 0],[1629.5411, 2108.6868, 0],[961.48071, 1887.1649, 0],[11677.637, 3212.2078, 0]] call BIS_fnc_selectRandom;
//_coords <- [center, min distance mission will spawn, max distance mission will spawn, max distance from nearest object, water mode, terrain gradient, shore mode
_coords = [_pos,0,1200,30,0,30,0] call BIS_fnc_findSafePos;

I'm guessing you could use something like this to find coordinates in the ocean by turning on water mode maybe?

Ah I see, yeah the _coords + 0.1234 lines in the code were what threw me off. I sort of figured that was roughly what it was doing, but my confusion is more about where I would even look to find that _pos section to define said centers in the worldspace... I feel like I have looked everywhere but clearly I haven't or have missed it.

Also, Vampire, my bad I have not gotten to checking out those vehicle classnames yet, going to try and do that tomorrow and I will hopefully have an update for you then on whether or not the vehicle database saving issue was resolved with that.
 
Ah I see, yeah the _coords + 0.1234 lines in the code were what threw me off. I sort of figured that was roughly what it was doing, but my confusion is more about where I would even look to find that _pos section to define said centers in the worldspace... I feel like I have looked everywhere but clearly I haven't or have missed it.

Also, Vampire, my bad I have not gotten to checking out those vehicle classnames yet, going to try and do that tomorrow and I will hopefully have an update for you then on whether or not the vehicle database saving issue was resolved with that.
In DZMSFunctions.sqf -> line 36-115ish are where the global center for the map is found and set. Thats why in the regular mission sqfs its normally "_coords = call DZMSFindPos;". I changed that line to what I posted to have my own centers so that the regular missions would still run normally how they had been.

EDIT:
might have mis-interpreted what you were getting at. But how it works is when the mission starts it runs this (near the begining of all missions) "_coords = call DZMSFindPos;" <- this is where the worldspace comes from when all the vehicles, buildings ect are spawned in. When that code is run, it calls the function from the DZMSFunctions.sqf to find a safe spot to create the mission. Once it has decided on the coordinates the script continues on through to spawn everything. Example lets say it chooses elektro and the coordinates are [10,11,0]. [10,11,0] = _coords from when it called the function earlier. We then use worldspace coordinates looking like this [(_coords select 0) + 6, (_coords select 1) - 0.5, 0] which would translate to [(10)+6, (11)-0.5, 0] <- we are offsetting each item to be spawned so that around the location chosen everything will spawn in correctly.

What I have done is replaced the "_coords = call DZMSFindPos;" at the begining of my custom mission and changed it to what I had above my edit. Heres a pastebin of my mission I made if you want to look at it.

http://pastebin.com/A96nbLL6
 
Last edited:
In DZMSFunctions.sqf -> line 36-115ish are where the global center for the map is found and set. Thats why in the regular mission sqfs its normally "_coords = call DZMSFindPos;". I changed that line to what I posted to have my own centers so that the regular missions would still run normally how they had been.

EDIT:
might have mis-interpreted what you were getting at. But how it works is when the mission starts it runs this (near the begining of all missions) "_coords = call DZMSFindPos;" <- this is where the worldspace comes from when all the vehicles, buildings ect are spawned in. When that code is run, it calls the function from the DZMSFunctions.sqf to find a safe spot to create the mission. Once it has decided on the coordinates the script continues on through to spawn everything. Example lets say it chooses elektro and the coordinates are [10,11,0]. [10,11,0] = _coords from when it called the function earlier. We then use worldspace coordinates looking like this [(_coords select 0) + 6, (_coords select 1) - 0.5, 0] which would translate to [(10)+6, (11)-0.5, 0] <- we are offsetting each item to be spawned so that around the location chosen everything will spawn in correctly.

What I have done is replaced the "_coords = call DZMSFindPos;" at the begining of my custom mission and changed it to what I had above my edit. Heres a pastebin of my mission I made if you want to look at it.

http://pastebin.com/A96nbLL6

Ohhhh ok I think I am beginning to understand. For the Elektro example, when you say [10,11,0], 10 is "select 0"/X-axis, 11 is "select 1"/Y-axis, and 0 is just Z-axis right?

Also, correct me if I am wrong, but by virtue of what you have done in your own mission, I could essentially bypass the whole _coords=DZMSFindPos by commenting it out and defining the possible worldspaces myself with "_pos=[0,1,2]" function right? I get that it is spawning missions about this designated center, but I don't fully understand what "(_coords select 0) + 6" is doing for example (like what does adding 6 to it do (think you actually already answered this--spawning AROUND center right?), and in game what does 6 come out to--600m? 6km? Etc.). It seems like if you want it to exclusively stay around the coastal areas it is almost necessary to define your own worldspace as it seems that DZMSFunctions really only defines one center and spawns around map at random, whereas if you desire coastal missions you would need a more stringent system.

P.S. Sorry if I am dragging this out, it is still all a bit confusing for me as this is my first server and I am still learning--I had no idea what I was getting myself into so the last few months have literally been a crash course in scripting/coding for me haha. Think I am off to a good start though lol have added many scripts since and I have really gotten a much more thorough understanding of how DayZ works behind the scenes. With that being said, I really really appreciate you guys taking the time to answer my questions, I hope that by me asking for clarification other people on here find solutions as well. If you guys want to free up the thread (sort of hijacking it w/ my questions lol :D) we can hop onto my Teamspeak at some point if you would prefer it.
 
Ohhhh ok I think I am beginning to understand. For the Elektro example, when you say [10,11,0], 10 is "select 0"/X-axis, 11 is "select 1"/Y-axis, and 0 is just Z-axis right?

Also, correct me if I am wrong, but by virtue of what you have done in your own mission, I could essentially bypass the whole _coords=DZMSFindPos by commenting it out and defining the possible worldspaces myself with "_pos=[0,1,2]" function right? I get that it is spawning missions about this designated center, but I don't fully understand what "(_coords select 0) + 6" is doing for example (like what does adding 6 to it do (think you actually already answered this--spawning AROUND center right?), and in game what does 6 come out to--600m? 6km? Etc.). It seems like if you want it to exclusively stay around the coastal areas it is almost necessary to define your own worldspace as it seems that DZMSFunctions really only defines one center and spawns around map at random, whereas if you desire coastal missions you would need a more stringent system.

P.S. Sorry if I am dragging this out, it is still all a bit confusing for me as this is my first server and I am still learning--I had no idea what I was getting myself into so the last few months have literally been a crash course in scripting/coding for me haha. Think I am off to a good start though lol have added many scripts since and I have really gotten a much more thorough understanding of how DayZ works behind the scenes. With that being said, I really really appreciate you guys taking the time to answer my questions, I hope that by me asking for clarification other people on here find solutions as well. If you guys want to free up the thread (sort of hijacking it w/ my questions lol :D) we can hop onto my Teamspeak at some point if you would prefer it.

When _coords is returned, that is the chosen mission center.
When its doing selects, it is essentially pulling numbers out of the chosen center.
If _coords is [10,11,0] that is X, Y, Height.
_coords select 0 = 10
_coords select 1 = 11
_coords select 2 = 0

So then you are modifying the coordinates for specific items.
So
[(_coords select 0) + 3, (_coords select 1) + 3, 0] is
[13, 14, 0]

Thats moving the object +3 on the X and Y which would be to the NorthEast on most maps.
 
Not sure if this has been asked before but when I allow the vehicles to be saved after restart, for some reason I have a whole heap of vehicles on my control panel map that don't show me what they are, they just come up as "null" My host is dayz.st on DayZ Mod v1.8.0.3

Example
kZNEoKF.png
 
When _coords is returned, that is the chosen mission center.
When its doing selects, it is essentially pulling numbers out of the chosen center.
If _coords is [10,11,0] that is X, Y, Height.
_coords select 0 = 10
_coords select 1 = 11
_coords select 2 = 0

So then you are modifying the coordinates for specific items.
So
[(_coords select 0) + 3, (_coords select 1) + 3, 0] is
[13, 14, 0]

Thats moving the object +3 on the X and Y which would be to the NorthEast on most maps.
Just like Vampire said. The addition and subtraction to the _coords is to spawn all the objects in the correct place. How I did it in the editor was by doing it this way, I chose the box to be my "center" (no idea why i didn't do this now that I think about it lol, I chose something at random to be center). The sqf after saving in the editor will look like this
Code:
_vehicle_20 = objNull;
if (true) then
{
  _this = createVehicle ["Land_CamoNet_NATO", [7785.3687, 3190.6211, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setDir -6.8721342;
  _this setPos [7785.3687, 3190.6211, 0];
};

_vehicle_21 = objNull;
if (true) then
{
  _this = createVehicle ["MedBox0", [7784.7256, 3189.5369, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_21 = _this;
  _this setDir -49.684994;
  _this setPos [7784.7256, 3189.5369, -3.1471252e-005];
};
[7784.7256, 3189.5369, -3.1471252e-005] which i would then use as a center for once the mission script starts.
the camo net would then need to be offset.
so the box would be [(_coords select 0) , (_coords select 1) , 0] or as in the previous example [10,11,0]
// _coords <- whatever safe position BIS_fnc_findSafePos finds
// select 0 (10) +/- whatever offset <- selecting x axis then doing some math to see how far off the camo net is from the box
// select 1 (11) +/- whatever offset <- selecting y axis then doing some math to see how far off the camo net is from the box
[(_coords select 0) + (7785.3687-7784.7256),(_coords select 0) + (3190.6211-3189.5369), 0]
this makes it so the box is center, and the camo net is center +.5 (in meters) in the x axis and +1.1 (in meters) in the y axis making it spawn in the proper location in comparison to the center.

I mean you could also just make the missions static and make a mission and use exact cordinates, just make sure to define ther _coords in the mission to something centered for you mission other then it finding a random location.


X6rLhUW.jpg


Reposting this image, another example but lets say that the box is center, and the rounded sandbags are straight south of it. the big vehicle crate would be [(_coords select 0) , (_coords select 1) , 0]
and the rounded sandbags would be something like [(_coords select 0) , (_coords select 1) - 2 , 0] which would make the sandbags 2 meters down on the y axis.

the little sandbag nest would be something like [(_coords select 0) + 3, (_coords select 1) -1, 0] making the sandbag nest in comparison to the crate +3 on the x axis and -1 on the y axis.

I'm pretty sure I did all my math backwards lol when I did my missions so anything that needed to have their direction set a certain way was backwards.
 
Last edited:
Not sure if this has been asked before but when I allow the vehicles to be saved after restart, for some reason I have a whole heap of vehicles on my control panel map that don't show me what they are, they just come up as "null" My host is dayz.st on DayZ Mod v1.8.0.3

Example

Are the vehicles actually saved to your database? Some of the classnames may be incorrect for vanilla dayz. In that case, adjust the classnames in the DZMSConfig.
 
After winning some missions we go in to capture the loot, vehicles, etc. and the deceased AI despawn too quickly. This is only a few minutes after we arrive at the spawn site. We don't have time to strip the gear from them. It doesn't happen all the time, but I noticed it a few times today.
 
Oh alright, I get it now. I would probably screw up creating a mission but I think I get the mechanics now. I will try and make something tonight and I will post it here to see if you guys think I got it.

Thanks again for the help guys.

One more quick question lol: if I am just running DayZ 1.8 Chernarus, can I delete EM1 from my missions folder (C130 crash)? This is Epoch specific right? Never seen it happen

EDIT: Also, Vampire, I just looked through my mission files and the vehicles that are spawned all have correct classnames of vehicles that already exist in my database, but the issue with only one saving still remains.
 
iI am loving this mission system, have been tweeking some and trying to build new ones, the following code to spawn the Ai, is the skill level range 0,1,2 or does it be 1,2,3 , i no the skill level below is 0 and the number of Ai to spawn is 3

//Usage: [_coords, count, skillLevel, unitArray]
[_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
 
hey guys can the Text be modified so that Mission start & stop, look a bit more appealing?
say the same as the Welcome Credits SQF?
say A Modifiable Header, and Body with colour??

just a thought, but massive Thanks to Vampire for this work, Truly out done ya self......
 
Use this in your code:
Code:
_hint = parseText format["<t align='center' color='#ff0000' shadow='2' size='1.75'>DEATH VALLEY!</t><br/><t  align='center' color='#ffffff'>Legion is gathering forces in a valley, team up and go wipe out them out! </t>"];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";
Just null out the announcement line in your code and use this instead. It's really clean and neat and you can configure the colors. For instance this is green:
Code:
_hint = parseText format["<t align='center' color='#00FF11' shadow='2' size='1.75'>SUCCESS!</t><br/><t  align='center' color='#ffffff'>Survivors have taken Death Valley!</t>"];
  customRemoteMessage = ['hint', _hint];
  publicVariable "customRemoteMessage";
while this is red:
Code:
_hint = parseText format["<t align='center' color='#ff1133' shadow='2' size='1.75'>FAILED</t><br/><t  align='center' color='#ffffff'>Survivors did not secure Death Valley!</t>"];
    customRemoteMessage = ['hint', _hint];
    publicVariable "customRemoteMessage";
 
I know the vehicles saving to database is experimental. Seems to work for the most part, but randomly some of the cars just wont stay, and on the Dayz.st admin map, most of the spawned vehicles say NULL.

Is there anything i can do to resolve this? And make more of the vehicles save?
thanks
 
Hello, I have been using DZMS a while, and i love it! But now its not spawning any bots to missions, i can see cars spawning at the mission and some objects. Also loot doesnt spawn at crates(medicals do). o_O But here is my rpt log if you can tell what is wrong with it :F

http://notepad.cc/share/l9x29bsV3I
 
I know the vehicles saving to database is experimental. Seems to work for the most part, but randomly some of the cars just wont stay, and on the Dayz.st admin map, most of the spawned vehicles say NULL.

Is there anything i can do to resolve this? And make more of the vehicles save?
thanks

I'm in the same boat, I have 2 servers, 1 saves most of the vehicles with a few null vehicles here and there but the other server is full of null vehicles, maybe its a dayz.st thing cause that's what I use.

It seems most of the fixes are for Epoch and not 1.8.0.3
 
Hello, I have been using DZMS a while, and i love it! But now its not spawning any bots to missions, i can see cars spawning at the mission and some objects. Also loot doesnt spawn at crates(medicals do). o_O But here is my rpt log if you can tell what is wrong with it :F

http://notepad.cc/share/l9x29bsV3I

In DZMSAIConfig you added a bag to the array, or removed it, and that is causing the AI not to spawn becuase an array can't have a comma after the final value.

Code:
ault_Pack_EP1",
"DZ_CivilBackpack_EP1", <-----
];

That comma needs removed.

I also doubt your SargeAI is working, as you have an error in it as well.
 
Congrats for the new mission, its on my test server and looks nice, no bug, the only thing I dislike the mission spawn often in the same area, I think it need to be random all around the map.

Few questions here.

1. Is it possible to add exactly what we want in a box and the number of each Items (like the other mission we had the misc)?

Lots players go on the mission and honestly its not what they would expect to have in a box and they will fight each other cause the stock is insufficient. Like in the medical box there was more other stuff than medical. Construction mission poor on construction material if you think about the number of AI killed the box not worth the work.

2. Is it possible in the SM to change a vehicle to spawn at the mission, like changing the SUV for the Armored SUV....?

3.Here for the SM3 [[(_coords select 0) + 20, _coords select 1,0],6,1] ExecVM DZMSAISpawn; is 20 is the number of AI spawning on the mission? What would be this one cause its a little different SM10 [_coords,3,1] ExecVM DZMSAISpawn; Can we increase it?

Thanks
 
Congrats for the new mission, its on my test server and looks nice, no bug, the only thing I dislike the mission spawn often in the same area, I think it need to be random all around the map.

Few questions here.

1. Is it possible to add exactly what we want in a box and the number of each Items (like the other mission we had the misc)?

Lots players go on the mission and honestly its not what they would expect to have in a box and they will fight each other cause the stock is insufficient. Like in the medical box there was more other stuff than medical. Construction mission poor on construction material if you think about the number of AI killed the box not worth the work.

2. Is it possible in the SM to change a vehicle to spawn at the mission, like changing the SUV for the Armored SUV....?

3.Here for the SM3 [[(_coords select 0) + 20, _coords select 1,0],6,1] ExecVM DZMSAISpawn; is 20 is the number of AI spawning on the mission? What would be this one cause its a little different SM10 [_coords,3,1] ExecVM DZMSAISpawn; Can we increase it?

Thanks

1. Take a look in the EXT config files, you can alter weapon crate loot in there
2. In each missions (Major and Minor) there should be a section that spawns in vehicles (not all missions have vehicles but for the ones that do I believe it starts out _vehicle="XXXXXX"). All you have to do is input whatever vehicle classname you want between the quotations
3. Check out page 15, I asked the same question and Vampire explained how the AI spawning mechanics works--to answer your question I believe it is actually the 6 towards the end and if you have multiple rows of AI spawning they all add together (so if you want 5 you could make all 0 except for one which would equal 5, or you could make one 3 and another 2, etc.)
 
Back
Top