Jump to content

Wicked AI/Mission system


Markk311

Recommended Posts

got this working...got custom spawns working..however i do have a question...do the custom spawns only load in at server start up, or is there a way to set them to repeat after a given amount of time i setup a custom para drop and it got set off shorty after the sever rebooted..other players have gone into that area and we never see the para drop happen again.. i need to be baable to have it repeat not just hapen 1 time every 6 hours...thanks

Link to comment
Share on other sites

/// Sets behavior of AI groups 
ai_combatmode = "RED";
ai_behaviour = "COMBAT";

This code is from the AIconfig.sqf file.

 

In a previous post the explanation for "ai_behaviour" was given as:

 

Here are the different ai_beahaviour you can use.

 

  • SAFE, CARELESS - Units will stay upright
  • AWARE, COMBAT - Units will stay upright most of the time, kneeling down occasionally
  • STEALTH - Units will be prone most of the time

 

 
However, can you please give me an explanation of the "ai_combatmode" setting?  What is the "RED" mode and what other modes are there?

 

 

  • "BLUE" (Never fire)
    • When hostile units are detected, they will track them, but will never fire back, even when fired upon.
    • This mode can only be set through the editor or script. No in-game commands to subordinates can set them to combat mode Blue.
  • "GREEN" (Hold fire - defend only)
    • When a player orders his units to "Hold fire", the units are set to combat mode Green.
  • "WHITE" (Hold fire, engage at will)
  • "YELLOW" (Fire at will)
    • If AI spots a target and decides it is in effective range, he will open fire. By default AI is set to YELLOW.
    • If a leader calls Target, the unit with aim without breaking formation.
  • "RED" (Fire at will, engage at will)
    • When a leader commands his units to Engage at will, combat mode RED is set. The AI does not keep formation and each member moves individualy. The leader command Disengage will set the units back to fire at will (YELLOW)
    • If Attack and Engage is called, the unit will break formation to find the best place to attack from (combat mode RED).

NOTE: To make AI hunt down a known target, you need to use '_unit setCombatMode "RED"'. The Seek & Destroy waypoint only makes the AI to search the vicinity of the waypoint itself. Not affect their behavior on their way to the waypoint itself.

 

 

And to your behavior full description :

 

Safe

It is possible to choose also Careless in mission editor, that expands the behavior for even more free movement (loiter) in range up to 150m.

  • will use roads, groups travel in convoy (overrides formation command)
  • stance with lowered weapon
  • turned out from vehicle
  • lie down when scared
  • less turning head, less observing surroundings (limited rate of target database)
Aware

Default behavior.

  • lie down when scared
  • soldiers sometimes move in cover
  • vehicles still prefer roads, travel in convoy
Danger (Combat)
  • dismiss (loiter movement) canceled
  • ignores limited speed setting
  • tends to change stance to kneel or prone
  • soldiers move in cover
  • soldiers disembark from some vehicles, e.g. damaged aircraft
  • turns of vehicle lights
Stealth
  • dismiss (loiter movement) canceled
  • faster target acquisition
  • tends to change stance to kneel or prone
  • keep themself also out of Unknown targets
  • soldiers move in cover, routing near structures
  • soldiers disembark from some vehicles, e.g. damaged aircraft
  • turns of vehicle lights
  • tanks avoid passing trees
Link to comment
Share on other sites

Another observation. Apparently the AI are killing each other at the missions. I went to one tonight and found 9 dead AI after I killed the only living one...

What you changed ? I've used this since 1.0.2.5 and had no issues, the missions all work perfectly, best mission script out at the minute as it has no errors.

Link to comment
Share on other sites

Hello guys,

 

did someone make an alternative ammo box? Mean i want to have 2 different boxes to call spawn in the missions. I make some realy hard mission with more NPCs, heli and vehicle patrols and para drops. And for this mission  i want loot with briefcases. And for this need second ammo box... :-)

 

So did someone make this?

 

THX !

Link to comment
Share on other sites

Deleted & replaced with yours & all working, could I be a pita & ask that u post your whole customspawn.sqf including the above?

 

Then I can compare where I went wrong, thanks again!

 

 

So why the reluctance for anyone to share their customspawns.sqf? is it a big secret?

Link to comment
Share on other sites

I added in some mission chopper patrols and vehicle patrols... but if the mission ends it will not clear this units. Choppers and vehicles are still there. All other is deleted...

 

Can someone help?

 

in script is :

clean_running_mission = True;
	deleteVehicle _box;
	{_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;

On my mind is there -1 for ai_vehicle_units and ai_air_units. So whay will it not delete vehicles and choppers? Ammo box deleted, NPCs deleted...

 

Anyone know, how to clean this too? :-)

 

EDIT: Solved.

Link to comment
Share on other sites

Hey guys, on the vehicle patrols there is a "spawn at" position, a "position to patrol" and a "patrol radius".  Does this mean they spawn at the first position, patrol to the second position then when they get there, roam around in a 50m radius?  Just trying to figure this out because my vehicle patrols are still the only thing not spawning.

 

Thanks.

Link to comment
Share on other sites

So why the reluctance for anyone to share their customspawns.sqf? is it a big secret?

 

Sure, here's mine.  They are Taviana positions and like I mentioned in other posts, vehicle patrols are still not working for me:

 

//STATIC GUNS, DUBO AIRFIELD NORTH

