Jump to content

Wicked AI/Mission system


Markk311

Recommended Posts

I have a Question about Partols.

 

I script Heli and Vehicle patrol good.

But i need help with " Custom group spawns ", how i get them to patrol from place to place or Radius of patrol like heli or vehicle ?

Or how i can set 10 randoms group with 2-4 NPC walking on map ?

Link to comment
Share on other sites

How would you fill all gunner turrets on heli/veh  for ai to shoot from?

Heli Parol

[[4563.64,10234.1,0],[0,0,0],3000,10,"UH60M_EP1_DZ",1] spawn heli_patrol;

Vehicle Patrol

[[3859,8764,0.01],[3859,8764,0.01],1500,10,"GAZ_Vodnik_DZ",1] spawn vehicle_patrol;

And they have gunner, but Vodnik have only front Gunner. This scripted for 1 gunner slot i think.

Maybe look into AI config.

 

In Wai / Compile found vehicle_patrols.sqf and change this :

ai_vehicle_units = (ai_vehicle_units + 1);

to this

ai_vehicle_units = (ai_vehicle_units + 2);
Link to comment
Share on other sites

// Time between missions (seconds)
wai_mission_timer = 500;
 
// How long before a mission times out (seconds)
wai_mission_timeout = 1200;
 
 
Edit: 1 missing was around 50 mins.  Now have 2 missions completed in 1:05 hours.
 
The mission was completed too. Will try reducing timeout to 15mins and time between to 5 and see if that helps.   They seemed to spawn perfect on NAPF but not so much on Cherno.  I'm using _position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos; on cherno and an array of positions on NAPF (only difference).
Link to comment
Share on other sites

Hi, I'm really new when it comes to scripting and I am trying to learn but it gets quite confusing at time.  I have tried 5 different times to add/install this awesome AI script to my server with no luck.  I just rented my new server 3 days ago and my server is hosted on Survival Servers.  I was wondering, if anyone could possibly help me by setting it up on my server files so it is at least working from the "default" settings?  I would like to have the first mission run about 10 mins after server starts.  If someone could be kind enough to at least get it added to my server files where its supposed to go, that would be such a big help. 

 

 

Here is a link to my server files

https://www.dropbox.com/sh/dfea0bix0hprduy/XPxAtNmozx

 

My email address is here also to contact me directly if needed

[email protected]

 

Thanks everyone:)

Link to comment
Share on other sites

I have a Question about Partols.

 

I script Heli and Vehicle patrol good.

But i need help with " Custom group spawns ", how i get them to patrol from place to place or Radius of patrol like heli or vehicle ?

Or how i can set 10 randoms group with 2-4 NPC walking on map ?

 

I run WAI and DZAI.  I find that DZAI is better for the walking patrols.

Link to comment
Share on other sites

Hey, is it just me or have any one the same problem that since the new arma patch (1.63.116523) the ai is spawning death? Got no errors in my rpt the rpt told me:

 

15:09:27 "WAI: Starting Mission C130_crash"
15:09:27 "WAI: Wrecked C130 Mission Started At [6411.14,8050.37]"
15:09:27 "WAI: Spawned a group of 8 Bandits at [6411.14,8050.37,0]"
15:09:28 "WAI: Spawned a group of 8 Bandits at [6411.14,8050.37,0]"
15:09:28 "WAI: Sapwned in 2 M2StaticMG"
15:09:28 "WAI: Sapwned in 2 M2StaticMG"

-----

15:55:05 "WAI: Starting Mission mayors_mansion"
15:55:05 "WAI: Mission Mayors Mansion Started At [2795.75,2994.76]"
15:55:06 "WAI: Spawned a group of 4 Bandits at [2795.75,2994.76,0]"
15:55:07 "WAI: Spawned a group of 4 Bandits at [2795.75,2994.76,0]"
15:55:08 "WAI: Spawned a group of 4 Bandits at [2795.75,2994.76,0]"
15:55:08 "WAI: Spawned a group of 4 Bandits at [2795.75,2994.76,0]"
15:55:09 "WAI: Spawned a group of 1 Bandits at [2795.75,2994.76,0]"
15:55:09 "WAI: Sapwned in 1 M2StaticMG"
15:55:09 "WAI: Sapwned in 1 M2StaticMG"

 

