Jump to content

Wicked AI/Mission system


Markk311

Recommended Posts

So i wanted some items to spawn in my ammo boxes so changed some files as following:

 

WAI\missions\missionCfg.sqf

ammo_box_items=["ItemBriefcase100oz","ItemGoldBar10oz"];

This line after the tools. This is just example of items. My plan is to fill this with buildables and other stuff for epoch.

 

 

And also in

WAI\missions\complie\ammobox.sqf

private ["_mags","_tool","_position","_box","_class","_numberofguns","_numberoftools","_numberofitems","_item","_weapon","_namecfg"];
_position = _this select 0;

_box = createVehicle ["BAF_VehicleBox",[(_position select 0),(_position select 1),0], [], 0, "CAN_COLLIDE"];
clearWeaponCargoGlobal _box;
clearMagazineCargoGlobal _box;

_numberofguns = round(random 5) + 5;
_numberoftools = round(random 5) + 5;
_numberofitems = round(random 5) + 5;

for "_i" from 1 to _numberofguns do {
	_weapon = ammo_box_guns call BIS_fnc_selectRandom;
	_mags = getArray (configFile >> "cfgWeapons" >> _weapon >> "magazines");
	_box addWeaponCargoGlobal [_weapon,1];
	_box addMagazineCargoGlobal [(_mags select 0),round(random 2) + 1];
};

for "_i" from 1 to _numberoftools do {
	_tool = ammo_box_tools call BIS_fnc_selectRandom;
	_box addWeaponCargoGlobal [_tool,2];
};

for "_i" from 1 to _numberofitems do {
	_item = ammo_box_items call BIS_fnc_selectRandom;
	_box addMagazineCargoGlobal [_item,3];
};

Tested under 1.0.2.5 unfortunately DayZ.ST still using that version and cant change to 1.0.3 to test it.

 

 

Also if you duplicate the bottom part of the ammobox.sqf and make another variables for currency items only it is possible to do the same and make a seperate part from items for only the currency items. To control their spawned in number. The number of item groups is only up the the user.

I'll put this in the next version. Thanks

Link to comment
Share on other sites

Place your custom static weapon spawns below

*/
[[[4002.7345,8116.1475,0],[3998.2585,8119.2454,0]],"M2StaticMG",0.5,1,"Bandit2_DZ",2,"","Random"] call spawn_static;
 
 
 
 
/*
 
I used this and nothing is popping up? tried a few variations. Could you elaborate on the system to call custom spawnws? 
 
Btw my ammo boxes are staying...I even added the boxes from the EMS mission system to spawn in your missions as they are wayyyyyyy better. 
Link to comment
Share on other sites

 

Place your custom static weapon spawns below

*/
[[[4002.7345,8116.1475,0],[3998.2585,8119.2454,0]],"M2StaticMG",0.5,1,"Bandit2_DZ",2,"","Random"] call spawn_static;
 
 
 
 
/*
 
I used this and nothing is popping up? tried a few variations. Could you elaborate on the system to call custom spawnws? 
 
Btw my ammo boxes are staying...I even added the boxes from the EMS mission system to spawn in your missions as they are wayyyyyyy better. 

 

looks like every thing is fine errors in your RPT?

Link to comment
Share on other sites

 Error in expression <With {};


{_position2 = _x;

if (_skin == "") then {
_aiskin = ai_skin call BIS>
 0:11:14   Error position: <== "") then {
_aiskin = ai_skin call BIS>
 0:11:14   Error Generic error in expression
 0:11:14 File z\addons\dayz_server\WAI\compile\SpawnStatic.sqf, line 26

Any idea? 

 

[[[911.21545,4532.7612,2.6292224],[921.21545,4532.7612,2.6292224]], //position(s) (can be multiple).
"M2StaticMG",             //Classname of turret
0.5,                      //Skill level 0-1. Has no effect if using custom skills
"Bandit2_DZ",              //Skin "" for random or classname here.
1,                          //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2,                          //Number of magazines. (not needed if ai_static_useweapon = False)
"",                          //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"                  //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static

My fault. Custom spawns is wrong

Link to comment
Share on other sites

I am having issues with the custom spawns

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

[[953.237,4486.48,0.001], //position
4,						  //Number Of units
1,					      //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",			      //Primary gun set number. "Random" for random weapon set.
4,						  //Number of magazines
"",						  //Backpack "" for random or classname here.
"Bandit2_DZ",			  //Skin "" for random or classname here.
"Random"                  //Gearset number. "Random" for random gear set.
] call spawn_group;

Place your custom group spawns below
*/





