Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

The Ikea Convoys spawn nothing but Chainsaws? 

I removed the Chainsaw-Call so it looks like this:

if(_complete) then {
[_crate,[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
};
and now they are completely empty..?

Getting this in my .rpt :

16:18:53 Error in expression <;

_crate addWeaponCargoGlobal [(_weapon select 0),1];

_crate addMagazineCargoGlo>

16:18:53   Error position: <select 0),1];

_crate addMagazineCargoGlo>

16:18:53   Error select: Type String, expected Array,Config entry

16:18:53 File z\addons\dayz_server\WAI\compile\dynamic_crate.sqf, line 52

 

Might be because of my slight... adjustment but the missions not spawning anything but Chainsaws just doesn't seem to be right^^

 

Try

[_crate,0,[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
 

Sorry what's needed to get the special missions to spawn other than removing the comment marks around it in the config? I've put that Super Villains Lair mission you converted for me in as a special mission but it never comes up.

 

You need to uncomment some stuff in the /missions/init.sqf so it looks like this

 

 

if(isServer) then {

    private["_b_missionTime","_h_missionTime","_h_startTime","_b_startTime","_result","_cnt","_currTime","_mission"];

    diag_log "WAI: Initialising missions";

    dynamic_crate                     = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\dynamic_crate.sqf";
    custom_publish                  = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\custom_publish_vehicle.sqf";

    // Mission functions
    call                             compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_functions.sqf";
    mission_init                    = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_init.sqf";
    mission_winorfail                = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_winorfail.sqf";
    minefield                        = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\minefield.sqf";
    
    {
        wai_mission_markers set [count wai_mission_markers, _x];
    } count ["MainHero","MainBandit","Side1Hero","Side1Bandit","Side2Hero","Side2Bandit","Special"];
    trader_markers                     = [];
    trader_markers                     = call get_trader_markers;
    markerready                     = true;
    wai_mission_data                = [];
    wai_hero_mission                = [];
    wai_bandit_mission                = [];
    wai_special_mission                = [];
    h_missionrunning                = false;
    b_missionrunning                = false;
    s_missionrunning                = false;
    _h_startTime                     = floor(time);
    _b_startTime                     = floor(time);
    _s_startTime                    = floor(time);
    _h_missionTime                    = nil;
    _b_missionTime                    = nil;
    _s_missionTime                    = nil;
    _mission                        = "";
    _result                         = 0;

    // Set mission frequencies from config
    {
        for "_i" from 1 to (_x select 1) do {
            wai_hero_mission set [count wai_hero_mission, _x select 0];
        };
    } count wai_hero_missions;

    {
        for "_i" from 1 to (_x select 1) do {
            wai_bandit_mission set [count wai_bandit_mission, _x select 0];
        };
    } count wai_bandit_missions;

    {
        for "_i" from 1 to (_x select 1) do {
            wai_special_mission set [count wai_special_mission, _x select 0];
        };
    } count wai_special_missions;


    // Start mission monitor
    while {true} do
    {
        _cnt         = {alive _x} count playableUnits;
        _currTime     = floor(time);

        if (isNil "_h_missionTime") then { _h_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };
        if (isNil "_b_missionTime") then { _b_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };
        if (isNil "_s_missionTime") then { _s_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };

        if((_currTime - _h_startTime >= _h_missionTime) && (!h_missionrunning)) then { _result = 1; };
        if((_currTime - _b_startTime >= _b_missionTime) && (!b_missionrunning)) then { _result = 2; };
        if((_currTime - _s_startTime >= _s_missionTime) && (!s_missionrunning)) then { _result = 3; };

        if(h_missionrunning) then { _h_startTime = floor(time); };
        if(b_missionrunning) then { _b_startTime = floor(time); };
        if(s_missionrunning) then { _s_startTime = floor(time); };

        if((_cnt >= wai_players_online) && (markerready) && ((diag_fps) >= wai_server_fps)) then {

            if (_result == 1) then {
                h_missionrunning     = true;
                _h_startTime         = floor(time);
                _h_missionTime        = nil;
                _result             = 0;

                _mission             = wai_hero_mission call BIS_fnc_selectRandom;
                execVM format ["\z\addons\dayz_server\WAI\missions\hero\%1.sqf",_mission];
            };

            if (_result == 2) then {
                b_missionrunning     = true;
                _b_startTime         = floor(time);
                _b_missionTime        = nil;
                _result             = 0;

                _mission             = wai_bandit_mission call BIS_fnc_selectRandom;
                execVM format ["\z\addons\dayz_server\WAI\missions\bandit\%1.sqf",_mission];
            };


            if (_result == 3) then {
                s_missionrunning     = true;
                _s_startTime         = floor(time);
                _s_missionTime        = nil;
                _result             = 0;

                _mission             = wai_special_mission call BIS_fnc_selectRandom;
                execVM format ["\z\addons\dayz_server\WAI\missions\special\%1.sqf",_mission];
            };

        };
        sleep 1;
    };
};

 

Where is the variable for the static spawn patrol radius? For the life of me, I cannot find it.

 

Thanks

 

It's the second one in the call.

 

	[
		[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)
		"Random",							// Skill level of units (easy, medium, hard, extreme, Random)
		"Random",							// Skin classname, use "Random" or classname here
		"Bandit"							// AI Type, "Hero" or "Bandit".
	] spawn vehicle_patrol;

Yup I have him on my server. He teleports in with no weapon, turns his head back and forth and teleports to another location. Other times you can see one running across the map. They are both invincible as well.

Also on occasion loot boxes are spawning in the sky instead of the ground. I have the latest versions.

 

Yup hes on my server as well - thought at 1st he might of been an InfiStar thing.. who knows....

 

Since i installed the Wicked Mission System tehre is always a Bot Survivor Teleporting around on the Map. YOu cant kill him, nor delete him or anything liek that.

When i turn WIcked AI off, this Teleporting Survivor is gone.

 

Think we have spotted a pattern :P I'll look into it guys :)

Link to comment
Share on other sites

One more tiny issue. After changing the percentage of AI killed to complete the missions, the crates are functioning as expected (awesome) but for some reason the Bandit Ural Attack mission just won't clear. Ever. Even with all of the AI dead lol. All others seem fine, something just goes a little wrong with this one.

Any idea what I can do to quick-fix on my end?

Thanks again for all your help :)

Link to comment
Share on other sites

One more tiny issue. After changing the percentage of AI killed to complete the missions, the crates are functioning as expected (awesome) but for some reason the Bandit Ural Attack mission just won't clear. Ever. Even with all of the AI dead lol. All others seem fine, something just goes a little wrong with this one.

Any idea what I can do to quick-fix on my end?

Thanks again for all your help :)

