Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

   After installing this on my server i have noticed when i disconnect to my server i get to lobby then after leaving lobby it freezes and i cannot completely exit the game without ctrlalttabbing... anyone else have this issue or anything like it?

That's an ArmA bug and not related to this mission release, It started with the last patch and happens if you spend longer than 10 minutes on any server.

Link to comment
Share on other sites

Is it possible to have a set of static AI and associated boxes reset after all AI units within 'X' range have been killed so that they will respawn and also spawn new boxes?  I have it set on my server so that AI have taken over Devil's Castle.  But as it stands once one group of players kills them all and loots the boxes then any other group has to wait until after the following restart several hours later to do it again.

 

Yes this is possible, but it is hardly static any more and rewriting the static stuff to make it dynamic (e.g. a mission) seems like a waste of time. You'd best convert it into an actual mission if you want this (which is actually not that hard and as a plus you are creating some content for everyone to enjoy ;-))

 

Hello, 

 

I have a problem with the mission "Ural Ambush" , impossible to validate 

 

Make sure all the AI are dead on that mission. Other then that, there seems to be an issue with missions not completing which we are looking into.

 

So if you are a hero in a hero mission the AI wont shoot at you? and bandit in bandit mission they wont bother you??

 

is there a way to control the humanity for this? 5000, and -5000 is too low of number.

 

also has this mod reduced the AI difficultly, they don't behave like a normal WAI AI (which are known to be super smart) and difficult to kill!

 

Nope AI will shoot at you either way. On the testbranch we are looking into making Hero AI behave a little different with warnings when you get too close, but on the current release there is nothing like that. Yes we reduced tactical awareness to Yellow since Red gave us some weird problems whilst testing. You might want to switch it back to Red and check if that suits your server better.

 

Hello there,

 

I would like to show these mission only if you got a GPS.

How can I do that ?

 

This is possible, but you'll have to rewrite the marker system to announce markers and write a custom mission marker that picks those up. This is actually a side project that i've been working on but it's nowhere near release, in other words, you'll have to write it yourself if you really want this.

 

That's an ArmA bug and not related to this mission release, It started with the last patch and happens if you spend longer than 10 minutes on any server.

 

 

^^ Which makes you wonder, did they even test 1.63 for more then 10 minutes...

Link to comment
Share on other sites

Need a little help. I tryed to do this on my own and cant get it to work.
If someone could look at what i have done and tell what is wrong.
I have an AI Hero Outpost on chernarus.
I put 4 groups of 6 ai in the static\default.sqf and cant get them to spawn in.
below is the config.sqf in the first spoiler
in the next spoiler is the default.sqf
In the system\server_monitor.sqf i put the following above allowConnection = true;  
ExecVM "\z\addons\dayz_server\WAI\init.sqf";
 
THIS IS AN UPDATE;
I Fixed it. i read about 30 post and found the answer. 
Link to comment
Share on other sites

Decided to give this another try and don't want to go through 48 pages.

 

How can I remove the hero missions? None of my players are bandits because I run PvE servers.

 

... Don't want to repeat something explained before + I think you've been here long enough to figure out the search function..

Link to comment
Share on other sites

I'm still with an issue with this system.. I just can't make the AI spawn with the gear set i created.

Can anyone help me?

 

I'm using it like this: 

//MAYOR
[
[22144.344, 19846.152, 0.001],	// Position
1,				// Number Of units
"hard",				// Skill level of unit (easy, medium, hard, extreme, Random)
"Random",			// Primary gun set number and rocket launcher.
10,				// Number of magazines
"Random",			// Backpack classname, use "Random" or classname here
"RU_Functionary1",		// Skin classname, use "Random" or classname here
"2",			        // Gearset number. "Random" for random gear set
"Bandit"			// AI Type, "Hero" or "Bandit".
] call spawn_group;
ai_gear0   = [["ItemBandage","ItemPainkiller"],["ItemKnife","ItemFlashlight"]];
ai_gear1   = [["ItemBandage","ItemPainkiller"],["ItemKnife","ItemFlashlight"]];
ai_gear2   = [["itemmorphine","ItemPainkiller"],["ItemKnife"]];
ai_gear_random	= [ai_gear0,ai_gear1];

