Anybody had any success with Chernarus AI boat patrols?

Benj

New Member
I've been trying to get good AI to patrol just off the coast of chernarus in RHIBs but can't seem to get anywhere with it using DZAI.
Anybody else done this and can point me in the right direction?
 
According to the .rpt they are spawning but then there is no sign of them... I think they're spawning at the bottom of the sea and drowning lol also think I've found the RHIBs (4 of them, which is how many I set to spawn) but no AI in them? :)
 
According to the .rpt they are spawning but then there is no sign of them... I think they're spawning at the bottom of the sea and drowning lol also think I've found the RHIBs (4 of them, which is how many I set to spawn) but no AI in them? :)
i would spawn them in near the shore (otmel is good as it has shallow areas) and see if the AI spawn near the RHIBs

not sure how DZAI spawns the vehicles and attaches the AI but im guessing the AI spawn near the vehicle then enter it so your diagnoses of them spawning at the bottom of the ocean seems right ,arma hates spawning things above water :p

(someone please correct me if im wrong!)
 
i spawned in static ai with a boat on the shore. gave them getinnearest waypoint and they took off in the boat. if you want custom ai, use custom ai scripts instead if the generic ambiance created by dzai et al.

you could also use the movin commands to assign driver and gunner.
 
I've looked at the DZAI code quite a bit as well as normal Arma 2 stuff. When you spawn a group, vehicle, units, you have a very short time to add the units to the group and shove them in the vehicle.

In DZAI's case they are forcing the units into the vehicle versuse waiting of them to get in, so i doubt they are drowning.

However, it might be that the positions in a boat are different from other vehicles and it is having issues.
 
Any idea how I'd test for this or how I'd solve it? think a custom AI script may be a bit out of my reach... Better to use something where most of the work has been done lol ;)
 
Any idea how I'd test for this or how I'd solve it? think a custom AI script may be a bit out of my reach... Better to use something where most of the work has been done lol ;)
you could add map markers to the spawned units so you can see where they are being spawned
 
Simple answer is that DZAI doesn't support any type of water vehicle type. If you're adding them in as land vehicles, DZAI will only search for non-water positions, if you're adding them as air vehicles, they will spawn 100m+ in the air. Not sure if there is an Arma 2 config category dedicated to water vehicles, if there is, you can add a special conditional check in the vehicle spawning .sqf to force water positions if the vehicle is a boat/ship/etc.
 
OK So in DZAI go to spawn_functions\spawnVehicleCustom.sqf

