DZAI 2.1.0 (Full Release Version) is now available

Buttface

OpenDayZ Rockstar!
The current Github version of DZAI is now updated to version 2.1.0 here: https://github.com/dayzai/DZAI

A (mostly) copy-and paste of some important points from the pre-release announcement:

Q: I'm currently running an older version of DZAI. What do I need to know before I upgrade?
A: I highly recommend you remove your current installation of DZAI and reinstall from scratch. The instructions for installing DZAI have changed slightly (you just need an extra [] before the call compile line). I highly discourage users from reusing old DZAI files due to the large amount of changes. This includes all config files.

Q: Where is the changelog for 2.1.0?
A: You can find the changelog for 2.1.0 by following this link.

Q: I have a pre-release build of 2.1.0 installed, do I still need to reinstall?
A: If you have pre-release build 6 then you don't need to re-install. If you have an earlier pre-release build or are unsure what build you have, reinstall with the most updated version from Github.

Q: Where did the global_classnames.sqf file go?
A: It's been merged with dzai_config.sqf

Q: Where did the dzai_settings_override.sqf file go?
A: It has been removed and is now only used for dev purposes.

Q: What are the custom spawn functions?
A:
  • DZAI_spawn (custom spawn function) has been renamed to DZAI_spawn_units
  • DZAI_spawn_vehicle (custom vehicle AI spawn function) has been added
  • Further instructions are provided in custom spawn config files
Q: What goes inside the square brackets [] in the call for dzai_initserver.sqf?
A:

Optional startup parameters may be inserted in the call for dzai_initserver.sqf: "readoverridefile" and
"enabledebugmarkers"
  • For example:
    Code:
    ["readoverridefile"] call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf";
  • The readoverridefile startup parameter will let DZAI read from a file named dzai_settings_override.sqf placed directly inside the DZAI folder. This is a file used for development and may not be relevant to regular users
  • The enabledebugmarkers startup parameter will allow DZAI to create debug markers indicating the positions of AI units and active spawn locations. This is meant for debugging and development purposes only. I won't respond (helpfully) to requests to adapt this feature for everyday non-development/debugging use.
 
A small correction is needed for spawnBandits_custom.sqf to fix an issue with despawning custom AI groups. Replace your entire spawnBandits_custom.sqf (located in the spawn_functions folder) with this:

Code:
/*
    spawnBandits_custom
   
    Usage:
   
    Description: DZAI custom spawn function (DZAI_spawn).
   
    Last updated: 6:00 PM 10/24/2013
*/

private ["_patrolDist","_trigger","_grpArray","_triggerPos","_equipType","_weapongrade","_totalAI","_startTime","_tMarker","_unitGroup","_spawnPos","_totalAI"];
if (!isServer) exitWith {};

_startTime = diag_tickTime;

_totalAI = _this select 0;                                   
//_this select 1;
_patrolDist = _this select 2;                               
_trigger = _this select 3;                                   
_weapongrade = _this select 4;
//_spawnMarker = _this select 5;

_grpArray = _trigger getVariable ["GroupArray",[]];   
if (count _grpArray > 0) exitWith {if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Active groups found at %1. Exiting spawn script (spawnBandits)",(triggerText _trigger)];};};                       

_trigger setTriggerArea [750,750,0,false];
_triggerPos = ASLtoATL getPosASL _trigger;

if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: Processed static trigger spawn data in %1 seconds (spawnBandits).",(diag_tickTime - _startTime)];};

_startTime = diag_tickTime;

if !(_trigger getVariable ["respawn",true]) then {
    _maxUnits = _trigger getVariable ["maxUnits",[0,0]];
    _totalAINew = (_maxUnits select 0);
    if (_totalAINew > 0) then {_totalAI = _totalAINew};    //Retrieve AI amount if it was updated from initial value (for non-respawning custom spawns only)
};
_spawnPos = [(ASLtoATL getPosASL _trigger),random (_patrolDist),random(360),false] call SHK_pos;
_unitGroup = [_totalAI,grpNull,_spawnPos,_trigger,_weapongrade] call DZAI_setup_AI;

//Set group variables
_unitGroup setVariable ["unitType","static"];
_unitGroup allowFleeing 0;

if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Group %1 has group size %2.",_unitGroup,_totalAI];};

if (_patrolDist > 1) then {
    0 = [_unitGroup,_triggerPos,_patrolDist] spawn DZAI_BIN_taskPatrol;
} else {
    [_unitGroup, 0] setWaypointType "HOLD";
    _unitGroup setFormDir (random 360);
};

if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: Spawned a group of %1 units in %2 seconds at %3 (spawnBandits).",_totalAI,(diag_tickTime - _startTime),(triggerText _trigger)];};

_equipType = if (_weapongrade in DZAI_weaponGrades) then {(_weapongrade max 0)} else {3};

_triggerStatements = (triggerStatements _trigger);
if (!(_trigger getVariable ["initialized",false])) then {
    0 = [_trigger,[_unitGroup],_patrolDist,_equipType,[],[_totalAI,0]] call DZAI_setTrigVars;
    _trigger setVariable ["triggerStatements",+_triggerStatements];
} else {
    _trigger setVariable ["isCleaning",false];
    _trigger setVariable ["maxUnits",[_totalAI,0]];
    if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Trigger group array updated to: %1.",_grpArray]};
};
_triggerStatements set [1,""];
_trigger setTriggerStatements _triggerStatements;
_trigger call DZAI_updStaticSpawnCount;

if ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled}) then {
    _nul = [_trigger] spawn DZAI_updateSpawnMarker;
};

_unitGroup
 
Back
Top