Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

I haven't done exhaustive testing yet but I've got my %kill set to 30 and even so, when I kill all AI, about 75% of the time there's no loot and the marker doesn't clear.  It's as if it doesn't know the mission is complete.

 

And I've always used flares and and smoke before and it worked every time. So far, I have yet to see a single flare or smoke plume when the missions complete - for those that really complete.

 

But I've been making changes and additions to other scripts too so something else could be interfering.  I'm going to put the old version (2.2.0 beta) back and see if everything works properly.

Link to comment
Share on other sites

Hi guys, GREAT mod, I need a little help please.

 

Been trying for over a month off/on to get the AlienZ (link to mod) into a WAI 2.2.0 mission, with no luck.

 

I've added the @AlienZ folder and the keys and it loads successfully with no problems. I've gotten a crate built into the admin tools menu that successfully spawns the weapons from the mod.

 

But i can't get a mission (static or random) to load the characters or vehicles (haven't tried a crate yet no point until the characters are right).

 

This link indicates that it has been successfully done, but the server is passworded with no indication of what it might be, no one is ever logged in to it, and i cant track the owner down to inquire.

 

I would like to have 4 -5 different missions that run only when the server is night-time.

 

Any help or ideas pointing me in the right direction would be tremendously appreciated.

note: this is for a dedicated server

Link to comment
Share on other sites

Hi guys I want to thank you guys for wai it's great I have 4 mission popping up a lot but here is where I need help. ATM I have mission radius at 1000 m and would like to know how I can expand minefield radius to 300m plz help if you can.

Thanks biship

Link to comment
Share on other sites

Figured out the no flares problem thanks to a post I found in another thread.  I had to set  EXPERIMENTAL CU FIX */ _CUF = false in Infistar.

 

But now I have another problem that is manifesting iteself in WAI but I don't think that's where the problem lies but I'm not sure where or how to start troubleshooting this one.

 

In my server-side .rpt:

 

15:58:25 "WAI: AI Config File Loaded"
15:58:25 "WAI: AI Monitor Started"
15:58:25 "WAI: Initialising static missions"
15:58:25 Error in expression <aigear select 0;
_geartools   = _aigear select 1;

