Jump to content

Wicked AI/Mission system


Markk311

Recommended Posts

The zooming in issue has been around for a long time at least a year or more. I always thought it was just a targeting issue. Or at least on the servers I have played on I don't remember not having to do it in a long time.

I have read a lot about that. But I'm at the point where I know that WAI is causing it . At least for me. If I put WAI in  then I have problems when I take it back out no problems.... no zooming. I am trying real hard to make a server why as few glitches as possible. And I really like WAI. Just thought maybe someone knew of a fix. Do you remember if all of the servers had WAI that you played on

I am going to do a little testing on WAI like taking out all skins but one, all guns but one, stuff lilke that and see what happens. I know somewhere there is a conflict with WAI.

 

Edited by KAIWIOS
Link to comment
Share on other sites

I have narrowed it down to this block in the WAI\init.sqf. Can anyone tell me what this does and why I need it?  I do have DZMS installed.

if(isNil("DZMSInstalled")) then {

  createCenter   EAST;
  createCenter   RESISTANCE;
 
  WEST     setFriend [EAST,0];
  WEST     setFriend [RESISTANCE,0];
 
  EAST     setFriend [WEST,0];
  EAST     setFriend [RESISTANCE,0];
  
  RESISTANCE    setFriend [EAST,0];
  RESISTANCE    setFriend [WEST,0];

 } else {
 
  createCenter   RESISTANCE;
  
  EAST     setFriend [RESISTANCE,0];
  WEST     setFriend [RESISTANCE,0];
  
  RESISTANCE    setFriend [EAST,0];
  RESISTANCE    setFriend [WEST,0]; 
 };
 
 wai_staticloaded   = false;
 WAIconfigloaded   = false;

 ai_ground_units   = 0;
 ai_emplacement_units = 0;
 ai_air_units   = 0;
 ai_vehicle_units  = 0;

This is what is giving me trouble with the trader menus.... I delete this line and the trader menus in stary work again

 

Link to comment
Share on other sites

  • 1 month later...

i got the problem that only 4 AI´s spawn at a mission, the mission don´t despawn when finish and no loot crate...

 

im running WAI and DZMS

 

13:42:24 "WAI: [Mission:[Hero] Bandit Base]: Starting... [5691.8,8419.48,0]"
13:42:27 Error in expression <er call find_suitable_ammunition;
_unit addMagazine _rocket;
_unit addMagazine _>
13:42:27   Error position: <addMagazine _rocket;
_unit addMagazine _>
13:42:27   Error addmagazine: Typ Bool, erwartet Array,Zeichenfolge
13:42:27 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 194
[.....]
16:15:39 "WAI: [Mission:[Hero] Ural Attack]: Starting... [3834.36,7976.34,0]"
16:15:42 Error in expression <er call find_suitable_ammunition;
_unit addMagazine _rocket;
_unit addMagazine _>
16:15:42   Error position: <addMagazine _rocket;
_unit addMagazine _>
16:15:42   Error addmagazine: Typ Bool, erwartet Array,Zeichenfolge
16:15:42 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 194

this is the spawn_group.sqf

	if (!isNil "_launcher" && wai_use_launchers) then {
		call {
			//if (_launcher == "Random") exitWith { _launcher = (ai_launchers_AT + ai_launchers_AA) call BIS_fnc_selectRandom; };
			if (_launcher == "at") exitWith { _launcher = ai_wep_launchers_AT call BIS_fnc_selectRandom; };
			if (_launcher == "aa") exitWith { _launcher = ai_wep_launchers_AA call BIS_fnc_selectRandom; };
		};
		_rocket = _launcher call find_suitable_ammunition;
		_unit addMagazine _rocket;				<----- line 194
		_unit addMagazine _rocket;
		_unit addWeapon _launcher;
	};

 

Link to comment
Share on other sites

  • 3 months later...

The download link to WickedAI?

https://github.com/f3cuk/WICKED-AI

 