[[[16448.199,11468.9,0],[16460.199,11496.7,0]],"M2StaticMG",0.5,"Bandit2_DZ",1,2,"","Random"] call spawn_static;

//PARADROPS, KAMBASE

[[8511.03,20035,0],[8357,20382.301,0],300,"UH1H_DZ",6,0.8,"Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//KAMBASE2
[[8520.69,19922.5,0],[8947.3,19060.801,0],300,"UH1H_DZ",6,0.8,"Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//DUBO RUNWAY
[[16515.6,10809.1,0],[17051,7305.04,0],600,"UH1H_DZ",7,"Random","Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//DAL DOCKS
[[14964.2,18449.801,0],[13351.7,19463.6,0],600,"UH1H_DZ",4,"Random","Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//PRISON WEST
[[11856.6,21073.6,0],[10408.5,19978.199,0],600,"UH1H_DZ",8,"Random","Random",6,"","Bandit2_DZ","Random",True] spawn heli_para;
//PRISON EAST
[[11925.4,21032.6,0],[12419.4,19372.199,0],600,"UH1H_DZ",8,"Random","Random",6,"","Bandit2_DZ","Random",True] spawn heli_para;

//HELI PATROL, KAMBASE

[[8524.79,19962.199,0],[8524.79,19962.199,0],150,4,"UH60M_EP1",1] spawn heli_patrol;

//FOOT PATROL, PRISON

[[11925.4,21032.6,0],5,1,"Random",4,"","Bandit2_DZ","Random"] call spawn_group;

//VEHICLE PATROL, DUBO HWY

[[16540.801,12630.6,0],[15870.6,10224.6,0],50,5,"HMMWV_Armored",1] spawn vehicle_patrol;
//WEST ISLAND, WEST HWY
[[3761.71,7422.9,0],[7434.63,4728.95,0],50,5,"HMMWV_Armored",1] spawn vehicle_patrol;

 

Link to comment
Share on other sites

When i want that my Bots are very Hard.. is that the right config?

 

["aimingAccuracy",1.00],
["aimingShake",0.01],
["aimingSpeed",1.00],
["endurance",1.00],
["spotDistance",1.00],
["spotTime",0.01],
["courage",1.00],
["reloadSpeed",0.01],
["commanding",1.00],
["general",1.00]
];

Link to comment
Share on other sites

When i want that my Bots are very Hard.. is that the right config?

 

["aimingAccuracy",1.00],

["aimingShake",0.01],

["aimingSpeed",1.00],

["endurance",1.00],

["spotDistance",1.00],

["spotTime",0.01],

["courage",1.00],

["reloadSpeed",0.01],

["commanding",1.00],

["general",1.00]

];

Yes, but by this setings no.

 

Remember by the skills 0=low skill 1=best skill. By aimingShake, for exapmle, 0=bad for NPC, 1= the best for NPC. So if you will set "aimingShake",0.01, than will be NPC realy not good ...

Link to comment
Share on other sites

 

Would be easy.

change this at the beginning of the missions you want to change

_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;

to

_positionarray = [[0,0,0],[0,0,0]];
_position = _positionarray call BIS_fnc_selectRandom;

 

Doesn't work for me...no mission spawns.

Link to comment
Share on other sites

Doesn't work for me...no mission spawns.

by me is it working... this is solution for 2 positions and there [0,0,0] you need write your postion.

 

I used only 1 position and it looks :

_positionarray = [[8146.03,9054.46,0]];
_position = _positionarray call BIS_fnc_selectRandom;

This is position to Altar... And the mission spawns only there

Link to comment
Share on other sites

Yes, but by this setings no.

 

Remember by the skills 0=low skill 1=best skill. By aimingShake, for exapmle, 0=bad for NPC, 1= the best for NPC. So if you will set "aimingShake",0.01, than will be NPC realy not good ...

Are you sure?

In the Wiki stand this...:

  • aimingShake
  • Affects how steadily the AI can hold a weapon (Higher value = less weapon sway)

That means that i must set it to low that the Bots are better.. or not? :/

Link to comment
Share on other sites

Are you sure?

In the Wiki stand this...:

  • aimingShake
  • Affects how steadily the AI can hold a weapon (Higher value = less weapon sway)

That means that i must set it to low that the Bots are better.. or not? :/

Read description

http://community.bistudio.com/wiki/skill

Not sure, but read this. Dont know now, how is it... :-)

Link to comment
Share on other sites

Hello, I have put this on my server, how do I know if its working please?

 

And also what does it do please?

 

Does it drop troops from helis? or drop care packages, are there map markers or does something pop up when it happens or will i notice straight away if its worked ?

 

just wondering if ive installed it correctley

 

many thanks

 

robbie

Link to comment
Share on other sites

by me is it working... this is solution for 2 positions and there [0,0,0] you need write your postion.

 

I used only 1 position and it looks :

_positionarray = [[8146.03,9054.46,0]];
_position = _positionarray call BIS_fnc_selectRandom;

This is position to Altar... And the mission spawns only there

 

Is it because I tried to use more than 2 locations?  Is there a limit on that?  I used exactly what you put and no missions spawn.  When I change it back to the random one, they spawn again (although mostly on the side of hills again).

Link to comment
Share on other sites

I try to run this with DZAI and have not so far succeeded to have them working together.

 

Here is my question:

[] ExecVM "\z\addons\dayz_server\WAI\init.sqf";
	call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf";
	allowConnection = true;

So, I just wonder is this the right form I am using or should it be done otherwise ?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...