so every thing is fine with the script just the AI is deat already when players go to the missions, so its all free loot.

 

EDIT: after looking at one mission i see whats the problem, the shoot themself/each other.... any way to fix this?

Edited by lunatikch
Link to comment
Share on other sites

Hi guys,

today i tried WAI mission system, but it seems not working for me.. :/

 

Is it possible, that WAI have some conflict with DZMS or DZAI? Because i have both on my server.. I want to put some WAI AI's to Skalisty Island for some premium reward for players (because WAI should be harder than DZAI).

 

I folowed the install instructions in main topic, so in my server_monitor.sqf it looks like that:

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

And I edited customSpawns.sqf, now it contains only this:

//Spawn Skalisty//
[[13436.6,2779.36,0], //pozice vesnice
30,						  //Number Of units
"Random",					      //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
4,			      //Primary gun set number. "Random" for random weapon set.
6,						  //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;


//Spawn Skalisty - staticke jednotky//
[[[13924.9,2875.09,0]],[13784.8,2897.78,0]], //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. 
"Random",						  //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
4,						  //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;

After this editing i restarted server and go to Skalisty, but no Ai's spawned :/ 

 

Can you tell me what i did wrong? Thanks for any help

Link to comment
Share on other sites

Hi guys,

today i tried WAI mission system, but it seems not working for me.. :/

 

Is it possible, that WAI have some conflict with DZMS or DZAI? Because i have both on my server.. I want to put some WAI AI's to Skalisty Island for some premium reward for players (because WAI should be harder than DZAI).

 

I folowed the install instructions in main topic, so in my server_monitor.sqf it looks like that:

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

And I edited customSpawns.sqf, now it contains only this:

//Spawn Skalisty//
[[13436.6,2779.36,0], //pozice vesnice
30,						  //Number Of units
"Random",					      //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
4,			      //Primary gun set number. "Random" for random weapon set.
6,						  //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;


//Spawn Skalisty - staticke jednotky//
[[[13924.9,2875.09,0]],[13784.8,2897.78,0]], //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. 
"Random",						  //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
4,						  //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;

After this editing i restarted server and go to Skalisty, but no Ai's spawned :/ 

 

Can you tell me what i did wrong? Thanks for any help

So, i realized that if i change in file WAI/init.sqf text on line 16, ai spawns ok..

createCenter east;
WEST setFriend [EAST,0];
EAST setFriend [WEST,0];
WAIconfigloaded = True;
WAImissionconfig = True;

But.. missions are still not working.. i really dont know whats wrong..

Link to comment
Share on other sites

I have this working good on my server but small issues. 1) I want to add rpg to AI and when I did players said when they took it off bodies they get kicked. How to have them used then removed when AI dies? Also how to get AI custom spawned to respawn after they die after a certain amount of time. Also any fix to AI sucking at night?

Link to comment
Share on other sites

[12775.161, 9667.4893, 0] cords i want mission to spawn how would i add this to 

 

private ["_position","_box","_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_cleanunits","_rndnum"];
 
_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
diag_log format["WAI: Mission Weapon Cache Started At %1",_position];
_box = createVehicle ["USVehicleBox",[(_position select 0),(_position select 1),0], [], 0, "CAN_COLLIDE"];
[_box] call spawn_ammo_box;
 
 
_rndnum = round (random 3) + 4;
[[_position select 0, _position select 1, 0],                  //position
_rndnum,  //Number Of units
1,      //Skill level 0-1. Has no effect if using custom skills
"Random",      //Primary gun set number. "Random" for random weapon set.
4,  //Number of magazines
"",  //Backpack "" for random or classname here.
"",  //Skin "" for random or classname here.
"Random",  //Gearset number. "Random" for random gear set.
true
] call spawn_group;
 
[[_position select 0, _position select 1, 0],                  //position
4,  //Number Of units
1,      //Skill level 0-1. Has no effect if using custom skills
"Random",      //Primary gun set number. "Random" for random weapon set.
4,  //Number of magazines
"",  //Backpack "" for random or classname here.
"",  //Skin "" for random or classname here.
"Random",  //Gearset number. "Random" for random gear set.
true
] call spawn_group;
 
[[[(_position select 0), (_position select 1) + 10, 0],[(_position select 0) + 10, (_position select 1), 0]], //position(s) (can be multiple).
"M2StaticMG",             //Classname of turret
0.5,  //Skill level 0-1. Has no effect if using custom skills
"",          //Skin "" for random or classname here.
0,  //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)
true
] call spawn_static;
 
 
[_position,"ION Inc."] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";
[nil,nil,rTitleText,"Free Weapons donated by ION Inc.! Greed will get you killed!", "PLAIN",10] call RE;
 
_missiontimeout = true;
_cleanmission = false;
_playerPresent = false;
_starttime = floor(time);
while {_missiontimeout} do {
sleep 5;
_currenttime = floor(time);
{if((isPlayer _x) AND (_x distance _position <= 150)) then {_playerPresent = true};}forEach playableUnits;
if (_currenttime - _starttime >= wai_mission_timeout) then {_cleanmission = true;};
if ((_playerPresent) OR (_cleanmission)) then {_missiontimeout = false;};
};
if (_playerPresent) then {
waitUntil
{
sleep 5;
_playerPresent = false;
{if((isPlayer _x) AND (_x distance _position <= 30)) then {_playerPresent = true};}forEach playableUnits;
(_playerPresent)
};
diag_log format["WAI: Mission Weapon cache Ended At %1",_position];
[nil,nil,rTitleText,"No need to Thank ION Inc.", "PLAIN",10] call RE;
} else {
clean_running_mission = True;
deleteVehicle _box;
{_cleanunits = _x getVariable "missionclean";
if (!isNil "_cleanunits") then {
switch (_cleanunits) do {
case "ground" : {ai_ground_units = (ai_ground_units -1);};
case "air" : {ai_air_units = (ai_air_units -1);};
case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
case "static" : {ai_emplacement_units = (ai_emplacement_units -1);};
};
deleteVehicle _x;
sleep 0.05;
};
} forEach allUnits;
 
diag_log format["WAI: Mission Wepaon cache timed out At %1",_position];
[nil,nil,rTitleText,"ION Inc. took the weapons to Trader City Balota to sell!", "PLAIN",10] call RE;
};
 
missionrunning = false;
Link to comment
Share on other sites

[[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;

Okay so i would like to spawn a C130J at [0,0,0] and have it fly to the mission and para drop about 20 AI into the Mission AO. How will i do this for its not working maybe cause i just copied this scriped and replaced it with custon veh and inf. here is my code.

 

 

[[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
"C130J",                         //Classname of chopper (Make sure it has 2 gunner seats!)
20,                                 //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.
"BAF_Soldier_AHAT_W",                      //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;

What else need to be done to make it , Can i make a C130 para ??

Link to comment
Share on other sites

How you made missions spawning please?

have you added the custom missions to teh MissionCfg.sqf in your PBO file.

 

// missions used when selecting the next random mission
wai_missions = [
"armed_vehicle",
"crash_spawner",
"disabled_civchopper",
"disabled_milchopper",
"MV22",
"MV22a",
"weapon_cache",
"convoy",
"Custom_Mission_Name_Here" ( Has to be exactly the same NO spaces ) 
];
Link to comment
Share on other sites

So no one knows how to make the vehicles from missions despawn at restart?

} else {
	clean_running_mission = True;
	deleteVehicle _veh;
	{_cleanunits = _x getVariable "missionclean";
	if (!isNil "_cleanunits") then {
		switch (_cleanunits) do {
			case "ground" : {ai_ground_units = (ai_ground_units -1);};
			case "air" : {ai_air_units = (ai_air_units -1);};
			case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
			case "static" : {ai_emplacement_units = (ai_emplacement_units -1);};
		};
		deleteVehicle _x;
		sleep 0.05;
	};	
	} forEach allUnits;

	diag_log format["CurlyAI: Mission Civilian Aircraft Timed Out At %1",_position];
	[nil,nil,rTitleText,"CurlyAI: Survivors did not secure the Civilian Aircraft in time!", "PLAIN",10] call RE;
};
missionrunning = false;

maybe ?

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...