I've been working a lot with the WAI mission system recently. I've shut down my Cherno Epoch server to concentrate on Epoch Napf, since I never liked the artificial map edge and I really like the variability of the Napf terrain.

 

As KAIWIOS noted above, the problem lies in WAI's use of the side and side hostility assignment system. I suspect it has to do with WAI's use of RESISTANCE HQ and side, but that's just a guess.

 

I posted a fix for the broken traders in Epoch Napf here:

 

It relies on actual humanity value checks and geographic locations to determine whether or not the player should interact with the trader, and the first time I installed it, traders started to work perfectly. 

 

Then I started to expand the WAI mission system, I made massive changes to the WAI configuration data and added a large number of missions. After I added a particularly large batch of new and revised code, I fired up the server to play, grabbed one of our loot trucks, and trundled on over to Emmen.

 

And the traders were broken.

 

I went admin and popped over to Lenzburg, Schratten, and SWAF, and I discovered that, as it had been prior to installing my 'fix', traders at each location had a distinct failure pattern. As before, both Hero and Bandit traders were broken. The pattern I had noted previously, however -- some traders worked at Lenzburg, none at Emmen, all at Schratten -- no longer prevailed! That set of symptoms -- which I was able to experience in precisely the same details on two other Epoch Napf WAI-equipped servers before I installed WAI on my own server -- had changed!!!

 

Now, only a single trader, the medical guy, functioned at Lenzburg. Medical and clothing traders worked at Emmen. And the tool/construction and ammo guys weren't working at Schratten.

 

I immediately uncommented the diagnostic lines and delays in my fnSelfActions.sqf file I'd used to verify that the trader interaction code wasn't even being executed originally -- only delays and print statements -- placed the revised file in the server's ftp area, and restarted.

 

Not only did I get the diagnostic statements on-screen, but traders functioned perfectly. Remember now -- adding stuff to the WAI missions system is entirely server side, and revision fnSelfActions.sqf is entirely client side.

 

Uh huh. Ok.

 

So I and some buds played for a few days, and last night I installed another big batch of new missions and WAI config extensions.  Again, nothing but server side changes!

 

Restarted, went about my business, and when I went to the traders ... broken again, still in the second pattern.

 

I uncommented out the diagnostic lines in fnSelfActions.sqf, restarted, and the diagnostic messages and traders worked perfectly again!

 

Commented out the diagnostic code, restarted, and traders are still working fine.

 

So... not only is the broken trader issue -- and I'll bet other glitches -- somehow related to the WAI's use of the side and hostility system, but also for some inexplicable reason to the "recentness" of the last update!  It makes no sense whatsoever. But at least on my Epoch Napf server, completely repeatable.

Link to comment
Share on other sites

I just had a thought.  There are limitations to the number of groups that can be assigned to each side HQ. I remember reading somewhere that the limit was a little fuzzy, for whatever reasons. Since the issues seem to pop up for folks who are running WAI -- and absolutely not just for servers running DZMS and WAI together -- and since issues seem to manifest most reliably with game agents, who must have unique relationships back to side controllers and whatever data structures manage them, it's beginning to look to me like something happens to system data integrity when WAI invokes the hostility relationships for side RESISTANCE. I can't see that WAI actually uses a RESISTANCE group anywhere, at least not the way I have it configured. I think I'm going to comment out those relationships and see what happens...

Link to comment
Share on other sites

  • 1 month later...

Hi, I am having an issue with my WAI in that sometimes it gets stuck in a cycle and spits this out forever while trying to spawn a mission and it just loops like this till after the next restart and not spawning missions:

 

20:42:56 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:42:56 "WAI: Invalid Position (Marker: "MainHero5")"
20:42:58 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:42:58 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:00 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:43:00 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:02 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:43:02 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:04 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:43:04 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:06 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:43:06 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:08 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:43:08 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:10 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
20:43:10 "WAI: Invalid Position (Marker: "MainHero5")"
20:43:12 "WAI DEBUG: FINDPOS: Checking nearby mission markers: ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker","MainHero5","MainBandit8"]"
Any ideas?

