Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

Got this error out the blue earlier..


 3:37:11 "WAI: [Mission:[bandit] Presidents in Town]: Starting... [5417.05,10432.4,0]"
 3:37:12 Error in expression <n { for "_i" from 1 to _mags do { _unit addMagazine _magazine; }; _unit addweapo>
 3:37:12   Error position: <addMagazine _magazine; }; _unit addweapo>
 3:37:12   Error addmagazine: Type Bool, expected Array,String
 3:37:12 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 141

 

It made only 1 AI spawn who didnt have a weapon, and then the mission crate had 50 mags of m240 ammo...

 

Thanks.

Link to comment
Share on other sites

Hi. Can someone please help me understand param 4 to spawn_group. The comment says "primary gun set number" - I tried searching this thread for "gun set" but the forum software here wouldn't do it.

 

Let's say I want to spawn a four-man squad where 3 guys have shotguns (just to pick something different) and 1 guy has a DMR. Presumably, I first have to define an array in config.sqf like ai_wep_guardduty or something. So, I set that to ["whatever_the_arma_shotgun_class_is","whatever_the_DMR_class_is"] (I'll look them up, this is just for discussion).

 

so then, in the mission sqf, for param 4, instead of "random" do I say ai_web_guardduty?

 

Thanks for any help and for the awesome mod.

Link to comment
Share on other sites

say you select weapon set 3 they'll get a random selection of weapons from that array.

 

From what array?

 

Where is "weapon set 3" defined?

 

In config.sqf there are indeed arrays that contain weapons, but the arrays have names, not numbers. ai_wep_assault has 13 items. ai_wep_machine has 5 items. ai_wep_sniper has 6 items.

 

If, in a mission, I set the param: primary gun set number = 3 what exactly am I doing?? Possibly I'm saying to use the 3rd item from each array, but then what happens if I set it to 11. Do I not get machine guns? Or do I get item 11 mod 5 from that array??

 

I'm not complaining about anything by the way. This is an awesome mod and I know they haven't yet had time to really thoroughly document it. But this is an area I would like some documentation on please.

Link to comment
Share on other sites

1 = ai_wep_assault

2 = ai_wep_machine

3 = ai_wep_sniper

 

So it'll pull a random selection from those arrays of weapons.

 

 

okay.

 

Hey could I make a recommendation? Get rid of ai_wep_random and instead have ai_wep_sets.

 