call {
if(_skin == "random") >
15:58:25   Error position: <select 1;

call {
if(_skin == "random") >
15:58:25   Error Zero divisor
15:58:25 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 91
15:58:26 Error in expression <ack;
};

{
_unit addMagazine _x
} count _gearmagazines;

{
_unit addweapon _x
} >
15:58:26   Error position: <_gearmagazines;

{
_unit addweapon _x
} >
15:58:26   Error Undefined variable in expression: _gearmagazines
15:58:26 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 153
15:58:26 "WAI: Initialising missions"

 

What's happening is that in my static mission file (see below), the mayor on SecB spawns but nothing else does.  I don't even get the message about the mayor successfully loading in my .rpt.  Here's the static mission file I'm trying to load.  I ran it through squint but didn't see anything wrong with it.

 

if(isServer) then {




//Custom Spawns file//
/*
Custom group spawns Eg.

[
[953.237,4486.48,0.001], // Position
4, // Number Of units
"Random", // Skill level of unit (easy, medium, hard, extreme, Random)
"Random", or ["Random","at"], // Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher
4, // Number of magazines
"Random", // Backpack classname, use "Random" or classname here
"Random", // Skin classname, use "Random" or classname here
3, // Gearset number. "Random" for random gear set
"Bandit" // AI Type, "Hero" or "Bandit".
] call spawn_group;

Place your custom group spawns below
*/

//MAYOR
[[22144.344, 19846.152, 0.001],1,"hard","Random",10,"Random","RU_Functionary1",3,"Bandit"] call spawn_group;
diag_log "WAI: Mayor loaded";

//WALL
[[22200.535, 19233.414, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22170.758, 19268.355, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22087.525, 19402.551, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22012.635, 19549.02, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[21969.379, 19799.959, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22132.943, 19998.055, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22293.195, 20148.699, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22524.277, 20277.641, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22805.9, 20207.092, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[23027.607, 19958.529, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[23125.289, 19651.629, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[23142.666, 19426.102, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[23104.883, 19238.574, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22937.314, 19093.746, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22501.318, 19000.621, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22320.965, 19119.047, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22895.33, 20122.66, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;
[[22329.719, 20180.971, 0.001],1,"hard","Random",9,"Random","Random",2,"Bandit"] call spawn_group;

diag_log "WAI: Wall loaded";

};

 

 

Update:  by doing nothing more than swapping out my WAI folder in dayz_server.pbo between my old working 2.2.0 beta and the new 2.2.0 final vanilla, freshly downloaded from this thread, the above errors comes and goes.  2.2.0 beta - no errors.  2.2.0 final - errors.  

Link to comment
Share on other sites

Hi guys I want to thank you guys for wai it's great I have 4 mission popping up a lot but here is where I need help. ATM I have mission radius at 1000 m and would like to know how I can expand minefield radius to 300m plz help if you can.

Thanks biship

update I found out how to do it myself-)

Link to comment
Share on other sites

Any idea what could be causing this error?

 

15:00:15 Error in expression <tion = wai_mission_data select _mission select 3;
};


{
_x setVariable ["Aggress>
15:00:15   Error position: <select 3;
};


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


{
_x setVariable ["Aggress>
15:00:16   Error position: <select 3;
};


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

I have put some customisations in but I'm not sure if they're the cause.

 

Link to comment
Share on other sites

custom_per_world = false; // use a custom mission file per world

 

What does the above line do if set to true? oh and i can see the line that says: use a custom mission file per world. I just dont understand it. 

Link to comment
Share on other sites

OK, my static missions won't load.   I went all the way back to the beginning.  Just this morning, I redownloaded WAI 2.2.0 final and fully replaced the WAI structure in my .PBO.  So far so good.  It ran error free.  

 

So I copied my static mission folder structure that worked under 2.2.0 beta and replaced it in the new 2.2.0 final.  That's the only change I made.  And I verified that nothing has changed in the static\init.sqf folder between old and new.  There are absolutely no warnings or errors in either the client-side or server-side.rpt.  The only WAI messages I get are:

 

13:02:08 "WAI: AI Config File Loaded"
13:02:08 "WAI: Initialising missions"
13:02:08 "WAI: AI Monitor Started"

 

That's it (besides the "mission started" messages for the hero/bandit missions).  The hero and bandit missions start.  

 

I never see the message in the logs from \wai\static\init.sqf about initialising static missions.   It's as if the static missions aren't even being called.  And I do have wai_mission_system = true; in the config.sqf.  As far as I know, there's nothing else controlling the activation of static missions, is there?

Link to comment
Share on other sites

D'oh!   How'd I miss that?  But now that that the static missions start, I'm seeing a new error that didn't exist with the beta:

 

16:18:28 "WAI: Initialising static missions"


16:18:29 Error in expression _geartools = _aigear select 1;

call {
if(_skin == "random") >
16:18:29 Error position: call {if(_skin == "random") >16:18:29 Error Zero divisor16:18:29 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 9116:18:29 "WAI: Air Units loaded"16:18:29 "WAI: Initialising missions"16:18:30 Error in expression };{_unit addMagazine _x} count _gearmagazines;{_unit addweapon _x} >16:18:30 Error position: <_gearmagazines;{_unit addweapon _x} >16:18:30 Error Undefined variable in expression: _gearmagazines

 

Any ideas?

Link to comment
Share on other sites

I have a new bandit weed mission for WAI 2.2.0.

 

I don't fully understand this new WAI 2.2.0 and really difficult for me to make custom missions for it. I'm gonna try to anyway,

but there's a few things I need to figure out first.

 

I would like to:

-Change the skins on the Ai that spawn in this particular mission (cops and rocker skins will do instead)

-Make some new custom loot crates that will spawn in ItemKiloHemp and some other stuff. (I'm totally lost on this one)

 

Here's a bandit mission. Basically just took the hero_base.sqf and used that as a template. 

 

Crop Raider

Cops are about to raid a hippy commune. Kill the cops, take the weed, then kill the hippies.

This mission needs a lot of tweaks. I'm sure people on this forum can help out with this.

 

1. You can test out this mission by creating an sqf file, name it as crop_raider.sqf, put the mission code below in there and save it to WAI/missions/bandit/crop_raider.sqf

 

2. Then put crop_raider.sqf in the list of bandit missions in the WAI config.sqf file 

Hopefully this is all you need to do to get it to work

 

If anyone knows how to help me with the loot boxes and Ai skins I can convert 15 other missions to this mission system much faster. I don't run this mission system so I have no way of testing it. Any feedback would be very helpful before I move onto the other 15. 

 

Damn! How do I use spoilers?

 

crop_raider.sqf

if(isServer) then {


private  ["_complete","_mission","_position","_crate","_num","_crate_type","_baserunover","_baserunover1","_baserunover2","_baserunover3","_baserunover4","_baserunover5","_baserunover6","_baserunover7","_baserunover8","_baserunover9","_baserunover10","_baserunover11","_baserunover12","_baserunover13","_baserunover14","_baserunover15","_baserunover16","_baserunover17","_baserunover18","_baserunover19","_baserunover20","_baserunover21","_baserunover22","_baserunover23","_baserunover24"];


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


_position = [80] call find_position;
[_mission,_position,"Hard","Crop Raider","MainBandit",true] call mission_init;


diag_log  format["WAI: [Mission:[Bandit] Hippy Commune]: Starting... %1",_position];


//Setup the crate
_crate_type  = crates_large call BIS_fnc_selectRandom;
_crate  = createVehicle [_crate_type,[(_position select 0) + 2,(_position select 1),0],[],0,"CAN_COLLIDE"];


//Buildings
_baserunover = createVehicle ["fiberplant",[(_position select 0) - 10.8, (_position select 1) - 16.3,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover setDir 0;
_baserunover setVectorUp surfaceNormal position _baserunover;
_baserunover1 = createVehicle ["fiberplant",[(_position select 0) + 16.2, (_position select 1) - 17.6,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover1 setDir 0;
_baserunover1 setVectorUp surfaceNormal position _baserunover1;
_baserunover2 = createVehicle ["fiberplant",[(_position select 0) - 17.3, (_position select 1) + 21,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover2 setDir 0;
_baserunover2 setVectorUp surfaceNormal position _baserunover2;
_baserunover3 = createVehicle ["fiberplant", [(_position select 0) + 28.6, (_position select 1) + 29,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover3 setDir 0;
_baserunover3 setVectorUp surfaceNormal position _baserunover3;
_baserunover4 = createVehicle ["fiberplant", [(_position select 0) - 29.8, (_position select 1) - 31.1,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover4 setDir 0;
_baserunover4 setVectorUp surfaceNormal position _baserunover4;
_baserunover5 = createVehicle ["fiberplant", [(_position select 0) + 30.2, (_position select 1) - 33,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover5 setDir 0;
_baserunover5 setVectorUp surfaceNormal position _baserunover5;
_baserunover6 = createVehicle ["fiberplant",[(_position select 0) - 32, (_position select 1) + 28.7,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover6 setDir 0;
_baserunover6 setVectorUp surfaceNormal position _baserunover6;
_baserunover7 = createVehicle ["fiberplant",[(_position select 0) - 32, (_position select 1) - 1.1,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover7 setDir 0;
_baserunover7 setVectorUp surfaceNormal position _baserunover7;
_baserunover8 = createVehicle ["fiberplant",[(_position select 0) + 1.3, (_position select 1) - 28,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover8 setDir 0;
_baserunover8 setVectorUp surfaceNormal position _baserunover8;
_baserunover9 = createVehicle ["fiberplant", [(_position select 0) + 27, (_position select 1) + 2,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover9 setDir 0;
_baserunover9 setVectorUp surfaceNormal position _baserunover9;
_baserunover10 = createVehicle ["fiberplant", [(_position select 0) - 0.3, (_position select 1) + 26,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover10 setDir 0;
_baserunover10 setVectorUp surfaceNormal position _baserunover10;
_baserunover11 = createVehicle ["fiberplant", [(_position select 0) + 35.9, (_position select 1) + 39,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover11 setDir 0;
_baserunover11 setVectorUp surfaceNormal position _baserunover11;
_baserunover12 = createVehicle ["fiberplant",[(_position select 0) - 39, (_position select 1)- 40.3,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover12 setDir 0;
_baserunover12 setVectorUp surfaceNormal position _baserunover12;
_baserunover13 = createVehicle ["fiberplant",[(_position select 0) - 36.9, (_position select 1) - 38.6,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover13 setDir 0;
_baserunover13 setVectorUp surfaceNormal position _baserunover13;
_baserunover14 = createVehicle ["fiberplant",[(_position select 0) + 38, (_position select 1) - 38.9,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover14 setDir 0;
_baserunover14 setVectorUp surfaceNormal position _baserunover14;
_baserunover15 = createVehicle ["fiberplant", [(_position select 0) - 37, (_position select 1) + 39.7,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover15 setDir 0;
_baserunover15 setVectorUp surfaceNormal position _baserunover15;
_baserunover16 = createVehicle ["fiberplant", [(_position select 0) - 0.1, (_position select 1) + 42.3,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover16 setDir 0;
_baserunover16 setVectorUp surfaceNormal position _baserunover16;
_baserunover17 = createVehicle ["fiberplant", [(_position select 0) + 42.1, (_position select 1) - 0.1,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover17 setDir 0;
_baserunover17 setVectorUp surfaceNormal position _baserunover17;
_baserunover18 = createVehicle ["fiberplant", [(_position select 0) + 0.1, (_position select 1) - 40.2,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover18 setDir 0;
_baserunover18 setVectorUp surfaceNormal position _baserunover18;
_baserunover19 = createVehicle ["hruzdum",[(_position select 0) - 0.01, (_position select 1)- 0.01,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover19 setDir 0;
_baserunover19 setVectorUp surfaceNormal position _baserunover19;
_baserunover20 = createVehicle ["fiberplant",[(_position select 0) - 10, (_position select 1) - 11,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover20 setDir 0;
_baserunover20 setVectorUp surfaceNormal position _baserunover20;
_baserunover21 = createVehicle ["fiberplant",[(_position select 0) + 13, (_position select 1) + 12.2,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover21 setDir 0;
_baserunover21 setVectorUp surfaceNormal position _baserunover21;
_baserunover22 = createVehicle ["fiberplant", [(_position select 0) + 12.3, (_position select 1) - 10.6,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover22 setDir 0;
_baserunover22 setVectorUp surfaceNormal position _baserunover22;
_baserunover23 = createVehicle ["fiberplant", [(_position select 0) - 11.3, (_position select 1) + 12.7,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover23 setDir 0;
_baserunover23 setVectorUp surfaceNormal position _baserunover23;
_baserunover24 = createVehicle ["fiberplant", [(_position select 0) + 15, (_position select 1) + 10,-0.2],[], 0, "CAN_COLLIDE"];
_baserunover24 setDir 0;
_baserunover24 setVectorUp surfaceNormal position _baserunover24;
_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7,_baserunover8,_baserunover9,_baserunover10,_baserunover11,_baserunover12,_baserunover13,_baserunover14,_baserunover15,_baserunover16,_baserunover17,_baserunover18,_baserunover19,_baserunover20,_baserunover21,_baserunover22,_baserunover23,_baserunover24];


//Group Spawning
_num = 4 + round (random 3);
[[(_position select 0) + 9, (_position select 1) - 13, 0],_num,"Hard",["Random","AT"],4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[(_position select 0) + 13, (_position select 1) + 15, 0],4,"Hard","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[(_position select 0) - 23, (_position select 1) - 25, 0],4,"Hard","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[(_position select 0) - 13, (_position select 1) + 15, 0],4,"Hard","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],4,"Hard","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;


//Humvee Patrol
[[(_position select 0) + 55, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","Hard","Hero","Hero",_mission] call vehicle_patrol;


//Static Guns
[[[(_position select 0) - 48, (_position select 1) + 0.1, 0]],"M2StaticMG","Hard","Hero","Hero",0,2,"Random","Random",_mission] call spawn_static;
[[[(_position select 0) + 2, (_position select 1) +48, 0]],"M2StaticMG","Hard","Hero","Hero",0,2,"Random","Random",_mission] call spawn_static;


//Heli Paradrop
[[(_position select 0), (_position select 1), 0],400,"UH1H_DZ",10,"Hard","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;


//Condition
_complete = [
[_mission,_crate], // mission number and crate
["crate"],  // ["crate"], or ["kill"], or ["assassinate", _unitGroup],
[_baserunover],  // cleanup objects
"Cops are about to raid the weed crops of a hippy commune...Kill the cops, take the weed and then kill the hippies", // mission announcement
"Bandits have raided the hippy commune", // mission success
"Bandits did not capture the hippy commune in time..piggy wins!" // mission fail
] call mission_winorfail;


if(_complete) then {
[_crate,[16,ai_wep_sniper],[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;
};


diag_log format["WAI: [Mission:[Bandit] Hippy Commune]: Ended at %1",_position];


b_missionsrunning = b_missionsrunning - 1;
};
Link to comment
Share on other sites

 

I have a new bandit weed mission for WAI 2.2.0.

 

I don't fully understand this new WAI 2.2.0 and really difficult for me to make custom missions for it. I'm gonna try to anyway,

but there's a few things I need to figure out first.

 

I would like to:

-Change the skins on the Ai that spawn in this particular mission (cops and rocker skins will do instead)

-Make some new custom loot crates that will spawn in ItemKiloHemp and some other stuff. (I'm totally lost on this one)

 

 

 

Hi Here is what i do: 

 

-Make some new custom loot crates that will spawn in ItemKiloHemp and some other stuff. (I’m totally lost on this one)

in config file find this section:

crate_tools     = [“ItemKeyKit”,”Binocular”,”Binocular_Vector”,”ItemCompass”,”ItemCrowbar”,”ItemEtool”,”ItemFishingPole”,”ItemFlashlightRed”,”ItemGPS”,”ItemHatchet_DZE”,”ItemKnife”,”ItemMachete”,”ItemMatchbox_DZE”,”ItemToolbox”,”NVGoggles”];

  crate_tools_buildable  = [“ItemToolbox”,”ItemEtool”,”ItemCrowbar”,”ItemKnife”];

  crate_tools_sniper   = [“ItemCompass”,”Binocular”,”Binocular_Vector”,”NVGoggles”,”ItemGPS”];

  crate_items     = [“FoodNutmix”,”FoodPistachio”,”FoodMRE”,”ItemSodaOrangeSherbet”,”ItemSodaRbull”,”ItemSodaR4z0r”,”ItemSodaMdew”,”ItemSodaPepsi”,”ItemBandage”,”ItemSodaCoke”,”FoodbaconCooked”,”FoodCanBakedBeans”,”FoodCanFrankBeans”,”FoodCanPasta”,”FoodCanSardines”,”FoodchickenCooked”,”FoodmuttonCooked”,”FoodrabbitCooked”,”ItemTroutCooked”,”ItemTunaCooked”,”ItemSeaBassCooked”,”ItemAntibiotic”,”ItemBloodbag”,”ItemEpinephrine”,”ItemHeatPack”,”ItemMorphine”,”ItemGoldBar”,”ItemGoldBar10oz”,”CinderBlocks”,”ItemCanvas”,”ItemComboLock”,”ItemLightBulb”,”ItemLockbox”,”ItemSandbag”,”ItemTankTrap”,”ItemWire”,”MortarBucket”,”PartEngine”,”PartFueltank”,”PartGeneric”,”PartGlass”,”PartPlankPack”,”PartVRotor”,”PartWheel”,”PartWoodPile”];

  crate_items_high_value  = [“ItemBriefcase100oz”,”ItemVault”,”30m_plot_kit”];

  crate_items_food   = [“ItemWaterbottle”,”FoodNutmix”,”FoodPistachio”,”FoodMRE”,”ItemSodaOrangeSherbet”,”ItemSodaRbull”,”ItemSodaR4z0r”,”ItemSodaMdew”,”ItemSodaPepsi”,”ItemSodaCoke”,”FoodbaconCooked”,”FoodCanBakedBeans”,”FoodCanFrankBeans”,”FoodCanPasta”,”FoodCanSardines”,”FoodchickenCooked”,”FoodmuttonCooked”,”FoodrabbitCooked”,”ItemTroutCooked”,”ItemTunaCooked”,”ItemSeaBassCooked”];

  crate_items_buildables  = [“forest_large_net_kit”,”cinder_garage_kit”,[“PartPlywoodPack”,5],”ItemSandbagExLarge5X”,”park_bench_kit”,”ItemComboLock”,[“CinderBlocks”,5],”ItemCanvas”,”ItemComboLock”,[“ItemLightBulb”,5],”ItemLockbox”,[“ItemSandbag”,5],[“ItemTankTrap”,5],[“ItemWire”,5],[“MortarBucket”,5],[“PartPlankPack”,5],”PartWoodPile”];

  crate_items_vehicle_repair = [“PartEngine”,”PartFueltank”,”PartGeneric”,”PartGlass”,”PartVRotor”,”PartWheel”];

  crate_items_medical   = [“ItemWaterbottle”,”ItemAntibiotic”,”ItemBloodbag”,”ItemEpinephrine”,”ItemHeatPack”,”ItemMorphine”,”ItemBandage”,”FoodCanFrankBeans”,”FoodCanPasta”];

  crate_items_chainbullets = [“2000Rnd_762x51_M134”,”100Rnd_762x51_M240”,”100Rnd_127x99_M2”,”150Rnd_127x107_DSHKM”];

add a new box: like

  crate_items_Crop_Raider = [itemKiloHemp”];

 

  Then in mission file at bottom add

  if(_complete) then {

  [_crate,0,0,[20,crate_items_Crop_Raider],0] call dynamic_crate;

};

This will give you 20 itemkilohemps

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

-Change the skins on the Ai that spawn in this particular mission (cops and rocker skins will do instead)

in AI settings

change this

  [[_position select 0, _position select 1, 0],4,"hard","random",4,"random","SKIN_NAME_HERE","random","bandit",_mission] call spawn_group;

 

your mission

 

if(isServer) then {

 

private   ["_baserunover","_mission","_directions","_position","_crate","_crate_type","_num"];

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

_position  = [80] call find_position;

// 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,"hard","Test Mission","MainHero",true] call mission_init;

diag_log   format["WAI: Mission Test Mission 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,[(_position select 0),(_position select 1),0],[],0,"CAN_COLLIDE"];

// Crate Spawn Example

// Parameters: 0: _crate

//    1: Max number of guns OR [MAX number of guns,gun_array]

//    2: Max number of tools OR [MAX number of tools,tool_array]

//    3: Max number of items OR [MAX number of items,item_array]

//    4: Max number of backpacks OR [MAX number of backpacks,backpack_array]

[_crate,16,[8,crate_tools_sniper],[3,crate_items_high_value],[4,crate_backpacks_large]] call dynamic_crate;

 

// Create some Buildings

_baserunover0  = createVehicle ["land_fortified_nest_big",[(_position select 0) - 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];

_baserunover1  = createVehicle ["land_fortified_nest_big",[(_position select 0) + 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];

_baserunover2  = createVehicle ["land_fortified_nest_big",[(_position select 0), (_position select 1) - 40,-0.2],[], 0, "CAN_COLLIDE"];

_baserunover3  = createVehicle ["land_fortified_nest_big",[(_position select 0), (_position select 1) + 40,-0.2],[], 0, "CAN_COLLIDE"];

_baserunover4  = createVehicle ["Land_Fort_Watchtower",[(_position select 0) - 10, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];

_baserunover5  = createVehicle ["Land_Fort_Watchtower",[(_position select 0) + 10, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];

_baserunover6  = createVehicle ["Land_Fort_Watchtower",[(_position select 0), (_position select 1) - 10,-0.2],[], 0, "CAN_COLLIDE"];

_baserunover7  = createVehicle ["Land_Fort_Watchtower",[(_position select 0), (_position select 1) + 10,-0.2],[], 0, "CAN_COLLIDE"];

// Adding buildings to one variable just for tidiness

_baserunover = [_baserunover0,_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5,_baserunover6,_baserunover7];

// Set some directions for our buildings

_directions = [90,270,0,180,0,180,270,90];

{ _x setDir (_directions select _forEachIndex) } forEach _baserunover;

// Make buildings flat on terrain surface

{ _x setVectorUp surfaceNormal position _x; } count _baserunover;

// Group Spawn Examples

// Parameters: 0: Position

//    1: Unit Count

//    2: Unit Skill ("easy","medium","hard","extreme" or "random")

//    3: Guns (gun or [gun,launcher])

//     Guns options : (0 = ai_wep_assault, 1 = ai_wep_machine, 2 = ai_wep_sniper, "random" = random weapon, "Unarmed" = no weapon)

//     Launcher options: (at = ai_wep_launchers_AT, aa = ai_wep_launchers_AA or "classname")

//    4: Magazine Count

//    5: Backpack ("random" or "classname")

//    6: Skin ("Hero","bandit","random","special" or "classname")

//    7: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")

//    8: AI Type ("bandit","Hero","special" or ["type", #] format to overwrite default gain amount) ***Used to determine humanity gain or loss***

//    9: Mission variable from line 9 (_mission)

_num = round (random 3) + 4;

[[_position select 0, _position select 1, 0],_num,"extreme",["random","at"],4,"random","bandit","random",["bandit",150],_mission] call spawn_group;

[[_position select 0, _position select 1, 0],4,"hard","random",4,"random","bandit","random","bandit",_mission] call spawn_group;

[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;

[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;

[[_position select 0, _position select 1, 0],4,"random","random",4,"random","bandit","random","bandit",_mission] call spawn_group;

// Humvee Patrol Example

// Parameters: 0: Patrol position

//    1: Starting position

//    2: Patrol radius

//    3: Number of Waypoints

//    4: Vehicle classname

//    5: Unit Skill ("easy","medium","hard","extreme" or "random")

//    6: Skin ("Hero","bandit","random","special" or "classname")

//    7: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***

//    8: Mission variable from line 9 (_mission)

[[(_position select 0) + 100, _position select 1, 0],[(_position select 0) + 100, _position select 1, 0],50,2,"HMMWV_Armored","random","bandit","bandit",_mission] call vehicle_patrol;

 

// Static Turret Examples

// Parameters: 0: Spawn position

//    1: Classname ("classname" or "random" to pick from ai_static_weapons)

//    2: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***

//    3: Skin ("Hero","bandit","random","special" or "classname")

//    4: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***

//    5: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random") ***NO effect if ai_static_useweapon = false;***

//    6: Magazine Count ***NO effect if ai_static_useweapon = false;***

//    7: Backpack ("random" or "classname") ***NO effect if ai_static_useweapon = false;***

//    8: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random") ***NO effect if ai_static_useweapon = false;***

//    9: Mission variable from line 9 (_mission)

};

[[[(_position select 0) - 10, (_position select 1) + 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

[[[(_position select 0) + 10, (_position select 1) - 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

[[[(_position select 0) + 10, (_position select 1) + 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

[[[(_position select 0) - 10, (_position select 1) - 10, 0]],"M2StaticMG","easy","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

// Heli Paradrop Example

// Parameters: 0: Paradrop position

//    1: Spawn position

//    2: Trigger radius

//    3: Vehicle classname

//    4: Amount of paratroopers

//    5: Unit Skill ("easy","medium","hard","extreme" or "random") ***NO effect if ai_static_skills = true;***

//    6: Gun (0:ai_wep_assault 1:ai_wep_machine 2:ai_wep_sniper or "random")

//    7: Magazine Count

//    8: Backpack ("random" or "classname")

//    9: Skin ("Hero","bandit","random","special" or "classname")

//    10: Gear (0:ai_gear0, 1:ai_gear1, 2:ai_gear2, 3:ai_gear3, 4:ai_gear4 or "random")

//    11: AI Type ("bandit","Hero" or "special") ***Used to determine humanity gain or loss***

//    12: Heli stay and fight after troop deployment? (true or false)

//    13: Mission variable from line 9 (_mission)

[[(_position select 0), (_position select 1), 0],[0,0,0],400,"UH1H_DZ",10,"random","random",4,"random","bandit","random","bandit",true,_mission] spawn heli_para;

// Assassination target example

// This is the same as normal group spawns but we assign it to a variable instead for use in the trigger below (if there are multiple units in this group you'll need to kill them all)

_assassinate = [[_position select 0, _position select 1, 0],1,"hard","random",4,"random","special","random","bandit",_mission] call spawn_group;

// Mission objective options and messages

[

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

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

  [_baserunover],  // buildings to cleanup after mission is complete, does not include the crate

  "A Mission has spawned, hurry up to claim the loot!", // mission announcement

  "The mission was complete/objective reached",   // mission success

  "The mission timed out and nobody was in the vicinity" // mission fail

] call mission_winorfail;

// End of mission

diag_log format["WAI: Mission bandit base ended at %1 ended",_position];

h_missionsrunning = h_missionsrunning - 1;

};

 

and spoilers

[ spoiler ] your text here [ /spoiler ]  remove space before [ like so

 

i put it on my test server when i get a spare min and test it

 

MegaZ

Link to comment
Share on other sites

Hi guys, GREAT mod, I need a little help please.

 

Been trying for over a month off/on to get the AlienZ (link to mod) into a WAI 2.2.0 mission, with no luck.

 

I've added the @AlienZ folder and the keys and it loads successfully with no problems. I've gotten a crate built into the admin tools menu that successfully spawns the weapons from the mod.

 

But i can't get a mission (static or random) to load the characters or vehicles (haven't tried a crate yet no point until the characters are right).

 

This link indicates that it has been successfully done, but the server is passworded with no indication of what it might be, no one is ever logged in to it, and i cant track the owner down to inquire.

 

I would like to have 4 -5 different missions that run only when the server is night-time.

 

Any help or ideas pointing me in the right direction would be tremendously appreciated.

note: this is for a dedicated server

 

bump

Link to comment
Share on other sites

Has anyone made sound or soundtracks play when a player is in the vicinity of a mission?  There are some servers I've played on where if you are in a trader city, you hear crowd sounds.  Is it possible to play a sound file when a mission spawns?  If so, how would I go about it?

Link to comment
Share on other sites

You could do that. Firstly you'd need to upload the sound to your mission file somewhere, like custom\sounds or something.

 

Then go into your description.ext and add it to the cfgsounds.

 

Then in the mission files for WAI create a trigger based off the _position variable to generate the sound if the player is within range, you'll have to work out how to cleanup the trigger after the mission is finished though.

Link to comment
Share on other sites

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