Any ideas?

Link to comment
Share on other sites

2 minutes ago, Jestertriks said:

How do you add coins to the AI wallets?

 

in WAI\compile\spawn_group

 

below

 

removeAllWeapons _unit;
removeAllItems _unit;

 

add

 

_cash = round(random 50) * 80; 
 _unit setVariable["CashMoney",_cash ,true];

 

change to your liking

Link to comment
Share on other sites

  • 4 weeks later...

Hey folks,

I'm trying to give an AI group that spawns in missions AT/AA weapons. Unfortunately, they always spawn with absolutely nothing.

Here are the various lines I used in the mission's SQF files:
 

[[_position select 0,_position select 1,0],1,"Random","at",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","aa",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","RPG7V",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","Strela",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","ai_wep_launchers_AT",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","ai_wep_launchers_AA",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","5",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group; // I made a custom AI gear # 5 in the config.

[[_position select 0,_position select 1,0],1,"Random","ai_gear5",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group; // I made a custom AI gear # 5 in the config.



None of those lines worked. Every time the mission AI spawned, that particular group ran around unarmed.

Perhaps I have to give them a primary weapon plus the launcher? How would I script that? Any ideas would be appreciated.

Thanks!

Link to comment
Share on other sites

On 5/27/2016 at 11:27 AM, Rick167 said:

Hey folks,

I'm trying to give an AI group that spawns in missions AT/AA weapons. Unfortunately, they always spawn with absolutely nothing.

Here are the various lines I used in the mission's SQF files:
 


[[_position select 0,_position select 1,0],1,"Random","at",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","aa",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","RPG7V",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","Strela",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","ai_wep_launchers_AT",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","ai_wep_launchers_AA",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

[[_position select 0,_position select 1,0],1,"Random","5",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group; // I made a custom AI gear # 5 in the config.

[[_position select 0,_position select 1,0],1,"Random","ai_gear5",4,"Random","Bandit","Random","Bandit",_mission] call spawn_group; // I made a custom AI gear # 5 in the config.



None of those lines worked. Every time the mission AI spawned, that particular group ran around unarmed.

Perhaps I have to give them a primary weapon plus the launcher? How would I script that? Any ideas would be appreciated.

Thanks!

Hey, I think your syntax is wrong for the launchers.

 

Here's the syntax i'm using which works great.

	[[_position select 0,_position select 1,0],1,"Hard",["Random","AT"],4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;
	[[_position select 0,_position select 1,0],1,"Hard",["Random","AA"],4,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

So this spawns 1 AI on hard difficulty with random gear and an AT launcher

The next one does the same but with an AA launcher.

Link to comment
Share on other sites

  • 1 month later...
11 hours ago, mrpow said:

For some reason my missions aren't spawning. I have everything in the proper order but they wont spawn, help please?

open your init.sqf and see where you have server_monitor.sqf... maybe another mod are using it outside of server.pbo  and u need edit onn it.

find

_serverMonitor =     [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";  //my server monitor into dayz_server.pbo

_serverMonitor =     [] execVM "custom\server_monitor.sqf"; //out of dayz_server.pbo

Link to comment
Share on other sites

I used andgregors AI bus route script to come up with this. This sets up a pair of choppers that fly a set route.

Open up your WAI  customSpawns.SQF and paste the following into it.

The choppers fly the waypoint list in order so plot them how you want the choppers to fly.

Spoiler

[[1659.38,9459.43,0.001],    //Position to start patrol. This is the first waypoint
[6000,000,200],                 // Position to spawn chopper at
200,                    //Radius of patrol waypoint completion
[[1664.55,3848.53,0.001],[2360.93,1184.83,0.001],[7755.71,1375.1,0.001],[11916.5,2375.85,0.001],[8469.33,6269.74,0.001],[10936.6,11004.8,0.001],[2900.91,10903.3,0.001]],                     //list of coordinates to use for waypoints
"UH1H_TK_EP1",                //Classname of vehicle (make sure it has driver and two gunners)
1                        //Skill level of units
] spawn presence_patrol;

Create a  presence_patrol.sqf and past the following.This goes into the WAI/compile folder.

Spoiler


if (!isServer)exitWith{};
private ["_wpnum","_radius","_gunner2","_gunner","_agunner2","_agunner","_skillarray","_startingpos","_heli_class","_startPos","_helicopter","_helicopter1","_unitGroup","_pilot","_pilot1","_skill","_position","_trioWPZ","_trioWPIndex","_trioWPradius","_trioWPradius","_trioFirstWayPoint","_trioWP","","",""];
_position = _this select 0;
_startingpos = _this select 1;
_radius = _this select 2;
_trioRouteWaypoints = _this select 3;
_heli_class = _this select 4;
_skill = _this select 5;

_skillarray = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];

_unitGroup = createGroup east;
_pilot = _unitGroup createUnit ["CZ_Soldier_Pilot_EP1", [0,0,0], [], 1, "NONE"];
[_pilot] joinSilent _unitGroup;
ai_air_units = (ai_air_units +1);

_helicopter = createVehicle [_heli_class, [(_startingpos select 0),(_startingpos select 1), 200], [], 0, "FLY"];
_helicopter setFuel 1;
_helicopter engineOn true;
_helicopter setVehicleAmmo 1;
_helicopter flyInHeight 100;
_helicopter lock true;
_helicopter addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage .5;}];

_pilot assignAsDriver _helicopter;
_pilot moveInDriver _helicopter;

_gunner = _unitGroup createUnit ["CZ_Soldier_Pilot_EP1", [0,0,0], [], 1, "NONE"];
_gunner assignAsGunner _helicopter;
_gunner moveInTurret [_helicopter,[0]];
[_gunner] joinSilent _unitGroup;
ai_air_units = (ai_air_units +1);

_gunner2 = _unitGroup createUnit ["CZ_Soldier_Pilot_EP1", [0,0,0], [], 1, "NONE"];
_gunner2 assignAsGunner _helicopter;
_gunner2 moveInTurret [_helicopter,[1]];
[_gunner2] joinSilent _unitGroup;
ai_air_units = (ai_air_units +1);

{_pilot setSkill [_x,1]} forEach _skillarray;
{_gunner setSkill [_x,_skill]} forEach _skillarray;
{_gunner2 setSkill [_x,_skill]} forEach _skillarray;
{_x addweapon "UZI_SD_EP1";_x addmagazine "30Rnd_9x19_UZI_SD";_x addmagazine "30Rnd_9x19_UZI_SD";} forEach (units _unitgroup);
{_x addEventHandler ["Killed",{[_this select 0, _this select 1, "air"] call on_kill;}];} forEach (units _unitgroup);
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_helicopter];
[_helicopter] spawn veh_monitor;

_pilot1 = _unitGroup createUnit ["CZ_Soldier_Pilot_EP1", [0,0,0], [], 1, "NONE"];
[_pilot1] joinSilent _unitGroup;
ai_air_units = (ai_air_units +1);

_helicopter1 = createVehicle [_heli_class, [(_startingpos select 0) + 100,(_startingpos select 1) + 100, 200], [], 0, "FLY"];
_helicopter1 setFuel 1;
_helicopter1 engineOn true;
_helicopter1 setVehicleAmmo 1;
_helicopter1 flyInHeight 100;
_helicopter1 lock true;
_helicopter1 addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage .5;}];

_pilot1 assignAsDriver _helicopter1;
_pilot1 moveInDriver _helicopter1;

_agunner = _unitGroup createUnit ["CZ_Soldier_Pilot_EP1", [0,0,0], [], 1, "NONE"];
_agunner assignAsGunner _helicopter1;
_agunner moveInTurret [_helicopter1,[0]];
[_agunner] joinSilent _unitGroup;
ai_air_units = (ai_air_units +1);

_agunner2 = _unitGroup createUnit ["CZ_Soldier_Pilot_EP1", [0,0,0], [], 1, "NONE"];
_agunner2 assignAsGunner _helicopter1;
_agunner2 moveInTurret [_helicopter1,[1]];
[_agunner2] joinSilent _unitGroup;
ai_air_units = (ai_air_units +1);

{_pilot1 setSkill [_x,1]} forEach _skillarray;
{_agunner setSkill [_x,_skill]} forEach _skillarray;
{_agunner2 setSkill [_x,_skill]} forEach _skillarray;
{_x addweapon "UZI_SD_EP1";_x addmagazine "30Rnd_9x19_UZI_SD";_x addmagazine "30Rnd_9x19_UZI_SD";} forEach (units _unitgroup);
{_x addEventHandler ["Killed",{[_this select 0, _this select 1, "air"] call on_kill;}];} forEach (units _unitgroup);
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_helicopter1];
[_helicopter1] spawn veh_monitor;

 

