Simple AI Tutorial (no rMod or DayZ_Factions)

No im using this one https://github.com/dayzai/DayZBanditAI and im guessing its Buttface's. The script only came with whats in the zip.

I haven't made a thread for my AI addon, but can you message me with the DayZ version you're encountering issues with (ie: Chernarus, Lingor, etc), and any other relevant details? I'm a bit busy this week but I'll do what I can. Thanks.

The issue you messaged me with sounds like a wrong entry into the loot arrays so I'd like to know if it's something that affects all DayZ versions or a specific one.
 
Hey guys, I have been trying to get this to work on my server. I have yet to get the AI to spawn at all. I am on a dayz.st server. As of right it is just a plain ole Chenarus server.

Here is my mission.pbo I have edited. Would you guys mind double checking this for me? I am some one what new to this, but the instructions seem simple enough. Maybe I missed something.

Ty for the help!
 

Attachments

  • dayz_mission.pbo
    64.6 KB · Views: 6
Wrex,

Your spawn lines are missing most of the variables
Code:
_aispawn = [[6689.49,2623.59,0],160,8,4] execVM "units\add_unit_server.sqf";//Chernogorsk

You need to have the rest, like unitype,faction, skill, should look something like this
Code:
_aispawn = [[6876.0,11165.0,0],300,100,1,4,0,3,10,1,900] execVM "Scripts\add_unit_server.sqf"; // Devils Castle
 
Awesome good spot. I used a script from another guide that didn't have all those variables set up. They are spawning in now just fine, but they de-spawn as soon as they die now.

hmmmmm
 
Wrex,

I don't mind helping you out if you really want to run this version, but I would recommend checking out my forked version of this where many of the issues are resolved.

http://opendayz.net/threads/morox-ai-sycosis-simple-ai-mod.9354/

If you are talking about the AI vanishing the moment they are killed - the fix for this is to update your add_unit_server.sqf, find the lines that say MPKilled and replace it for Killed, find addMPEventHandler and replace it with addEventHandler.
 
Hi,
Just finished installing the files from https://github.com/dayzai/DayZBanditAI .
Started the server and the AI spawns just fine. But it seems that I have the same problem as Kiraorg.
"When I kill an AI then check his Gear the game crashes."
Don't know what map he's using, but I'm using Lingor on DayZ.st
Did you find what is causing this Buttface?

Lol after I logged in 3 times, the first bandit AI i killed was lootable. however no zombie spawns and no loot in buildings?
 
Hi,
Just finished installing the files from https://github.com/dayzai/DayZBanditAI .
Started the server and the AI spawns just fine. But it seems that I have the same problem as Kiraorg.
"When I kill an AI then check his Gear the game crashes."
Don't know what map he's using, but I'm using Lingor on DayZ.st
Did you find what is causing this Buttface?

Lol after I logged in 3 times, the first bandit AI i killed was lootable. however no zombie spawns and no loot in buildings?

Can you tell me which version of Lingor this problem happened with? I've tested with the Skaronator version, killed some AI, and I've never encountered crashes. I haven't playtested with zombies enabled so I never encountered the zombie problem, but if you want to try fixing the zombie issue, you can try commenting out the zombie_generate and wild_spawnZombies lines in dayz_ai_initialize.sqf. Side effect is that AI won't be hostile to zombies. You will also need to comment out the eventHandler responsible for causing zombie aggro.

I have verified that zombie spawns are functioning on Chernarus and Celle, so I'm not sure what is going on. The crashing on gear checking might be because you are using the non-Skaronator version (not sure if you are), as the config file for Lingor includes several new weapons exclusive to that version. If this is the case, try commenting out the four "DZAI_..." lines in lingor_config.sqf in the configs folder to remove weapons exclusive to Skaronator Lingor.

I'm planning on releasing the next version (0.04) this weekend so I would really like to get this fix in if it's fixable. However, if the Lingor problems aren't with the Skaronator version I'm afraid I won't be putting in fixes.

Edit: Confirmed that zombie spawns are working on Skaronator Lingor
Edit#2: Couldn't replicate crashing on gear check, will continue testing.
Edit#3: Killed 5 AI units but noticed no problems. Checking gear didn't cause crashing, zombies spawned, loot spawned in buildings.
 
The version of my server is: Arma: 103419 - Dayz: 2.0. and its a Taviana Map. The weird thing is, sometimes i can check gear (Very Rare) and other times i check gear of Npcs and the game crashes. Ive played with zombies enabled and disabled and still the crashes continue. Ive never had a problem with loot not spawning or no zombies spawning. The next test im going to have to do is a fresh install of the Npc mod without any of my other scripts.
 