ai_wep_sets contains arrays of weapons, just like ai_wep_random does now. "random" means to grab a random array from ai_wep_sets just like it does now (although it's called ai_wep_random).

 

1 would mean, "use the first array in ai_wep_sets"

2 would mean use the second array

 

Basically, right now you've hardcoded 1 to mean ai_wep_assault, right? Not criticizing, just offering an alternative that is more expandable maybe.

Link to comment
Share on other sites

1 = ai_wep_assault

2 = ai_wep_machine

3 = ai_wep_sniper

 

So it'll pull a random selection from those arrays of weapons.

 

https://github.com/f3cuk/WICKED-AI/blob/Testbranch/WAI/compile/spawn_static.sqf#L85

 

Looks like it's 0,1 or 2 actually.

 

I don't know if I know enough about this stuff yet to implement my suggestion, but maybe I'll get it a shot.

Link to comment
Share on other sites

Hi Guys, Another mission I converted works ok but I do get this error in RPT this is used on NAPF so change Cords if on different map and I run a PVE servers and all AI are in bandit skins : 

 

19:28:43 Error in expression <ts + vehicles + allDead;

{
if(typeName _x == "ARRAY") then {

{
deleteVehicle _>
19:28:43 Error position: <_x == "ARRAY") then {

{
deleteVehicle _>
19:28:43 Error Undefined variable in expression: _x
19:28:43 File z\addons\dayz_server\WAI\compile\mission_winorfail.sqf, line 275
19:28:44 "WAI: [Mission:[Hero] Death Valley]: Ended at [18419,5880.08,0.002]"

 

If any one can help me out I would be grateful Thanks 

MegaZ

 

Here is the Death Valley mission:

 

if(isServer) then {
 
private   ["_vehicle","_vehclass","_complete","_crate","_mission","_position","_crate_type","_rndnum","_vehicle"];

// Get mission number, important we do this early
_mission   = count wai_mission_data -1;

// Get a safe position 80 meters from the nearest object
_position = [18419,5880.08,0.002];

// 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,"Extreme","Death Valley","MainHero",true] call mission_init;

diag_log   format["WAI: [Mission:[Hero] Death Valley] started at %1",_position];

//Setup the crate
_crate_type  = crates_large call BIS_fnc_selectrandom; // Choose between crates_large, crates_medium and crates_small
_crate    = createVehicle [_crate_type,[18408.7,5893.55,0.00128174],[],0,"CAN_COLLIDE"];

//Troops
_rndnum = 4 + round (random 3);
[[18438.7, 5819.19, 0],_rndnum,"Extreme",["Random","AT"],4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;
[[18479.8, 5834.96, 0],_rndnum,"Extreme",["Random","AA"],4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;
[[18379.8, 5804.96, 0],_rndnum,"Extreme","Random",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;
[[18279.8, 5859.96, 0],_rndnum,"Extreme","Random",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;
 
//Static Guns
[[[18470.8, 5799.16, 0]],"M2StaticMG","Extreme","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
[[[18460.5, 5830.6, 0]],"M2StaticMG","Extreme","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
[[[18467.1, 5819.52, 0]],"M2StaticMG","Extreme","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

//CH_47F
_vehclass   = "CH_47F_EP1_DZE";
_vehicle  = [_vehclass,_position,_mission] call custom_publish;

//Heli Paradrop
[[18438.7, 5819.19, 0],[18082.8,12362.3,0],50,"UH1H_DZ",10,"Random","Random",4,"Random","Bandit","Random","Bandit",true,_mission] spawn heli_para;

// Mission objective options and messages
  _complete = [
  [_mission,_crate], // mission variable (from line 9) and crate
  ["crate"],    // Mission objective type (["crate"], or ["kill"], or ["assassinate", _assassinate])
  [_vehicle],   // cleanup objects
  "Legion is gathering forces in a valley, team up and go wipe out them out!", // mission announcement
  "Survivors have secured Death Valley",   // mission success
  "Survivors did not secure Death Valley in time" // mission fail
] call mission_winorfail;

  if(_complete) then {
  [_crate,5,0,[15,crate_items_chainbullets],2] call dynamic_crate;
};

// End of mission
diag_log format["WAI: [Mission:[Hero] Death Valley]: Ended at %1",_position];
h_missionsrunning = h_missionsrunning - 1;
};

Link to comment
Share on other sites

Hi Guys, Another mission I converted works ok but I do get this error in RPT this is used on NAPF so change Cords if on different map and I run a PVE servers and all AI are in bandit skins : 

 

19:28:43 Error in expression <ts + vehicles + allDead;

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _>

19:28:43 Error position: <_x == "ARRAY") then {

{

deleteVehicle _>

19:28:43 Error Undefined variable in expression: _x

19:28:43 File z\addons\dayz_server\WAI\compile\mission_winorfail.sqf, line 275

19:28:44 "WAI: [Mission:[Hero] Death Valley]: Ended at [18419,5880.08,0.002]"

 

If any one can help me out I would be grateful Thanks 

MegaZ

 

Here is the Death Valley mission:

 

if(isServer) then {

 

private   ["_vehicle","_vehclass","_complete","_crate","_mission","_position","_crate_type","_rndnum","_vehicle"];

// Get mission number, important we do this early

_mission   = count wai_mission_data -1;

// Get a safe position 80 meters from the nearest object

_position = [18419,5880.08,0.002];

// 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,"Extreme","Death Valley","MainHero",true] call mission_init;

diag_log   format["WAI: [Mission:[Hero] Death Valley] started at %1",_position];

//Setup the crate

_crate_type  = crates_large call BIS_fnc_selectrandom; // Choose between crates_large, crates_medium and crates_small

_crate    = createVehicle [_crate_type,[18408.7,5893.55,0.00128174],[],0,"CAN_COLLIDE"];

//Troops

_rndnum = 4 + round (random 3);

[[18438.7, 5819.19, 0],_rndnum,"Extreme",["Random","AT"],4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[18479.8, 5834.96, 0],_rndnum,"Extreme",["Random","AA"],4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[18379.8, 5804.96, 0],_rndnum,"Extreme","Random",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[18279.8, 5859.96, 0],_rndnum,"Extreme","Random",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

 

//Static Guns

[[[18470.8, 5799.16, 0]],"M2StaticMG","Extreme","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

[[[18460.5, 5830.6, 0]],"M2StaticMG","Extreme","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

[[[18467.1, 5819.52, 0]],"M2StaticMG","Extreme","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

//CH_47F

_vehclass   = "CH_47F_EP1_DZE";

_vehicle  = [_vehclass,_position,_mission] call custom_publish;

//Heli Paradrop

[[18438.7, 5819.19, 0],[18082.8,12362.3,0],50,"UH1H_DZ",10,"Random","Random",4,"Random","Bandit","Random","Bandit",true,_mission] spawn heli_para;

// Mission objective options and messages

  _complete = [

  [_mission,_crate], // mission variable (from line 9) and crate

  ["crate"],    // Mission objective type (["crate"], or ["kill"], or ["assassinate", _assassinate])

  [_vehicle],   // cleanup objects

  "Legion is gathering forces in a valley, team up and go wipe out them out!", // mission announcement

  "Survivors have secured Death Valley",   // mission success

  "Survivors did not secure Death Valley in time" // mission fail

] call mission_winorfail;

  if(_complete) then {

  [_crate,5,0,[15,crate_items_chainbullets],2] call dynamic_crate;

};

// End of mission

diag_log format["WAI: [Mission:[Hero] Death Valley]: Ended at %1",_position];

h_missionsrunning = h_missionsrunning - 1;

};

 Bump :

 

Any one out there that can help me resolve RPT error as listed above and or these:

 

----

 

20:07:02 Error in expression <" + str(_uid)); };

}];

};

_vehicle

};

_vehicle addEventHandler ["GetIn",{_nil >

20:07:02   Error position: <_vehicle addEventHandler ["GetIn",{_nil >

20:07:02   Error Undefined variable in expression: _vehicle

20:07:02 File z\addons\dayz_server\WAI\compile\custom_publish_vehicle.sqf, line 195

-------

6:01:02 Error in expression <= [

[_mission,_crate],

["crate"],   

[_vehicle],  

"Bandits have disabled an >

16:01:02   Error position: <_vehicle],  

"Bandits have disabled an >

16:01:02   Error Undefined variable in expression: _vehicle

16:01:02 File z\addons\dayz_server\WAI\missions\hero\armed_vehicle.sqf, line 44

----

 

any help would be appreciated

MegaZ

Link to comment
Share on other sites

  • 2 weeks later...

Bump

 

Can no one help with trying to sort out these RPT errors ?? - You know give a man a fish and feed him for a day - Teach a man to fish he can feed himself for life - Would just love to know where to even just start to try and clean up these erros, Any clues would be appreciated.

 

MegaZ

Link to comment
Share on other sites

@megaz
 
//CH_47F
_vehclass   = "CH_47F_EP1_DZE";
_vehicle  = [_vehclass,_position,_mission] call custom_publish;
 
My best guess is this
 
_vehclass   = "CH_47F_EP1_DZE";
 
In config.sqf make
 
cargo_trucks = [
refuel_trucks = [
civil_vehicles = [
 
to
 
In config.sqf make
 
cargo_trucks = [
refuel_trucks = [
civil_vehicles = [
death_valley  = ["CH_47F_EP1_DZE"];
 
change
 
_vehclass   = "CH_47F_EP1_DZE";
 
to 
 
_vehclass   = death_valley call BIS_fnc_selectRandom;
 
-------------------------------------------------------------------
Now my own error
 
Anyone seen this?
 
17:11:11 "WAI: [Mission:[Hero] Disabled Convoy]:
 
17:13:13 WARNING: Function 'name' - Vadim Fisenko is dead
17:13:14 Error in expression <tion = wai_mission_data select _mission select 3;
};
 
{
_x setVariable ["Aggress>
17:13:14   Error position: <select 3;
};
 
{
_x setVariable ["Aggress>
17:13:14   Error select: Type Number, expected Array,Config entry
17:13:14 File z\addons\dayz_server\WAI\compile\bandit_behaviour.sqf, line 14
Link to comment
Share on other sites

The updated version is great.  I've been adding things to the missions to give them more atmosphere.   I have Sector B working as a static mission and it works perfectly except for one thing in particular.  When a player gets in one of the Urals that spawns as part of the mission, they die when they get out of the vehicle.  There are no messages anywhere.  Not in either the client or server log files, not in any server log, or BattlEye filter log.  The player simply dies.   Anyone seen this and know what the fix is?

 

Thanks, 

Bob

Link to comment
Share on other sites

My best guess is the urals are viewed as hacked in by the server from the way they spawn in. Change the urals to crates and i bet you won't have that problem.

 

I have sector B also but I use crates.

 

EDIT:

 

When i used the previous, 1.7 versions of WAI, I had issues with spawning vehicles in the static sector B script.

If i was going to try it now i would copy/ paste the custom_publish_vehicle.sqf to a new file and name it custom_publish_vehicle2.sqf. I would then call it in the config and any vehicle spawned on sector B would call from it, custom_publish_vehicle2.sqf. I would remove the reference to _mission in the custom_publish_vehicle2.sqf . The vehicle is published to the database after the mission is cleared, sector B is not a "mission" in WAI. I think this is where the problem is.

 

Doing this though would open a new can of worms, every restart there would be a new ural spawned on sector B, on top of the one that was already spawned the last restart if no player moved it. You would have to set the urals as urals not already in the game, like a ural repair, then write an event in the database to delete all ural repairs when the server restarts.

 

Then you would deal with players saying "Wheres my ural" after they clear it and a restart.

Link to comment
Share on other sites

Hi guys, i have a problem, that the missions stop spawning, but i cant see any errors in my .rpt file.

 

Sometimes it is only 2-3 missions, and sometimes more than 10.

 

I have set the bandit/hero missions to 2 each.

 

It is an OverPoch server.

 

Anybody able to guess where i have to look for errors?

Link to comment
Share on other sites

Would like to add drones -  Ka137_MG_PMC  to my missions....Any Ideas??  Thanks

 Hi the old Wicked AI 1.6 - 1.7 had a mission with this in I have attached the file this may help you

 

private ["_playerPresent","_cleanmission","_currenttime","_starttime","_missiontimeout","_vehname","_veh","_position","_vehclass","_vehdir","_objPosition"];

_vehclass = "Ka137_MG_PMC";

_vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");

_position = [16059.1, 18778, 0];

diag_log format["WAI: Mission Ka137 Started At %1",_position];

_veh = createVehicle [_vehclass,_position, [], 0, "CAN_COLLIDE"];

_vehdir = round(random 360);

_veh setDir _vehdir;

clearWeaponCargoGlobal _veh;

clearMagazineCargoGlobal _veh;

_veh setVariable ["ObjectID","1",true];

PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_veh];

diag_log format["WAI: Mission Ka137 spawned a %1",_vehname];

_objPosition = getPosATL _veh;

_rndnum = round (random 3) + 4;

[[16069.1, 18788, 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.

"CZ_Special_Forces_GL_DES_EP1_DZ",        //Skin "" for random or classname here.

"Random",      //Gearset number. "Random" for random gear set.

true

] call spawn_group;

[[16049.1, 18768, 0],                  //position

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

"CZ_Special_Forces_GL_DES_EP1_DZ",        //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(s) (can be multiple).

"M2StaticMG",             //Classname of turret

0.5,       //Skill level 0-1. Has no effect if using custom skills

"CZ_Special_Forces_GL_DES_EP1_DZ",     //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,"Captured UFO?"] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";

_hint = parseText format["<t align=center' color='#ff0000' shadow='2' size='1.75'>Minor Mission!</t><br/><t  align='center' color='#ffffff'>Captured Legion radios report they found a UFO?! Kill them and it's yours to try out!</t&gt];

customRemoteMessage = ['hint', _hint];

publicVariable "customRemoteMessage";

_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 {

[_veh,[_vehdir,_objPosition],_vehclass,true,"0"] call custom_publish;

waitUntil

{

  sleep 5;

  _playerPresent = false;

  {if((isPlayer _x) AND (_x distance _position <= 30)) then {_playerPresent = true};}forEach playableUnits;

  (_playerPresent)

};

diag_log format["WAI: Mission Ka137 Ended At %1",_position];

_hint = parseText format["<t align=center' color='#00FF11' shadow='2' size='1.75'>SUCCESS!</t><br/><t  align='center' color='#ffffff'>Survivors have secured the UFO!</t&gt];

    customRemoteMessage = ['hint', _hint];

    publicVariable "customRemoteMessage";

} 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["WAI: Mission Ka137 Timed Out At %1",_position];

_hint = parseText format["<t align=center' color='#ff1133' shadow='2' size='1.75'>FAILED</t><br/><t  align='center' color='#ffffff'>Survivors did not secure the UFO in time!</t&gt];

    customRemoteMessage = ['hint', _hint];

    publicVariable "customRemoteMessage";

};

missionrunning = false;

Link to comment
Share on other sites

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

Now my own error
 
Anyone seen this?
 
17:11:11 "WAI: [Mission:[Hero] Disabled Convoy]:
 
17:13:13 WARNING: Function 'name' - Vadim Fisenko is dead
17:13:14 Error in expression <tion = wai_mission_data select _mission select 3;
};
 
{
_x setVariable ["Aggress>
17:13:14   Error position: <select 3;
};
 
{
_x setVariable ["Aggress>
17:13:14   Error select: Type Number, expected Array,Config entry
17:13:14 File z\addons\dayz_server\WAI\compile\bandit_behaviour.sqf, line 14

 

 Thank Phail will check this out over the weekend

 

Yep I also get that one along with this other one that I belive cant be fixed until next release is done.

 

20:27:21 Error in expression < getVariable["actionSet", false];

if (!_actionSet) then {

s_player_holderPickup>

20:27:21   Error position: <_actionSet) then {

s_player_holderPickup>

20:27:21   Error Undefined variable in expression: _actionset

20:27:21 File z\addons\dayz_code\init\object_BackpackAction.sqf, line 13

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

20:27:22 Error in expression <tion = wai_mission_data select _mission select 3;

};

{

_x setVariable ["Aggress>

20:27:22   Error position: <select 3;

};

{

_x setVariable ["Aggress>

20:27:22   Error select: Type Number, expected Array,Config entry

20:27:22 File z\addons\dayz_server\WAI\compile\bandit_behaviour.sqf, line 14

Link to comment
Share on other sites

12:05:24 Error in expression < = _this select 6;
_aitype = _this select 7;
 
if (count _this > 8) then {
_>
12:05:24   Error position: <select 7;
 
if (count _this > 8) then {
_>
12:05:24   Error Zero divisor
12:05:24 File z\addons\dayz_server\WAI\compile\vehicle_patrol.sqf, line 12
 
Any idea why this is coming? Ive recently added a vehicle patrol on an AI site so only now noticed it errored.
Link to comment
Share on other sites

Saw some other people where having a problem with the RPT error :
 
 

19:11:45 Error in expression <tion = wai_mission_data select _mission select 3;
};

{
_x setVariable ["Aggress>
19:11:45   Error position: <select 3;
};

{
_x setVariable ["Aggress>
19:11:45   Error select: Type Number, expected Array,Config entry
19:11:45 File z\addons\dayz_server\WAI\compile\bandit_behaviour.sqf, line 14
19:11:48 Error in expression <tion = wai_mission_data select _mission select 3;
};

{
_x setVariable ["Aggress>
19:11:48   Error position: <select 3;
};

{
_x setVariable ["Aggress>
19:11:48   Error select: Type Number, expected Array,Config entry
19:11:48 File z\addons\dayz_server\WAI\compile\bandit_behaviour.sqf, line 14

Wondering if anyone has found a way to fix it.

Link to comment
Share on other sites

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