_unitGroup allowFleeing 0;
_unitGroup setBehaviour "COMBAT";
_unitGroup setSpeedMode "FULL";
_unitGroup setCombatMode "RED";
_unitGroup selectLeader ((units _unitGroup) select 0);

//Load Patrol Route
    
    _trioWPIndex = 2;
    _trioWPradius = 300;//waypoint radius
    _trioFirstWayPoint = _position;
    _trioWP = _unitGroup addWaypoint [_trioFirstWayPoint, _trioWPradius,_trioWPIndex];
    _trioWP setWaypointType "MOVE";
    
    
    {
    _trioWPIndex=_trioWPIndex+1;
    _trioWP = _unitGroup addWaypoint [_x, _trioWPradius,_trioWPIndex];
    _trioWP setWaypointType "MOVE";
    diag_log format ["TRIO:Waypoint Added: %2 at %1",_x,_trioWP];
    } forEach _trioRouteWaypoints;
    
    //Create Loop Waypoint
    _trioWP = _unitGroup addWaypoint [_trioFirstWayPoint, _trioWPradius,_trioWPIndex+1];
    _trioWP setWaypointType "CYCLE";

Open up the WAI init.sqf and paste the following into it.

presence_patrol = compile preprocessFileLineNumbers "\z\addons\dayz_server\VehAI\compile\presence_patrol.sqf";

