[Support] DZMS DayZ Mission System

Depends on which map you're running, but your server RPT will be in the same folder as your config.cfg and Basic.cfg
 
I have two questions that I'm hoping people can help me with.

1. I was wondering if it's possible to make the red circle around the mission stay after the mission is complete for a time, like 15 minuets.

2. I was also wondering if it's possible to have separate crates from minor and major missions, I plan on making major missions a lot harder and want them to always have better gear, where as I want minor missions to have not as good gear.

Any info on either of these questions is appreciated greatly, if you could show me how to do this that would be great. Thanks guys!
 
Any way to remove rpg on mission ai on death? Didn't see any options for that.

It should be removing it from them on death automatically.

If you don't want it removed on death you can removed the lines that do so in DZMSAIKilled.sqf
 
Hello Vampire is me again with another question. Anyway on Mission AI attack a player in Eastside skin such as MVD_Soldier_MG/RUS_Commander/RUS_Soldier_GL/ ? or Eastside skins that are not done by epoch?
 
(...)
However I'm going to implement some additional AI logic, like healing, shooting for effect, hiding bodies, throwing grenades, flares, smokes, etc.

It's very first version of my AI logic - mbnqAI.sqf

DZMSAISpawn.sqf, under:
Code:
_unit setVariable ["DZMSAI", true];
place:
Code:
[_unit,_position] execVM "\z\addons\dayz_server\DZMS\mbnqAI.sqf";

It's also recomended to:
DZMSAISpawn.sqf
Code:
_unitGroup setCombatMode "RED";
_unitGroup setBehaviour "COMBAT";
...
_wp1 setWaypointType "MOVE";
_wp2 setWaypointType "GUARD";
_wp3 setWaypointType "MOVE";
_wp4 setWaypointType "GUARD";

DZMSAIKilled.sqf
Code:
  //Lets inform the nearby AI of roughly the players position
   //This makes the AI turn and react instead of laying around
   // def=300 metters, let's try 400 -mbnq
   {
     if (((position _x) distance (position _unit)) <= 400) then {
       _x reveal [_player, 4.0];
     }
   } forEach allUnits;

What I made to make AI very difficult was:
1.) I gave them nvgs, hunting rifles, rpk and some minor auto rifles
(AI behaves differently depending on the type of weapon they use)
2.) I've made a lot of high defence value static spawn locations
Code:
waitUntil { { _x distance _coords < 500 } count playableunits < 1 };
before executing missions, to prevent spawning bots at players
BIS_fnc_findSafePos it's nice for spawning crash sites, camps, etc but npcs at the middle of field was not what I want :)
(...)

Main features:
- scatter, looking for cover
- inf ammo
- healing
- using smokes, grenades, flares (via createvehicle)
- prevent npcs from running too far from base
- stealing vehicles (can steal vehicles, drive them to specified location and go back to mission area)

I've also changed their weapons array so they can use all best weapons ingame, however weapons being changed to more common types when killed to prevent players from getting stuff too easily. (It requires to moddiffy mission files, forcing to spawn skillLevel 2 groups.)

DZMSAIKilled.sqf:
Code:
  _aigearArray = [DZMSGear0,DZMSGear1,DZMSGear2,DZMSGear3,DZMSGear4];
   _aigear = _aigearArray call BIS_fnc_selectRandom;
   _gearmagazines = _aigear select 0;

   // *** let's choose unit gear ***

   _weapon = DZMSWeps2 call BIS_fnc_selectRandom;
   _magazine = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select 0;

   // *** let's clean unit gear ***
     {
       _unit removeMagazine _x
     } forEach magazines _unit;
     sleep 0.1;

     removeAllWeapons _unit;
     sleep 0.1;

   // *** let's add some stuff ***
     _unit addMagazine _magazine;
     sleep 0.1;

     {
       _unit addMagazine _x
     } forEach _gearmagazines;
     sleep 0.1;

     _unit addWeapon _weapon;
     sleep 0.1;

   //  *** let's make sure unit will not have nvgs ***
     if (_unit hasWeapon "NVGoggles") then {_unit removeWeapon "NVGoggles";};
DZMSAIConfig.sqf
Code:
DZMSSkills1 = [
["aimingAccuracy",0.80],
["aimingShake",0.85],
["aimingSpeed",0.85],
["endurance",0.85],
["spotDistance",0.85],
["spotTime",0.85],
["courage",0.85],
["reloadSpeed",0.85],
["commanding",0.85],
["general",0.85]
];

DZMSSkills2 = [
["aimingAccuracy",0.85],
["aimingShake",0.95],
["aimingSpeed",0.95],
["endurance",1.00],
["spotDistance",0.90],
["spotTime",0.90],
["courage",0.85],
["reloadSpeed",1.00],
["commanding",1.00],
["general",1.00]
];

DZMSSkills3 = [
["aimingAccuracy",1.00],
["aimingShake",1.00],
["aimingSpeed",1.00],
["endurance",1.00],
["spotDistance",1.00],
["spotTime",1.00],
["courage",1.00],
["reloadSpeed",1.00],
["commanding",1.00],
["general",1.00]
];

...

DZMSWeps1 = [
"LeeEnfield",
"Winchester1866",
"Remington870_lamp",
"M1014",
"MP5A5",
"bizon"
];

DZMSWeps2 = [
"LeeEnfield",
"MP5A5",
"AKS_74_U",
"RPK_74",
"AK_74_GL",
"M14_EP1",
"huntingrifle",
"AK_47_M",
"M16A2GL",
"Sa58P_EP1"
];

