DZAI Issues

Nemaconz

New Member
Good afternoon gents, I have been working the last 48 hours trying to get all of the bugs out of the DZAI mod on my server and am running into a few different issues. (I run a DayZ Overpoch server on Chernarus with all the latest updates)

First things first, I have the AI vic patrols, air patrols and static spawns working. The only problem listed from those three are that the AI in the vehicles will not dismount to engage players. At first I thought there might be an issue the side they are on but they are all set to east side. (on a side note I have disabled all other AI mods on my server to try and isolate my problems) If you shoot the vehicle to the point of explosion (this only takes a few bullets to do btw, I don't know what the deal is with the damage handler for vehicles and aircraft but a few bullets applied to any ground or air vehicle will destroy them with no problem, need to figure out how to resolve that as well) the AI will dismount and engage the player. So I assume this is an event handler issue, there is nothing in any of the vehicle scripts that tells the AI to "get out" when a player is detected that I can find.

Second, dynamic spawning of AI, it's simply not happening at all, I have set the parameter to true but not dynamic AI spawn at all anywhere on the server. Nothing in the report logs reveals any error, all it will tell me is the number of dynamic AI that are spawned, which is always zero. Anyone else having this issue?

Third, the static patrols almost act like they don't see me most of the time, now if I fire my gun into the air it will get their attention and they will open fire on me, but if I just walk right up to them and keep on going, they'll ignore me. Now the AI are set to east side, but at one point of them them said "hello" to me like he was resistance. Now I'm not new when it comes to this type of stuff, I have actually written my own custom AI script before, it wasn't even close to DZAI complexity but I understand how this is supposed to work. I changed the parameters for east and resistance groups by not allowing AI units to be switched to resistance units until 500 east units have been created, obviously I am not creating that many units so there should be no reason for these units to be spawning in as resistance. Is there any way to simply do away with the chance for resistance units, all of my efforts to get rid of it completely has thus far ended with the mod not working.

Thank you!

Regards,
Nemaconz
 
By default I thought DZAI was pretty aggressive. There is actually another thread going on right now with exactly the OPPOSITE problem you have where the AI are ruthless.
Its not so much the side as the 'orders' they are following. make sure they are set to combat mode RED.
https://community.bistudio.com/wiki/ArmA:_AI_Combat_Modes
And dont forget about their skill levels. You want them to notice you so set the skills higher so they DO notice and react sooner. I think DZAI was set pretty low by default, I always had all my AI skills in the .7 to .9 range and it worked well. The only thing I kept lower was the range (cant recall the exact variable off-hand) because I wanted the players to be able to spot them and get in position, run away or get the first shot off .. players hate to get ambushed all the time.
 
Yea I set all their skills to maximum across the board, everything is set to
Combatmode Red, they are all east side. These guys still won't get out of their vics to attack me, and if I delete their vic while they are in it so that they just appear as a group on the ground, they will totally ignore me unless I fire on them, then and ONLY then will they attack me back, and their skills are just as deadly as they should be. It's as if they are still under orders that are consistent with GREEN combat mode, but I have gone through every file in DZAI several times and have changed all combat modes to RED, so it's just boggling my mind at this point. The only thing that seems to be working properly is the aircraft, they will light you up if you are driving in a vic with deadly accuracy and aggression. Everything else is jacked up to one degree or another. I'm at a loss on this one, it makes no sense at all. Turning off all my other AI or leaving them on makes no difference. I remember once upon I time I used an earlier version of DZAI and didn't have any of these difficulties, the dynamic AI still would not spawn on the earlier one either but everything else worked like a charm. I wish I had the other threads problem, because I want these guys to be just as ruthlessly psychotic as my WAI missions.
 
The mysterious ways of Arma, it seems to do as it pleases regardless of instructions. For some reason, their waypoint is a higher priority than defense and it looks like you have all the possible issues covered so ... I dont have an answer. If the WAI is working well, why not use that exclusively?
I liked the SargeAI because it incorporated the UPSMON scripts http://dev.withsix.com/projects/upsmon/wiki which IMHO made the AI much more aggressive and realistic ..

BTW, I have almost your same issue on Arma3. I created a Deathmatch server and if the AI see you first then they will shoot to kill. But if you spot one standing around, you can shoot him and there is zero reaction and I mean ZERO. You can shoot them 2-3 times and they just stand there. So they are basically non-moving targets if they are looking the other way. And i am sure they would not get out of a vehicle either.
 
The vehicles issue is due to the general quirkiness of the Arma2 AI. 90% of the time I see the vehicle patrols properly engage upon spotting me and drive off when they've lost me. Sometimes not all of the non-driver AI disembark and I'm not sure what causes this. I let the Arma 2 AI decide when to board/unboard so this is not due to DZAI.

On damagehandlers: Land vehicles don't have any special damage handling other than preventing physics-related damage due to poor driving ability. Air vehicles are modified to self-destruct when Engine or Structural damage has reached >0.90 (0.90+ means destroyed in Arma terms) since AI air vehicles are unusually durable for some unexplained reason.

Dynamic spawns will be usually 0 since they're not supposed to be active 100% of the time. They're mostly intended to ambush players who are out in the middle of nowhere. If you're within 600m of any city/town/trader area or near water, dynamic spawns are cancelled. Try lowering the DZAI_maxSpawnTime value in dzai_config.sqf to make dynamic spawns more frequent. Your situation is odd because a vast majority of user feedback about the dynamic spawn system is that they're much too frequent.

Your third issue is the most strange one because it's something I've never encountered since I first created DZAI. If the AI are greeting you then it means that side relations have been modified to make East friendly to West. Try running DZAI as the only AI addon to see if something else was responsible for modifying side relations. If you're running Overpoch or Overwatch, some of their skins may have improperly set "sides" which make you friendly to the AI. Try using the default Survivor skin and see if the problem persists.

By the way, DZAI switches from East to Resistance only when 140 East groups (not units) have been created. This is because Arma 2 has a hardcoded max of ~147 groups per side and I chose to use 140 as a safe limit as no other AI addon (as far as I know) includes checks for this. By modifying this number to 500 you've only disabled the limiter, which can cause problems if your server reaches this limit.
 
Well the dynamic spawns are now working just fine, I've had to increase the time for a spawn chance to occur because the buggers spawn like crazy, I also increased the trigger distance so they don't always spawn so close to people. I have sorted the issue with the AI saying hi to you, so no problems there. The issue with the AI not dismounting persists, they almost never engage if they are patrolling in a military vic, every once in a blue moon I can get armored HUMVEE's to fire on me if I shoot at the back of the vehicle. I have tried every trick in the book to get this one sorted short of wiping my test server and starting from scratch.

One question I have, is how do I get the helos to engage players not in vehicles, they will never do it unless fired upon. Looking at this line from the heli_detectplayers.sqf

_detected = _detectOrigin nearEntities [["CAManBase","LandVehicle"],_detectRange];

is there another entry I should make to that array to have them target dismounted players? Or is CAManBase supposed to do that? Thanks again!!!
 
Just out of curiosity, you did not add an eventhandler for AI to "get out" when a player is detected correct? You let ARMA make that call? Because vehicle AI act like they are resistance, even with all AI disabled, and only DZAI vic AI active on the server, they still will not do anything, they will get out when the vic gets destroyed, and if you destroyed it they will attack you, if you didn't destroy it and they get out they will ignore you, and only sometimes fire at you if you shoot one of them, sometimes they will just keep ignoring you no many how many of them you kill. Blows my mind.
 
AI air vehicles just don't seem to detect players on foot, it's likely due to the Arma-set visibility values for man type units. The detection script is only run when the air vehicle reaches its waypoint and it does detect all man and land vehicle types. Air vehicles are already easily detected by the default AI.

I did not add any special get-out event handlers for land vehicles. The whole land vehicle system was created using parts of WAI as a code base then heavily modified and upgraded. Land vehicle patrols are the most recent major addition to DZAI so weird behavior is expected.
 
What file do I need to edit to change the number of Dynamic and Static AI spawns? I can find where the variables are defined for the arrays, but I cannot actually find an array where I can set the min and max spawn, I know the triggers make that decision but I know there has to be something that defines it such as _totalai = ((1+(random 2) or something to that affect. The maximum number of ai that spawn never exceeds three and I'd like to bump that up a bit. Thanks again!
 
Static spawns:

This will depend on which map you're using, because DZAI is currently stuck in the middle of a formatting change so some maps use the "old" format while some use the "new" format. I'll discuss the new format but the old format works basically the same way.

In your world_spawn_configs folder, you'll see many .sqf files named world_(mapname). Each of those files contains static spawn configs for each map they're named after.

The general "new" format:

Code:
["DZAI_Kamenka",[0,1],[],0] call DZAI_static_spawn;
["DZAI_Kamenka",[0,1],[],0] call DZAI_static_spawn;

The [0,1] part is what controls the amount of AI that spawn. It means there's a guaranteed minimum of 0 (zero) units and a maximum potential of 1 unit. Matching to your example, it would be (0 + (random 1)). A few spawns may have an extra number at the end (usually a 2), which specifies the number of groups to spawn - it's basically a multiplier value. Most spawns don't have this extra value so for the most part, don't worry about it.

Dynamic spawns:

First, a warning, be extremely careful about dynamic AI since it can be incredibly un-fun to have a small army homing in your position in the middle of nowhere, so don't go nuts with increasing AI group sizes here. The file you're looking for is in spawn_functions\spawnBandits_dynamic.sqf, look for the comment "//Calculate group weapongrade and spawn units" and that area will be self-explanatory.
 
My AI are acting strangly, never had problem before with them, the static ae fine but the air and land vehicle damn they don't even attack anymore.
Air vehicle fly all around and will attack sometime but very rarely, the land vehicle if you are close to them they get out of the vehicle and shoot you. Strange cause I didn't touch the file for months.
 
Back
Top