dayZ NPC (AI) Units / Troops | Add to Server.

Not sure what SR #8 is but looking aat your world locations it seems you are using the same as the chernarua map. I think that might spawn some ai in the oceans in taviana. Could this be causing the SR #8?
I did set my own locations, for test purpose
 
hey biomisten where are you thinking of setting up the spawns on taviana i was thinking of doing them around martin but what coordinates would i need to put in to do this.

Cheers
 
The only difference in code between you and me is i omitted the red parts.
/*
IMPORTANT STUFF STARTS HERE:
*/
_dayzFactions = [] execVM "Dayz_Factions\init.sqf";
//diag_log format["Dayz Factions executed: %1",_dayzFactions];
//Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units]
_aispawn = [[6689.49,2623.59,0],160,8,4] execVM "units\add_unit_server.sqf";//Chernogorsk
_aispawn = [[7622.51,7912.7,0],5000,20,6] execVM "units\add_unit_server.sqf";//Chernaurs (Whole map)
_aispawn = [[7625.51,7915.7,0],5000,20,6] execVM "units\add_unit_server.sqf";//Chernaurs (Whole map)
_aispawn = [[4598.66,10197.7,0],650,12,4] execVM "units\add_unit_server.sqf";//NW Airfield
_aispawn = [[10447.5,2246.96,0],180,3,3] execVM "units\add_unit_server.sqf";//Electrozavodsk
_aispawn = [[13253.3,6406.53,0],180,4,3] execVM "units\add_unit_server.sqf";//Solnichniy
/*
IMPORTANT STUFF ENDS HERE
*/
};
 
hey biomisten where are you thinking of setting up the spawns on taviana i was thinking of doing them around martin but what coordinates would i need to put in to do this.

Cheers
I have them at Martin and the racetrack rest of them random
Middle of martin [0,[16485.23,14424.41,0]]
 
Looking forward to deploy it on my server. However, can anyone help me out what weapons are they carry, is it lootable - and are they "hardcore" against survivors - I mean, are they gonna open fire automatically if they spot a survivor?

Thanks in advance!
The weapons are chosen at random, for each unit, from three options, if you look at lines #21-#23
Code:
 switch (_rndLOut) do
    {
      case 0: {["AK_47_M","30Rnd_762x39_AK47"]};
      case 1: {["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"]};
      case 2: {["Remington870_lamp","8Rnd_B_Beneli_74Slug"]};
    };
You can change the weapon and the ammo in there. If you want to give them more ammo (grenades for example) just add another addMagazine line further down (with the rest)
Code:
_aiunit addMagazine "<magazine class name in here>";

Unit Skill: Currently the units' skill is set to 1 for everything, these should probably be edited, try these
Code:
 _aiunit setSkill ["aimingAccuracy",1];
    _aiunit setSkill ["aimingShake",0.9];
    _aiunit setSkill ["aimingSpeed",1];
    _aiunit setSkill ["endurance",1];
    _aiunit setSkill ["spotDistance",0.6];
    _aiunit setSkill ["spotTime",0.8];
    _aiunit setSkill ["courage",0.9];
    _aiunit setSkill ["reloadSpeed",1];
    _aiunit setSkill ["commanding",1];
    _aiunit setSkill ["general",1];
and experiment. Also the setBehaviour will be important, have been considering setting that to CARELESS info combatModes and setBehaviour

Friend or Foe: As kain6699 has found you can get the units to shoot at survivors by changing the setFriend values in the Dayz_Factions\init.sqf. Any value below 0.6 will be an enemy so you could probably make it that and they won't pursue your survivors as much as the zeds, again worth experimenting with: setFriend

As for getting them to re-spawn after death I would think that some form of eventhandler will need attaching to the unit that triggers a new .sqf when he dies. Could carry all the info across so a clone of the unit was respawned. Will have a look into it later.
 
The only difference in code between you and me is i omitted the red parts.
/*
IMPORTANT STUFF STARTS HERE:
*/
_dayzFactions = [] execVM "Dayz_Factions\init.sqf";
//diag_log format["Dayz Factions executed: %1",_dayzFactions];
//Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units]
_aispawn = [[6689.49,2623.59,0],160,8,4] execVM "units\add_unit_server.sqf";//Chernogorsk
_aispawn = [[7622.51,7912.7,0],5000,20,6] execVM "units\add_unit_server.sqf";//Chernaurs (Whole map)
_aispawn = [[7625.51,7915.7,0],5000,20,6] execVM "units\add_unit_server.sqf";//Chernaurs (Whole map)
_aispawn = [[4598.66,10197.7,0],650,12,4] execVM "units\add_unit_server.sqf";//NW Airfield
_aispawn = [[10447.5,2246.96,0],180,3,3] execVM "units\add_unit_server.sqf";//Electrozavodsk
_aispawn = [[13253.3,6406.53,0],180,4,3] execVM "units\add_unit_server.sqf";//Solnichniy
/*
IMPORTANT STUFF ENDS HERE
*/
};
They are just comments, won't effect the working of the code.
 
Have you got any entries in your .rpt log file, should have AIUNIT: etc. If not the code isn't running, have you packaged it into your mission .pbo ?
Yep, i pack my mission files, couldnt find ''AIUNIT'' in my .rpt
i could try with the mission file again and see.
EDIT Yes i can see it now
 
Yep, i pack my mission files, couldnt find ''AIUNIT'' in my .rpt
i could try with the mission file again and see.
EDIT Yes i can see it now
You got AI units running around somewhere then, spawn yourself on the starting worldspace, they don't move too fast and make a noise. I deliberately added the shotgun with a torch, you can see them for miles at night..
 
ok cool you wouldnt happen to have the line for the martin base handy as not sure of the coordinates setup required

Cheers
Go to the spot in game then find your entry in the survivor table of mysql, use the worldspace from that. As mentioned, take out the zero at the start, you only need X and Y, can set Z to zero..
 
Got it working :)
BUT getting kicked for SR #8
Changed line 8 in scripts.txt to 5 (addResources) logged in as a survivor, declared war between me and them, killed like 2-4. got kicked again #8
Have you fixed this ? Seems strange as server is doing the work (i may be wrong). Mine have run ok, I may have changed some kick options to log. I wish BE provided a way to globally allow a .sqf file..
 
Can you email me your scripts.txt and latest .rpt log file, ideally ones when you are trying to run the script.
 
Back
Top