I already tried to use these ways:

2,
"2",
"ai_gear2",
ai_gear2,

In this case, i want to use the ai_gear2.

What am i doing wrong?

Link to comment
Share on other sites

I'm still with an issue with this system.. I just can't make the AI spawn with the gear set i created.

Can anyone help me?

I'm using it like this:

//MAYOR
[
[22144.344, 19846.152, 0.001],	// Position
1,				// Number Of units
"hard",				// Skill level of unit (easy, medium, hard, extreme, Random)
"Random",			// Primary gun set number and rocket launcher.
10,				// Number of magazines
"Random",			// Backpack classname, use "Random" or classname here
"RU_Functionary1",		// Skin classname, use "Random" or classname here
"2",			        // Gearset number. "Random" for random gear set
"Bandit"			// AI Type, "Hero" or "Bandit".
] call spawn_group;
ai_gear0   = [["ItemBandage","ItemPainkiller"],["ItemKnife","ItemFlashlight"]];
ai_gear1   = [["ItemBandage","ItemPainkiller"],["ItemKnife","ItemFlashlight"]];
ai_gear2   = [["itemmorphine","ItemPainkiller"],["ItemKnife"]];
ai_gear_random	= [ai_gear0,ai_gear1];
I already tried to use these ways:

2,
"2",
"ai_gear2",
ai_gear2,
In this case, i want to use the ai_gear2.

What am i doing wrong?

In /compile/spawn_group.sqf

 

find

if(_gear == 1) exitWith {_aigear = ai_gear1;};
Add below

if(_gear == 2) exitWith {_aigear = ai_gear2;};
Link to comment
Share on other sites

Ok so I took your advice and edited one of the missions to become a custom mission instead of using a static one.  From what I can tell it appears to be set up properly but I can't get it to spawn the mission.  I removed all other missions in the bandit section except for this one and set it to 100% spawn chance.  I've been on the server for an hour and two hero missions spawned and then nothing.  There are no errors in the server RPT.  What am I missing?  Other bandit missions are still running despite the fact that I have taken them out of the config file as having a chance to run.

wai_bandit_missions = [
			["devils_castle",100]
						];

