Ai attacking traders

BetterDeadThanZed

Valued Member!
Although I have the "final" version of DZAI, which supposedly fixed the problem of AI attacking the traders, they are still attacking the traders according to my players.
 
I've been testing them in my server and if you have free-for-all enabled they pretty much try to kill anything that they see. It's made for some epic battles with the random patrols engaging the WAI patrols and the three different chopper spawns (WAI, DZAI, enhanced chopper crash script) shooting at each other. Overall it's something I can live with if they zero in on a trader now and again.
 
A quick list of questions:

  • What map are you running?
  • Have you modified any trader-related Epoch files (ie: Locations of trader units or markers for trader areas)
DZAI checks the area around 250m around each marker that DayZ Epoch places on the map for any traders then forces them to be friendly to all sides. If you've changed the name of a marker, made any new markers, made any new trader locations, then some traders may not be found by DZAI.

When I was testing this fix for Napf the difference was clear as night and day. I was testing north at AWOL's Airfield where there is one exposed trader with clear line-of-sight to a nearby AI spawn. Without the fix, the area would sound like a war zone as the trader would be constantly shot by AI, my character would be completely ignored as well. With the fix, the trader was never touched.

You can try to fix this by yourself by comparing two files: DZAI/scripts/setup_trader_areas.sqf and your mission sqm file. Relevant files for Chernarus:

https://github.com/vbawol/DayZ-Epoch/blob/master/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqm
https://github.com/dayzai/DZAI/blob/master/DZAI/scripts/setup_trader_areas.sqf

In the mission.sqm, all trader-related marker names should be in the appropriate case statement in setup_trader_areas.sqf. These areas are what DZAI recognizes as "trader areas". In the above example, the name of the Stary trader marker is defined in mission.sqm by:

Code:
name="Tradercitystary";

You will find "Tradercitystary" in the case statement for Chernarus in setup_trader_areas.sqf.
 
I'm running Napf. The only change I made to the traders was making the bandit trader a hero trader but I didn't change his name. The trader at AWOL's airfield is the one people are telling me is being attacked. He's inside of a building so I'm not sure why they even see him.
 
That's probably the root cause because I had tied in the fixes to the dynamic spawn blacklisting. Give me a few minutes to test my quick fix.
 
Back
Top