Simple AI Tutorial (no rMod or DayZ_Factions)

I originally had this working. I was having problems getting the worldspace to work correctly, however I figured it out. Once I tried to use the updated files it no long works. I reverted to my previous pbo and followed the guide and it still does not work. Would someone mind taking peek at my pbo to show me where I am going wrong. I am trying to spawn the ai by the firestation/factory in electro.
It won't even let me open that PBO
 
I thought since I've been bombarding this thread with inexperience, I'd throw my pbo file up for you to check out.

Thank you very much Sycosis. I went through the tutorial again, and found out that I was using the http://opendayz.net/index.php?threads/dayz-npc-ai-units-troops-add-to-server.8002/ pbo, which then following your instructions used different folder names...I derped...

I got the map/ai running for anyone who wants a base mission pbo with the addition of ai in NW and cherno only.

Once again, thank you sycosis.
 

Attachments

  • dayz_mission.pbo
    58.6 KB · Views: 17
ok sorted out the weaponless NPC, just a quick question Sycosis is it possible to change the NPC skins without changing there side? Im running Oring would it be best to check in the editor to see what skins are allowed? cheers thebes
 
Hey Sycosis, Awesome work on this. I've been following this and have it working great on Celle. One issue I'm having is Celle has a Debug Monitor and I have no Idea how to disable it or even were to find the exeVM for it. I want to Add the Bandit Kills and I tried using a different Debug and now it won't show up at all. This is the custom Debug I tried using https://github.com/nomadichayward/DayZ_Dual_Admin_Debug_Monitor
No luck, thank you for all this great information on NPC's, keep up the Awesome Job man!!
 
Hey Sycosis, Awesome work on this. I've been following this and have it working great on Celle. One issue I'm having is Celle has a Debug Monitor and I have no Idea how to disable it or even were to find the exeVM for it. I want to Add the Bandit Kills and I tried using a different Debug and now it won't show up at all. This is the custom Debug I tried using https://github.com/nomadichayward/DayZ_Dual_Admin_Debug_Monitor
No luck, thank you for all this great information on NPC's, keep up the Awesome Job man!!

The debug doesnt show using the hotkeys listed in the intructions for the dual monitor, try the 'Ins' key this shows the debug on 1.7.6.1 and is replaced by the dual if you installed it correctly
 
I used the Init File for the Dual, I just switched over my private stuff. It wasn't showing up for "Always on" for either the Admin or regular players. If I add Unit_Killed.sqf will the Bandit kills show up? And if I add
Code:
_zombieKills = _killer getVariable["zombieKills",0];
_killer setVariable["zombieKills",_zombieKills+1,true];
_humanity = _killer getVariable["humanity",0];
_killer setVariable["humanity",_humanity+100,true];


It will add to the Humanity Right? So does this mean before Adding the Above Code it will show up as Bandits?
I'm just a little mixed up and I Really Appreciate Any and ALL help.
 
I am very lost here. I have gone to the extent of copying and pasting other's init files from this thread into my PBO. Is there anyway that a refuel script maybe effecting this? I don't see anything wrong with this. I recently excluded the unit killed.sqf and Dayz then then able to launch but without spawning the Ai in. If i include it I get stuck at load with an error that something went wrong.
 

Attachments

  • init.sqf
    2.6 KB · Views: 2
ok sorted out the weaponless NPC, just a quick question Sycosis is it possible to change the NPC skins without changing there side? Im running Oring would it be best to check in the editor to see what skins are allowed? cheers thebes
On page 1 of this thread, someone was nice enough to list all of the unbanned skins. To change the skins, just add a gearSet with the skins you want and reference it. gearSet is independant of faction.
 
I am very lost here. I have gone to the extent of copying and pasting other's init files from this thread into my PBO. Is there anyway that a refuel script maybe effecting this? I don't see anything wrong with this. I recently excluded the unit killed.sqf and Dayz then then able to launch but without spawning the Ai in. If i include it I get stuck at load with an error that something went wrong.
You're using an old version of the script, so I can only guess that you're using old files as well, because if you're using that init with the most recent files, then you're not going to be working correctly. That init correctly corresponds to the older files, as long as you have a scripts folder with add_unit_server.sqf and set_unit_factions.sqf inside of a scripts folder inside your mission file.
 
