Jump to content

[RELEASE] DZAI [Updated for 1.0.7]


Relentless

Recommended Posts

Im looking for instruction on how to add custom loot crates to static AI spawns. I have an AI base with about 50 AI and would love to add 2-3 custom loot crates to the area. Can anyone please supply me with so instruction on how to go about this? Any help will be appreciated. 

Link to comment
Share on other sites

2 hours ago, Cyrus said:

Im looking for instruction on how to add custom loot crates to static AI spawns. I have an AI base with about 50 AI and would love to add 2-3 custom loot crates to the area. Can anyone please supply me with so instruction on how to go about this? Any help will be appreciated. 

I wouldn't add this to DZAI tbh. Easier would be to write an external script to create a crate at the location you want (probably somewhere at your static mission). In this script you can also define some item arrays, then you select one of these arrays with the BIS random function and fill the crate with these items, that's it. With that, you should have different loot inside the crate each restart. I would take a peek into WAI's crate spawning, this helps a lot to understand how it's done.

Link to comment
Share on other sites

  • 1 month later...

Periodically, an error occurs in the server RPT:

17:08:14 Error in expression <log format ["error DZAI _isArmed = %1", _isArmed];
_antistuckPos = (getWPPos [_u>
17:08:14   Error position: <_isArmed];
_antistuckPos = (getWPPos [_u>
17:08:14   Error Undefined variable in expression: _isarmed
17:08:14 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 19

Who knows why?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

I'm using this version of the DZAI on epoch 1.0.6.2 and i've many errors like this in my rpt:

3:01:19   Error position: <_ret>
 3:01:19   Error Undefined variable in expression: _ret
 3:01:19 File z\addons\dayz_server\DZAI\compile\fn_selectRandom.sqf, line 22
 3:01:19 Error in expression <ypointPosition [_unitGroup,0]) distance _wpSelect) > 300) then {
_tooClose = fal>
 3:01:19   Error position: <_wpSelect) > 300) then {
_tooClose = fal>
 3:01:19   Error Undefined variable in expression: _wpselect
 3:01:19 File z\addons\dayz_server\DZAI\compile\heli_randompatrol.sqf, line 7
 3:01:19 Error in expression <);   
_ret = _this select _ret;    

Edit: I've reinstalled the dzai folder and now all is working fine. Thanks for updating this to epoch 1.0.6.2 :)

Link to comment
Share on other sites

  • 2 weeks later...
48 minutes ago, Halo3kings said:

I'm having trouble getting this mod to work. I've quadruple checked the installation locations and the server_monitor.sqf. it seems so easy to install, but i'm just at whits end. 

https://pastebin.com/HLriUfzv

How did you edit  server_monitor.sqf? WAI seems to be loaded, but DZAI is not loaded at all.

Add DZAI line " [] call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf"; " if  you did not. 
You can add it  just before or after WAI like below:

Spoiler

if (isDedicated) then {endLoadingScreen;};
[] call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf";//DZAI
[] ExecVM "\z\addons\dayz_server\WAI\init.sqf";//WAI

allowConnection = true;
sm_done = true;
publicVariable "sm_done";


 

btw,

Spoiler
  1. 14:08:45 Error in expression <K_CIV_EP1",_Ratio3],
  2. ["VWGolf",_Ratio3]
  3. ["BMP2_Ambul_CDF"]
  4. [ "BRDM2_TK_EP1"]
  5. ];
  6. >
  7. 14:08:45   Error position: <["BMP2_Ambul_CDF"]
  8. [ "BRDM2_TK_EP1"]
  9. ];
  10. >
  11. 14:08:45   Error Missing ]
  12. 14:08:45 File z\addons\dayz_server\system\dynamic_vehicle.sqf, line 115

you have wrong format in dayz_server\system\dynamic_vehicle.sqf . check your arrays, each element must be saparated by "," , and the element need a integer value (the number of the vehicle to spawn), like _Ratio3 for VWGolf.

Link to comment
Share on other sites

6 minutes ago, Schalldampfer said:

How did you edit  server_monitor.sqf? WAI seems to be loaded, but DZAI is not loaded at all.

Add DZAI line " [] call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf"; " if  you did not. 
You can add it  just before or after WAI like below:

