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

I just get a loading screen, do i add the code including this if (isServer) then { or just below it? Because i just added it below it and it didnt work
Have you changed the worldspace entries for tavi ? Locations are different..

Edit: sodding phone :)
 
Sweet it seems to be working, now what do i need to change so that they will attack players... i jumped in game and stood right in front of one of them and shot them... also when the guy died he had a radio on him :/
 
Sweet it seems to be working, now what do i need to change so that they will attack players... i jumped in game and stood right in front of one of them and shot them... also when the guy died he had a radio on him :/
You can change the 'relationships' in the addon dayZ Factions file. Essentially changing sides will decide their friendliness. I have had some strange results from this, possibly related to my bus service, but spawning a group (by a server admin) caused them to randomly attack a nearby player, resulting in both of their demise.. Generally it is reliable though..
 
which values do i change in there to have them attack players? right now i just have the "default" settings. also i read somewhere but cant find it now.. that u need to change the distance at which they engage at?
 
which values do i change in there to have them attack players? right now i just have the "default" settings. also i read somewhere but cant find it now.. that u need to change the distance at which they engage at?
Check out the links at the end of the first post, sides covered there.. The available settings are explained in the setup. Anything further may be covered by Sycosis's tutorial or by editing the code..
 
Is there a way to have the monitor record the bandit kills like it does with zombies and head shots?

You can get survivor and bandit kills from the survivors profile, in profile table.. Assuming you mean a debug monitor ?
 
You can get survivor and bandit kills from the survivors profile, in profile table.. Assuming you mean a debug monitor ?
yeah the debug monitor that shows the zombie kills head shot bandit and hero kills and humanity so would i change that in the database? I am using DayzCC by the way and hosting the server my self on my PC at home not using Dayz.st as this is just for me and a few friends to play around on.
 
I have not seen the information here, so I share how to add backpacks.
Change the code for your needs.
Code:
                private["_rndBp","_aiBpAdd"];
                _aiunit addBackpack "DZ_ALICE_Pack_EP1";
                    for [{ b=1 },{ b < 10 },{ b = b + 1; }] do
                    {
                        _rndBp=floor(random 13);
                        _aiBpAdd=
                        switch (_rndBp) do
                        {
                          case 0: {"17Rnd_9x19_glock17"};
                          case 1: {"6Rnd_45ACP"};
                          case 2: {"8Rnd_9x18_Makarov"};
                          case 3: {"7Rnd_45ACP_1911"};
                          case 4: {"8Rnd_B_Beneli_Pellets"};
                          case 5: {"15Rnd_9x19_M9SD"};
                          case 6: {"HandChemGreen"};
                          case 7: {"HandChemBlue"};
                          case 8: {"HandChemRed"};
                          case 9: {"TrapBear"};
                          case 10: {"ItemWire"};
                          case 11: {"ItemSandbag"};
                          case 12: {"HandRoadFlare"};
                     
                        };
                    unitBackpack _aiunit addMagazineCargo [_aiBpAdd,1];
                    diag_log format ["AIUNIT: Add to backpack:%1",_aiBpAdd];
                    };
This is my joke xample, for one badass bot.
Code:
_aiunit addBackpack "DZ_Backpack_EP1";
                    unitBackpack _aiunit addMagazineCargo ["PipeBomb",2];
                    unitBackpack _aiunit addweaponCargo ["M32_EP1",1];
                    unitBackpack _aiunit addMagazineCargo ["6Rnd_FlareWhite_M203",2];
                    unitBackpack _aiunit addMagazineCargo ["6Rnd_FlareRed_M203",2];
                    unitBackpack _aiunit addMagazineCargo ["6Rnd_HE_M203",2];
 
Code:
16:39:56  Error addweapon: Type Array, expected String
16:39:56 File mpmissions\__cur_mp.chernarus\units\add_unit_server.sqf, line 46
16:39:56 "AIUNIT: Spawn initiated: Centre:[2778.32,5337.06,0] | Radius in m:400 | Waypoint number:8"
16:39:56 "AIUNIT: Creating BAF_Soldier_L_DDPM by <NULL-object> at [2779.32,5338.06,0]. Result:R 1-1-G:1 | Loadout:[["ItemGPS","ItemMap","ItemCompass","ItemWatch","ItemRadio","PK","RPG7V","ItemFlashlight"],["100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","PG7V","PG7V","PG7V"]] / Num:2"
16:39:56 Error in expression <
_aiammo = _ailoadout select 1;
_aiunit addweapon _aiwep;
_aiunit addMagazine _a>
16:39:56  Error position: <addweapon _aiwep;
_aiunit addMagazine _a>
16:39:56  Error addweapon: Type Array, expected String
16:39:56 File mpmissions\__cur_mp.chernarus\units\add_unit_server.sqf, line 46