/*
Custom static weapon spawns Eg. (with one position)

[[[911.21545,4532.7612,2.6292224]], //position(s) (can be multiple).
"M2StaticMG",             //Classname of turret
0.5,					  //Skill level 0-1. Has no effect if using custom skills
"Bandit2_DZ",			  //Skin "" for random or classname here.
1,						  //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2,						  //Number of magazines. (not needed if ai_static_useweapon = False)
"",						  //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"				  //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static;

Custom static weapon spawns Eg. (with mutiple positions)

[[[911.21545,4532.7612,2.6292224],[921.21545,4532.7612,2.6292224]], //position(s) (can be multiple).
"M2StaticMG",             //Classname of turret
0.5,					  //Skill level 0-1. Has no effect if using custom skills
"Bandit2_DZ",			  //Skin "" for random or classname here. 
1,						  //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2,						  //Number of magazines. (not needed if ai_static_useweapon = False)
"",						  //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"				  //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static;

Place your custom static weapon spawns below
*/

[[[12426.7,12540.2,0.001],[4706.14,2531.7,0.001]], //position(s) (can be multiple).
"M2StaticMG",             //Classname of turret
0.5,					  //Skill level 0-1. Has no effecme here.
1,						  //Primary gun set number. "Rat if using custom skills
"Bandit2_DZ",			  //Skin "" for random or classnandom" for random weapon set. (not needed if ai_static_useweapon = False)
2,						  //Number of magazines. (not needed if ai_static_useweapon = False)
"",						  //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"				  //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] 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)
1						//Skill level of units 
] 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)
1						//Skill level of units 
] spawn vehicle_patrol;

Place your vehicle patrols below this line
*/

[[12261.9,12652.7,0],   //Position to patrol
[12261.9,12652.7,0],	// Postition 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)
1						//Skill level of units 
] spawn vehicle_patrol;

[[13388.3,6679.11,0],   //Position to patrol
[13388.3,6679.11,0],	// Postition 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)
1						//Skill level of units 
] spawn vehicle_patrol;

[[4803.34,2456.95,0],   //Position to patrol
[4803.34,2456.95,0],	// Postition 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)
1						//Skill level of units 
] 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
1,                                 //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",                          //Primary gun set number. "Random" for random weapon set.
4,                                 //Number of magazines
"",                                //Backpack "" for random or classname here.
"Bandit2_DZ",                      //Skin "" for random or classname here.
"Random",                          //Gearset number. "Random" for random gear set.
True                               //True: Heli will stay at position and fight. False: Heli will leave if not under fire. 
] spawn heli_para;

Place your paradrop spawns under this line
*/

