Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

Wondered if you might want to add this hemp mission. I was using it before but now it doaesn't work with the updates.

 

 

Weed:

 

//Weed

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

_vehclass = cargo_trucks call BIS_fnc_selectRandom;

_position = [getMarkerPos "center",0,4500,10,0,200,0] call BIS_fnc_findSafePos;

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

_veh = createVehicle [_vehclass,[(_position select 0), (_position select 1),0], [], 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 Convoy spawned a %1",_vehclass];

_objPosition = getPosATL _veh;

_box = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];

_1ox1 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];

_2ox2 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];

_3ox3 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];

_4ox4 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];

[[_position select 0, _position select 1, 0],4,1,"Random",4,"","Bandit2_DZ","Random",true] call spawn_group;

[[_position select 0, _position select 1, 0],4,1,"Random",4,"","Bandit2_DZ","Random",true] call spawn_group;

[[_position select 0, _position select 1, 0],4,1,"Random",4,"","Bandit2_DZ","Random",true] call spawn_group;

//Turrets

[[[(_position select 0) + 10, (_position select 1) + 10, 0],[(_position select 0) + 10, (_position select 1) - 10, 0]],"M2StaticMG",0.8,"Bandit2_DZ",0,2,"","Random",true] call spawn_static;

[_position,"Marijuana Field"] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";

[nil,nil,rTitleText,"Bandits have started harvesting the marijuana field! Take them out to gather the crop yourself!! Better Bring a machete. Check your map for the location!", "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: Ural Attack Mission Ended At %1",_position];

    [nil,nil,rTitleText,"The marijuana has been secured by survivors!", "PLAIN",10] call RE;

        sleep 120;

        deleteVehicle _box;

        deleteVehicle _1ox1;

        deleteVehicle _2ox2;

        deleteVehicle _3ox3;

        deleteVehicle _4ox4;

        deleteVehicle __veh;

} else {

    clean_running_mission = True;

    deleteVehicle _box;

    deleteVehicle _1ox1;

    deleteVehicle _2ox2;

    deleteVehicle _3ox3;

    deleteVehicle _4ox4;

    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: Ural Attack Mission Timed Out At %1",_position];

    [nil,nil,rTitleText,"The marijuana is now gone!", "PLAIN",10] call RE;

};

missionrunning = false;

Yeah, that's the mission I made, I posted it awhile ago. All I did was take a mission out of the WAI missions and tweak it around a little. Nice to see someone actually got some use out of it. Im working on making one that will work with this update. I can let you know when its done.

Link to comment
Share on other sites

Yeah, that's the mission I made, I posted it awhile ago. All I did was take a mission out of the WAI missions and tweak it around a little. Nice to see someone actually got some use out of it. Im working on making one that will work with this update. I can let you know when its done.

 

Oh cool, good to know.

 

Is it possible to add crate with hemp in it or hemp in the truck?

 

Some people don't have the harvest script...

 

Thank you.

Link to comment
Share on other sites

Getting an error in my RPT:

20:13:47 "WAI: AI Config File Loaded"
20:13:47 "WAI: AI Monitor Started"
20:13:47 "WAI: Initialising static missions"
20:13:47 "WAI: Initialising missions"
20:13:48 Error in expression <unit] joinSilent _unitGroup;

