Simple AI Tutorial (no rMod or DayZ_Factions)

Okay, so this running out of ammo thing is pretty annoying. I think the best way to resolve it, for now, is to stop the AI from firing at the Zombies. Does anyone know what changes I can make to my .pbo to do this? I only want them to fire upon survivors. Here is my current .pbo
 

Attachments

  • test_17spawns_525PM.pbo
    71.5 KB · Views: 10
Im using DayZ.st to host my server and have things working well, unfortunately when the mission file is loaded on my server my server becomes greyed out on DayZ Commander as if it is running an incorrect version of the armabeta although it is running the latest version. Anyone else having this problem? and if not what could have caused it? Thank you in advanced.
 
this is pretty cool stuff, for anyone following this and all the other threads where everyone (lot's of people) have contributed different bits to the dayz AI snippets floating around, this has some interesting features to it like zombies react to AI gunshots, respawning, patrols, etc https://github.com/dayzai/DayZBanditAI

edit: it was pretty trivial to snag a few of those features and combine them with what I've ended up with following this and a few other AI threads
 
I went out last night and didn't finish the project. I'm going to set up a personal server to finish it off, but the only things left are the respawn and bandit detection, and both are extremely close. I'm just having a little trouble with localization and passing of variables.
 
this is pretty cool stuff, for anyone following this and all the other threads where everyone (lot's of people) have contributed different bits to the dayz AI snippets floating around, this has some interesting features to it like zombies react to AI gunshots, respawning, patrols, etc https://github.com/dayzai/DayZBanditAI

edit: it was pretty trivial to snag a few of those features and combine them with what I've ended up with following this and a few other AI threads

Aha, I see you've found my Github repo. It's slightly out of date at the moment, but I will be uploading the newest code for DayZ 1.7.6.1 later today. I caution against using the entire mission file and slapping it into a regular private hive as I don't use any if(!isServer) checks to prevent unexpected script behaviors since it breaks the AI spawn triggers for some reason.
 
Aha, I see you've found my Github repo. It's slightly out of date at the moment, but I will be uploading the newest code for DayZ 1.7.6.1 later today. I caution against using the entire mission file and slapping it into a regular private hive as I don't use any if(!isServer) checks to prevent unexpected script behaviors since it breaks the AI spawn triggers for some reason.

Yes I did, thanks for sharing that. I didn't use the whole thing yet I just added bits from yours like the flies around dead ai, zombies hearing gunshots from ai, something else I forget at the moment into what I had rolling, I think once I get a feel for arma2 scripting I want to try to get all this stuff syncing on the server so I could use something like what you're doing with the city spawns and patrols and etc, without bandits multiplying when a lot of people are on, unless you fixed that already.

edit: oh yeah the other thing i used from yours was AI bandit kills adding to the players bandit kills
 
I went out last night and didn't finish the project. I'm going to set up a personal server to finish it off, but the only things left are the respawn and bandit detection, and both are extremely close. I'm just having a little trouble with localization and passing of variables.
It's the weekend so why not :)
Glad you intend to finish the respawning, I've spent 2 days looking at BI scripting and it's bloody complex, Respawning is needed as my players are hunting the AI down because the score board logs how many have been killed
There are some amazing things you can do using DAC or UPSMON but they are way above my levels of script knowledge.
 
It's the weekend so why not :)
Glad you intend to finish the respawning, I've spent 2 days looking at BI scripting and it's bloody complex, Respawning is needed as my players are hunting the AI down because the score board logs how many have been killed
There are some amazing things you can do using DAC or UPSMON but they are way above my levels of script knowledge.

I've heard great things about DAC and UPS, wondering if anyone will post a guide on how to use them effectively.
 
DAC seems to be the tool to use but it's soooo complicated :( I've been playing with it for 2 days and really hope someone will post a guide on using it.
 
Yes I did, thanks for sharing that. I didn't use the whole thing yet I just added bits from yours like the flies around dead ai, zombies hearing gunshots from ai, something else I forget at the moment into what I had rolling, I think once I get a feel for arma2 scripting I want to try to get all this stuff syncing on the server so I could use something like what you're doing with the city spawns and patrols and etc, without bandits multiplying when a lot of people are on, unless you fixed that already.

edit: oh yeah the other thing i used from yours was AI bandit kills adding to the players bandit kills

There are some parts in my AI bandit script that I can't take credit for, such as the event handlers for unlimited ammo, body wounds, crediting bandit kills, dead body flies. Much of my scripting was built from the ground up using parts of DaiZy as a base. This is the reason I haven't publicly advertised my bandit scripts, due to crediting issues - it's hard to tell which parts are my original coding and which parts are borrowed.

I've tried to approach the issue of multiplying bandits using a somewhat kludgy method of using public variables to limit the maximum rate at which bandits are spawned. At the worst case scenario, it's useless coding and doesn't work as intended, in the best case scenario, it prevents spawn trigger abuse by locating the borders of the trigger and hopping back and forth to create mass spawns of AI bandits. For my purposes of playing lone wolf, it's a complete godsend at times, such as when I have to backtrack through a large city, I don't unintentionally re-trigger a whole series of spawns elevator prank style.
 
There are some parts in my AI bandit script that I can't take credit for, such as the event handlers for unlimited ammo, body wounds, crediting bandit kills, dead body flies. Much of my scripting was built from the ground up using parts of DaiZy as a base. This is the reason I haven't publicly advertised my bandit scripts, due to crediting issues - it's hard to tell which parts are my original coding and which parts are borrowed.

I've tried to approach the issue of multiplying bandits using a somewhat kludgy method of using public variables to limit the maximum rate at which bandits are spawned. At the worst case scenario, it's useless coding and doesn't work as intended, in the best case scenario, it prevents spawn trigger abuse by locating the borders of the trigger and hopping back and forth to create mass spawns of AI bandits. For my purposes of playing lone wolf, it's a complete godsend at times, such as when I have to backtrack through a large city, I don't unintentionally re-trigger a whole series of spawns elevator prank style.

Will you be doing anything specifically for celle?
 
Will you be doing anything specifically for celle?

At the present time I'm not working on maps other than Chernarus, but it isn't too hard to import it to other maps. Depending on how much code Celle has in common with basic DayZ, importing the AI package to other maps is a simple issue of ensuring that any banned item/skin classnames are removed, any new unbanned ones are added, and creating new spawn trigger locations.
 
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.
quoting this from your earlier post is there any way to make the extra troops part of the same squad i have changed the numbers round so that 4 is my new added unit and 5 being the squad but if i have 5 in it only spawns the first 3 that was created but not my new one so i have to add a seperate code just to get that unit in as that only spawns under number 4 which used to be squad
 
Do your AI respawn when killed Buttface ? Anyway your code would work with the existing code Sycosis has done ?
 
Do your AI respawn when killed Buttface ? Anyway your code would work with the existing code Sycosis has done ?

Yes, they do, as they spawn dynamically based on triggers as opposed being spawned all at once on server start. I think several scripts could be adapted for Syncosis' code, such as the eventhandlers and equipment/inventory generation scripts. (fn_unitBackpackTools, fn_unitConsumables, fn_unitSelectPistol, fn_unitSelectRifle)
 
Sounds intresting, The unlimited ammo is a nice touch so that i can equip the Ai with decent loot.
Thanks for the reply :)
 
What I would really like is a couple squads that roamed the entire map (like center them in the middle of the map and make their radius like 7,000 meters I guess?) And then it would be cool if devils castle, the NE airfield, the NW airfield, and stary sober all had like gaurd patrols of those areas (that were fairly difficult to defeat). It would alos be cool to have like a sniper team overwatching elektro and cherno with an average skill so they wouldnt just waste everyone. I kind of like them all military and all very hostile towards players, but I wouldnt want them to be able to engage more than say 200 meters out, other than the snipers which could have a long engagment radius. I know this is a lot and its cool if you cant/dont want to do all that. I'm sure I can take what you already did for me and figure it out (just might take longer lol). But if you did that you would be my hero haha.

Thanks for everything you have already done though man, you have definetly extended my game time (I was getting bored kiling only zombies), now I get to worry about these AI!! :)
here is your file all updated to what you wanted i have taken out the 2 previous spawns that i put in to show you them working if you have made anymore then you will have to add them back in im not 100% sure of what the distance is for the sniper teams you wanted but i have turned them down a bit so just let me no if they are still shooting to far or anything else ok bud.
 

Attachments

  • dayz_mission.pbo
    73.2 KB · Views: 26
Back
Top