Jump to content

Wicked AI/Mission system


Markk311

Recommended Posts

THIS VERSION WILL NOT WORK WITH DAYZ EPOCH 1.0.6.1 PLEASE USE THIS VERSION: https://github.com/ebayShopper/WICKED-AI

 

Current Version 0.16

  • Adds more options to ammo boxes
  • tweaks to missions
  • Added timeouts to missions
  • Fix ammobox despawn in 1.0.3

 

Wicked AI feature list

 

  • Customizable loadouts for groups.
  • Customizable Static weapon units
  • Customizable Heli patrols
  • Customizable vehicle patrols
  • Customizable helicopter group paradrop
  • Ability to setup custom skill settings
  • Can spawn units in any script in the dayz_server.pbo
  • AI share your info making them more difficult

 

Wicked Mission System  Features (WIP)

 

  • Customizable random vehicles for missions
  • Vehicles save to database only when player gets close
  • Loads easily from AI system. No need for extra install
  • Map markers refresh so JIP players will have them on map
  • Uses wasteland like missions
  • Customizable ammo boxes
  • Missions can timeout if no player is in the area

Setup

ONLY WORKS FOR DAYZ EPOCH CURRENTLY

Download Here (version 0.16)

Setup is easy Put the WAI folder in your main dayz_server directory

 Add above allowConnection = true; in server_monitor.sqf

    [] ExecVM "\z\addons\dayz_server\WAI\init.sqf";
    allowConnection = true;

No need for the killing a hacker fix.

Config files are located in the main WAI folder and main Missions folder.

Setup your custom spawns in Customspawns.sqf

 

This is still a WIP. So try it out and give some feedback on it to help improve the system. The mission system is lacking numbers, but the randomness of vehicles chosen makes up for it. I have had this on my server for a few weeks and everything seems to be running fine even with over 50 AI spawned in with the mission system running. I will post a more detailed setup later as I have no time now. This is running on my clans Epoch server if you want to get a taste before you try it. 69.64.52.14:2312.

 

 

Known issues.

Vehicle drivers are idiots

Not a lot of debugging

 

What is being worked on...

More config options for missions.

Changing format for AI weapon sets to not require mags in array.

 

Early version of paradrop script.

http://www.youtube.com/watch?v=opIUs4AgWXs

 

Info Sharing Test

http://youtu.be/a5G5NTmeWZQ

Link to comment
Share on other sites

Spawning in units in custom spawns or from another script. Use the format in customSpawns.sqf