One check in the Taviana config file told me why issues are happening - because I haven't reconfigured DZAI's weapon arrays for Taviana. So far, the config file only contains spawn trigger locations, so DZAI is pulling the default DayZ weapon data. I'm guessing the crashes are because the Taviana mod has banned or removed certain weapons from the original DayZ mod that DZAI is trying to spawn in.

Since there are (were?) two major DayZ Taviana versions I hadn't decided which one I would "officially" support, that's why there was little to no development for Taviana. But now, taking a quick look at DayZ Commander, it seems that the number of Taviana 2.0 servers far outnumbers 1.5.0 servers, so I'll be adding 2.0 support to DZAI sometime soon.

On another note, in the next version (0.04), DZAI will include untested support for multiple DayZ mods that use the same map. For example, if Lingor 1.3 shares the same basic code as original DayZ (as in weapons and skins), there should be no problem, while still supporting the added weapons in the Skaronator version.

Edit: It seems the issue is that Taviana 2.0 is horribly out of date compared to the current version of original DayZ. Looks like the fix just involves removing some items.

Last Edit: I've released version 0.04 on Github with all the fixes I've talked about and then some more. If zombies don't work with Lingor 1.3 then it means the mod uses out of date DayZ code and I recommend you switch to Skaronator Lingor instead.
 
Thank you I really appreciate the help!

I got every thing working except one thing. I made a 3rd case for the NPC gear. When ever I try to loot case 3 my ARMA crashes. Is It because they have guns that are not on the loot table for the server? I gave them g36c's and M40A3's

I would upload my PBO again but I cant seem to be able to use the attachment function again :/
 
// to add more gear sets, just add another case, and copy and paste the variables from one of the other cases into it, and then reference it in the init.
switch (_gearSet) do {
case 0 : {
_sniperSkin = "BAF_Soldier_L_DDPM";
_sniperRifle = "M24_des_EP1";
_sniperAmmo = "5Rnd_762x51_M24";
_sniperAmmoCount = 8;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_L_DDPM";
_gunnerRifle = "M4A1_AIM_CAMO";
_gunnerAmmo = "30Rnd_556x45_Stanag";
_gunnerAmmoCount = 4;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "BAF_Soldier_L_DDPM";
_militiaRifle = "M1014";
_militiaAmmo = "8Rnd_B_Beneli_74Slug";
_militiaAmmoCount = 5;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
case 1 : {
_sniperSkin = "BAF_Soldier_L_DDPM";
_sniperRifle = "LeeEnfield";
_sniperAmmo = "10x_303";
_sniperAmmoCount = 3;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_L_DDPM";
_gunnerRifle = "Winchester1866";
_gunnerAmmo = "15Rnd_W1866_Slug";
_gunnerAmmoCount = 3;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "BAF_Soldier_L_DDPM";
_militiaRifle = "revolver_EP1";
_militiaAmmo = "6Rnd_45ACP";
_militiaAmmoCount = 3;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
case 2 : {
_sniperSkin = "BAF_Soldier_L_DDPM";
_sniperRifle = "M40A3";
_sniperAmmo = "5Rnd_762x51_M24";
_sniperAmmoCount = 8;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_L_DDPM";
_gunnerRifle = "G36C";
_gunnerAmmo = "30Rnd_556x45_G36";
_gunnerAmmoCount = 4;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "BAF_Soldier_L_DDPM";
_militiaRifle = "FN_FAL";
_militiaAmmo = "FN_FAL_ANPVS4";
_militiaAmmoCount = 4;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
 
America,

I would recommend looking at my fixes to this mod which can be found here,

http://opendayz.net/threads/morox-ai-sycosis-simple-ai-mod.9354/

If you still want to use this one I can try to help out but most of the issues are already fixed in mine. To solve the vanishing AI problem is to update your add_unit_server.sqf, find the lines that say MPKilled and replace it for Killed, find addMPEventHandler and replace it with addEventHandler.

As far as making AI friendly, you set what faction they are in the spawn line, 0 is (sort of firendly) 1 is enemy and 2 is friendly. Then you can also adjust the settings in the set_unit_faction.sqf, .1 is hate and 1 is friendly.
 
Wrex,

Found your issue, in your Case 2 you Militia ammo is wrong, what you have listed there is a weapon not ammo it should read

Code:
_militiaAmmo = "20Rnd_762x51_FNFAL";
 
Wow lol. Thanks so much for the help! Wish I was better at debugging so I wouldn't have to post these simple mistakes :/

But I do certainly appreciate you!
 
Back
Top