if(isServer) then {
	 
	private 		["_baserunover","_mission","_directions","_position","_crate","_crate_type","_num"];

	// Get a safe position 80 meters from the nearest object
	_position		= [[6883.49,11440.7,0.001]];
	
	// Initialise the mission variable with the following options, [position, difficulty, mission name, mission type (MainHero/Mainbandit), minefield (true or false)] call mission_init;
	_mission 		= [_position,"hard","Devil's Castle","MainBandit",true] call mission_init;

	diag_log 		format["WAI: Mission Devil's Castle started at %1",_position];

	//Setup the crate
	_crate1 = createVehicle ["USVehicleBox",[6883.49,11440.7,0.001],[],0,"CAN_COLLIDE"];
	_crate2 = createVehicle ["USVehicleBox",[6878.31,11443.5,0.002],[],0,"CAN_COLLIDE"];
	[_crate1,[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
	[_crate2,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;

	// Crate Spawn Example
	// Parameters:	0: _crate
	//				1: Max number of guns OR [MAX number of guns,gun_array]
	//				2: Max number of tools OR [MAX number of tools,tool_array]
	//				3: Max number of items OR [MAX number of items,item_array]
	//				4: Max number of backpacks OR [MAX number of backpacks,backpack_array]
	//[_crate,16,[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;
	 
	/*
	// Create some Buildings
	_baserunover0 	= createVehicle ["land_fortified_nest_big",[(_position select 0) - 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover1 	= createVehicle ["land_fortified_nest_big",[(_position select 0) + 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover2 	= createVehicle ["land_fortified_nest_big",[(_position select 0), (_position select 1) - 40,-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover3 	= createVehicle ["land_fortified_nest_big",[(_position select 0), (_position select 1) + 40,-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover4 	= createVehicle ["Land_Fort_Watchtower",[(_position select 0) - 10, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover5 	= createVehicle ["Land_Fort_Watchtower",[(_position select 0) + 10, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover6 	= createVehicle ["Land_Fort_Watchtower",[(_position select 0), (_position select 1) - 10,-0.2],[], 0, "CAN_COLLIDE"];
	_baserunover7 	= createVehicle ["Land_Fort_Watchtower",[(_position select 0), (_position select 1) + 10,-0.2],[], 0, "CAN_COLLIDE"];
	
	// Adding buildings to one variable just for tidiness
	_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7];
	
	// Set some directions for our buildings
	_directions = [90,270,0,180,0,180,270,90];
	{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;

	// Make buildings flat on terrain surface
	{ _x setVectorUp surfaceNormal position _x; } count _baserunover;
	*/
	// Group Spawn Examples
	// Parameters:	0: Position
	//				1: Unit Count
	//				2: Unit Skill ("easy","medium","hard","extreme" or "random")
	//				3: Guns (gun or [gun,launcher])
	//					Guns options	: (0 = ai_wep_assault, 1 = ai_wep_machine, 2 = ai_wep_sniper, "random" = random weapon, "Unarmed" = no weapon)
	//					Launcher options: (at = ai_wep_launchers_AT, aa = ai_wep_launchers_AA or "classname")
	//				4: Magazine Count
	//				5: Backpack ("random" or "classname")
	//				6: Skin ("Hero","bandit","random","special" or "classname")
	//				7: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
	//				8: AI Type ("bandit","Hero","special" or ["type", #] format to overwrite default gain amount) ***Used to determine humanity gain or loss***
	//				9: Mission variable from line 9 (_mission)
	_num = round (random 3) + 4;
	[[_position select 0, _position select 1, 0],_num,"extreme",["random","at"],4,"random","bandit","random",["bandit",150],_mission] call spawn_group;
	[[_position select 0, _position select 1, 0],4,"hard","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
	[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
	[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
	[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
	[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;	
	[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;
	
	// Humvee Patrol Example
	// Parameters:	0: Patrol position
	//				1: Starting position
	//				2: Patrol radius
	//				3: Number of Waypoints
	//				4: Vehicle classname
	//				5: Unit Skill ("easy","medium","hard","extreme" or "random")
	//				6: Skin ("Hero","bandit","random","special" or "classname")
	//				7: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
	//				8: Mission variable from line 9 (_mission)
	//[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","random","bandit","bandit",_mission] call vehicle_patrol;
	 
	// Static Turret Examples
	// Parameters:	0: Spawn position
	//				1: Classname ("classname" or "random" to pick from ai_static_weapons)
	//				2: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
	//				3: Skin ("Hero","bandit","random","special" or "classname")
	//				4: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
	//				5: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random") ***NO effect if ai_static_useweapon = false;***
	//				6: Magazine Count ***NO effect if ai_static_useweapon = false;***
	//				7: Backpack ("random" or "classname") ***NO effect if ai_static_useweapon = false;***
	//				8: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random") ***NO effect if ai_static_useweapon = false;***
	//				9: Mission variable from line 9 (_mission)
	
	[[[(_position select 0) - 10, (_position select 1) + 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
	[[[(_position select 0) + 10, (_position select 1) - 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
	

	// Heli Paradrop Example
	// Parameters:	0: Paradrop position
	//				1: Spawn position
	//				2: Trigger radius
	//				3: Vehicle classname
	//				4: Amount of paratroopers
	//				5: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***
	//				6: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random")
	//				7: Magazine Count
	//				8: Backpack ("random" or "classname")
	//				9: Skin ("Hero","bandit","random","special" or "classname")
	//				10: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")
	//				11: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***
	//				12: Heli stay and fight after troop deployment? (true or false)
	//				13: Mission variable from line 9 (_mission)
	[[(_position select 0), (_position select 1), 0],[0,0,0],400,"UH1H_DZ",10,"random","random",4,"random","bandit","random","bandit",true,_mission] spawn heli_para;

	// Assassination target example
	// This is the same as normal group spawns but we assign it to a variable instead for use in the trigger below (if there are multiple units in this group you'll need to kill them all)
	//_assassinate = [[_position select 0, _position select 1, 0],1,"hard","random",4,"random","special","random","bandit",_mission] call spawn_group;

	// Mission objective options and messages
	[
		[_mission,_crate],	// mission variable (from line 9) and crate
		["crate"], 			// Mission objective type (["crate"], or ["kill",wai_kill_percent], or ["assassinate", _assassinate])
		[_baserunover], 	// buildings to cleanup after mission is complete, does not include the crate
		"Bandits have taken over Devil's Castle!  The risk is great, but the rewards are plenty!",	// mission announcement
		"Devil's Castle is safe once again!",			// mission success
		"The bandits have dug in and permanently secured their location."	// mission fail
	] call mission_winorfail;

	// End of mission
	diag_log format["WAI: Mission bandit base ended at %1 ended",_position];

	h_missionrunning = false;
};

Link to comment
Share on other sites

@Darth_Rogue: You need to define at least one _crate in order for it crate missions to work.

--

@BetterDeadThenZed: Wicked AI is - code-wise - nothing like the old one. Fundamentals have changed and you've got to read yourself into them before attempting to install a static mission. We've included an example with clear instructions on how to use the static AI. Before anything read that and change your custom mission accordingly. If you have trouble converting please post your file and let others help you.

About only wanting to spawn Bandit missions, there's a few ways to do this. If you want multiple missions enabled simply copy all the bandit missions into the hero missions folder and replace the hero missions array in config.sqf with the bandit one. If not, simply remove the second timer from the init.sqf.

Link to comment
Share on other sites

@Darth_Rogue: You need to define at least one _crate in order for it crate missions to work.

--

 

 

 

So this is not sufficient?

//Setup the crate
	_crate1 = createVehicle ["USVehicleBox",[6883.49,11440.7,0.001],[],0,"CAN_COLLIDE"];
	_crate2 = createVehicle ["USVehicleBox",[6878.31,11443.5,0.002],[],0,"CAN_COLLIDE"];
	[_crate1,[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
	[_crate2,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;

Or should it be:

//Setup the crate
	_crate = createVehicle ["USVehicleBox",[6883.49,11440.7,0.001],[],0,"CAN_COLLIDE"];
	_crate1 = createVehicle ["USVehicleBox",[6878.31,11443.5,0.002],[],0,"CAN_COLLIDE"];
	[_crate,[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
	[_crate1,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;

Also, I'm getting this error in my RPT.  I can't see where it's tied to anything in WAI but it only began appearing when I installed the custom bandit mission.  I'm trying to get it to spawn at specific coords but it's not working.  And it seems anytime it tries to load it gives this error:

23:26:34 Error in expression <X", "_newY", "_testPos"];
_newX = _posX + (_maxDist - (random (_maxDist * 2)));
>
23:26:34   Error position: <+ (_maxDist - (random (_maxDist * 2)));
>
23:26:34   Error Generic error in expression
23:26:34 File ca\modules\functions\misc\fn_findSafePos.sqf, line 90 

I have the coords listed in the mission file as:

if(isServer) then {
	 
	private 		["_baserunover","_mission","_directions","_position","_crate","_crate_type","_num"];

	// Get a safe position 80 meters from the nearest object
	_position		= [[6883.49,11440.7,0.001]];
	
	// Initialise the mission variable with the following options, [position, difficulty, mission name, mission type (MainHero/Mainbandit), minefield (true or false)] call mission_init;
	_mission 		= [_position,"hard","Devil's Castle","MainBandit",true] call mission_init;
 

What am I doing wrong?

Link to comment
Share on other sites

Which one? the top section?

 

//Setup the crate
    _crate1 = createVehicle ["USVehicleBox",[6883.49,11440.7,0.001],[],0,"CAN_COLLIDE"];
    _crate2 = createVehicle ["USVehicleBox",[6878.31,11443.5,0.002],[],0,"CAN_COLLIDE"];
    [_crate1,[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
    [_crate2,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;

Link to comment
Share on other sites

I have a prison I created on an island. I have placed 4 AI there with the police skin. I'd like to give them shotguns. In config.sqf, I added this line:

ai_wep_shotgun = [["Winchester1866","15Rnd_W1866_Slug"],["MR43","8Rnd_B_Beneli_Pellets"],["M1014","8Rnd_B_Beneli_74Slug"],["Remington870_lamp","8Rnd_B_Beneli_74Slug"]];

This is the code to spawn these guys:

[
     [825.44647, 6901.1753, 0],      // Position
     4,                              // Number Of units
     "Easy",                         // Skill level of unit (easy, medium, hard, extreme, Random)
     "Random",                       // Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher
     4,                              // Number of magazines
     "",                             // Backpack classname, use "Random" or classname here
     "RU_Policeman_DZ",              // Skin classname, use "Random" or classname here
     "Random",                       // Gearset number. "Random" for random gear set
     "Bandit"                        // AI Type, "Hero" or "Bandit".
] call spawn_group;

I opened spawn_static.sqf and added this line:

if(_gun == 3)  exitWith { _aiweapon = ai_wep_shotgun; };

I tried setting the primary gun number to "3" and to 3 and neither worked. They spawn without a weapon.

Link to comment
Share on other sites

In /compile/spawn_group.sqf

 

find

if(_gear == 1) exitWith {_aigear = ai_gear1;};
Add below

if(_gear == 2) exitWith {_aigear = ai_gear2;};

 

------------------------------------

 

 

I have a prison I created on an island. I have placed 4 AI there with the police skin. I'd like to give them shotguns. In config.sqf, I added this line:

ai_wep_shotgun = [["Winchester1866","15Rnd_W1866_Slug"],["MR43","8Rnd_B_Beneli_Pellets"],["M1014","8Rnd_B_Beneli_74Slug"],["Remington870_lamp","8Rnd_B_Beneli_74Slug"]];

This is the code to spawn these guys:

[
     [825.44647, 6901.1753, 0],      // Position
     4,                              // Number Of units
     "Easy",                         // Skill level of unit (easy, medium, hard, extreme, Random)
     "Random",                       // Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher
     4,                              // Number of magazines
     "",                             // Backpack classname, use "Random" or classname here
     "RU_Policeman_DZ",              // Skin classname, use "Random" or classname here
     "Random",                       // Gearset number. "Random" for random gear set
     "Bandit"                        // AI Type, "Hero" or "Bandit".
] call spawn_group;

I opened spawn_static.sqf and added this line:

if(_gun == 3)  exitWith { _aiweapon = ai_wep_shotgun; };

I tried setting the primary gun number to "3" and to 3 and neither worked. They spawn without a weapon.

 

Hey @Betterdead, 

like f3cuk said in a few posts above, you should make the shotgun edit in the spawn_group.sqf like the example he gave me, but in the specific variable, for guns...

Then in the spawn_static you should only add the number of reference. for example:

 

in the spawn_group you add this line:

if(_gun == 3) exitWith { _aiweapon = ai_wep_shotgun; };

in the config.cfg you add this:

ai_wep_shotgun = [["Winchester1866","15Rnd_W1866_Slug"],["MR43","8Rnd_B_Beneli_Pellets"],["M1014","8Rnd_B_Beneli_74Slug"],["Remington870_lamp","8Rnd_B_Beneli_74Slug"]];

and in the spawn_static this:

 3,                       // Primary gun set number

Maybe i'm wrong, but i think you will understand the logic =D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Advertisement
×
×
  • Create New...