Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

 

I havd the same problem.

That is easy to do.

There is my custom spawn file: WAI\static\default.sqf

Analize this and you get your answer.

I use default build in boxes with edited content and one customize box created by my self called Pck_box.

All works well.

if(isServer) then {


	//Custom Spawns file//
	/*
	Custom group spawns Eg.

	[
		[953.237,4486.48,0.001],			// Position
		4,									// Number Of units
		"Random",							// Skill level of unit (easy, medium, hard, extreme, Random)
		"Random",							// Primary gun set number. "Random" for random weapon set
		4,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Random",							// Skin classname, use "Random" or classname here
		"Random"							// Gearset number. "Random" for random gear set
	] call spawn_group;

	Place your custom group spawns below
	*/

[[8147.00,8564.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[10700.0,6810.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[11144.0,7806.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[9336.00,3584.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[9244.00,4978.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[11074.0,5312.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[5740.00,9634.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[8664.00,11182.0,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[7632.00,5806.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[3104.00,9278.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[4128.00,5470.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[2656.00,2950.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[3032.00,2078.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[5488.00,2078.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[5024.00,3934.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[4648.00,7590.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[10424.0,9150.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[9288.00,2054.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[13040.0,3854.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[13376.0,6662.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[8000.00,7150.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[2152.00,4766.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[2824.00,7102.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[5809.00,7442.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[5910.00,5831.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;
[[7094.00,4508.00,0],2,"Random","Random",4,"Random","Random","Random"] call spawn_group;



/*
	Custom static weapon spawns Eg. (with mutiple positions)

	[
		[									// Position(s) (can be multiple)
			[911.21,4532.76,2.62],
			[921.21,4542.76,2.62]
		],
		"M2StaticMG",						// Classname of turret
		"easy",								// Skill level of unit (easy, medium, hard, extreme, Random)
		"Bandit2_DZ",						// Skin classname, use "Random" or classname here
		"Random",							// Primary gun set number. "Random" for random weapon set
		2,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Random"							// Gearset classname, use "Random" or classname here
	] call spawn_static;

	Place your custom static weapon spawns below
	*/
[[[4382.14,10631.1,0.001]],"Igla_AA_pod_East","hard","TK_GUE_Soldier_AAT_EP1","Random",4,"Random","Random"] call spawn_static;
[[[4515.79,10616.1,0.001]],"M2StaticMG","hard","Bandit2_DZ","Random",4,"Random","Random"] call spawn_static;
[[[4383.74,10596.1,0.001]],"M2StaticMG","medium","Bandit2_DZ","Random",4,"Random","Random"] call spawn_static;




/*
	Custom Chopper Patrol spawn Eg.

	[
		[725.391,4526.06,0],				// Position to patrol
		[0,0,0],							// Position to spawn chopper at
		2000,								// Radius of patrol
		10,									// Number of waypoints to give
		"UH1H_DZ",							// Classname of vehicle (make sure it has driver and two gunners)
		"Random"							// Skill level of units (easy, medium, hard, extreme, Random)
	] spawn heli_patrol;

	Place your heli patrols below
	*/






		/* 
	Custom Vehicle patrol spawns Eg. (Watch out they are stupid)

	[
		[725.391,4526.06,0],				// Position to patrol
		[725.391,4526.06,0],				// Position to spawn at
		200,								// Radius of patrol
		10,									// Number of waypoints to give
		"HMMWV_Armored",					// Classname of vehicle (make sure it has driver and gunner)
		"Random"							// Skill level of units (easy, medium, hard, extreme, Random)
	] spawn vehicle_patrol;

	Place your vehicle patrols below this line
	*/
[[4358.00,10374.0,0],[4488.00,10711.0,0],50,10,"HMMWV_M2_USArmy","easy"] spawn vehicle_patrol;
[[4492.00,10347.0,0],[4535.00,10663.0,0],50,10,"HMMWV_M998_crows_M2_DES_EP1","medium"] spawn vehicle_patrol;
[[4472.00,10447.0,0],[4635.00,10763.0,0],50,10,"HMMWV_TOW_DES_EP1","hard"] spawn vehicle_patrol;



	/*
	Paradropped unit custom spawn Eg.

	[
		[911.21545,4532.7612,2.6292224],	// Position that units will be dropped by
		[0,0,0],							// Starting position of the heli
		400,								// Radius from drop position a player has to be to spawn chopper
		"UH1H_DZ",							// Classname of chopper (Make sure it has 2 gunner seats!)
		5,									// Number of units to be para dropped
		"Random",							// Skill level of units (easy, medium, hard, extreme, Random)
		"Random",							// Primary gun set number. "Random" for random weapon set.
		4,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Bandit2_DZ",						// Skin classname, use "Random" or classname here
		"Random",							// Gearset number. "Random" for random gear set.
		true								// true: Aircraft will stay at position and fight. false: Heli will leave if not under fire. 
	] spawn heli_para;

	Place your paradrop spawns under this line
	*/
// BanditsSupplyBase
[[4420.63,10648.0,0],[1130.00,7294.00,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",false] spawn heli_para;
[[4440.63,10648.0,0],[1140.00,7294.00,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",true] spawn heli_para;
[[4430.63,10648.0,0],[1120.00,7294.00,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",true] spawn heli_para;
//NEAF
//[[12360.0,12598.0,0],[11736.0,14330.0,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",true] spawn heli_para;
[[12370.0,12598.0,0],[11746.0,14330.0,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",true] spawn heli_para;
//BALOTA
//[[4777.00,2515.00,0],[4344.00,166.000,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",true] spawn heli_para;
[[4787.00,2515.00,0],[4354.00,166.000,100],300,"UH1H_DZ",5,"Random","Random",4,"Random","Bandit2_DZ","Random",true] spawn heli_para;
	diag_log "WAI: Static mission loaded";

//Boxes
//Bandit Supply Base
_box = createVehicle ["BAF_VehicleBox",[4491.11,10634.4,0.001], [], 0, "CAN_COLLIDE"];
[_box] call Construction_Supply_Box;
_box1 = createVehicle ["BAF_VehicleBox",[4467.0278,10659.71,-3.0517578e-005], [], 0, "CAN_COLLIDE"];
[_box1,5,15,3] call spawn_ammo_box;
_box2 = createVehicle ["BAF_VehicleBox",[4403.1333,10581.208,-3.0517578e-005], [], 0, "CAN_COLLIDE"];
[_box2] call Chain_Bullet_Box;
_box3 = createVehicle ["BAF_VehicleBox",[4423.4888,10611.725,6.1035156e-005], [], 0, "CAN_COLLIDE"];
[_box3] call Extra_Large_Gun_Box;

//PCK
Pck_Box	= compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\static\boxes\Pck_Box.sqf";

_box4 = createVehicle ["RUBasicWeaponsBox",[2655.64,2296.98,0.2], [], 0, "CAN_COLLIDE"];
[_box4] call Pck_Box;
_box5 = createVehicle ["RUBasicWeaponsBox",[7551.63,3908.92,0.1], [], 0, "CAN_COLLIDE"];
[_box5] call Pck_Box;
_box6 = createVehicle ["RUBasicWeaponsBox",[10943.7,3382.27,0.4], [], 0, "CAN_COLLIDE"];
[_box6] call Pck_Box;
_box7 = createVehicle ["RUBasicWeaponsBox",[12988.4,5972.07,0.75], [], 0, "CAN_COLLIDE"];
[_box7] call Pck_Box; 
};
[/code]
Hmm so to add my custom boxes i only need to add them to WAI\static\default.sqf with apropriete calls ?

What i did:

to \WAI\compile added my 3 boxes that i use since wai 1.73

In main init.sqf i did:


	if (ai_mission_system) then {
		ExecVM "\z\addons\dayz_server\WAI\missions\init.sqf";
		ExecVM "\z\addons\dayz_server\WAI\static\StaticAmmoBoxes.sqf";
	};

};
In \\WAI\missions\init.sqf i added:

//A.I Island 
	My_Precious_Box                 = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\MyPreciousBox.sqf";
    AI_Base_Box                     = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\AIBaseBox.sqf";
    AI_Build_Box                    = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\AIBuildBox.sqf";

My \WAI\static\StaticAmmoBoxes.sqf    looks like this:

 

_box = createVehicle ["BAF_VehicleBox",[478.375,421.594,0.0], [], 0, "CAN_COLLIDE"];
[_box] call AI_Base_Box;       //Market

_box1 = createVehicle ["RUVehicleBox",[416.691,478.509,0.0], [], 0, "CAN_COLLIDE"];
[_box1] call My_Precious_Box;         // PAS

_box2 = createVehicle ["RUVehicleBox",[529.257,349.877,0.0], [], 0, "CAN_COLLIDE"];
[_box2] call AI_Build_Box;                 ////Build

And as result i get error like this:

 

11:32:22 "WAI: AI Monitor Started"
11:32:22 "WAI: Initialising static missions"
11:32:22 "WAI: Initialising missions"
11:32:23 Error in expression <.0], [], 0, "CAN_COLLIDE"];
[_box] call AI_Base_Box;       

_box1 = createVehic>
11:32:23   Error position: <AI_Base_Box;       

_box1 = createVehic>
11:32:23   Error Undefined variable in expression: ai_base_box
11:32:23 File z\addons\dayz_server\WAI\static\StaticAmmoBoxes.sqf, line 20
11:32:23 "WAI: Static mission loaded"
11:32:23 "HIVE: WRITE: "CHILD:388:46279260970101:""
11:32:23 "CUSTOM: Selected "2159""
11:32:25 Error in expression <0], [], 0, "CAN_COLLIDE"];
[_box1] call My_Precious_Box;         

_box2 = creat>
11:32:25   Error position: <My_Precious_Box;         

_box2 = creat>
11:32:25   Error Undefined variable in expression: my_precious_box
11:32:25 File z\addons\dayz_server\WAI\static\StaticAmmoBoxes.sqf, line 23
11:32:25 "WAI: Paradrop waiting for player"

The question is what i did wrong ?

Link to comment
Share on other sites

@xywtez

Analize this:

and the  reply below that post.

@mdswish

 

There are major structure and files changes in WAI directory.

You dont need to overwrite files of existing old WAI.

Move old WAI  directory to WAI_old.

Comment in the old trigger in server_monitor.sqf like that:

	[] call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf";
//	[] ExecVM "\z\addons\dayz_server\WAI\init.sqf";
	[] ExecVM "\z\addons\dayz_server\EMS\DZMSInit.sqf";
	allowConnection = true;	
	sm_done = true;
	publicVariable "sm_done"; 

Add the new WAI directory and the exec line in server_functions.sqf down there

ExecVM "\z\addons\dayz_server\WAI\init.sqf";

You can always easilly move back to the old one changing only the trigger.

Link to comment
Share on other sites

What files have been changed in this update? I have done a lot of custom stuff with the default.sqf and config and would really rather not have to redo it all again if possible.  

 

It's a major overhaul from the previous version, I would recommend waiting for the next major update until considering this because there will be changes in the custom spawn calls

Link to comment
Share on other sites

It's a major overhaul from the previous version, I would recommend waiting for the next major update until considering this because there will be changes in the custom spawn calls

 

 

I mean the 2.0.2 update.  I already updated from 1.6 to 2.0 and it's been running well with no errors.  Just wanted to see if there was any compelling reason to update if everything is working ok already.

Link to comment
Share on other sites

I mean the 2.0.2 update.  I already updated from 1.6 to 2.0 and it's been running well with no errors.  Just wanted to see if there was any compelling reason to update if everything is working ok already.

ah well in that case any patch that only increments that last number number should be compatible, easiest way is to use winmerge or similar and compare the files

 

It was probably the bug fixes to heli patrol and flares

Edited by Jossy
Link to comment
Share on other sites

Could someone please show me how this work:

_rndnum = round (random 3) + 4;

This returns 1+4=5 , 2+4=6, 3+4=7  ?? 

and that:

_rndnum = floor(random 7);

This returns 1,2,3,4,5,6  ??

 

Is that right?

 

I try to search about my self but idk even how i should call it.

Edited by DaVIdoSS
Link to comment
Share on other sites

Something else you may want to consider as a feature f3cuk, a chance to spawn for each mission, some missions might be meant to be rarer or maybe just the harder ones come up less often. Just a thought.

That is already a feature if you just add the same mission twice in the config

For example:

wai_missions= ["medi_camp","medi_camp","medi_camp","medi_camp","black_hawk_crash","armed_vehicle","bandit_base","captured_mv22","ikea_convoy","destroyed_ural","disabled_milchopper","mayors_mansion","weapon_cache"];

it is certainly something that could be done easily enough though, perhaps he will throw it on the future updates

 

 

Are the mission random or on a ratio scale ?

 

Because sometimes I get Ural attack and Weapons Cache like 3 times in a row, Don't know if this is just bad luck or the script xD

 

see above :P

Edited by Jossy
Link to comment
Share on other sites

That is already a feature if you just add the same mission twice in the config

For example:

wai_missions= ["medi_camp","medi_camp","medi_camp","medi_camp","black_hawk_crash","armed_vehicle","bandit_base","captured_mv22","ikea_convoy","destroyed_ural","disabled_milchopper","mayors_mansion","weapon_cache"];

it is certainly something that could be done easily enough though, perhaps he will throw it on the future updates

 

 
 

see above :P

Ahh nice man, didn't think of that, thanks!

Link to comment
Share on other sites

For some reason the tank traps dont disapear after the missions ends, but the mines do, could a mod like plot 4 life or deploy anything have something to do?

 

Identified and fixed.

 

--

Update 2.0.3

Fixed some minor issues with 2.0.2

Changelog

2.0.3

  • Fixed issue with tank traps not disappearing after MV-22 mission
Please update to the latest version or do the changes yourself.

Download

Link to comment
Share on other sites

I had a question too, I've selected static positions for my missions to spawn at for now, after the players have completed the missions the box and buildings stay though, is there some way to put in a sleep after they trigger the end of it then remove all the structures and the box effectively clearing the ground again? So like give them like 15 minutes to loot everything after the mission has completed then it despawns all the buildings and the box?

Link to comment
Share on other sites

I had a question too, I've selected static positions for my missions to spawn at for now, after the players have completed the missions the box and buildings stay though, is there some way to put in a sleep after they trigger the end of it then remove all the structures and the box effectively clearing the ground again? So like give them like 15 minutes to loot everything after the mission has completed then it despawns all the buildings and the box?

Hi Havoc302,

Sorry I have missed that one.

First off i'd like to let you know that I have not seen any weirdly placed missions on the current code. Therefore the need of static mission places should no longer exist.

--

I like your suggestion, but what if there are still people looting or inside the mission buildings? Will they just fall down and see the loot disappearing in front of them?

Link to comment
Share on other sites

I mean the 2.0.2 update.  I already updated from 1.6 to 2.0 and it's been running well with no errors.  Just wanted to see if there was any compelling reason to update if everything is working ok already.

 

I have now linked the version numbers in the OP to the actual changes done. If you want to upgrade a minor version, simply click those and do them individually.

Link to comment
Share on other sites

 

Identified and fixed.

 

--

Update 2.0.3

Fixed some minor issues with 2.0.2

Changelog

2.0.3

  • Fixed issue with tank traps not disappearing after MV-22 mission
Please update to the latest version or do the changes yourself.

Download

 

 

 

Could that same fix also be used on other missions as well?  I did the Ikea Convoy the other day and the tank traps persisted after completion of the mission.  I could also not remove them manually even with a toolbox as you normally can with tank traps. 

Link to comment
Share on other sites

Hi Havoc302,

Sorry I have missed that one.

First off i'd like to let you know that I have not seen any weirdly placed missions on the current code. Therefore the need of static mission places should no longer exist.

--

I like your suggestion, but what if there are still people looting or inside the mission buildings? Will they just fall down and see the loot disappearing in front of them?

I would probably put a message that comes up 5 minutes before they despawn with some sort of warning. Players get used to it pretty fast too. The reason I've stuck with fixed locations is so we don't get mission spawning on top of players bases, I've set 11 possible positions they can spawn at which keeps them away from anything to sensitive, my AI have things like Stingers and M107's, so they tend to be pretty brutal to someone straying even within 1K of the mission :P

Link to comment
Share on other sites

Why are there 2 dif Githubs with completly dif files in them?

 

Testbranch is for future release with lots of untested code and thus should never be used. The master has the latest stable files.

--

 

I would probably put a message that comes up 5 minutes before they despawn with some sort of warning. Players get used to it pretty fast too. The reason I've stuck with fixed locations is so we don't get mission spawning on top of players bases, I've set 11 possible positions they can spawn at which keeps them away from anything to sensitive, my AI have things like Stingers and M107's, so they tend to be pretty brutal to someone straying even within 1K of the mission :P

Okay :P Well i quess you could do a simple

 

Sleep 1500;
[nil,nil,rTitleText,"Warning: 5 minutes left to loot the bandit base mission", "PLAIN",10] call RE;
Sleep 300;
deleteVehicle _box;
deleteVehicle _baserunover;
etc.
Just add that after

 

[_box,"Survivors captured the base, HOOAH!!",[_tanktraps,_mines]] call mission_succes;
---

Nice, but i use ems and dzai, will this conflict with the other systems like 0.173 does plus running overpoch with the skins on players ai didn't detect players, i had to remove the wai shame as i liked the missions and easy setup on custom spawns

To be honest -> No clue. I'd say go for it and let us know. As far as i know all vars have been privately defined so it shouldn't mix up with other stuff.

Link to comment
Share on other sites

 

Testbranch is for future release with lots of untested code and thus should never be used. The master has the latest stable files.

--

Okay :P Well i quess you could do a simple

 

Sleep 1500;
[nil,nil,rTitleText,"Warning: 5 minutes left to loot the bandit base mission", "PLAIN",10] call RE;
Sleep 300;
deleteVehicle _box;
deleteVehicle _baserunover;
etc.
Just add that after

[_box,"Survivors captured the base, HOOAH!!",[_tanktraps,_mines]] call mission_succes;

Awesome!, thanks man, that's perfect.

 

On another note, I have a couple of missions I've made, one little easy one for the noobies and one we've given a difficulty level of "Ultra Mega Doom", I can PM you a Google Drive link if you're interested.

Link to comment
Share on other sites

Could that same fix also be used on other missions as well?  I did the Ikea Convoy the other day and the tank traps persisted after completion of the mission.  I could also not remove them manually even with a toolbox as you normally can with tank traps.

You are right, fixed in the latest.

---

Update 2.0.4

Fixed some minor issues with 2.0.3

Changelog

2.0.4

  • Fixed issue with tank traps not disappearing after Ikea mission
Please update to the latest version or do the changes yourself.

Download

Link to comment
Share on other sites

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