Jump to content
Sign in to follow this  
silola

Dynamic-AI-Creator (DAC) V3.0 released

Recommended Posts

Thanks mate! It works our perfectly, I love you!

haha jk but still thanks

No worries. Have fun :)

Share this post


Link to post
Share on other sites

This may be very easy but how do you turn off the markers on the map and other unit waypoints in the zones once you are done with the setup and ready to play for real. Thanks Avibird.

Share this post


Link to post
Share on other sites

See p37 of the manual. You can have them off from the start or turn them off later, as Silola explains.

It's really worth becoming familiar with the configs; for example, you can make changes that markedly alter how one or both sides will act/react.

BR

Orcinus

Share this post


Link to post
Share on other sites
See p37 of the manual. You can have them off from the start or turn them off later, as Silola explains.

It's really worth becoming familiar with the configs; for example, you can make changes that markedly alter how one or both sides will act/react.

BR

Orcinus

Yes I started reading the manual only on page 14 lol. It's a lot of stuff to take in and then test to see if I understand what I just read!

How do you make a zone only be active if a bluefor unit is in the zone. I have tryed using all the trigger items but no luck. What page lol thanks Avibird. I just love this script.:)

Still can't get it to work. I tryed to change multiple code lines in the marker folder and one in the Config. I need a little more direction lol Avibird

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites

Still can't get it to work. I tryed to change multiple code lines in the marker folder and one in the Config. I need a little more direction lol Avibird

Re markers:

Set the files back to default. Add this to the DAC_Config_Markers.sqf before the "Default" entry:

	case 12:	
{		
			_setShowZones 		= 0;
			_setShowWPs 		= 0;
			_setShowUnit 		= [0,0,0,0];
			_setGroupType 		= 0;
			_setMarkerText		= [""];
			_setMarkerDel 		= 1;
			_setMarkerRefresh 	= [0.1,0.1];
			_setSizeWpLine 		= [0,0];
			_setSizeLeaderLine 	= 0;
			_setSizeZoneLine 		= 0;
			_setSizeCampLine 	= 0;
			_setSizeZoneBorder 	= 0;
			_setArtiMarker 		= 01;
			_setCampMarker 		=0;
			_setSideColor 		= [
									"ColorRed",
									"ColorBlue",
									"ColorYellow",
									"ColorGreen",
									"ColorWhite",
									"ColorBlack",
									"ColorGreen",
									"ColorBlack"
								  ];
			_setMarkerClass		= [
									[
										["STATICWEAPON","Dot",[0.5,0.5],1]
									],
									[
										["MAN","mil_triangle",[0.6,0.6],1]
									],
									[
										["CAR","mil_box",[0.5,0.8],1],
										["TRUCK","mil_box",[0.5,0.9],1]
									],
									[
										["TANK","mil_box",[0.6,1.2],1],
										["APC","mil_box",[0.6,1.2],1]
									],
									[
										["MOTORCYCLE","Dot",[0.3,0.7],1]
									],
									[
										["AIR","mil_triangle",[0.7,1.5],1],
										["HELICOPTER","mil_triangle",[0.7,1.5],1],
										["PLANE","mil_triangle",[0.9,1.5],1],
										["ParachuteBase","mil_triangle",[0.9,0.3],1]
									],
									[
										["SHIP","Dot",[0.9,1.3],1]
									],
									[
										["OTHER","Dot",[0.7,0.7],1]
									]
								  ];
};
//-----------------------------------------------------------------------------------------------

In the DAC_Config_Creator, set the line for markers to

	if(isNil "DAC_Marker") 	then {	DAC_Marker	= 12	};

That will hide all markers and waypoints, unit locations, etc., exactly as it should be in-mission.

If you want to see the markers, etc., initially, use the default line in the config creator and put in the init.sqf after all the DAC-related stuff:

sleep [i]number[/i]
DAC_Marker = 12;

Use of the sleep command like that is a bit crude, there is probably a more elegant way to do it but I don't have time to think about it right now. Probably something like

waitUntil {DAC_Zone == 0};
sleep ([i]however long you need to admire your design[/i])