I would suggest maybe trying something like:
Add "_isWaterVehicle" Under Private = [........

Then add
_isWaterVehicle = (_vehicleType isKindOf "Water"); (you can also do an array inplace of "Water" if you want a specific type)

Under
_isAirVehicle = (_vehicleType isKindOf "Air");

The use something like
Code:
if (_isWaterVehicle) then {
    _roadSearching = 0;    //No need to search for road positions for water vehicles
    _waterPosAllowed = 1; //Allow water position for water vehicles
    _spawnMode = "SHORE"; //set spawn mode for Water vehicles
    _vehSpawnPos set [2,1]; //spawn air vehicles in air
    _markerPos set [2,150]; //set marker height in air
    if (_maxCargoUnits != 0) then {_maxCargoUnits = 0}; //disable cargo units for air vehicles
};

I am also note sure (pun intended) if you need to change this:
_vehicle setPos _vehSpawnPos;
to this:
_vehicle setPosASL _vehSpawnPos;

To make sure that it spawns above sea level, other wise setPos will drop the vehicle 1 meter ( _vehSpawnPos set [2,1]; ) above the terrain level, which will more than likely be underwater, I think.

I also think line 37:
if (({isPlayer _x} count (_vehSpawnPos nearEntities [["CAManBase","Land","Air"],300])) == 0) then {
Would need to be changed to be:
if (({isPlayer _x} count (_vehSpawnPos nearEntities [["CAManBase","Land","Air", "water"],300])) == 0) then {

I think this would atleast allow the vehicles to be setup if called from a mission. I guess if you then want to extend this to also include the heli and land patrols that happen if set then you would have to make simular additions to the patrol scripts and DZAI config. I'm interested in this too now. lol

Please note, this is not tested just what i thought of looking at it here.
 
Then add
_isWaterVehicle = (_vehicleType isKindOf "Water"); (you can also do an array inplace of "Water" if you want a specific type)
i looked into the cfgvehicles configreference and it has to be:

_vehicleType isKindOf "Ship"

Also change :
Code:
_spawnMode = "SHORE"; //set spawn mode for Water vehicles
only Options for that are "NONE", "FLY", "FORM" and "CAN_COLLIDE"
_spawnMode = "NONE"
should be good

It also can create conflicts with the waypoint search, they have to be in water too, else they will be on land, and the AI can't find any route to them, or leave the boat behind on the shore.

ps.: i believe you have to create a marker for the sea, else the boat can spawn in every little pond
_marker = _this select 0;
 
Last edited:
2014-10-24_00001.jpg

Erm... ok o_O
 
i started a trial, but i have no way to test it. maybe someone want to?
look here:
https://github.com/rockeumel/DZAI

it exist a section for seapatrols in the config now

ps.: it's a trial and untested, so it can be that a few things are not perfect, or give failure in the rpt

EDIT: Issue Tracker is now activ, if you find any bug, please create an issue on github or write here in the Thread :D
https://github.com/rockeumel/DZAI/issues
 
Last edited:
Tested and no vehicle patrols spawning at all and getting this in .rpt
Code:
14:32:05 "[DZAI] Initializing DZAI version 2.1.3 Release Build 09272014 using base path z\addons\dayz_server\DZAI."
14:32:05 "[DZAI] Reading DZAI configuration file."
14:32:05 "[DZAI] DZAI configuration file loaded."
14:32:05 "[DZAI] Compiling DZAI functions."
14:32:05 Error in expression <60),2] call SHK_pos;
_vehSpawnPos = set [2,0];
_spawnMode = "NONE";
};

_maxGunn>
14:32:05 Error position: <[2,0];
_spawnMode = "NONE";
};

_maxGunn>
14:32:05 Error Missing ;
14:32:05 File z\addons\dayz_server\DZAI\spawn_functions\spawnVehiclePatrol.sqf, line 31
14:32:05 Error in expression <60),2] call SHK_pos;
_vehSpawnPos = set [2,0];
_spawnMode = "NONE";
};

_maxGunn>
14:32:05 Error position: <[2,0];
_spawnMode = "NONE";
};

_maxGunn>
14:32:05 Error Missing ;
14:32:05 File z\addons\dayz_server\DZAI\spawn_functions\spawnVehiclePatrol.sqf, line 31
14:32:05 "[DZAI] DZAI functions compiled."
14:32:05 "[DZAI] Epoch classnames loaded."
14:32:05 "[DZAI] DZAI settings: Debug Level: 0. DebugMarkers: false. WorldName: chernarus. ModName: epoch (Ver: 1.0.5.1). DZAI_dynamicWeaponList: true. VerifyTables: true."
14:32:05 "[DZAI] AI spawn settings: Static: true. Dynamic: true. Air: true. Land: true."
14:32:05 "[DZAI] AI settings: DZAI_findKiller: true. DZAI_useHealthSystem: true. DZAI_weaponNoise: true. DZAI_zombieEnemy: true."
14:32:05 "[DZAI] DZAI loading completed in 0.341995 seconds."
14:32:05 Error in expression <dCamps = [3, "center", 4500, 2000] call fn_bases;
dayzInfectedCamps = Server_Inf>
14:32:05 Error position: <fn_bases;
dayzInfectedCamps = Server_Inf>
14:32:05 Error Undefined variable in expression: fn_bases
14:32:05 File z\addons\dayz_server\system\server_monitor.sqf, line 403
14:32:05 Error in expression < > 0) or {(DZAI_maxLandPatrols > 0)} or ){(DZAI_maxSeaPatrols > 0)} then {
_nul >
14:32:05 Error position: <){(DZAI_maxSeaPatrols > 0)} then {
_nul >

any ideas anyone? :D
 
Back
Top