I used the Init File for the Dual, I just switched over my private stuff. It wasn't showing up for "Always on" for either the Admin or regular players. If I add Unit_Killed.sqf will the Bandit kills show up? And if I add
Code:
_zombieKills = _killer getVariable["zombieKills",0];
_killer setVariable["zombieKills",_zombieKills+1,true];
_humanity = _killer getVariable["humanity",0];
_killer setVariable["humanity",_humanity+100,true];


It will add to the Humanity Right? So does this mean before Adding the Above Code it will show up as Bandits?
I'm just a little mixed up and I Really Appreciate Any and ALL help.
If you don't add this code, nothing will happen at all, and they will just die. If you add this code, it will add to the zombie kills. If you switch zombieKills with banditKills it will add to bandit kills.

It will add 100 humanity for the kills. You can adjust that where it says _humanity+100
 
I thought since I've been bombarding this thread with inexperience, I'd throw my pbo file up for you to check out.

Thank you very much Sycosis. I went through the tutorial again, and found out that I was using the http://opendayz.net/index.php?threads/dayz-npc-ai-units-troops-add-to-server.8002/ pbo, which then following your instructions used different folder names...I derped...

I got the map/ai running for anyone who wants a base mission pbo with the addition of ai in NW and cherno only.

Once again, thank you sycosis.


Well I used your PBO file as reference and compared it to mine. I deleted everything again I had, took a previously backed up PBO and followed the instructions. It seems to have worked this time. Maybe it was staying up to 3am with redbull that had my panties all bothered. Thank you for the time sycosis.
 
Hey, great work man. I was wondering if it was possible to add 2 more variables, combat mode and behavour. This would allow for optimizing friendly ai.

For bus routes(aware makes them travel on roads more)

For guards(aware and safe make them stop kneeling and going prone, also holds weapon lowered, and opens them up for "loiter movement" what ever that is)

And for my idea, to put unarmed group of civs (safe and blue) in a walled in area with a huge squad of military outside "holding them hostage" . With axeman's lead units script you can fight your way inside, rescue the civs(mouse wheel to select lead units), and lead them out of there. Drop them off to an admin at the trading post and get rewarded with some loot. Then watch me plant c4 and order then to sit on it. After all another groups spawning in an hour!

Please let me know what you think and thanks for all the great work!
 
I have a dayz.st server on cherno with ai working as stated per instructions on first page...i however am still unable to get them to respawn is there something i can upload and have checked to see if im correct or not in my following directions lol?
 
I have a dayz.st server on cherno with ai working as stated per instructions on first page...i however am still unable to get them to respawn is there something i can upload and have checked to see if im correct or not in my following directions lol?
The way I tested mine was set respawn time to 60 and watched them respawn after a minute.
 
yes i put at 600 and waited for em as well..nothing happened so far...pretty much empty server at moment but i have ai guarding weapons crates on 2 islands ...working great other then no respawn yet.im sure i messed up somewhere along the line
 
yes i put at 600 and waited for em as well..nothing happened so far...pretty much empty server at moment but i have ai guarding weapons crates on 2 islands ...working great other then no respawn yet.im sure i messed up somewhere along the line
Something I came across at one point was the localization of variables was affecting my commands. You might try doing something like this:
Code:
private ["_player","_killer","_aispawnpos","_wpradius","_wpnum","_numUnits","_unitType","_faction","_baseSkill","_potentialSkill","_gearSet","_respawnTime"];
_player = _this select 0;
_killer = _this select 1;
_aispawnpos = _this select 2;
_wpradius = _this select 3;
_wpnum = _this select 4;
_numUnits = _this select 5;
_unitType = _this select 6;
_faction = _this select 7;
_baseSkill = _this select 8;
_potentialSkill = _this select 9;
_gearSet = _this select 10;
_respawnTime = _this select 11;
 
aispawnpos = _aispawnpos;
wpradius = _wpradius;
wpnum = _wpnum;
numUnits = _numUnits;
unitType = _unitType;
globalFaction = _faction;
baseSkill = _baseSkill;
potentialSkill = _potentialSkill;
gearSet = _gearSet;
respawnTime = _respawnTime;
 
sleep _respawnTime;
_aispawn = [aispawnpos,wpradius,wpnum,numUnits,unitType,globalFaction,baseSkill,potentialSkill,gearSet,respawnTime] execVM "scripts\add_unit_server.sqf";

Replace your unit_killed.sqf with this
 
Hello, I'm having issue's with BattlEye Restriction #8. I have been all over google and haven't found any useful information. I have Opened my Scripts with FileZilla and changed almost everything to 1 that was a 5 but every time I kill an AI, I get kicked. Thank you
 
Back
Top