dayZ NPC (AI) Units / Troops | Add to Server.

great script, excellent work :)

does anyone have a list of skins one could use as skins for the AI troops?
BAF Soldiers and Takistani Insurgents dont really fit one my Taviana server :/

check out CfgVehicles.hpp in your dayz.pbo - theres the definition of all allowed unit classes/skins in there.
 
ok thanks!

now ive got a weird bug, everytime someone tries to loot a NPC bandit their game crashes, does for me too.
anyone got an idea why that might be, is it side related?
 
ok thanks!

now ive got a weird bug, everytime someone tries to loot a NPC bandit their game crashes, does for me too.
anyone got an idea why that might be, is it side related?

Check all of the items you're loading in - i had that happen when I mistyped an inventory object. Apparently it didn't throw an error until you tried to loot the corpse.
 
i think it crashes because of this :
_aiunit addMagazine "Binocular";
_aiunit addMagazine "ItemCompass";
_aiunit addMagazine "ItemMap";
_aiunit addMagazine "ItemWatch";
_aiunit addMagazine "ItemFlashlight";
_aiunit addMagazine "ItemMatchbox";
_aiunit addMagazine "ItemToolbox";

d'oh theyre weapons not magazines >.<
 
great script, excellent work :)

does anyone have a list of skins one could use as skins for the AI troops?
BAF Soldiers and Takistani Insurgents dont really fit one my Taviana server :/
Page 1 of the Simple AI Tutorial, a person listed all the non-banned skins.
 
Anyone try setdamage on their AI units? It's non-functional for me... I can do a getDamage and find the ai unit's health, but I can't set it.

When I create the unit i'm calling a

[_aiunit] execvm "units\npc_damage.sqf";

And then doing something like

Code:
_ai = this select 0;
 
while{true} do {
 
if (some criteria) then {
 
_ai setdamage 1;
 
};
};

but nothing happens. I've got some reporting in the code that reports out the unit health before it gets set, and it just keeps spamming Damage 0. Any thoughts?

Edit:
Nevermind, it works now. I don't know why :/

Edit2:

It's because i'm an idiot, and I was randomizing my damage to the AI with floor(random 0.5). So it was always zero.
 
Anyone tell me what is up here?

I'm getting this error in my report log:

Code:
22:17:03 "AIUNIT: Creating TK_INS_Soldier_EP1 by <NULL-object> at [10277.4,12050.7,0]. Result:<NULL-object> | Loadout:["Remington870_lamp","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug"] / Num:13"
22:17:03 Error in expression <S;
 