I just had the same thing happen with the Hero Ural Attack mission. Only thing in my rpt was:

 9:38:10 R 1-1-A:1: moving in direct condition failed, dist 2.7016

 9:38:24 "CLEANUP: Deleted 12 Loot Piles out of 15"

 9:39:30 "WAI: [Mission:[Hero] Ural Attack]: Ended at [10445.3,15600.7,0]"

All of the AI was killed, but it is possible that I did not complete the mission in time. I did not see a "Mission Failed" statement

Link to comment
Share on other sites

So I'm looking through the loot that's supposed to get added to the crates, in the bandit base mission this is what's supposed to be put in the crate:

 

if(_complete) then {
[_crate,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;
};
 
 
Am I right in thinking that that's just these items?
 
crate_items_sniper = [["ItemPainkiller",5],"Skin_Sniper1_DZ","Skin_CZ_Soldier_Sniper_EP1_DZ","Skin_GUE_Soldier_Sniper_DZ"];
crate_tools_sniper = ["ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"];
crate_items_high_value = ["ItemBriefcase100oz","ItemVault","30m_plot_kit","ItemHotwireKit","ItemRuby","ItemTopaz"];
crate_backpacks_large = ["DZ_GunBag_EP1","DZ_Backpack_EP1","DZ_LargeGunBag_EP1","DZ_CivilBackpack_EP1"];
 
Where does it get it's other items from, like guns, ammo, etc?
Link to comment
Share on other sites

Sorry cannot answer all of your questions right now. I'll make sure i'll get to them later.

--

About the dynamic crate. The way this works is pretty straight forward.

 

[
_crate,
[16,ai_wep_sniper], // WEAPONS DEFAULT ai_wep_random | can be either a fixed number OR [number,ARRAY] where the the chosen ARRAY should consist of ["WEAPONCLASS", "AMMOCLASS"] e.g. [["M16A4_ACG","30Rnd_556x45_Stanag"],["Sa58V_RCO_EP1","30Rnd_762x39_AK47"]]
[8,crate_tools_sniper], // TOOLS DEFAULT crate_tools | can be either a fixed number OR [number,ARRAY] where the chosen ARRAY must contain tools
[3,crate_items_high_value], // ITEMS DEFAULT crate_items | can be either a fixed number OR [number,ARRAY] where the chosen ARRAY must contain items
[4,crate_backpacks_large] // ITEMS DEFAULT crate_backpacks_all | can be either a fixed number OR [number,ARRAY] where the chosen ARRAY must contain backpacks
] call dynamic_crate;
Furthermore you always need to define all of them, meaning use 0 if you don't want any of those kind of items to spawn. Also remember that the number is a maximum number and the actual number of items put inside the crate is a randomly picked rounded one between 51% - 100% of the number you put in.

Hope that clears things up a bit.

Link to comment
Share on other sites

Sorry cannot answer all of your questions right now. I'll make sure i'll get to them later.

--

About the dynamic crate. The way this works is pretty straight forward.

 

[
_crate,
[16,ai_wep_sniper], // WEAPONS DEFAULT ai_wep_random | can be either a fixed number OR [number,ARRAY] where the the chosen ARRAY should consist of ["WEAPONCLASS", "AMMOCLASS"] e.g. [["M16A4_ACG","30Rnd_556x45_Stanag"],["Sa58V_RCO_EP1","30Rnd_762x39_AK47"]]
[8,crate_tools_sniper], // TOOLS DEFAULT crate_tools | can be either a fixed number OR [number,ARRAY] where the chosen ARRAY must contain tools
[3,crate_items_high_value], // ITEMS DEFAULT crate_items | can be either a fixed number OR [number,ARRAY] where the chosen ARRAY must contain items
[4,crate_backpacks_large] // ITEMS DEFAULT crate_backpacks_all | can be either a fixed number OR [number,ARRAY] where the chosen ARRAY must contain backpacks
] call dynamic_crate;
Furthermore you always need to define all of them, meaning use 0 if you don't want any of those kind of items to spawn. Also remember that the number is a maximum number and the actual number of items put inside the crate is a randomly picked rounded one between 51% - 100% of the number you put in.

Hope that clears things up a bit.

 

 

Awesome thanks for that man.

 

So if I wanted to put other items in would I just do something like this?

 

if(_complete) then {
[_crate,[16,ai_wep_random],[8,crate_tools_sniper],[8,crate_items],[1,crate_items_high_value],[2,crate_backpacks_large]] call dynamic_crate;
};
Link to comment
Share on other sites

Right now you can only define one type per objectype. In the next version we'll make it possible to define multiple types probably like this

 

if(_complete) then {
[_crate,[16,ai_wep_random],[8,crate_tools_sniper],[[8,crate_items],[1,crate_items_high_value]],[2,crate_backpacks_large]] call dynamic_crate;
};

Note the extra [ and ].
Link to comment
Share on other sites

 

Right now you can only define one type per objectype. In the next version we'll make it possible to define multiple types probably like this

if(_complete) then {
[_crate,[16,ai_wep_random],[8,crate_tools_sniper],[[8,crate_items],[1,crate_items_high_value]],[2,crate_backpacks_large]] call dynamic_crate;
};
Note the extra [ and ].

 

Awesome thanks man!

Link to comment
Share on other sites

Also I've given my special mission it's own position, I don't want it spawning just anywhere, but now I'm getting this error, it looks fine to me though.

 

_position = [[16679, 17683,0]];
 
// 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","Super Villains Lair","special",false] call mission_init;
 
Getting this error:
 
 4:54:50 Error in expression <select _mission) select 1;
 