[[0,0,0],                 //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;

This will spawn a group of 4 AI at position [0,0,0] with a skill level of 1 (If custom skills if turned on in the config then it would use custom skill array 1). If you need help with setting skills to your liking then look here. "Random" chooses a random weapon array then chooses a gun out of that. If this was set to 1 then it would pick a gun out of weapon set 1. Number of magazines is self-explanatory. Backpack and skin can be the name of the backpack or skin in "quotes" or just "" for a random skin definable in the config. Gear set is customizable in the config and can be 0-4 or "Random" for a random gear set. All of this can be found in customSpawns.sqf.

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

Spawning a paradrop goes along the same lines as spawning a group execpt they will paradrop in when a player gets within the specified distance. Here the position the units will be paradropped at is [911.21545,4532.7612,2.6292224]. The starting position is the position that the heli will spawn at when a player enters the area and then fly to the drop. The radius from drop is the distance a player has to be in from the position for the heli to spawn in. The rest is the same as spawning in a group.

 

 

If ai_mission_system is set to true in the aiconfig then it will load mission system. The config for missions is located at "WAI \ missions \ missionCfg.sqf".

In there you can set what vehicles you want to spawn in the mission system. There is also a customizable ammo box that spawns on some missions that you can set near the bottom. The ammo box will spawn with random weapons from ammo_box_guns and random tools from ammo_box_tools.

Missions are located in the missions folder in missions. If you want to change what missions can spawn in look inside missionscfg.sqf.

Link to comment
Share on other sites

Is there a way to have random fixed spawns rather than using bis_fnc_findsafepos ?

I have an Epoch Taviana server and bis_fnc_findsafepos always favors high on mountains :(

 

A system similer to how the EMS missions work, see this Example would be exellent.

 

I don't mind sharing the coordinates when done but how would i impliment it ?

Link to comment
Share on other sites

I can't see anything specific to chernarus, using the bis_fnc_findsafepos works but always chooses mountains on Taviana, I like your system in EMS Fuchs but EMS has a few snags that you guys are working out, I've had to remove it for now.

In the end i plan to have both mission systems running unless you all work together :)

Link to comment
Share on other sites

Is there a way to have random fixed spawns rather than using bis_fnc_findsafepos ?

I have an Epoch Taviana server and bis_fnc_findsafepos always favors high on mountains :(

 

A system similer to how the EMS missions work, see this Example would be exellent.

 

I don't mind sharing the coordinates when done but how would i impliment it ?

Would be easy.

change this at the beginning of the missions you want to change

_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;

to

_positionarray = [[0,0,0],[0,0,0]];
_position = _positionarray call BIS_fnc_selectRandom;
Link to comment
Share on other sites

 

Would be easy.

change this at the beginning of the missions you want to change

_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;

to

_positionarray = [[0,0,0],[0,0,0]]
_position = _positionarray call BIS_fnc_selectRandom;

I'm getting an error on line 7 of armed_vehicle.sqf

 

My RPT log shows the following :

File z\addons\dayz_server\WAI\missions\missions\armed_vehicle.sqf, line 7
17:40:07 Error in expression <995,10629.646,0],[8412.1973,3045.4038,0][10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error position: <[10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error Missing ]
17:40:07 File z\addons\dayz_server\WAI\missions\missions\armed_vehicle.sqf, line 7
17:40:07 Error in expression <995,10629.646,0],[8412.1973,3045.4038,0][10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error position: <[10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error Missing ]

This is the top 9 lines of armed_vehicle.sqf, line 7 _positionarray, any ideas ?

private ["_vehname","_veh","_position","_vehclass","_vehdir","_objPosition"];


_vehclass = armed_vehicle call BIS_fnc_selectRandom;

_vehname    = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
_positionarray = [[17380.426,5279.2412,0],[8467.2363,7764.6978,0],[15444.671,8667.6758,0],[8463.8125,5510.5239,0],[16104.994,15535.804,0],[7729.2627,7001.7979,0],[15078.381,15698.128,0],[5759.5493,9423.253,0],[13809.14,19294.951,0],[6098.1333,8610.5947,0],[10285.479,19396.813,0],[4265.5854,7978.0996,0],[8594.7168,19659.965,0],[2260.0608,6925.2681,0],[12143.011,14925.385,0],[4775.9395,6315.7642,0],[12676.353,12593.693,0],[14468.995,10629.646,0],[8412.1973,3045.4038,0][10173.31,5819.1787,0],[9473.5557,2013.2627,0],[9421.4414,5169.317,0],[9845.7949,3310.0532,0],[10864.61,620.55743,0]]
_position = _positionarray call BIS_fnc_selectRandom;
diag_log format["WAI: Mission Armed Vehicle Started At %1",_position];
Link to comment
Share on other sites

 

I'm getting an error on line 7 of armed_vehicle.sqf

 

My RPT log shows the following :

File z\addons\dayz_server\WAI\missions\missions\armed_vehicle.sqf, line 7
17:40:07 Error in expression <995,10629.646,0],[8412.1973,3045.4038,0][10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error position: <[10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error Missing ]
17:40:07 File z\addons\dayz_server\WAI\missions\missions\armed_vehicle.sqf, line 7
17:40:07 Error in expression <995,10629.646,0],[8412.1973,3045.4038,0][10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error position: <[10173.31,5819.1787,0],[9473.5557,2013.2>
17:40:07   Error Missing ]

This is the top 9 lines of armed_vehicle.sqf, line 7 _positionarray, any ideas ?

private ["_vehname","_veh","_position","_vehclass","_vehdir","_objPosition"];


_vehclass = armed_vehicle call BIS_fnc_selectRandom;

_vehname    = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
_positionarray = [[17380.426,5279.2412,0],[8467.2363,7764.6978,0],[15444.671,8667.6758,0],[8463.8125,5510.5239,0],[16104.994,15535.804,0],[7729.2627,7001.7979,0],[15078.381,15698.128,0],[5759.5493,9423.253,0],[13809.14,19294.951,0],[6098.1333,8610.5947,0],[10285.479,19396.813,0],[4265.5854,7978.0996,0],[8594.7168,19659.965,0],[2260.0608,6925.2681,0],[12143.011,14925.385,0],[4775.9395,6315.7642,0],[12676.353,12593.693,0],[14468.995,10629.646,0],[8412.1973,3045.4038,0][10173.31,5819.1787,0],[9473.5557,2013.2627,0],[9421.4414,5169.317,0],[9845.7949,3310.0532,0],[10864.61,620.55743,0]]
_position = _positionarray call BIS_fnc_selectRandom;
diag_log format["WAI: Mission Armed Vehicle Started At %1",_position];

No semi colin at the end of the line

sorry wasn't paying attention when i typed that in. Fixed in original post to save someone lots of time...lol

 

If you get an error in the lines that _position is used for something like "3 expected only gave 1" or something like that.

use [ _position select 0, _position select 1, _position select 2] where _position is used in the script.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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