yeah its there, so weird.

Spoiler

Capture.thumb.JPG.03fc5b0eb1c4b14be608276a53c2e91e.JPG

Link to comment
Share on other sites

22 minutes ago, Halo3kings said:

yeah its there, so weird.

  Hide contents

Capture.thumb.JPG.03fc5b0eb1c4b14be608276a53c2e91e.JPG

did you pack the server pbo?

the dzai_initserver.sqf create a log line in very first step
 

Spoiler

/*
    DZAI Server Initialization File
    
    Description: Handles startup process for DZAI. Does not contain any values intended for modification.
*/
private ["_startTime","_directoryAsArray","_worldname","_allUnits"];

if (!isServer || !isNil "DZAI_isActive") exitWith {};
DZAI_isActive = true;

_startTime = diag_tickTime;

_directoryAsArray = toArray __FILE__;
_directoryAsArray resize ((count _directoryAsArray) - 25);
DZAI_directory = toString _directoryAsArray;
if (isNil "_this") then {_this = []};
if ((count _this) > 0) then {
    //diag_log "DEBUG :: Startup parameters found!";
    if ("readoverridefile" in _this) then {DZAI_overrideEnabled = true} else {DZAI_overrideEnabled = nil};
    if ("enabledebugmarkers" in _this) then {DZAI_debugMarkersEnabled = true} else {DZAI_debugMarkersEnabled = nil};
} else {
    //diag_log "DEBUG :: Startup parameters not found!";
    DZAI_overrideEnabled = nil;
    DZAI_debugMarkersEnabled = nil;
};

//Report DZAI version to RPT log
#include "DZAI_version.txt"
diag_log format ["[DZAI] Initializing %1 version %2 using base path %3.",DZAI_TYPE,DZAI_VERSION,DZAI_directory];

so if it's running without error, you haven't loaded the new server_monitor.sqf with DZAI(or you directly set DZAI_isActive variable before running DZAI)

Link to comment
Share on other sites

6 hours ago, Schalldampfer said:

did you pack the server pbo?

the dzai_initserver.sqf create a log line in very first step
 

  Reveal hidden contents

/*
    DZAI Server Initialization File
    
    Description: Handles startup process for DZAI. Does not contain any values intended for modification.
*/
private ["_startTime","_directoryAsArray","_worldname","_allUnits"];

if (!isServer || !isNil "DZAI_isActive") exitWith {};
DZAI_isActive = true;

_startTime = diag_tickTime;

_directoryAsArray = toArray __FILE__;
_directoryAsArray resize ((count _directoryAsArray) - 25);
DZAI_directory = toString _directoryAsArray;
if (isNil "_this") then {_this = []};
if ((count _this) > 0) then {
    //diag_log "DEBUG :: Startup parameters found!";
    if ("readoverridefile" in _this) then {DZAI_overrideEnabled = true} else {DZAI_overrideEnabled = nil};
    if ("enabledebugmarkers" in _this) then {DZAI_debugMarkersEnabled = true} else {DZAI_debugMarkersEnabled = nil};
} else {
    //diag_log "DEBUG :: Startup parameters not found!";
    DZAI_overrideEnabled = nil;
    DZAI_debugMarkersEnabled = nil;
};

//Report DZAI version to RPT log
#include "DZAI_version.txt"
diag_log format ["[DZAI] Initializing %1 version %2 using base path %3.",DZAI_TYPE,DZAI_VERSION,DZAI_directory];

so if it's running without error, you haven't loaded the new server_monitor.sqf with DZAI(or you directly set DZAI_isActive variable before running DZAI)

Yeah I packed the server with the correct lines, and no the DZAI_isActive is set to false. 

Link to comment
Share on other sites

  • 3 months later...

Any Ideas on how to get the vehicles to catch fire when they enter water? Right now they just hang about and don't remove themselves. This is a big problem on my Tavi server around the bridge and other ponds.

Thanks for any help.

Link to comment
Share on other sites

59 minutes ago, G2K said:

Any Ideas on how to get the vehicles to catch fire when they enter water? Right now they just hang about and don't remove themselves. This is a big problem on my Tavi server around the bridge and other ponds.

Thanks for any help.

