Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

Maybe i got a funny idea for a mission (have not read the whole thread... hope i am not "reinventing" this idea)

 

Hunting the Duck/Bird:

 

-Small duck/bird flying over the map with "imaginary" gps device attached for seeing it on the map and some sort of proof item in its inventory that you shot the duck/bird

 

e.g.

picture_dog_tags_ca.paa.png

Evidence (Dog tags)

 

-Add a reward NPC where you can exchange the item for money

 

No idea if it is scriptable, but it could be kind of funny to see ppl shoting in the air to get this freakin duck/bird.

 

Regards, fexxianosch

 

 

Link to comment
Share on other sites

 

Apart from that it actually works on 1051? Try these: https://github.com/f3cuk/WICKED-AI/blob/master/changelist.md

 

 

Yes this is possible using something like this.

_position     = [0,0,0]; // coords center of the mission
_start         = false;
waitUntil{

    {
        if((isPlayer _x) && (_x distance _position <= 1500)) then {
            _start = true
        };
    } count playableUnits;

    (_start)

};

This is not how this works. ai_share_distance is the amount of distance between you and the AI you killed for AI to share your rough position. So for example if you set it to 300 and you are 400m away from the AI you just killed, they won't share your rough location (e.g. look towards you).

 

 

Easy enough

_dice = random 10;

if(_dice < 2) then { // about 20% chance
    
        // code here

};

 

Hi but you just sent me the same again? still dynamic loot? i need to choose what loot each crate/AI have?

Link to comment
Share on other sites

Ok well thanks to Megaz I finally got the custom AI groups to spawn, had to modify your file with my co-ordinates & it finally came to life - cheers!

 Glad I could help -

Do you get the same error in your rtp about:

 

