Customizing AI Weapons

Karmafied

Member
Hi Everyone!

I have reason to believe that it's possible to customize which weapons each AI class has (Military has better weapons than surv/band). However, there are no actual threads about it, and each time I try to do it, all my AI are without ANY weapons. (Note: I run a private family server, so I do not use any AH or BE scripts.)

Here is what I have in my SARconfig if anyone can see something I'm missing.

Code:
// military

// potential weapon list for leaders
SAR_sold_leader_weapon_list = ["M16A4_ACG","M4A1_AIM_SD_camo","M4A3_CCO_EP1","Sa58V_CCO","FN_FAL_ANPVS4","Sa58V_RCO_EP1","G36_C_SD_camo","G36K_camo"];
SAR_sold_leader_pistol_list = []; 

// potential item list for leaders -> Item / Chance 1 - 100
SAR_sold_leader_items = [["ItemWaterbottle",75],["FoodCanBakedBeans",60],["FoodMRE",60]];
SAR_sold_leader_tools =  [["ItemMap",50],["ItemGPS",5],["Binocular",15],["NVGoggles",15],["ItemRadio",100],["ItemEtool",50],["ItemFlashlightRed",75]];

//potential weapon list for riflemen
SAR_sold_rifleman_weapon_list = ["M16A2","M4A1","M4A1_Aim","G36C","M16A2GL","M1014"];
SAR_sold_rifleman_pistol_list = [];  

// potential item list for riflemen
SAR_sold_rifleman_items = [["ItemWaterbottle",75],["FoodCanBakedBeans",60],["FoodMRE",60]];
SAR_sold_rifleman_tools = [["ItemMap",50],["ItemCompass",30],["Binocular",15],["ItemRadio",100],["ItemEtool",50],["ItemFlashlightRed",75]];

//potential weapon list for snipers
SAR_sold_sniper_weapon_list = ["DMR","M14_EP1","SVD_CAMO","M24","M40A3"];
SAR_sold_sniper_pistol_list = []; 

// potential item list for snipers
SAR_sold_sniper_items = [["ItemWaterbottle",75],["FoodCanBakedBeans",60],["FoodMRE",60],["ItemTent",20]];
SAR_sold_sniper_tools = [["ItemMap",50],["ItemCompass",30],["Binocular_Vector",50],["ItemRadio",100],["ItemEtool",25],["ItemFlashlightRed",5],["NVGoggles",15]];

//
// survivors
//

// potential weapon list for leaders
SAR_surv_leader_weapon_list = ["AK_74","M16A2","MP5A5","M4A1","AK_47_M"];
SAR_surv_leader_pistol_list = []; 

// potential item list for leaders -> Item / Chance 1 - 100
SAR_surv_leader_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["FoodbaconCooked",15],["FoodbeefCooked",50],["ItemWaterbottle",15]];
SAR_surv_leader_tools =  [["ItemMap",50],["ItemCompass",30],["Binocular",25],["ItemFlashlight",50],["ItemKnife",20],["ItemRadio",100]];

//potential weapon list for riflemen
SAR_surv_rifleman_weapon_list = ["M16A2","Winchester1866","AK_74","LeeEnfield","MR43"];
SAR_surv_rifleman_pistol_list = [];  

// potential item list for riflemen
SAR_surv_rifleman_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["FoodbaconCooked",15],["FoodbeefCooked",50],["ItemWaterbottle",15]];
SAR_surv_rifleman_tools = [["ItemMap",5],["ItemCompass",5],["Binocular",10],["ItemFlashlight",50],["ItemKnife",20],["ItemRadio",100]];

//potential weapon list for snipers
SAR_surv_sniper_weapon_list = ["LeeEnfield","M14_EP1","Huntingrifle","Crossbow_DZ"];
SAR_surv_sniper_pistol_list = []; 

// potential item list for snipers
SAR_surv_sniper_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["FoodbaconCooked",15],["FoodbeefCooked",50],["ItemWaterbottle",15]];
SAR_surv_sniper_tools = [["ItemMap",5],["ItemCompass",5],["Binocular",10],["ItemFlashlight",50],["ItemKnife",20],["ItemRadio",100]];

//
// bandits
//

// potential weapon list for leaders
SAR_band_leader_weapon_list = ["Sa58V_RCO_EP1","AKS_74_kobra","G36C","AK_47_M","Sa58V_CCO_EP1"];
SAR_band_leader_pistol_list = []; 

// potential item list for leaders -> Item / Chance 1 - 100
SAR_band_leader_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["FoodbaconCooked",15],["FoodbeefCooked",50],["ItemWaterbottle",15]];
SAR_band_leader_tools =  [["ItemMap",50],["ItemCompass",30],["Binocular",25],["ItemFlashlight",50],["ItemKnife",20],["ItemRadio",100]];

//potential weapon list for riflemen
SAR_band_rifleman_weapon_list = ["AK_74","AKS_74_U","Sa58P_EP1","M1014"];
SAR_band_rifleman_pistol_list = [];  

// potential item list for riflemen
SAR_band_rifleman_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["FoodbaconCooked",15],["FoodbeefCooked",50],["ItemWaterbottle",15]];
SAR_band_rifleman_tools = [["ItemMap",5],["ItemCompass",5],["Binocular",10],["ItemFlashlight",50],["ItemKnife",20],["ItemRadio",100]];

//potential weapon list for snipers
SAR_band_sniper_weapon_list = ["DMR","Huntingrifle","SVD_Camo"];
SAR_band_sniper_pistol_list = []; 