Get the position of the vehicle, use this check (https://community.bistudio.com/wiki/surfaceIsWater) and setDamage 1.

Link to comment
Share on other sites

  • 1 year later...

I'm using custom static spawns for the Hemp farms on Lingor.

It spawns 10 units with various weapons but never any AT weapons.

How would I add AT guys to the group?

Here's an example:

[
		"hempfarm1",	//This is the marker name to be used as the patrol and spawning area.
		10, 						//This trigger will spawn a group of 2 AI units.
		3,						//Weapon grade setting. 1 = weapon chosen from Military loot table (see below for explanation of Weapon Grade)
		false					//(OPTIONAL)* Respawn setting. True: AI spawned will respawn (Default). False: AI will not respawn. Spawn area will be deleted when all units have been killed.
	] call DZAI_spawn_units;

Thanks.

Link to comment
Share on other sites

  • 10 months later...
On 6/11/2017 at 8:35 AM, ViktorReznov said:

Posting this here because following the guide for an older version will drive you in circles and being here will hopefully eliminate too many questions about it. Maybe even put in a pull to have it in the repository to start with?

To get coins in ai wallet, you need to edit 2 files

dzai\init\dzai_config.sqf

  Reveal hidden contents

insert these variables underneath DZAI_humanityGain = 50:



//Amount of money to reward player for killing an AI unit (Default: false)									
DZAI_moneyGain = true;

//If ai_hasMoney=true, this defines what's the max amount of money an AI can hold, this value gets multiplied by 10, means if ai_moneyAmount=3000 the maximum amount an AI can hold is 30000
DZAI_moneyAmount = 3000;

 

and dzai\compile\ai_death.sqf

  Hide contents

at the bottom just before _victim



if (DZAI_moneyGain && Z_singleCurrency) then {
		_cash = round(random DZAI_moneyAmount) * 10; // adds money to ai wallets in 10x increments. 
		_victim setVariable[Z_MoneyVariable,_cash ,true];
	};

 

When you check the ai wallet youll get a random 10 to 30000 cash!

I have used this to attempt to apply coins to DZAI in 1.0.7 and I am getting this error:

18:48:12 Error in expression <random DZAI_moneyAmount) * 10; 
_victim setVariable[Z_MoneyVariable,_cash ,true]>
18:48:12   Error position: <setVariable[Z_MoneyVariable,_cash ,true]>
18:48:12   Error Type Any, expected String
18:48:12 File z\addons\dayz_server\DZAI\compile\ai_death.sqf, line 99

Anyone got any ideas?

Link to comment
Share on other sites

  • 4 weeks later...

Hello, DZAI works nice, but i have a problem with vehicle patrols getting stuck (sometimes they tip over and sometimes they accelerate without moving forward) especially in Novy Sobor. Any ideas? 

Also i was wondering whats the best way to make convoy and mark its live location on the map. Maybe WAI is better for that job?

Link to comment
Share on other sites

  • 2 months later...

If where using WAI then where does this go? 

call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf";

I put it in server_functions above WAI, where I have had it before but getting this error in my rpt

 

14:59:45 Error in expression < (count _inventory > 0) && !_isPlot && !_doorLocked) then {
if (_type in DZE_Loc>
14:59:45   Error position: <_doorLocked) then {
if (_type in DZE_Loc>
14:59:45   Error Undefined variable in expression: _doorlocked
14:59:45 File z\addons\dayz_server\system\server_monitor.sqf, line 219
14:59:45 Error in expression <mulation false;

_doorLocked = _type in DZE_DoorsLocked;
_isPlot = _type == "Pla>
14:59:45   Error position: <DZE_DoorsLocked;
_isPlot = _type == "Pla>
14:59:45   Error Undefined variable in expression: dze_doorslocked
14:59:45 File z\addons\dayz_server\system\server_monitor.sqf, line 195
14:59:45 Error in expression < (count _inventory > 0) && !_isPlot && !_doorLocked) then {
if (_type in DZE_Loc>
14:59:45   Error position: <_doorLocked) then {
if (_type in DZE_Loc>
14:59:45   Error Undefined variable in expression: _doorlocked
14:59:45 File z\addons\dayz_server\system\server_monitor.sqf, line 219
14:59:45 Error in expression <mulation false;
 

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...