Also I don't know what else you're running (btw, the DAC initialisation should be done right at the start of the init.sqf). Put in a value like 120 & see if that's long enough for you to see what's happening, adjust as necessary.

Re activating a zone: that is all in the manual & the demos (you have played them, haven't you?... makes the manual much easier to understand). See pp15 et seq.

You need a zone with an init line like

fun=["z5",[5,[color="#FF0000"]1[/color],0],[6,3,6,2],[],[8,4,8,2],[],[1,1,1,7]] spawn DAC_Zone;

The red "1" denotes that the zone is to be set inactive immediately after initialisation.

The trigger will have Blufor present as the condition. & onact would be

([z5] Call DAC_Activate)

Alternatively you can use a trigger to create the zone mid-mission rather than at the start - see p21.

IIRC there are demos showing one or both of these.

BR

Orcinus

Share this post


Link to post
Share on other sites
Re markers:

Set the files back to default. Add this to the DAC_Config_Markers.sqf before the "Default" entry:

	case 12:	
{		
			_setShowZones 		= 0;
			_setShowWPs 		= 0;
			_setShowUnit 		= [0,0,0,0];
			_setGroupType 		= 0;
			_setMarkerText		= [""];
			_setMarkerDel 		= 1;
			_setMarkerRefresh 	= [0.1,0.1];
			_setSizeWpLine 		= [0,0];
			_setSizeLeaderLine 	= 0;
			_setSizeZoneLine 		= 0;
			_setSizeCampLine 	= 0;
			_setSizeZoneBorder 	= 0;
			_setArtiMarker 		= 01;
			_setCampMarker 		=0;
			_setSideColor 		= [
									"ColorRed",
									"ColorBlue",
									"ColorYellow",
									"ColorGreen",
									"ColorWhite",
									"ColorBlack",
									"ColorGreen",
									"ColorBlack"
								  ];
			_setMarkerClass		= [
									[
										["STATICWEAPON","Dot",[0.5,0.5],1]
									],
									[
										["MAN","mil_triangle",[0.6,0.6],1]
									],
									[
										["CAR","mil_box",[0.5,0.8],1],
										["TRUCK","mil_box",[0.5,0.9],1]
									],
									[
										["TANK","mil_box",[0.6,1.2],1],
										["APC","mil_box",[0.6,1.2],1]
									],
									[
										["MOTORCYCLE","Dot",[0.3,0.7],1]
									],
									[
										["AIR","mil_triangle",[0.7,1.5],1],
										["HELICOPTER","mil_triangle",[0.7,1.5],1],
										["PLANE","mil_triangle",[0.9,1.5],1],
										["ParachuteBase","mil_triangle",[0.9,0.3],1]
									],
									[
										["SHIP","Dot",[0.9,1.3],1]
									],
									[
										["OTHER","Dot",[0.7,0.7],1]
									]
								  ];
};
//-----------------------------------------------------------------------------------------------

In the DAC_Config_Creator, set the line for markers to

	if(isNil "DAC_Marker") 	then {	DAC_Marker	= 12	};

That will hide all markers and waypoints, unit locations, etc., exactly as it should be in-mission.

If you want to see the markers, etc., initially, use the default line in the config creator and put in the init.sqf after all the DAC-related stuff:

sleep [i]number[/i]
DAC_Marker = 12;

Use of the sleep command like that is a bit crude, there is probably a more elegant way to do it but I don't have time to think about it right now. Probably something like

waitUntil {DAC_Zone == 0};
sleep ([i]however long you need to admire your design[/i])

Also I don't know what else you're running (btw, the DAC initialisation should be done right at the start of the init.sqf). Put in a value like 120 & see if that's long enough for you to see what's happening, adjust as necessary.

Re activating a zone: that is all in the manual & the demos (you have played them, haven't you?... makes the manual much easier to understand). See pp15 et seq.

You need a zone with an init line like

fun=["z5",[5,[color="#FF0000"]1[/color],0],[6,3,6,2],[],[8,4,8,2],[],[1,1,1,7]] spawn DAC_Zone;

The red "1" denotes that the zone is to be set inactive immediately after initialisation.

The trigger will have Blufor present as the condition. & onact would be

([z5] Call DAC_Activate)

Alternatively you can use a trigger to create the zone mid-mission rather than at the start - see p21.

IIRC there are demos showing one or both of these.

BR

Orcinus

Hey Orcinus thanks for the help

I am trying to go over all the demo missions but I cant play/edit due to download content removed or deleted. What do i need to add to the demo from the download DAC folder. Avibird

Share this post


Link to post
Share on other sites

@avibird1

Most of the demos run from the pbo - you need ypu put the DAC pbo in a modfolder e.g., "@DAC" in the main Arma directory, & add -mod= @DAC to your startup line.

Share this post


Link to post
Share on other sites

Orcinus have you noticed that deactivated zones on the new Lingor don't reactivate with the standard trigger (Blufor present, [z2] Call DAC_Activate ) they don't seem to restart after a few minutes of play! In fact it seems that the active DAC zones stop working after about 15 minutes... It's driving me crazy! I'm running ACE (which has DAC built in as a mod) and I tried using the script version as well - both with the same result. Is it because of some value on the island? I posted the in the Lingor forums but it seemed to get ignored and I'm totally flummoxed about what to do to fix this.

Share this post


Link to post
Share on other sites
Orcinus have you noticed that deactivated zones on the new Lingor don't reactivate with the standard trigger (Blufor present, [z2] Call DAC_Activate ) they don't seem to restart after a few minutes of play! In fact it seems that the active DAC zones stop working after about 15 minutes... It's driving me crazy! I'm running ACE (which has DAC built in as a mod) and I tried using the script version as well - both with the same result. Is it because of some value on the island? I posted the in the Lingor forums but it seemed to get ignored and I'm totally flummoxed about what to do to fix this.

I haven't made a DAC mission on Lingor yet - waiting patiently for the new units plus lots of other stuff keeping me busy. Is there anything in the RPT? What units are you using? Have you tried porting your mission to another Island, e.g., one of the stock BIS terrains?

Share this post


Link to post
Share on other sites

MVD, Spetznaz and Insurgents - no Lingor troops on map. It's really annoying - I've ported the mission onto other maps and it spawns just fine and they don't just 'despawn' even when I'm in the zone (which is what seems to happen to the 1 'always on' zone). It must have to do with the map somehow.

Share this post


Link to post
Share on other sites

Just started playing with this and having an issue I am spawning East (insurgents) with also a Camp , but the camp does not seem to be East (insurgents), they are EAST but they start shooting OPFOR , what am I doing wrong ?

fun=["z1",[0,0,0],[5,2,50,6],[],[ ],[2,2,50,0,100,10],[0,6,3,0]] spawn DAC_Zone

Share this post


Link to post
Share on other sites
Just started playing with this and having an issue I am spawning East (insurgents) with also a Camp , but the camp does not seem to be East (insurgents), they are EAST but they start shooting OPFOR , what am I doing wrong ?

fun=["z1",[0,0,0],[5,2,50,6],[],[ ],[2,2,50,0,100,10],[0,6,[b]3[/b],0]] spawn DAC_Zone

you have the wrong behaviour set for the units - 6 is Insurgents and it should be set to 0. so your last block should be [0,6,0,0] if you want to change the camp configuration then its the 4th number in that string.

Also you don't have a zone number set! You should try this; ["z1", [1,0,0],[5,2,50,6],[],[ ],[2,2,50,0,100,10],[0,6,0,0]] (note the 1 in the first block is the number of the zone - a 0 isn't a good number for a zone.)

Edited by 7th_Serf

Share this post


Link to post
Share on other sites
you have the wrong behaviour set for the units - 6 is Insurgents and it should be set to 0. so your last block should be [0,6,0,0] if you want to change the camp configuration then its the 4th number in that string.

Also you don't have a zone number set! You should try this; ["z1", [1,0,0],[5,2,50,6],[],[ ],[2,2,50,0,100,10],[0,6,0,0]] (note the 1 in the first block is the number of the zone - a 0 isn't a good number for a zone.)

