Jump to content
DAmNRelentless

[RELEASE] DZAI for 1.0.6+

Recommended Posts

Hey there guys,

first of all, this is not my mod/addon whatever. All credits go to SnarkIndustries who made the previous version for Epoch 1.0.5.1 of DZAI.
Here is his github: https://github.com/SnarkIndustries/DZAI
Sadly, he is no longer active and also his donation link is suspended, so I can just give some credits.

Special thanks at this point goes to @salival who updated the variables and adjusted some changes to get this working with new Epoch.
I just reworked the structure of the repo and fixed all the install instructions and also some mixed up paths.


What is DZAI?
DZAI is designed to be a simple, configurable, easy-to-install AI package. This AI package is designed to work out of the box with any supported DayZ mod/map. It's basically there for AI-based patrols.


Download and installation is provided on my and salivals github. The Client installation is normally not required but recommended to gain better sync between server and client.
https://github.com/DAmNRelentless/DZAI
https://github.com/oiad/DZAI

So have fun with it. If there are any questions, ask here on epochmod-forum.

Greetz Relentless :)

Share this post


Link to post
Share on other sites

Ugh, cant get this to work...

Is there a line asking the minimum players to be online before any AI apawn?

 

Also, RPT log shows no errors...

Spawn time has been set to 1 second just to see if I can get it to work... :/

Share this post


Link to post
Share on other sites

The minimum of players is one (1).

Your RPT should show something like this after someone join:

Spoiler
13:29:36 "[DZAI] Initializing DZAI version 2.2.1 Release Build 20141208 using base path z\addons\dayz_server\DZAI."
13:29:36 "[DZAI] Reading DZAI configuration file."
13:29:36 "[DZAI] DZAI configuration file loaded."
13:29:36 "[DZAI] Compiling DZAI functions."
13:29:36 "[DZAI] DZAI functions compiled."
13:29:36 "[DZAI] Epoch classnames loaded."
13:29:36 "[DZAI] DZAI settings: Debug Level: 0. DebugMarkers: false. WorldName: napf. ModName: epoch (Ver: dayz epoch 1.0.6.1). DZAI_dynamicWeaponList: true. VerifyTables: true."
13:29:36 "[DZAI] AI spawn settings: Static: true. Dynamic: true. Random: false. Air: true. Land: true."
13:29:36 "[DZAI] AI settings: DZAI_findKiller: true. DZAI_useHealthSystem: true. DZAI_weaponNoise: true. DZAI_zombieEnemy: true."
13:29:36 "[DZAI] DZAI loading completed in 0.529053 seconds."

If not, you do something wrong at the installation.

 

Share this post


Link to post
Share on other sites

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

Spoiler

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

Spoiler

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!

Share this post


Link to post
Share on other sites

Add [ _killer = effectiveCommander vehicle _killer; ] into fn_cuntkills.sqf like this:

Spoiler
private ["_killer","_victim","_killType","_killCount"];
_killer = _this select 0;
_victim = _this select 1;
_killType = _this select 2;
_killer = effectiveCommander vehicle _killer;
_killCount = _killer getVariable [_killType,0];
_killer setVariable [_killType,(_killCount +1),true];
if (DZAI_humanityGain != 0) then {
 _humanity = _killer getVariable["humanity",0];
 _humanity = _humanity + DZAI_humanityGain;
 _killer setVariable["humanity",_humanity,true];
};

This will make humanity when you kill an AI with a vehicle turret weapon.

(PvP kill in 1.0.6 already has this feature)

Share this post


Link to post
Share on other sites

Hi Dam and tnx for the great work,

I have a question that probably the answer is right before my eyes and cant see :)

Is there a way to choose the spawn points of the land patrols? And also to make the cars be temp but stay unlocked if players decide to claim them?

Thanks again

Share this post


Link to post
Share on other sites
1 hour ago, totis said:

Hi Dam and tnx for the great work,

I have a question that probably the answer is right before my eyes and cant see :)

