Simple AI Tutorial (no rMod or DayZ_Factions)

It's 2am and I haven't figured out how to get the bandits detected, or how to get the zombies to respawn, both should be easy to fix, but I'm just fried. I will figure it out probably tomorrow when I have time to step away for a bit.
 
Quick question - If squads are 3 dudes, does that mean you gotta put units = 3, or units =1 to get just 3 guys?

And bandit detection would be awesome. Get some sleep!
 
Quick question - If squads are 3 dudes, does that mean you gotta put units = 3, or units =1 to get just 3 guys?

And bandit detection would be awesome. Get some sleep!
1 unit is 3 ppl if you select squad.. if you do 3 units with squad you're going to get 9 people..
 
Alright thanks, just wanted to make sure that's how it worked, and it didn't do something funky for picking say 1-2 in units, while selecting squad.
 
Just about to go to bed and got the respawn working. Just trying to get the bandit detection working now.
 
Just about to go to bed and got the respawn working. Just trying to get the bandit detection working now.

nice one, i was about ready for sleep last night when i posted!

did i miss something though, zombies respawn and bandit detection? i can gather what bandit detection will be, but is zombies respawn actually the AI respawn, or are you respawning zombies for another reason? :)
 
Do you intend on doing a "Hero" detection as well? Might come in handy for AI guards in areas/bases. I assume its going to be another line in the init.sqf, something like setting a humanity barrier before they attack?

So you have like.. say "Attack anyone above -5000" if you wana have a bandit hideout, and like... anyone below 5000 for a hero hangout.. and be capable of altering the numbers?
 
hey sycosis thanks for all the new help for people seems i may have kicked it back off lol im just wanting to no one other thing before you upload the respawn code can you add any more troops to a group as in the resistance. would i only have to copy and paste another line inderneath the _resistanceMilitiaSkin = "BAF_Soldier_Officer_MTP"; say add that one again under it then give them a load out and thats it or would i have to add everything that is for that specific one again as well as a few other things if that makes sense. sorry forgot to say its for adding more in with different weapons
 
hey sycosis thanks for all the new help for people seems i may have kicked it back off lol im just wanting to no one other thing before you upload the respawn code can you add any more troops to a group as in the resistance. would i only have to copy and paste another line inderneath the _resistanceMilitiaSkin = "BAF_Soldier_Officer_MTP"; say add that one again under it then give them a load out and thats it or would i have to add everything that is for that specific one again as well as a few other things if that makes sense. sorry forgot to say its for adding more in with different weapons

im sure sycosis will correct me if im wrong, but i would assume for (example) west, you'd add another name like _westpsycho or something as another option, it would be given a variable, so after 3 for squad, 4 would be psycho. then in the add_unit you have case 4 : and set all the bits in there and when you do your aispawn, select 4 for unit and it should spawn.
best way would be to try it i'd say. copy the whole case 3: part for one of them, paste it below and call it case 4, change all instances within case 4 of _westsniper or whatever to your new name, then try spawning one?

EDIT-
not sure how accurate i am, but i think sycosis also had certain variables like varying skill levels and gearsets, so when he's done with his new code, it might mean you could just spawn a different gearset without having to spawn a whole new unit
 
Sycosis already answered how to add new groups :) It's on page 3 but i've quoted it below

It might be a little complicated to follow the case scheme in the add_unit_server.sqf but if you can manage, it won't be hard at all to add another type of troop. Just copy case 3, where ever there is 1, paste it between 3 and 4, name it 4, and then rename 4 to 5. and at the top of the config add another set of variables (eg: _resistanceTrooptypeRifle) and replace the static variables that are in the new case 4 with these variables.
 
its not a new group that im wanting its more AI in the groups that are already there so i want to be able to have say 6 different resistance units so each one has a different weapon
 
Sorry Scottieo i misunderstood you.
If you do get it working would you share the code ? That sounds like a great idea :)
 
Good morning everyone. I have been reading through this and a few other posts about adding AI to my server and I guess I'm just way to much of a noob to do this. I'm totally lost when it comes to this stuff. I have a dayz.st server and I would love to have a semi-large number of AI patrolling a large portion of the map to add that extra feel to it. I am really just looking for a server.pbo or mission.pbo that will do this that I can just upload to my dayz.st server. I'm begining to realize that I am not going to be able to do this and would be willing to pay someone for those files. I think once I had the files I could learn to tweak them from there. Would anyone be willing to do this for me?

Thanks so much.
 
Impulse the best way is to read the 1st post and then all the others that follow :) It's tricky but all the instructions are posted in this thread.
I'd be happy to help you as will others if you get stuck, just try and see how you get on.
Remember to make a backup of ANY files you edit so you can revert back if things break.
 
Okay, I've read every single post and I think I am stuck on the simplest part to be honest. Below are the steps I've done

1. The initial post has me download two files (add_unit_server.sqf, and set_unit_faction.sqf) I have downloaded those files and saved them to a folder on my desktop.

2. I then found the zombie_generate.sqf on my local machine and added the code to the end of that file, then added it to the same folder on my desktop.

3. Then I downloaded my mission.pbo from my dayz.st admin control panel, unpacked with PBOManager, copied the init.sqf to the new folder on my desktop where the other files are located and made the changes as described in the tutorial.

4. So now I have these 4 files, edited as the tutorial describes in a folder on my desktop (add_unit_server.sqf, set_unit_faction.sqf, zombie_generate.sqf, and init.sqf).

Here is where I'm not sure what to do, but this is what I tried with no luck
- I packaged all of those new files into my mission.pbo so the new files would replace the old ones. I then uploaded to my admin control panel, restared server and I can't connect. I gets stuck on the connecting to host screen.


I have read where some of these files go into a folder called "scripts", but I have no idea where that folder is, I dont think I have access to it.

Thanks for taking the time to help me, I'm totally new to all this stuff.

Thank you.
 
When you extract the dayz_code.pbo (might be named differently depening on your map/host) you get a folder containing the "init.sqf" and a few other files ? inside there make a new folder and call it scripts.
Add the following 3 files "add_unit_server.sqf" "set_unit_faction.sqf" and finally "zombie_generate.sqf" to the scripts folder.
Edit the init.sqf file and add the _aispawn as shown in the 1st post

Then repack the dayz_code folder and it becomes dayz_code.pbo, upload that back to your server and you're done :)
 
Okay, so the path to the dayz_code.pbo that I am extracting and looking at is steamapps/common/arma2operationarrowhead/@dayz/Addons - im assuming this is for the cherno map and that I'm looking at the correct dayz_code.pbo, correct?

When I extract that file and look through it I have 9 folders (actions, cfgworlds, compile, external, gui, init, medical, source, and system) none of which have an actual init.sqf in them, even the "init" folder itself doesnt have the file.
 
Back
Top