_marker = createMarker [_type, _position];
_marker>
 4:54:50   Error position: <createMarker [_type, _position];
_marker>
 4:54:50   Error 1 elements provided, 3 expected
 4:54:50 File z\addons\dayz_server\WAI\compile\mission_init.sqf, line 59
Link to comment
Share on other sites

Loving the changes to the Mission System, Thx for all your hard work, very much appreciated by many.

 

Sry if this was already covered, I skimmed through the replies but didn't see the answer I was searching for (then again scrolling through 40+ replies at 2:30am things tend to get blurry) 

 

How does one change the amount of mission that are activated? default is 1 Hero and 1 bandit, I would like to change this to at least 2-4 of each type at any given time.

 

PS: Mission system needs a weed mission...Such as "Bandits are attacking the Farmers weed fields"  lol  

Link to comment
Share on other sites

Is there a way to still call a custom box like in the last mission system?

 

I've added this into the mission itself: 

 

_crate          = createVehicle ["BAF_VehicleBox",[(_position select 0),(_position select 1) + 12,0], [], 0, "CAN_COLLIDE"];
[_crate] call Gunbox_super_villain;

 

I've added this file into the missions folder named Gunbox_super_villain.sqf and added this to the init.sqf in the mission folder: Gunbox_super_villain = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\missions\gunbox_super_villain.sqf"; But it's still not loading it, the crate is empty

 

 