Is there a way to choose the spawn points of the land patrols? And also to make the cars be temp but stay unlocked if players decide to claim them?

Thanks again

No, land patrols (I guess you mean the guys in the cars) are spawned dynamically all over the map depending on how many you set max. The higher you set the DZAI_maxLandPatrols variable, the higher is the chance to spot one of these guys. As far as I know there is no static spawn system integreated, that's only possible for infantry.

The cars are temporary by default. As far as I remember there is the message "This vehicle won't stay over server restart" or something like that. Means that it will not be saved to the database. But there's no claim option.

But these are nice suggestions. Let's see if I do a remake of that script when I am done with updating my current scripts.

Share this post


Link to post
Share on other sites

I can't figure out how to get this to work.  I followed the two guides linked on your Github.  I'm using a survival servers as a host and my missions folder does not contain a dayz_code folder so I thought I could just place it within my mission folder then change where the files were looking to "DZAI_Client\dzai_initclient.sqf" instead of "dayz_code\DZAI_Client\dzai_initclient.sqf" and everything would be fine.  It does not appear to be loading when a player connects.  I've attached a screenshot of the mission folder I am able to download from the server host and a link to my RPT file. https://pastebin.com/qWf3PMfY 

 

folderscreenshot.png

Share this post


Link to post
Share on other sites

@Tuhjay

The client files are not even necessary to run the AI system. This shouldn't be the problem. Make sure you placed the line in the server_monitor.sqf right.
The dayz_code folder only exists if you already have custom scripts that actually use this folder. If you don't have it, simply create one or change all the paths.

Share this post


Link to post
Share on other sites
On 7/8/2017 at 7:44 AM, Schalldampfer said:

Add [ _killer = effectiveCommander vehicle _killer; ] into fn_cuntkills.sqf like this:

  Reveal hidden contents
private ["_killer","_victim","_killType","_killCount"];
_killer = _this select 0;
_victim = _this select 1;
_killType = _this select 2;
_killer = effectiveCommander vehicle _killer;
_killCount = _killer getVariable [_killType,0];
_killer setVariable [_killType,(_killCount +1),true];
if (DZAI_humanityGain != 0) then {
 _humanity = _killer getVariable["humanity",0];
 _humanity = _humanity + DZAI_humanityGain;
 _killer setVariable["humanity",_humanity,true];
};

This will make humanity when you kill an AI with a vehicle turret weapon.

(PvP kill in 1.0.6 already has this feature)

@Schalldampfer i know this works when you are the gunner of vehicle but is there a way for it to work with say an armed littlebird or mi17 rockets? you are the pilot and gunner but doesnt seem to give humanity the way a vehicle with a driver and a separate gunner works. 

Share this post


Link to post
Share on other sites

maybe you need to add humanity separately for them like

Spoiler

{
_killer = _x

_killCount = _killer getVariable [_killType,0];
_killer setVariable [_killType,(_killCount +1),true];

if (DZAI_humanityGain != 0) then {
    _humanity = _killer getVariable["humanity",0];
    _humanity = _humanity + DZAI_humanityGain;
    _killer setVariable["humanity",_humanity,true];
};

} forEach (crew _killer);

I haven't tested this yet

Share this post


Link to post
Share on other sites
1 hour ago, DieTanx said:

How does Blacklist Work? Can somebody explain how i would set this up.  example shows blacklist1, blacklist 2, but unsure what this means

Set a marker in your mission.sqm underneath "class Markers" and make sure to increase the items of markers when you add one. then you can enter the name of this marker in the blacklist.

Share this post


Link to post
Share on other sites
On 10/14/2017 at 1:30 AM, DAmNRelentless said:

Set a marker in your mission.sqm underneath "class Markers" and make sure to increase the items of markers when you add one. then you can enter the name of this marker in the blacklist.

could i just use     name="Tradercitystary";    name="AirVehicles";  these names in the array? 
or does it need specificly the blacklist area?

Share this post


Link to post
Share on other sites

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


  • Advertisement
  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Latest Donations

  • Advertisement
  • Discord

×