if (!_actionSet) then {

s_player_holderPickup>

10:54:02   Error position: <_actionSet) then {

s_player_holderPickup>

10:54:02   Error Undefined variable in expression: _actionset

10:54:02 File z\addons\dayz_code\init\object_BackpackAction.sqf, line 13

MegaZ

 

Now Just need to find out how and if Triggers can be used to spawn AI :rolleyes:

Link to comment
Share on other sites

	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
	[
		[725.391,4526.06,0],				
		[1500,960,1000],							
		2000,								
		3,
		"UH1H_DZ",							
		"Hard",							
		"Random",							
		"Bandit"							
	] spawn heli_patrol;

The second part of the code, is what i tried but didnt work. The first part of the code is what ib ased it off. Can somebody help me out here with what i did wrong? And what's the best way to get cordinates for the choppers? (the radius to spawn chopper iaadjusted that several times, based on the infistar debug monitor cordinates. Aint working?)

 

Tried these cordinates : 8893.29,9178.14,0.00143433 on spawnpoint & patrolpoint...

 

 Spawns look ok : What map you running?

 

This works for me on NAPF try adding this and see if it works spawns top island up north

 

[

  [16394.3,18450.3,0.001],    // Position to patrol

  [16394.3,18450.3,0.001],       // Position to spawn chopper at

  1500,        // Radius of patrol

  10,         // Number of waypoints to give

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

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

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

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

] spawn heli_patrol;

 

MegaZ

Link to comment
Share on other sites

Yes this is possible using something like this.

_position     = [0,0,0]; // coords center of the mission
_start         = false;
waitUntil{

    {
        if((isPlayer _x) && (_x distance _position <= 1500)) then {
            _start = true
        };
    } count playableUnits;

    (_start)

};

Hi f3cuk, Thanks for the reply so if I add this, It sould spawn a group of 10 AI when a player gets within 1500 ot the 15083,17563,0.00 coords set below?

 

_position     = [15083,17563,0.00]; // coords center of the mission

_start         = false;

waitUntil{

    {

        if((isPlayer _x) && (_x distance _position <= 1500)) then {

            _start = true

        };

    } count playableUnits;

    (_start)

};

[

  [16563.9,18256.5,0.001],   // Position

  10,         // Number Of units

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

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

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

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

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

] call spawn_group;

 

If so where do I place this block of text in the default .sqf in the static folder ? if so would it be at the end of the file before or after this line :

 

diag_log "WAI: Static mission loaded";

 

thanks 

MegaZ

Link to comment
Share on other sites

Hi but you just sent me the same again? still dynamic loot? i need to choose what loot each crate/AI have?

 

Yes dynamic loot is included. But this is actually a good thing and can be easily adjusted to perfectly suit your needs if you learn how to use it.

If you really want static loot I'm pretty sure someone has explained how to in this topic.

Link to comment
Share on other sites

Also I have a suggestion for next update , it would be even better if you could have the mission startup message Pop up on top right of screen in a dialog box with an image of the vehicle that spawned for that mission, I seen couple of servers have that and it's so much cooler than text in middle of the screen! Would love to see that abdon , thanks

Link to comment
Share on other sites

hello quick question how can you modify the mission so that you can use a custom made box instead of dynamic loot, not sure on what need to be changed in the code or added, or how to do change whats in the dynamic loot, would really apreciate an explanation on it

 

thank you very much.

Link to comment
Share on other sites

hello quick question how can you modify the mission so that you can use a custom made box instead of dynamic loot, not sure on what need to be changed in the code or added, or how to do change whats in the dynamic loot, would really apreciate an explanation on it

 

thank you very much.

Link to comment
Share on other sites

I have this working on my main server and testing server.  We have somewhat of an issue though.  Our server has satchel charges for sale, but not RPG's.  RPG's and other launchers are given out as event prizes, etc.

 

Some of the missions are spawning something like 15 satchel charges, or 10-15 hotwire kits.  We had one spawn 4 RPG's and rockets for them.  Is there any way I can turn this off, or limit how much of it spawns without using a static loot table?  I love the dynamic loot, as it adds in so much more variety.

 

Any help would be great, thanks.

Link to comment
Share on other sites

Hey guys, i'm trying to make a mission, but i'm with a problem... I'd like to have the mission to run only once per server restart, i don't want them to be running from time to time. Also i want it in a static place (i don't think this is going to be a problem).

 

But i'm really having trouble trying to run it only 1 time per server restart.

 

this is the mission i'm using (custom mission based on a file a guy sent here on the forum - sorry, i can't find your post, i got it a couple of days ago) :

alien_field.sqf

if(isServer) then {
 
private ["_mission","_directions","_position","_crate","_crate_type","_num"];
 
_position = [2478.42,17208.8]; //Alien Field
 
// 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","Alien Field","MainBandit",true] call mission_init;
 
diag_log format["WAI: Mission Alien Field started at %1",_position]; //can be edited if dynamic option is chosen
 
//Setup the crate
//_crate_type = crates_small call BIS_fnc_selectRandom; //dynamic crate option
//_crate = createVehicle [_crate_type,[(_position select 0),(_position select 1) + 5,0], [], 0, "CAN_COLLIDE"]; //dynamic crate option
_crate = createVehicle ["land_radio_box",[2491.27,17222.5,0.001],[],0,"CAN_COLLIDE"];
_crate1 = createVehicle ["land_radio_box",[2463.01,17213.5,0.001],[],0,"CAN_COLLIDE"];
_crate2 = createVehicle ["land_radio_box",[2498.98,17198.2,0.0011],[],0,"CAN_COLLIDE"];
[_crate,[2,crate_tools_buildable],[5,crate_items_buildables],4] call dynamic_crate; //can be edited to define crate contents
[_crate1,[2,crate_items_lvl2]] call dynamic_crate; //can be edited to define crate contents
[_crate2,[2,crate_items_garage]] call dynamic_crate; //can be edited to define crate contents
 
//AI Units Spawns
_num = round (random 3) + 2;
[[_position select 0, _position select 1, 0],_num,"hard","random",9,"random","bandit","3","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],_num,"hard","random",9,"random","bandit","3","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],_num,"hard","random",9,"random","bandit","3","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],_num,"hard","random",9,"random","bandit","3","bandit",_mission] call spawn_group;
[[_position select 0, _position select 1, 0],_num,"hard","random",9,"random","bandit","3","bandit",_mission] call spawn_group;

 
//Static Turrets
//[[[(_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
//[[(_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;
 
 
// Mission objective options and messages
[
[_mission,_crate], // mission variable (from line 9) and crate
["crate"], // Mission objective type (["crate"], or ["kill",wai_kill_percent], or ["assassinate", _assassinate])
"Bandits have taken over Devil's Castle!  The risk is great, but the rewards are plenty!", // mission announcement (can be edited if a dynamic position is chosen)
"O acampamento Alienígena foi tomado por sobreviventes! Você tem apenas 5 minutos para recolher os suprimentos!", // mission success  (can be edited if a dynamic position is chosen)
"O acampamento Alienígena ainda continua tomado por forças misteriosas." // mission fail
] call mission_winorfail;
 
// End of mission
diag_log format["WAI: Mission bandit base ended at %1 ended",_position];
 
h_missionrunning = false;
}; 

 

Does anyone know where do i have to change to make it happen? This file is inside "WAI-->missions-->special-->alien_field.sqf

Link to comment
Share on other sites

question about para drop for the mission just did some testing and addes a paradrop to one of the misisons and the drop happens after the mission has been complete, i copy pasted the para drops from the president mission to the sniper extraction, is anyone able to explain how to modify it so its compatable with the mission, or is there a place were all the specific numbers/names mean

 

example  //Heli Paradrop
    [[(_position select 0),(_position select 1),0],[0,0,0],1000,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;
    [[(_position select 0) + 50,(_position select 1),0],[50,50,0],1000,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;
    [[(_position select 0) + 100,(_position select 1),0],[100,0,0],1000,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;

 

obviously the begining is coordinates but im not sure what the rest mean, sorry but i would apreciate any help thans

Link to comment
Share on other sites

question about para drop for the mission just did some testing and addes a paradrop to one of the misisons and the drop happens after the mission has been complete, i copy pasted the para drops from the president mission to the sniper extraction, is anyone able to explain how to modify it so its compatable with the mission, or is there a place were all the specific numbers/names mean

 

example  //Heli Paradrop

    [[(_position select 0),(_position select 1),0],[0,0,0],1000,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;

    [[(_position select 0) + 50,(_position select 1),0],[50,50,0],1000,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;

    [[(_position select 0) + 100,(_position select 1),0],[100,0,0],1000,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Hero","Random","Hero",true,_mission] spawn heli_para;

 

obviously the begining is coordinates but im not sure what the rest mean, sorry but i would apreciate any help thans

Look in the missions folder of your install, in there is a file MISSION_EXAMPLES.sqf which details each item and what it is. That should help you.

Link to comment
Share on other sites

Look in the missions folder of your install, in there is a file MISSION_EXAMPLES.sqf which details each item and what it is. That should help you.

okay i see what all the paramaters do now thank you, one more question though hwo do you make the paradrop initiate faster like after and x ammount of group units killed or so minutes after the fight started or even better immediatly after the fight started.

Link to comment
Share on other sites

Hi, I used this script for my server. But when I put static AIs at certain area, There are double AIs spawned. I mean, If I put 1 AI at grid : 110012 then 2 AIs are spawned at that point.

Also When the mission is spawned, some of AIs and static guns are duplicated other certain area. How can I fix this problem?. I used default.sqf file to put the static AIs

Link to comment
Share on other sites

Hi F3cuk,

 

Is this update of WAI compatible with DZMS AI? I ask this because i tried running this with DZMS and found logging into the server after installing was extremely slow. 

In my RPT logs I found messages such as:

 

NetServer::SendMsg: cannot find channel #137608413, users.card=2

 
Creation of object O 1-2-A:<Empty main subgroup> failed, state LOGGED IN
 
Client: Nonnetwork object 3337a020.
 
Client: Nonnetwork object 314f3400.
 
As soon as i reverted to my current setup these messages stopped appearing. It's a shame really, the update looks like a real improvement  :)
 
Thanks
Link to comment
Share on other sites

 

if(isServer) then {

 
private["_bomb","_area_max","_area_min","_position", "_area", "_num_mines","_allmines"];
 
_position = _this select 0;
_pos_x = _position select 0;
_pos_y = _position select 1;
_pos_z = _position select 2;
_area_min = _this select 1;
_area_max = _this select 2;
_num_mines = _this select 3;
_allmines = [];
 
for "_x" from 1 to _num_mines do {
 
private["_mine_pos","_mine"];
 
_mine_pos = [_position,_area_min,_area_max,10,0,2000,0] call BIS_fnc_findSafePos;
 
if(floor(random 2) == 1) then {
_mine = createVehicle ["MineE", _mine_pos, [], 0, "CAN_COLLIDE"];
} else {
_mine = createVehicle ["Mine", _mine_pos, [], 0, "CAN_COLLIDE"];
};
_mine spawn {
private["_vehicle_near","_bomb"];
waitUntil
{
_vehicle_near = false;
{
if((isPlayer _x) && (vehicle _x != _x) && (vehicle _x distance _this < 10)) then {
_vehicle_near = true
};
} count playableUnits;
(_vehicle_near)
};
_bomb = "Bo_GBU12_lgb" createVehicle (getPosATL _this);
sleep 3;
deleteVehicle _bomb;
deleteVehicle _this;
};
_allmines set [(count _allmines), _mine];
 
};
 
_allmines;
 
};

I want to make static mine field to certain area. So I made second minefield file as minefield2.sqf. 

 

after that put the minefield2.sqf. file to the compile folder and modified init.sqf file. See below

 

minefield = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\minefield.sqf";

minefield2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\minefield2.sqf";

 

 

And add the minefield at the end of the default.sqf like this : [[6200.68,14159.8,0],10,400,800,1] call minefield2;

 

[ [position where you want],radious min, radious max, mine number, 1] call minefield2;

 

I don't know What this mean :  _allmines  = []; 

So, I just put the number 1.

 

I'll try to my test server

 

PS : I just wonder Why there's double spawning at the certain static spawning point. I mean, If I put 2 Ai at the certain spawn point. There are 4 Ai spawned.

 

Anyone plz tell me the reason. Thank you.

 

 

Sorry for my bad english.

Link to comment
Share on other sites

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