DZMSWeps3 = [
"Sa58V_EP1",
"Sa58P_EP1",
"Sa58V_CCO_EP1",
"AK_74_GL_kobra",
"Sa58V_RCO_EP1",
"AKS_74_pso",
"huntingrifle",
"AK_47_M",
"SVD_CAMO_DZ",
"BAF_L85A2_RIS_Holo",
"M40A3",
"M4A1_AIM_SD_camo",
"M240_DZ",
"M4A1_RCO_GL",
"G36A_camo",
"FN_FAL",
"G36C_camo",
"Mk_48_DZ",
"M4A1_HWS_GL_SD_CAMO",
"SVD_DZ",
"DMR_DZ",
"AKS_74_U",
"RPK_74",
"AK_74_GL",
"M14_EP1",
"M16A2GL",
"Sa58P_EP1",
"M240_DZ"
];

Works well for me and I didn't notice any performance drop. With these changes npcs are rly nasty (however I could forget some changes I've made). It's not a serious AI logic, just an addition to make npcs more challenging.

Full mod compilation DZMS_mbnq_compilation

Im running
Code:
DZMSVersion = "RC1.1";
on vanilla dayz 1.8.0.3, dayz.st server.

Thanks again Vampire for making this nice ms ! :)
 
Last edited:
Want to try this out, where does this code go?

It's also recomended to:
Code:
_unitGroup setCombatMode "RED";
_unitGroup setBehaviour "COMBAT";
...
_wp1 setWaypointType "MOVE";
_wp2 setWaypointType "GUARD";
_wp3 setWaypointType "MOVE";
_wp4 setWaypointType "GUARD";
 
DZMSAISpawn.sqf
It's changes example, not ready-to-paste code.
Simply edit the file and change values in "" with given on example.
 
i take it the _unitGroup setCombatMode "RED" etc above is this?

_unit setCombatMode "RED";
_unit setBehaviour "COMBAT";
 
In respect to Vampire's work you should start your own thread for this as an add-on/refinement. Don't get me wrong, it's great to share and help but this thread should remain specific to Vamp's efforts and comments towards his code. Me personally I'm very interested in your changes because learning the AI subroutines is next on my list and this makes a good jumping off spot.
 
In respect to Vampire's work you should start your own thread for this as an add-on/refinement. Don't get me wrong, it's great to share and help but this thread should remain specific to Vamp's efforts and comments towards his code. Me personally I'm very interested in your changes because learning the AI subroutines is next on my list and this makes a good jumping off spot.

Ofc, you're right. I'll make new topic when needed, because I've already wrote all needs to get it working.
cheers
 
Last edited:
just wondering if how you added neg or pos humanity from killing ai to dzai ? really like this option

This is already included in the config.
DZMSMissHumanity = true/false to turn it on/off
DZMSCntHumanity = the number to increase their humanity.

Hello Vampire is me again with another question. Anyway on Mission AI attack a player in Eastside skin such as MVD_Soldier_MG/RUS_Commander/RUS_Soldier_GL/ ? or Eastside skins that are not done by epoch?

As long as the player is a Survivor they will be fired upon. It is not based on the skin, it is based on the player side.
Survivors can have East skins but will still be on the West side unless you modify it with a script.
 
I have a mission(s) where no AI are spawning. I looked in my RPT log and see the following:

_unit = _unitGroup createUnit [_aiskin, [(_position select >
11:34:45 Error position: <createUnit [_aiskin, [(_position select >
11:34:45 Error Type Any, expected String
11:34:45 File z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf, line 33
11:34:45 Error in expression <_fnc_selectRandom;


_unit = _unitGroup createUnit [_aiskin, [(_position select >
11:34:45 Error position: <createUnit [_aiskin, [(_position select >
11:34:45 Error Type Any, expected String
11:34:45 File z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf, line 33
11:34:46 [DZMS]: (DZMSUnitsMinor) 0 AI Spawned, 0 units in mission.
11:34:47 [DZMS]: (DZMSUnitsMinor) Waiting for 0/0 Units or Less to be Alive and a Player to be Near the Objective.


Could you help me why I am getting this?
 
If i wanted to have 1 static Ai location as well as the usual random locations could i add it to this code in the config file below eg cords for klen

// Array of static locations. X,Y,Z
DZMSStatLocs = [
[11502.6,11326.1,0],
[0,0,0]
];
 
I have a mission(s) where no AI are spawning. I looked in my RPT log and see the following:

_unit = _unitGroup createUnit [_aiskin, [(_position select >
11:34:45 Error position: <createUnit [_aiskin, [(_position select >
11:34:45 Error Type Any, expected String
11:34:45 File z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf, line 33
11:34:45 Error in expression <_fnc_selectRandom;

_unit = _unitGroup createUnit [_aiskin, [(_position select >
11:34:45 Error position: <createUnit [_aiskin, [(_position select >
11:34:45 Error Type Any, expected String
11:34:45 File z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf, line 33
11:34:46 [DZMS]: (DZMSUnitsMinor) 0 AI Spawned, 0 units in mission.
11:34:47 [DZMS]: (DZMSUnitsMinor) Waiting for 0/0 Units or Less to be Alive and a Player to be Near the Objective.


Could you help me why I am getting this?

i had this problem before, traced it back to Ai spawning with 0 as skill level, check your mission think its 1,2 or 3

eg
[[(_coords select 0) - 20, (_coords select 1) - 15,0],2,1,"DZMSUnitsMinor"] call DZMSAISpawn;

the "1"" is skill level make sure it isnt "0"
 
Back
Top