What must i fix ?

Here ist the Line 41 until 54

Code:
    //clear default weapons / ammo
    removeAllWeapons _aiunit;
    //add random selection
    _aiwep = _ailoadout select 0;
    _aiammo = _ailoadout select 1;
    _aiunit addweapon _aiwep;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
    _aiunit addMagazine _aiammo;
 
Right, my fault. never use it.
But 2 slots multiplied 8 times.
And there seems to be an array within an array
Loadout:
[["ItemGPS","ItemMap","ItemCompass","ItemWatch","ItemRadio","PK","RPG7V","ItemFlashlight"]
,["100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","PG7V","PG7V","PG7V"]]
.......
sorry, nead to see all of your code.
 
Why does this not work, they only spawn with primary weapon
Code:
    _rndLOut=floor(random 28);
    _ailoadout=
    switch (_rndLOut) do
    {
      case 0: {["DMR","20Rnd_762x51_DMR"]};
      case 1: {["M24","5Rnd_762x51_M24"]};
      case 2: {["SVD_CAMO","10Rnd_762x54_SVD"]};
      case 3: {["M40A3","5Rnd_762x51_M24"]};
      case 4: {["M249_DZ","200Rnd_556x45_M249"]};
      case 5: {["M240","100Rnd_762x51_M240"]};
      case 6: {["Mk_48_DZ","100Rnd_762x51_M240"]};
      case 7: {["Sa58V_EP1","30Rnd_762x39_SA58"]};
      case 8: {["BAF_L85A2_RIS_Holo","30Rnd_556x45_Stanag"]};
      case 9: {["G36C","30Rnd_556x45_G36"]};
      case 10: {["M4A1_HWS_GL_camo","30Rnd_556x45_Stanag"]};
      case 11: {["M16A4_ACG","30Rnd_556x45_Stanag"]};
      case 12: {["G36A_camo","30Rnd_556x45_G36"]};
      case 13: {["AK_47_M","30Rnd_762x39_AK47"]};
      case 14: {["M16A2","30Rnd_556x45_Stanag"]};
      case 15: {["FN_FAL","20Rnd_762x51_FNFAL"]};
      case 16: {["M4A1","30Rnd_556x45_Stanag"]};
      case 17: {["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"]};
      case 18: {["G36K_camo","30Rnd_556x45_G36"]};
      case 19: {["AK_47_S","30Rnd_762x39_AK47"]};
      case 20: {["VSS_Vintorez","20Rnd_9x39_SP5_VSS"]};
      case 21: {["RPK_74","75Rnd_545x39_RPK"]};
      case 22: {["PK","100Rnd_762x54_PK"]};
      case 23: {["SVD","10Rnd_762x54_SVD"]};
      case 24: {["AK_107_Kobra","30Rnd_545x39_AK"]};
      case 25: {["ksvk","5Rnd_127x108_KSVK"]};
      case 26: {["BAF_LRR_scoped_W","5Rnd_86x70_L115A1"]};
      case 27: {["M4SPR","30Rnd_556x45_Stanag"]};
       
      default {["ItemMap"]};
    };
   
    //Generate what the sidearm and ammo will be
    _rndLOut=floor(random 3);
    _aiside=
    switch (_rndLOut) do
    {
      case 0: {["UZI_EP1","15Rnd_9x19_M9"]};
      case 1: {["MakarovSD","8Rnd_9x18_MakarovSD"]};
      case 2: {["UZI_SD_EP1","30Rnd_9x19_UZI_SD"]};
    };
 
    //Generate what the equipment will be - it's likely to be antibiotics, but maybe.... :)
    _rndLOut=floor(random 17);
    _aiequipspawn=
    switch (_rndLOut) do
    {
      case 0: {["Binocular_Vector"]};
      case 1: {["ItemGPS"]};
      case 2: {["NVGoggles"]};
      case 3: {["Binocular"]};
    };
 
Back
Top