Almost there :)

However, there's an error on p7 of the DAC manual - resistance and insurgents were inadvertently reversed in the list.

Side 6 is actually resistance (independent) and side 2 is insurgents (side East). See

http://forums.bistudio.com/showthread.php?99759-DAC3-initialisation-tutorial-(for-DAC-beginners)&p=1837196&viewfull=1#post1837196

BR

Orcinus

Share this post


Link to post
Share on other sites

Thanks Guys - all works - yes i used 6 from the manual - will make a note of that - but Great Manual b.t.w going through it step by step :)

Edited by psvialli

Share this post


Link to post
Share on other sites

Sorry a couple more questions !

1) Is there a way to keep OPFOR in Buildings or patrol buildings ?

2) Is it best to deactivate a Zone that is a long way away to reduce server lagg or is it ok to just leave as is using the Reduce inf

Thanks

Share this post


Link to post
Share on other sites

@psvialli

Re 1): see the DAC_config_behaviour pages in the manual, you can activate/deactivate building search, choose how long they stay inside, & the the delay before the building is searched again. Also there was at least one post on that in this thread (last year, IIRC) with a detailed answer from Silola. Would have been August 2011 at the latest.

Re 2): IIRC if you deactivate a zone, all the units it has spawned get deleted - which may or may not be what you want. Wrt reduction, only the group leaders are not reduced; unless you have a lot of groups it might make only a marginal difference. You could test by using a radio trigger (maybe better, set a script to run at a preset time after mission start) to deactivate the zone while monitoring FPS, etc. Probably will need to do that quite a few times to average out differences due to variations in the amount of other stuff going on.