WEST setFriend [RESISTANCE,1];
WEST setFriend [BANDITS,0];
WEST setFriend [S>
22:17:03  Error position: <setFriend [BANDITS,0];
WEST setFriend [S>
22:17:03  Error Type Any, expected Side

Only does this for one or two units , then the rest seem to be spawning properly? Here is my factions file:

Code:
waitUntil{initialized};
//0Day
createCenter BANDITS;
createCenter RESISTANCE;
createCenter SNIPERS;
//Survivors
WEST setFriend [RESISTANCE,1];
WEST setFriend [BANDITS,0];
WEST setFriend [SNIPERS,0];
//Bandits
BANDITS setFriend [RESISTANCE,0];
BANDITS setFriend [WEST,0];
BANDITS setFriend [CIVILIAN,0];//AI Units attack zeds
BANDITS setFriend [SNIPERS,0];
//AI Units
RESISTANCE setFriend [WEST,0.6];
RESISTANCE setFriend [BANDITS,0];
RESISTANCE setFriend [CIVILIAN,0];//AI Units attack zeds
RESISTANCE setFriend [SNIPERS,0];
//SNIPERS
SNIPERS setFriend [WEST,0];
SNIPERS setFriend [BANDITS,0];
SNIPERS setFriend [CIVILIAN,0];
SNIPERS setFriend [RESISTANCE,0];
 
Anyone tell me what is up here?

I'm getting this error in my report log:

Code:
22:17:03 "AIUNIT: Creating TK_INS_Soldier_EP1 by <NULL-object> at [10277.4,12050.7,0]. Result:<NULL-object> | Loadout:["Remington870_lamp","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug"] / Num:13"
22:17:03 Error in expression <S;
 
WEST setFriend [RESISTANCE,1];
WEST setFriend [BANDITS,0];
WEST setFriend [S>
22:17:03  Error position: <setFriend [BANDITS,0];
WEST setFriend [S>
22:17:03  Error Type Any, expected Side

Only does this for one or two units , then the rest seem to be spawning properly? Here is my factions file:

Code:
waitUntil{initialized};
//0Day
createCenter BANDITS;
createCenter RESISTANCE;
createCenter SNIPERS;
//Survivors
WEST setFriend [RESISTANCE,1];
WEST setFriend [BANDITS,0];
WEST setFriend [SNIPERS,0];
//Bandits
BANDITS setFriend [RESISTANCE,0];
BANDITS setFriend [WEST,0];
BANDITS setFriend [CIVILIAN,0];//AI Units attack zeds
BANDITS setFriend [SNIPERS,0];
//AI Units
RESISTANCE setFriend [WEST,0.6];
RESISTANCE setFriend [BANDITS,0];
RESISTANCE setFriend [CIVILIAN,0];//AI Units attack zeds
RESISTANCE setFriend [SNIPERS,0];
//SNIPERS
SNIPERS setFriend [WEST,0];
SNIPERS setFriend [BANDITS,0];
SNIPERS setFriend [CIVILIAN,0];
SNIPERS setFriend [RESISTANCE,0];


I'm not sure that you can create any center that you want.. I think the east/west/resistance/civilian are baked in as 'center' types. Not sure.
 
Anyone tell me what is up here?

I'm getting this error in my report log:

Code:
22:17:03 "AIUNIT: Creating TK_INS_Soldier_EP1 by <NULL-object> at [10277.4,12050.7,0]. Result:<NULL-object> | Loadout:["Remington870_lamp","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug"] / Num:13"
22:17:03 Error in expression <S;
 
WEST setFriend [RESISTANCE,1];
WEST setFriend [BANDITS,0];
WEST setFriend [S>
22:17:03  Error position: <setFriend [BANDITS,0];
WEST setFriend [S>
22:17:03  Error Type Any, expected Side

Only does this for one or two units , then the rest seem to be spawning properly? Here is my factions file:

Code:
waitUntil{initialized};
//0Day
createCenter BANDITS;
createCenter RESISTANCE;
createCenter SNIPERS;
//Survivors
WEST setFriend [RESISTANCE,1];
WEST setFriend [BANDITS,0];
WEST setFriend [SNIPERS,0];
//Bandits
BANDITS setFriend [RESISTANCE,0];
BANDITS setFriend [WEST,0];
BANDITS setFriend [CIVILIAN,0];//AI Units attack zeds
BANDITS setFriend [SNIPERS,0];
//AI Units
RESISTANCE setFriend [WEST,0.6];
RESISTANCE setFriend [BANDITS,0];
RESISTANCE setFriend [CIVILIAN,0];//AI Units attack zeds
RESISTANCE setFriend [SNIPERS,0];
//SNIPERS
SNIPERS setFriend [WEST,0];
SNIPERS setFriend [BANDITS,0];
SNIPERS setFriend [CIVILIAN,0];
SNIPERS setFriend [RESISTANCE,0];
SNIPERS isn't a side. Your options are EAST, WEST, RESISTANCE.

There are also ENEMY, FRIENDLY, CIVILIAN, SIDELOGIC. They all come with pre-conditions though, and i'm not positive that you can even use them.
 
Ah well , that sucks.. I wanted the Snipers and Bandits to hate each other, so there was a chance of some ambient gunfights... and I also wanted my castle AI patrol to hate both bandits and Snipers, but like Players ;)

If that made sense.. Guess I'll just have to keep snipers and bandits as friends, same old :p
 
Ah well , that sucks.. I wanted the Snipers and Bandits to hate each other, so there was a chance of some ambient gunfights... and I also wanted my castle AI patrol to hate both bandits and Snipers, but like Players ;)

If that made sense.. Guess I'll just have to keep snipers and bandits as friends, same old :p
Hahah - i think that Arma was designed to simulate a much more simple form of warfare.
 
Ah well , that sucks.. I wanted the Snipers and Bandits to hate each other, so there was a chance of some ambient gunfights... and I also wanted my castle AI patrol to hate both bandits and Snipers, but like Players ;)

If that made sense.. Guess I'll just have to keep snipers and bandits as friends, same old :p
If you make your castle WEST, and your bandits EAST, and your snipers RESISTANCE, then you can still accomplish that. Being limited to 3 factions is lame though I agree, especially when 1 of the factions is limited to share your faction. You would also have to hate east and resistance in this scenario though.
 
Hey all, 1stly thanks Axeman for putting this together.

I have A.I bandits, that will attack players working well.
I have changed their skins and their weapons.

but i can't get any equipment to load.

@Orcthrasher, earlier in the thread you posted this..
Code:
//Generate what the equipment will be - it's likely to be a map, but maybe.... :)
_rndLOut=floor(random 100);
_aiequipspawn=
switch (_rndLOut) do
{
case 0: {["Binocular_Vector"]};
case 1: {["ItemGPS"]};
case 2: {["ItemCompass"]};
case 3: {["NVGoggles"]};
case 4: {["Binocular"]};
 
default {["ItemMap"]};
};


does that work with axemans original OP?

if so can you tell me where to put it exactly please.

if that doesnt work with axemans A.I. does anyone know if there is a way to do similar as that?
 
If you make your castle WEST, and your bandits EAST, and your snipers RESISTANCE, then you can still accomplish that. Being limited to 3 factions is lame though I agree, especially when 1 of the factions is limited to share your faction. You would also have to hate east and resistance in this scenario though.

That's exactly what I've done, thanks for the suggestion. Nobody likes anybody in the factions list now, kind of like real life lol.. Thanks again for the tip :)
 
@Sycosis: How do I get the West AI to kill a player after taking a few of the West AI out ? before I just setfriend west to 0.6 , but I can't do that now? can I ?
 
@Sycosis: How do I get the West AI to kill a player after taking a few of the West AI out ? before I just setfriend west to 0.6 , but I can't do that now? can I ?
They should still turn on him, though it would take like 3 kills I suspect. I've added AI into my recent scripts which i'm about to publish that makes everyone hunt for bandits thanks to Sarge, and i've added an eventhandler that i'm trying to get working right now that reduces your humanity for killing units, which would make someone a bandit if they killed west. After I get this last kink worked out I will publish and you can add it to what you have.
 
2 Big ones that haven't been solved yet and I'm pretty sure others would like to see this added:

ONE: Anyone figured out how to keep the AI's fully stocked with AMMO (infinate ammo kind of thing)

TWO: Anyway to make the WEST AI immune to bullets from the WEST players ?

Also, I need recommendations for a good bus or heli pickup script.

Cheers.
 
They should still turn on him, though it would take like 3 kills I suspect. I've added AI into my recent scripts which i'm about to publish that makes everyone hunt for bandits thanks to Sarge, and i've added an eventhandler that i'm trying to get working right now that reduces your humanity for killing units, which would make someone a bandit if they killed west. After I get this last kink worked out I will publish and you can add it to what you have.

This hunting for Bandits addition, is that based on humanity? So I could allow a bandit who's only killed one or two people onto my camp, but anyone with a humanity below that will get nailed ? lol
 
Back
Top