//gunbox super villain


_crate = _this select 0;
_crate setVariable ["ObjectID","1",true];
_crate setVariable ["permaLoot",true];
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crate];


clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;


// RIFLES
_crate addWeaponCargoGlobal ["RPG18", 2];
_crate addWeaponCargoGlobal ["MAAWS", 2];
_crate addWeaponCargoGlobal ["Stinger", 2];
_crate addWeaponCargoGlobal ["IGLA", 2];
_crate addWeaponCargoGlobal ["KSVK_DZE", 2];
_crate addWeaponCargoGlobal ["BAF_AS50_scoped_DZ", 2];
_crate addWeaponCargoGlobal ["M107_DZ", 2];


// PISTOLS
_crate addWeaponCargoGlobal ["M9SD", 2];
_crate addWeaponCargoGlobal ["UZI_SD_EP1", 2];
_crate addWeaponCargoGlobal ["RH_Deaglemzb", 2];
_crate addWeaponCargoGlobal ["RH_python", 2];


// AMMUNITION
_crate addMagazineCargoGlobal ["RPG18", 20];
_crate addMagazineCargoGlobal ["MAAWS_HEAT", 10];
_crate addMagazineCargoGlobal ["MAAWS_HEDP", 10];
_crate addMagazineCargoGlobal ["Stinger", 15];
_crate addMagazineCargoGlobal ["IGLA", 15];
_crate addMagazineCargoGlobal ["Mine", 10];
_crate addMagazineCargoGlobal ["PipeBomb", 10];
_crate addMagazineCargoGlobal ["BAF_ied_v1", 10];
_crate addMagazineCargoGlobal ["BAF_ied_v2", 10];
_crate addMagazineCargoGlobal ["BAF_ied_v3", 10];
_crate addMagazineCargoGlobal ["BAF_ied_v4",10];
_crate addMagazineCargoGlobal ["panzergrenade", 25];
_crate addMagazineCargoGlobal ["1Rnd_HE_GP25", 25];
_crate addMagazineCargoGlobal ["1Rnd_HE_M203", 25];
_crate addMagazineCargoGlobal ["HandGrenade_east", 25];
_crate addMagazineCargoGlobal ["HandGrenade_west", 25];
_crate addMagazineCargoGlobal ["5Rnd_127x99_as50", 20];
_crate addMagazineCargoGlobal ["5Rnd_127x108_KSVK", 20];
_crate addMagazineCargoGlobal ["10Rnd_127x99_m107", 10];
_crate addMagazineCargoGlobal ["2000Rnd_762x51_M134", 20];
_crate addMagazineCargoGlobal ["100Rnd_127x99_M2", 20];
_crate addMagazineCargoGlobal ["50Rnd_127x107_DSHKM", 20];
_crate addMagazineCargoGlobal ["ItemRuby", 4];
_crate addMagazineCargoGlobal ["ItemTopaz", 4];