Share this post


Link to post
Share on other sites
@psvialli

Re 1): see the DAC_config_behaviour pages in the manual, you can activate/deactivate building search, choose how long they stay inside, & the the delay before the building is searched again. Also there was at least one post on that in this thread (last year, IIRC) with a detailed answer from Silola. Would have been August 2011 at the latest.

Re 2): IIRC if you deactivate a zone, all the units it has spawned get deleted - which may or may not be what you want. Wrt reduction, only the group leaders are not reduced; unless you have a lot of groups it might make only a marginal difference. You could test by using a radio trigger (maybe better, set a script to run at a preset time after mission start) to deactivate the zone while monitoring FPS, etc. Probably will need to do that quite a few times to average out differences due to variations in the amount of other stuff going on.

Many thanks worked it out now !

Edited by psvialli

Share this post


Link to post
Share on other sites

OK Another question !

I am trying to add a script to some civi vehicles when there are created - so i have gone into the DAC_Config_Events and added

	_Events_Unit_V = 	[
							["[_vehc] execVM ""carbomb.sqf"""],
							[],
							[],
							[],
							[],
							[]
						];

Carbomb script

_object = _this select 0;
_value = random 100;
///set to 99 for testing
if (_value < 99) then {
_blowup = false;
while {alive _object} do
   {
   // include vehicles
       _targetArray = nearestObjects [(getPos _object), ["MAN", "LandVehicle"], 10];
       if ((count _targetArray) > 0) then
       {
           {
               if (str(side _x) == "WEST") then
               {
               _blowup = true;
               };
           } forEach _targetArray;
       };
       if (_blowup) then
       {

  if (isServer) then
{
  [nil, nil, rHINT, "DIE YOU SCUM....."] call RE;
};  
   sleep 5;
       _boom = "R_57mm_HE" createVehicle (position _object);
       }
       else
       {
       sleep 60;        // change to tweak wait time before checks
       };
   };
};  

Rpt error :-