call {
if(_aitype == "hero") 		exitWith { _unit se>
20:13:48   Error position: <_aitype == "hero") 		exitWith { _unit se>
20:13:48   Error Undefined variable in expression: _aitype
20:13:48 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 109
20:13:48 Error in expression < call BIS_fnc_selectRandom;
};

_unit = _unitGroup createUnit [_aiskin,[_pos_x,_>
20:13:48   Error position: <_unitGroup createUnit [_aiskin,[_pos_x,_>
20:13:48   Error Undefined variable in expression: _unitgroup
20:13:48 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 105
20:13:48 Error in expression <gun			= _gun select 0;
};

if (typeName _aitype == "ARRAY") then {
_gain 			= _a>
20:13:48   Error position: <_aitype == "ARRAY") then {
_gain 			= _a>
20:13:48   Error Undefined variable in expression: _aitype
20:13:48 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 23
Link to comment
Share on other sites

Oh cool, good to know.

 

Is it possible to add crate with hemp in it or hemp in the truck?

 

Some people don't have the harvest script...

 

Thank you.

Yeah, I could add hemp to a crate. Not 100% sure on how to add to vehicle but sure I could figure it out. But with adding it to crate you would have to have a special crate sqf added to your compile folder in your wai folder. I could maybe send you a zip or something or maybe I could jus explain how to do it. Ill let you know when Im all done. Just testing it all now.
Link to comment
Share on other sites

 

Getting an error in my RPT:

20:13:47 "WAI: AI Config File Loaded"
20:13:47 "WAI: AI Monitor Started"
20:13:47 "WAI: Initialising static missions"
20:13:47 "WAI: Initialising missions"
20:13:48 Error in expression <unit] joinSilent _unitGroup;

call {
if(_aitype == "hero") 		exitWith { _unit se>
20:13:48   Error position: <_aitype == "hero") 		exitWith { _unit se>
20:13:48   Error Undefined variable in expression: _aitype
20:13:48 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 109
20:13:48 Error in expression < call BIS_fnc_selectRandom;
};

_unit = _unitGroup createUnit [_aiskin,[_pos_x,_>
20:13:48   Error position: <_unitGroup createUnit [_aiskin,[_pos_x,_>
20:13:48   Error Undefined variable in expression: _unitgroup
20:13:48 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 105
20:13:48 Error in expression <gun			= _gun select 0;
};

if (typeName _aitype == "ARRAY") then {
_gain 			= _a>
20:13:48   Error position: <_aitype == "ARRAY") then {
_gain 			= _a>
20:13:48   Error Undefined variable in expression: _aitype
20:13:48 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 23

 

 

Fixed the problem.  I copied my old default.sqf from the old version which didn't have the Bandit/Hero variables in it.  

 

 

Having another issue though.  My two boxes I had spawning are no longer spawning.  What's the best way to fix this if I want it to spawn a specific crate with a specific set of items?

 

This is what I currently have:

 

//Bandit Supply Base
_box = createVehicle ["BAF_VehicleBox",[6883.49,11440.7,0.001], [], 0, "CAN_COLLIDE"];
[_box] call Construction_Supply_Box;
_box1 = createVehicle ["BAF_VehicleBox",[6878.31,11443.5,0.002], [], 0, "CAN_COLLIDE"];
[_box1] call Extra_Large_Gun_Box;
Link to comment
Share on other sites

Change

//Bandit Supply Base
_box = createVehicle ["BAF_VehicleBox",[6883.49,11440.7,0.001], [], 0, "CAN_COLLIDE"];
[_box] call Construction_Supply_Box;
_box1 = createVehicle ["BAF_VehicleBox",[6878.31,11443.5,0.002], [], 0, "CAN_COLLIDE"];
[_box1] call Extra_Large_Gun_Box;

To (something like)

_crate1 = createVehicle ["BAF_VehicleBox",[6883.49,11440.7,0.001],[],0,"CAN_COLLIDE"];
_crate2 = createVehicle ["BAF_VehicleBox",[6878.31,11443.5,0.002],[],0,"CAN_COLLIDE"];
[_crate1,[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4] call dynamic_crate;
[_crate2,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;
Link to comment
Share on other sites

yea sure here you go.

 

 

if(isServer) then {

//Custom Spawns file//

/*

Custom group spawns Eg.

[

[953.237,4486.48,0.001], // Position

15, // Number Of units

"Random", // Skill level of unit (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Skin classname, use "Random" or classname here

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

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_group;

Place your custom group spawns below

*/

[

[18509.26, 17108.652, -0.00016212463], // Position

15, // Number Of units

"Random", // Skill level of unit (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Skin classname, use "Random" or classname here

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

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_group;

[

[18461.719, 17101.717, 0.00015068054], // Position

15, // Number Of units

"Random", // Skill level of unit (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Skin classname, use "Random" or classname here

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

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_group;

[

[18519.053, 17087.346, 0.00033950806], // Position

15, // Number Of units

"Random", // Skill level of unit (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Skin classname, use "Random" or classname here

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

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_group;

[

[18504.354, 17088.346, 0.00024604797], // Position

15, // Number Of units

"Random", // Skill level of unit (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Skin classname, use "Random" or classname here

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

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_group;

[

[18504.354, 17088.346, 0.00024604797], // Position

15, // Number Of units

"Random", // Skill level of unit (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Skin classname, use "Random" or classname here

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

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_group;

/*

Custom static weapon spawns Eg. (with mutiple positions)

[

[ // Position(s) (can be multiple)

[911.21,4532.76,2.62],

[921.21,4542.76,2.62]

],

"M2StaticMG", // Classname of turret

"easy", // Skill level of unit (easy, medium, hard, extreme, Random)

"Bandit2_DZ", // Skin classname, use "Random" or classname here

"Random", // Primary gun set number. "Random" for random weapon set

2, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Random", // Gearset classname, use "Random" or classname here

"Bandit" // AI Type, "Hero" or "Bandit".

] call spawn_static;

Place your custom static weapon spawns below

*/

/*

Custom Chopper Patrol spawn Eg.

[

[725.391,4526.06,0], // Position to patrol

[0,0,0], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"UH1H_DZ", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

Place your heli patrols below

*/

[

[18828.4,2074.95,0.002], // Position to patrol

[18828.4,2074.95,25.002], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"UH1H_DZ", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[15366.6,9510.95,0.001], // Position to patrol

[15366.6,9510.95,25.001], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"UH1H_DZ", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[7631.59,6887.78,0.002], // Position to patrol

[7631.59,6887.78,25.002], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"UH1H_DZ", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[11109.8,12957.7,0.001], // Position to patrol

[11109.8,12957.7,0.001], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"UH1H_DZ", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[1980.2,11101.7,0.196], // Position to patrol

[1980.2,11101.7,25.196], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"CH_47F_EP1", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[5589.02,16412.7,0.001], // Position to patrol

[5589.02,16412.7,25.001], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"CH_47F_EP1", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[12441.2,14847.3,0.001], // Position to patrol

[12441.2,14847.3,25.001], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"CH_47F_BAF", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[11110,10549.3,0.001], // Position to patrol

[11110,10549.3,25.001], // Position to spawn chopper at

2000, // Radius of patrol

10, // Number of waypoints to give

"CH_47F_BAF", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[18504.354,17088.346,30.000], // Position to patrol

[18504.354,17088.346,30.000], // Position to spawn chopper at

300, // Radius of patrol

10, // Number of waypoints to give

"UH1Y", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[18519.053, 17087.346, 25.000], // Position to patrol

[18519.053, 17087.346, 30.000], // Position to spawn chopper at

300, // Radius of patrol

10, // Number of waypoints to give

"UH1Y", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[18419.053, 17187.346, 30.000], // Position to patrol

[18419.053, 17187.346, 30.000], // Position to spawn chopper at

300, // Radius of patrol

10, // Number of waypoints to give

"UH1Y", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

[

[18619.053, 17287.346, 30.000], // Position to patrol

[18619.053, 17287.346, 30.000], // Position to spawn chopper at

300, // Radius of patrol

10, // Number of waypoints to give

"UH1Y", // Classname of vehicle (make sure it has driver and two gunners)

"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 heli_patrol;

/*

Custom Vehicle patrol spawns Eg. (Watch out they are stupid)

[

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

Place your vehicle patrols below this line

*/

[

[18504.354, 17088.346, 1.00024604797], // Position to patrol

[18504.354, 17088.346, 0.00024604797], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"ArmoredSUV_PMC", // 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;

[

[18461.719, 17101.717, 1.00015068054], // Position to patrol

[18461.719, 17101.717, 1.00015068054], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"ArmoredSUV_PMC", // 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;

[

[6119.33,5073.99,0.001], // Position to patrol

[6119.33,5073.99,0.001], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"ArmoredSUV_PMC", // 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;

[

[5326.65,8230.45,0.001], // Position to patrol

[5326.65,8230.45,0.001], // Position to spawn at

2000, // 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;

[

[10844.9,12670.5,0.002], // Position to patrol

[10844.9,12670.5,0.002], // Position to spawn at

8000, // Radius of patrol

10, // Number of waypoints to give

"MLRS_DES_EP1", // 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;

[

[15882.9,9435.07,0.001], // Position to patrol

[15882.9,9435.07,0.001], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"HMMWV_M998A2_SOV_DES_EP1", // 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;

[

[9544.15,11784.3,0.001], // Position to patrol

[9544.15,11784.3,0.001], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"HMMWV_M998A2_SOV_DES_EP1", // 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;

[

[6202.03,12756.5,0.001], // Position to patrol

[6202.03,12756.5,0.001], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"Pickup_PK_TK_GUE_EP1", // 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;

[

[3631.72,9843.1,0.002], // Position to patrol

[3631.72,9843.1,0.002], // Position to spawn at

2000, // Radius of patrol

10, // Number of waypoints to give

"Pickup_PK_TK_GUE_EP1", // 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;

/*

Paradropped unit custom spawn Eg.

[

[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

"Random", // Skill level of units (easy, medium, hard, extreme, Random)

"Random", // Primary gun set number. "Random" for random weapon set.

4, // Number of magazines

"Random", // Backpack classname, use "Random" or classname here

"Bandit2_DZ", // Skin classname, use "Random" or classname here

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

"Bandit", // AI Type, "Hero" or "Bandit".

true // true: Aircraft will stay at position and fight. false: Heli will leave if not under fire.

] spawn heli_para;

Place your paradrop spawns under this line

*/

diag_log "WAI: Static mission loaded";

};

 

thank you

Link to comment
Share on other sites

Yeah, I could add hemp to a crate. Not 100% sure on how to add to vehicle but sure I could figure it out. But with adding it to crate you would have to have a special crate sqf added to your compile folder in your wai folder. I could maybe send you a zip or something or maybe I could jus explain how to do it. Ill let you know when Im all done. Just testing it all now.

 

Yeah in the crate would be fine. I don't really want to install the harvest script just for one mission. I have an Overpoch Lingor server and Lingor has two (as far as I know) hemp farms that can be harvested.

 

Either way you want to do it. Instructions or a zip. I'd just love to keep that mission...

 

Thanks again.

Link to comment
Share on other sites

latest version, first run and.........

 6:18:43 Warning Message: Script z\addons\dayz_server\WAI\compile\functions.sqf not found
 6:18:51 "WAI: AI Config File Loaded"
 6:19:00 "WAI: Initialising missions"
 6:19:00 Warning Message: Script z\addons\dayz_server\WAI\compile\position_functions.sqf not found
 6:19:00 "WAI: AI Monitor Started"
 6:19:09 Error in expression <s 					= [];
trader_markers 					= call get_trader_markers;
markerready 					= t>
 6:19:09   Error position: <get_trader_markers;
markerready 					= t>
 6:19:09   Error Undefined variable in expression: get_trader_markers
 6:19:09 File z\addons\dayz_server\WAI\missions\init.sqf, line 18

both files don't exist

it works, but the mssions spawn outside of the map

Link to comment
Share on other sites

latest version, first run and.........

 6:18:43 Warning Message: Script z\addons\dayz_server\WAI\compile\functions.sqf not found
 6:18:51 "WAI: AI Config File Loaded"
 6:19:00 "WAI: Initialising missions"
 6:19:00 Warning Message: Script z\addons\dayz_server\WAI\compile\position_functions.sqf not found
 6:19:00 "WAI: AI Monitor Started"
 6:19:09 Error in expression <s 					= [];
trader_markers 					= call get_trader_markers;
markerready 					= t>
 6:19:09   Error position: <get_trader_markers;
markerready 					= t>
 6:19:09   Error Undefined variable in expression: get_trader_markers
 6:19:09 File z\addons\dayz_server\WAI\missions\init.sqf, line 18

both files don't exist

try not to download from the testbranch while we are developing ;)

Link to comment
Share on other sites

In 2.0.5 I was running a really nice random construction loot.

 

Hoping this works in the new one.

 

In config added 

 /* BUILDABLES CONFIG */
_cinder = round(random 5) * 8;
_mortar = round(random 2) * 5;
_floor = round(random 3) * 5;
_ply = round(random 1) * 5;
_cwall = round(random 3) * 4;
_scrap = round(random 2) * 5;
_snd = round(random 2) * 5;
_trap = round(random 1) * 5;
_net = round(random 1) * 3;
_combo = round(random 1) * 2;
_scaf = round(random 1) * 4;
_cs = round(random 1) * 2;
_csf = round(random 1) * 2;
_safe = round(random 1) * 100;
if (_safe == > 90) then {
_safe1 = round(random 1) *2;
};
/* END BUILDABLES CONFIG */

 

Then changed crate_items_buildables to 

crate_items_buildables		= ["CinderBlocks", _cinder],["MortarBucket", _mortar],["metal_floor_kit", _floor],["PartPlywoodPack", _ply],["cinder_wall_kit", _cwall],["PartGeneric", _scrap],["ItemSandbag", _snd],["ItemTankTrap", _trap],["forest_large_net_kit", _net],["workbench_kit", 1],["ItemComboLock", _combo],["ItemFireBarrel_kit", 1],["ItemScaffoldingKit", _scaf],["ItemJerryMixed", _csf],["ItemVault", _safe1];

Link to comment
Share on other sites

In 2.0.5 I was running a really nice random construction loot.

 

Hoping this works in the new one.

 

In config added 

 /* BUILDABLES CONFIG */
_cinder = round(random 5) * 8;
_mortar = round(random 2) * 5;
_floor = round(random 3) * 5;
_ply = round(random 1) * 5;
_cwall = round(random 3) * 4;
_scrap = round(random 2) * 5;
_snd = round(random 2) * 5;
_trap = round(random 1) * 5;
_net = round(random 1) * 3;
_combo = round(random 1) * 2;
_scaf = round(random 1) * 4;
_cs = round(random 1) * 2;
_csf = round(random 1) * 2;
_safe = round(random 1) * 100;
if (_safe == > 90) then {
_safe1 = round(random 1) *2;
};
/* END BUILDABLES CONFIG */

 

Then changed crate_items_buildables to 

crate_items_buildables		= ["CinderBlocks", _cinder],["MortarBucket", _mortar],["metal_floor_kit", _floor],["PartPlywoodPack", _ply],["cinder_wall_kit", _cwall],["PartGeneric", _scrap],["ItemSandbag", _snd],["ItemTankTrap", _trap],["forest_large_net_kit", _net],["workbench_kit", 1],["ItemComboLock", _combo],["ItemFireBarrel_kit", 1],["ItemScaffoldingKit", _scaf],["ItemJerryMixed", _csf],["ItemVault", _safe1];

it should work from having a quick look at the code

 

actually it might just end up more randomized from what I can tell, not entirely sure because f3cuk did up the crate code

Edited by Jossy
Link to comment
Share on other sites

is there a reason in the mission init all the special mission calls are commented out. as its set up it will only run hero and bandit missions. Is there a reason why I shouldn't take the // out from the special mission ones.

 

No reason other than there is currently only the one special missions, which would repeat over and over and be kinda silly, we're working on others that will be added in later releases.

 

If you really want you can enable it, it hasn't had much testing though as it hasn't been our main focus at this point

Link to comment
Share on other sites

Lil adjustment and the building loot is nice and random/balanced. Where they aren't too rewarding all the time, but you get random each time.

 

I've actually gone through and swapped a bunch of things up, if i get anything working nice i'll let you all know

 

*** One thing this Mission System needs is either a tutorial on editing and randomising loot, or making loot editing a lot more user friendly and simple.

Link to comment
Share on other sites

this value has no effect on servers running infiSTAR until we find out a way around the server restarting when using it

 

Well i d say the mission spawn 905% here and where the other one is 

 

My players are just sitting there waiting for the missions

 

Image :

2oXE5bK.jpg

Also getting spammed with this :

13:53:42 Error in expression < {

_skill = _this select 3;

call {
if(_skill == "easy") exitWith { _wp_rad = 2>
13:53:42   Error position: <_skill == "easy") exitWith { _wp_rad = 2>
13:53:42   Error Undefined variable in expression: _skill
13:53:42 File z\addons\dayz_server\WAI\compile\group_waypoints.sqf, line 17
Link to comment
Share on other sites

I'm guessing no errors in RPT?

 

Please switch on debug mode and report with your RPT after running with that for a few hours. I'm interested to see how many loops the location finder takes to find a suitable spawn.

Link to comment
Share on other sites

Also please temporary replace find_position.sqf with this one, it should help us give insight into what is happening.

if(isServer) then {
    
    private ["_i","_traders","_safepos","_validspot","_position"];

    waitUntil {markerready};

    if(use_blacklist) then {
        _safepos        = [getMarkerPos "center",0,9500,(_this select 0),0,0.5,0,blacklist];
    } else {
        _safepos        = [getMarkerPos "center",0,9500,(_this select 0),0,0.5,0];
    };

    _validspot     = false;
    _i             = 1;

    while{!_validspot} do {

        _position     = _safepos call BIS_fnc_findSafePos;
        _validspot    = true;

        if (_position call inDebug) then { _validspot = false; }; //diag_log("WAI: Invalid Position (Debug)");

        if(wai_near_water != 0) then {
            if ([_position,wai_near_water] call isNearWater) then {
                _validspot = false;
                diag_log("WAI: Invalid Position (Water)");
            };
        };

        if (isNil "infiSTAR_LoadStatus1" && wai_near_town != 0) then {
            if ([_position,wai_near_town] call isNearTown) then {
                _validspot = false;
                diag_log("WAI: Invalid Position (Town)");
            };
        }; // ELSE infoSTAR is enabled, need to find another method of finding near towns

        if(wai_near_road != 0) then {
            if ([_position,wai_near_road] call isNearRoad) then {
                _validspot = false;
                diag_log("WAI: Invalid Position (Road)");
            };
        };

        if(debug_mode) then { diag_log("WAI DEBUG: FINDPOS: Checking nearby mission markers: " + str(wai_mission_markers)); };

        if (wai_avoid_missions) then {
            {
                if (getMarkerColor _x != "" && (_position distance (getMarkerPos _x) < wai_mission_spread)) exitWith {
                    _validspot = false;
                    diag_log("WAI: Invalid Position (Other mission nearby)");
                };
            } count wai_mission_markers;
        };

        if(debug_mode) then { diag_log("WAI DEBUG: FINDPOS: Checking nearby trader markers: " + str(trader_markers)); };

        if (wai_avoid_traders) then {
            {
                if (getMarkerColor _x != "" && (_position distance (getMarkerPos _x) < wai_mission_spread)) exitWith {
                    _validspot = false;
                    diag_log("WAI: Invalid Position (Trader nearby)");
                };
            } count trader_markers;
        };

        if(_validspot) then {
            if(debug_mode) then { diag_log("Loop complete, valid position " +str(_position) + " in " + str(_i) + " attempts"); };
        } else {
            _i = _i + 1;
        };
    };

    _position
};

Link to comment
Share on other sites

f3cuk :https://www.dropbox.com/s/hyep9f2cupmraat/arma2oaserver.RPT?dl=0

 

I left the missions to time-out every 120 seconds (2 minutes)

 

Alot of spam in that file about markers xD

 

I would fix the errors you are having with other things before worrying about spawn positions

 

It looks to me as though you don't have the updated spawn_group.sqf, which would also lead me to believe you may not have the latest update..

 

down the bottom of spawn_group.sqf does it look like this?

	if(_pos_z == 0) then {
		[_unitGroup,[_pos_x,_pos_y,_pos_z],_skill] spawn group_waypoints;
	};

	diag_log format ["WAI: Spawned a group of %1 AI (%3) at %2",_unitnumber,_position,_aitype];
Link to comment
Share on other sites

Same conclusion on my end. Please update to the latest version.

 

--

If after update this problem still persists, please try again with this find_position.sqf and report back.

 

if(isServer) then {
    
    private ["_i","_traders","_safepos","_validspot","_position"];

    waitUntil {markerready};

    if(use_blacklist) then {
        _safepos        = [getMarkerPos "center",0,9500,(_this select 0),0,0.5,0,blacklist];
    } else {
        _safepos        = [getMarkerPos "center",0,9500,(_this select 0),0,0.5,0];
    };

    _validspot     = false;
    _i             = 1;

    while{!_validspot} do {

        _position     = _safepos call BIS_fnc_findSafePos;
        _validspot    = true;

        if (_position call inDebug) then {
            _validspot = false;
            diag_log("WAI: Invalid Position (Debug)");
        };

        if(wai_near_water != 0) then {
            if ([_position,wai_near_water] call isNearWater) then {
                _validspot = false;
                diag_log("WAI: Invalid Position (Water)");
            };
        };

        if (isNil "infiSTAR_LoadStatus1" && wai_near_town != 0) then {
            if ([_position,wai_near_town] call isNearTown) then {
                _validspot = false;
                diag_log("WAI: Invalid Position (Town)");
            };
        }; // ELSE infoSTAR is enabled, need to find another method of finding near towns

        if(wai_near_road != 0) then {
            if ([_position,wai_near_road] call isNearRoad) then {
                _validspot = false;
                diag_log("WAI: Invalid Position (Road)");
            };
        };

        if(debug_mode) then { diag_log("WAI DEBUG: FINDPOS: Checking nearby mission markers: " + str(wai_mission_markers)); };

        if (wai_avoid_missions) then {
            {
                if (getMarkerColor _x != "" && (_position distance (getMarkerPos _x) < wai_mission_spread)) exitWith {
                    _validspot = false;
                    diag_log("WAI: Invalid Position (Other mission nearby)");
                };
            } count wai_mission_markers;
        };

        if(debug_mode) then { diag_log("WAI DEBUG: FINDPOS: Checking nearby trader markers: " + str(trader_markers)); };

        if (wai_avoid_traders) then {
            {
                if (getMarkerColor _x != "" && (_position distance (getMarkerPos _x) < wai_mission_spread)) exitWith {
                    _validspot = false;
                    diag_log("WAI: Invalid Position (Trader nearby)");
                };
            } count trader_markers;
        };

        if(_validspot) then {
            if(debug_mode) then { diag_log("Loop complete, valid position " +str(_position) + " in " + str(_i) + " attempts"); };
        } else {
            _i = _i + 1;
        };
    };

    _position
};

Link to comment
Share on other sites

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