It should look something like this.

heli_patrol = compile preprocessFileLineNumbers "\z\addons\dayz_server\VehAI\compile\heli_patrol.sqf";

presence_patrol = compile preprocessFileLineNumbers "\z\addons\dayz_server\VehAI\compile\presence_patrol.sqf";

Link to comment
Share on other sites

I also use this to set up random paradrops. I hated knowing where the paradrops were at and figured what the heck I'll see if this works and it does . This particular one will pick a random location in a radius of 5800 meters from the center of the map.  _pos = [getMarkerPos "center",0,5800,10,0,20,0] call BIS_fnc_findSafePos;  edit the 2nd number for the size you want.

 

Paste the following into your WAI customSpawns.sqf

_pos = [getMarkerPos "center",0,5800,10,0,20,0] call BIS_fnc_findSafePos;
[_pos,  //Position that units will be dropped by
[0,0,0],                           //Starting position of the heli
500,                               //Radius from drop position a player has to be to spawn chopper
"Mi171Sh_CZ_EP1",                         //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.
"",                      //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;

Link to comment
Share on other sites

1 hour ago, Zephish said:

I am trying to install WAI on my server but it does nothing, no missions pop up and there is nothing in the RPT about WAI.

are u repacking your dayz_Server.pbo once you edit the server_monitor.sqf?

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