Error in expression <ue < 99) then {

_blowup = false;

while {alive _object} do

{

_targetArray = near>

Error position: <alive _object} do

{

_targetArray = near>

Error alive: Type Group, expected Object

line 11 error

If i run this script on a pre placed vehicle it all works fine ? so any idea what i am doing wrong ?

Share this post


Link to post
Share on other sites

I haven't messed with the events config much, however there are 2 things I notice on looking at the relevant manual pages:

1. Your RPT complains that it expected an Object & found a group. You have the activation (init) code in a group category, "Create". DAC doesn't accept that.

2. There are only 6 [] array entries shown in each of the "case" sections in the DAC_Config_Events file; however the manual shows 7 sections:

Event        Variable     Description                                                                   
Create      >  _group   >  After a group has been generated       
ReachWP    >  _group   >  When a group has reached one of their waypoints 
NotAliveGroup   >  _group   >  When a group is down  
NotAliveUnit    >  _unit    >  When a unit is down 
BeforeReduce    >  _unit    >  Before a group is reduced 
AfterBuildUp    >  _unit    >  After a reduced group has been re-generated 
InitVehicle    >  _vehc    >  After a vehicle has been generated 

"InitVehicle" does not appear in the 'header' line above the various case blocks in DAC_Config_Events.

You might try adding an additional line containing just [] at the end of the set in the relevant "case" block, i.e. as shown in bold red:

		_Events_Unit_V = 	[
							[],
							[],
							[],
							[],
							[],
							[]
							[b][color="#FF0000"][][/color][/b]
						];

then enter your code string into the new array and see what happens. It's possible that Silola omitted that option for some reason and hence it will not work. Please let us all know what happens :)

If not then depending on your mission design, alternatively you could:

A. Fire up the zone at the start & if the vehicle(s) will reduce, add your activation line to the "AfterBuildUp" section (which applies to units) & that might be all you need. However AIUI DAC does not reducr the entirety of a group, the leader remains. In a group of one, that unit must (?) be the leader so likely they will not reduce. Worth trying maybe - DAC might reduce the car but leave the driver. Possibly. Or not.

B. Spawn the cars into an array (after setting the group size to [1,0] to generate single cars) & give them some user-defined waypoints. Use the waypoints to release them from DAC and apply your script. As is, they'll then sit there waiting for a chance to blow up, unless you have another AI routine running that will take them over in a useful way.

To avoid them becoming stationary you could use additional, subsequent user-defined waypoints to have them move around an area (cycle). Given AI driving skill <cough>. their appearance at any given spot will be somewhat unpredictable. The approach Silola outlines on p26 to keep released groups moving will not work for your purpose, as the config for waypoints does not offer the ability to add any action to a waypoint in addition to those defined by DAC itself.

Edited by Orcinus

Share this post


Link to post
Share on other sites

Many thanks for your reply - nope not having any luck, but come up with another way I placed some down and use UPS to get them to go to random WP so Issue resolved !

Edited by psvialli

Share this post


Link to post
Share on other sites

Has anyone had this happen when using DAC in a mission. I have two large zones that are connected. Each zone has 3 camps and 14 respawns. Each zone spawns only 7 inf, 4 wheeled and 3 armor groups. I am using DAC in a domination edit with a few other scripts added to the mission. I let the game run overnight to see how the performance would be. One camp was destroyed and next to the camp was a group of 136 units both crew and regular soldiers just sitting around. The other camps were still active but the mission should have 14 inf groups, 8 wheeled groups and 6 armor groups A total of 28 groups. When I look to see there was less then 12 groups moving around the zones not including the non active group with 136 units. Any input on this would be great. When I killed the 136 unit group my performance with FPS went from 17 to 37. thanks Avibird.

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites

I have a lot of Zones scattered around that are reduced , but when we FLY over them they get activated, is there a way to STOP zones building back up when you Fly over them ? i.e only activate on Foot ? as this is cause a lot off Lagg

thanks

Edited by psvialli

Share this post


Link to post
Share on other sites

I am wondering how i can restart / re activate a DAC zone once the DAC units in the zone are running low meaning almost all dead.

Share this post


Link to post
Share on other sites

Is a requirement to let the numbers in the zone run low?

If not why not just a camp or number or camps connected to the zone, give each say 100 respawns. That way you get a pretty much continuous supply of enemy.

Having a number of camps in different places around the main area would mean enemy reinforcing from different directions.

Share this post


Link to post
Share on other sites

i tried the camps but they only seemed to spawn like 1 group of enemy ai who never really travelled further than 100mtrs from the base maybe i diddnt set them correctly. any ideas what i done wrong.

---------- Post added at 16:49 ---------- Previous post was at 16:01 ----------

got it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×