_crate addMagazineCargoGlobal ["15Rnd_9x19_M9SD", 8];
_crate addMagazineCargoGlobal ["30Rnd_9x19_UZI_SD", 8];
_crate addMagazineCargoGlobal ["RH_6Rnd_357_Mag", 8];
_crate addMagazineCargoGlobal ["RH_7Rnd_50_AE", 8];


// ITEMS
_crate addWeaponCargoGlobal ["LaserDesignator", 2];
_crate addWeaponCargoGlobal ["Binocular_Vector", 2];
_crate addWeaponCargoGlobal ["NVGoggles", 2];
_crate addWeaponCargoGlobal ["ItemGPS", 2];


//BACKPACKS
_crate addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 4];


// CLOTHING
_crate addMagazineCargoGlobal ["Skin_Drake_Light_DZ", 2];
_crate addMagazineCargoGlobal ["Skin_GUE_Commander_DZ", 2];
_crate addMagazineCargoGlobal ["Skin_Sniper1_DZ", 2];

Link to comment
Share on other sites

Hey,

 great mission system been working fine till a few days ago when I installed the latest infinistar update.

3:08:03 Error in expression <y call server_hiveReadWrite;
_outcome = _result select 0;
if(_outcome == "PASS")>
 3:08:03   Error position: <_result select 0;
if(_outcome == "PASS")>
 3:08:03   Error Undefined variable in expression: _result
 3:08:03 File z\addons\dayz_server\compile\server_spawnEvent.sqf, line 39
 3:08:13 "Player is Null FAILED: Exiting, player sync: <NULL-object>"
 3:08:13 Error in expression <y call server_hiveReadWrite;
_outcome = _result select 0;
if(_outcome == "PASS")>
 3:08:13   Error position: <_result select 0;
if(_outcome == "PASS")>
 3:08:13   Error Undefined variable in expression: _result
 3:08:13 File z\addons\dayz_server\compile\server_spawnEvent.sqf, line 39

 that's what my rpt looks like, infinistar doesn't seem to like it one bit, it starts spamming the server with "the server is being broken" screen flashes then it reboots it. this is from line 35 to 50, you guys see any problems here or should I talk to infinistar?

while {1 == 1} do {
	
	// Find current time from server
	_key = "CHILD:307:";
	_result = _key call server_hiveReadWrite;
	_outcome = _result select 0;
	if(_outcome == "PASS") then {
		_date = _result select 1;
		_datestr  = str(_date);
		if (EventSchedulerLastTime != _datestr) then {
			
			// internal timestamp
			ServerCurrentTime = [(_date select 3), (_date select 4)];

			// Once a minute.
			EventSchedulerLastTime = _datestr;

Link to comment
Share on other sites

i was wondering, how do i make a set number of item spawn in a crate. there are two numbers i have noticed that make a differance in the spawn. one in the config file for the crate type and items in crate and one on the mission file, the mission files seems to give  it a maximum times number to run by like 10 time 10 for a max of 100 items. can i make it just a set amount or no?

 

Link to comment
Share on other sites

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