// potential item list for snipers
SAR_band_sniper_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["FoodbaconCooked",15],["FoodbeefCooked",50],["ItemWaterbottle",15]];
SAR_band_sniper_tools = [["ItemMap",5],["ItemCompass",5],["Binocular",10],["ItemFlashlight",50],["ItemKnife",20],["ItemRadio",100]];
 
Note: Even if you don't have any interest in perusing my code, I wouldn't be opposed to someone loading their own working SARconfig if they have accomplished this. I can make the necessary adjustments. Thanks!
 
This is very much possible, since i have done it my self in the past. I have just come back to this and started a server again, though my problem right now is that my ai doesnt have any weapons no matter what i do. So until i have it working my self i cant show you :).

In theory i cant see anything wrong in what you have done, other then forgotten there is not an equal chance the ai will spawn with the different weapons...

SAR_sold_sniper_weapon_list = ["DMR","M14_EP1","SVD_CAMO","M24","M40A3"];
with this setup you will very rarely see the DMR show up, they allmost allways have the svd or m24.

SAR_sold_sniper_weapon_list = ["DMR","DMR","M14_EP1","SVD_CAMO","M24","M40A3","M40A3"];
With this setup theres a bigger chance on the dmr and the M40A3 showing up.

I cant remember which weapons have the bigger chance, so this is just an example. This was how it was done last time i did this atleast :)
 
Karmafied I have nothing to add other then am here watching this just in case you crack this.
I also run a family home server and would love to add custom weapons to the AI.
 
Hi Styxx, after I posted this, I started talking to someone about the whole process but had more difficulty. I ended up switching to DZAI and OMG am I glad I did. I was always afraid of having to relearn everything and not have the customization that i was used to. Lo and behold, I decided to just give it a try and see what happened. The AI are smarter and more realistic, and it literally took me 10 minutes to understand and setup. I can't recommend it enough.
 
Last edited:
Hi Styxx, after I posted this, I started talking to someone about the whole process but had more difficulty. I ended up switching to DO AI and OMG am I glad I did. I was always afraid of having to relearn everything and not have the customization that i was used to. Lo and behold, I decided to just give it a try and see what happened. The AI are smarter and more realistic, and it literally took me 10 minutes to understand and setup. I can't recommend it enough.
Karmafied what is DO AI?
I have searched. It looks like it MIGHT be is SargeAI based on Google hits.
That is what I am currently using. Love it.
But if there is another AI I would love to test it.
Thanks
 
I have edited the AI loadouts in the past. I have not tried to add Dayz Epoch guns to Sarge, but you certainly can to other AI such as those that spawn using the DZMS or AIMissions so I would think you can do this for SargeAI easily. Just be sure you have not made any syntax errors in the script, which would explain why AI spawn with no weapons or don't spawn at all.
 
Hi Styxx, after I posted this, I started talking to someone about the whole process but had more difficulty. I ended up switching to DZAI and OMG am I glad I did. I was always afraid of having to relearn everything and not have the customization that i was used to. Lo and behold, I decided to just give it a try and see what happened. The AI are smarter and more realistic, and it literally took me 10 minutes to understand and setup. I can't recommend it enough.

How can they be smarter and more realistic? Sarge uses UPSMON which improves the combat tactics of the AI http://dev.withsix.com/projects/upsmon/wiki
I think the benefit of SargeAI is that you can have different factions so the server is not just AI vs Players. I love hearing gunshots and checking out the action as two groups are having a battle.
 
You can setup DZAI to do the same thing. The AI will always be hostile to players, yes, but they will also battle each other.

In terms of realism, I can watch Sarge AI patrols just walk blindly across a field and know that they are AI. DZAI actually look like players when they move and use tactics. Not to mention, the vehicle patrols and heli-reinforcement with DZAI is top notch.
 
Hi there. A bit late, but I've only just started setting up an Arma 3 server. I'm running Exile 1.0.2 and I've found that I can only use custom weapon packs with Sarge when the PBO file is installed in the Exile addons folder (@ExileServer\addons) instead of putting the whole @Mod folder in the main directory. I've only tested this with a few NIArms weapons packs but that seemed to fix the issue.
 
May be really late to respond, and possibly irrelevant. Just know that except for a few upsmon errors, This is working on a 1.0.6.1 overpoch server, and I love it. Now im working on recoding it to interact with dzai and wai. 3 ai factions fighting each other. beiggest problem is coding the side relations in a similar fashion. also coding everyone with the ability to actually target, shoot and kill zeds. and likewise for zeds. ai with diplomatic zedimmunity, bs. ill get back to you all later if interested in how to change their weapons.
 
May be really late to respond, and possibly irrelevant. Just know that except for a few upsmon errors, This is working on a 1.0.6.1 overpoch server, and I love it. Now im working on recoding it to interact with dzai and wai. 3 ai factions fighting each other. beiggest problem is coding the side relations in a similar fashion. also coding everyone with the ability to actually target, shoot and kill zeds. and likewise for zeds. ai with diplomatic zedimmunity, bs. ill get back to you all later if interested in how to change their weapons.
Sarge is the only AI that I really liked. Especially the truly roaming ai: You could have them spawn on server startup without a player needed and roam the server till they died. That made it so much better than the ones that spawn and despawn on players.

Going to see if this works with dayz 1.8.9, but I think 1.8.8 didn't play nice.

Akvindr you got past the upsom errors?
 
So to be clear, all my testing has been done on a dayz epoch 1061 server. Ive seen full function with minor errors from upsmon and lots of complaints from RE but thats to be expected with how old this is. However, I will be working on this to bring back sarge. (Prolly should start another thread for this) however I am computerless for a little bit longer as my mb fried recently. Will post link to new thread when I have one and the time, localize errors that are being had and tackle them all
 
Back
Top