[[12426.7,12540.2,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
1,                                 //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",                          //Primary gun set number. "Random" for random weapon set.
4,                                 //Number of magazines
"",                                //Backpack "" for random or classname here.
"Bandit2_DZ",                      //Skin "" for random or classname here.
"Random",                          //Gearset number. "Random" for random gear set.
True                               //True: Heli will stay at position and fight. False: Heli will leave if not under fire.
] spawn heli_para;

[[11799.9,12647.9,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
1,                                 //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",                          //Primary gun set number. "Random" for random weapon set.
4,                                 //Number of magazines
"",                                //Backpack "" for random or classname here.
"Bandit2_DZ",                      //Skin "" for random or classname here.
"Random",                          //Gearset number. "Random" for random gear set.
True                               //True: Heli will stay at position and fight. False: Heli will leave if not under fire.
] spawn heli_para;

[[13320.1,6718,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
1,                                 //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",                          //Primary gun set number. "Random" for random weapon set.
4,                                 //Number of magazines
"",                                //Backpack "" for random or classname here.
"Bandit2_DZ",                      //Skin "" for random or classname here.
"Random",                          //Gearset number. "Random" for random gear set.
True                               //True: Heli will stay at position and fight. False: Heli will leave if not under fire.
] spawn heli_para;

[[4706.14,2531.7,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
1,                                 //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",                          //Primary gun set number. "Random" for random weapon set.
4,                                 //Number of magazines
"",                                //Backpack "" for random or classname here.
"Bandit2_DZ",                      //Skin "" for random or classname here.
"Random",                          //Gearset number. "Random" for random gear set.
True                               //True: Heli will stay at position and fight. False: Heli will leave if not under fire.
] spawn heli_para;

Can someone help me out with this, Missions work great but nothing I put in here works for me. Any help would be greatly appreciated.

Link to comment
Share on other sites

[[[12426.7,12540.2,0.001],[4706.14,2531.7,0.001]], //position(s) (can be multiple).
"M2StaticMG", //Classname of turret
0.5,                     //Skill level 0-1. Has no effecme here.
1,                         //Primary gun set number. "Rat if using custom skills
"Bandit2_DZ",             //Skin "" for random or classnandom" for random weapon set. (not needed if ai_static_useweapon = False)
2,                         //Number of magazines. (not needed if ai_static_useweapon = False)
"",                         //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"                 //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static;

needs to be this

[[[12426.7,12540.2,0.001],[4706.14,2531.7,0.001]], //position(s) (can be multiple).
"M2StaticMG", //Classname of turret
0.5,                     //Skill level 0-1. Has no effect if using custom skills
"Bandit2_DZ",             //Skin "" for random or classname here.
1,                         //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2,                         //Number of magazines. (not needed if ai_static_useweapon = False)
"",                         //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"                 //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static;

Was an error on my part in the customspawns file. I didn't change the comment from the old format.

Link to comment
Share on other sites

[[[12426.7,12540.2,0.001],[4706.14,2531.7,0.001]], //position(s) (can be multiple).
"M2StaticMG", //Classname of turret
0.5,                     //Skill level 0-1. Has no effecme here.
1,                         //Primary gun set number. "Rat if using custom skills
"Bandit2_DZ",             //Skin "" for random or classnandom" for random weapon set. (not needed if ai_static_useweapon = False)
2,                         //Number of magazines. (not needed if ai_static_useweapon = False)
"",                         //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"                 //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static;

needs to be this

[[[12426.7,12540.2,0.001],[4706.14,2531.7,0.001]], //position(s) (can be multiple).
"M2StaticMG", //Classname of turret
0.5,                     //Skill level 0-1. Has no effect if using custom skills
"Bandit2_DZ",             //Skin "" for random or classname here.
1,                         //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2,                         //Number of magazines. (not needed if ai_static_useweapon = False)
"",                         //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random"                 //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
] call spawn_static;

Was an error on my part in the customspawns file. I didn't change the comment from the old format.

 

What about the paradrops? and thank you for your help...It was almost like it isnt reading my file, nothing I posted in the file worked, the paradrops , vehicles or anything...again thanks for your help..

Link to comment
Share on other sites

 

Hi!

I have a problem with running your script. What could be the wrong?

 

https://www.dropbox.com/s/43xp7xf6tq187rn/103serverfiles.zip

 

Thanks!

 

 

Why not just say what's going wrong ? no offence but i wouldn't download some random files from someone with 1 post :p

 

I can say that the missions work perfectly on 1.0.2.5 and 1.0.3 :)

All you have to do is add the WAI folder to you server.pbo root and 1 file edit, it's a really simple install

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...