Jump to content
silola

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

Recommended Posts

It's possible to save spawned units into an user-defined global array.

 

Default script call (example):

["z1",[1,0,0],[3,3,20,6],[],[],[],[0,0,0,0,1]] spawn DAC_Zone

 

Extended script call (example):

["z1",[1,0,0],[3,3,20,6,"InfZone1"],[],[],[],[0,0,0,0,1]] spawn DAC_Zone

 

With this script call, DAC creates a global array InfZone1 and all the spawned infantry groups will be saved into this one.

 

Two more examples:

 

["z2",[1,0,0],[3,3,20,6,"InfZone2"],[],[],[],[0,0,0,0,1]] spawn DAC_Zone

saves all infantry groups from zone z2 into the global array InfZone2

 

["z3",[1,0,0],[3,3,20,6,"InfZone3"],[],[3,1,15,5,"TankZone3"],[],[0,0,0,0,1]] spawn DAC_Zone

saves all infantry groups from zone z3 into the global array InfZone3,

saves all tank groups from zone z3 into the global array TankZone3

 

In connection to your mission:

 

 

// spawn enemy
_values = ["z1",[1,0,0],[1,1,2,2,"InfZone1"],[],[],[],[1,1,1,0]];
[_sidepos,80,80,0,0,_values] call DAC_fNewZone;

 

//new section >>> not tested

_dacUnits = [];

for "_i" from 0 to ((count InfZone1) - 1) do {{_dacUnits pushback _x} foreach units (InfZone1 select _i)};

 

// WAIT UNTIL objective destroy
waitUntil {sleep 5;{alive _x} count _dacUnits == 0}; //// no problem here.

 

Hope it helps ;)

 

Silola

Share this post


Link to post
Share on other sites

It's possible to save spawned units into an user-defined global array.

 

Default script call (example):

["z1",[1,0,0],[3,3,20,6],[],[],[],[0,0,0,0,1]] spawn DAC_Zone

 

Extended script call (example):

["z1",[1,0,0],[3,3,20,6,"InfZone1"],[],[],[],[0,0,0,0,1]] spawn DAC_Zone

 

With this script call, DAC creates a global array InfZone1 and all the spawned infantry groups will be saved into this one.

 

Two more examples:

 

["z2",[1,0,0],[3,3,20,6,"InfZone2"],[],[],[],[0,0,0,0,1]] spawn DAC_Zone

saves all infantry groups from zone z2 into the global array InfZone2

 

["z3",[1,0,0],[3,3,20,6,"InfZone3"],[],[3,1,15,5,"TankZone3"],[],[0,0,0,0,1]] spawn DAC_Zone

saves all infantry groups from zone z3 into the global array InfZone3,

saves all tank groups from zone z3 into the global array TankZone3

 

In connection to your mission:

 

 

Hope it helps ;)

 

Silola

Thank you man... you are great ill try it :D

Share this post


Link to post
Share on other sites

Is there a way to create a zone where units are generated but with no waypoints. And then only waypoints created in a linked zone? I've tried this using 0 for waypoints generated in the zone but DAC complains about a zone with no waypoints.

Share this post


Link to post
Share on other sites

Is there a way to create a zone where units are generated but with no waypoints. And then only waypoints created in a linked zone? I've tried this using 0 for waypoints generated in the zone but DAC complains about a zone with no waypoints.

 

What you are trying to do is, I believe, a no return zone. This zone would spawn units but they will never come back if set to zero or with a probabilty of coming back with a maximum of 100 (Entry The selection of side, the unit-, behaviour-, and Camp-Configuration). A linked waypoint zone is possible (Entry Create Waypoint Zones in the manual).

 

No return zone (spawning infantry only): ["z1",[1,0,0,0],[8,2,50,8],[],[],[],[0,0,0,0,0]] spawn DAC_Zone;

Waypoint zone for infantry only (20 waypoints): ["z2",[1,0,0],[20],[],[],[],[0,0,0,0,0]] spawn DAC_Zone;

Share this post


Link to post
Share on other sites

What you are trying to do is, I believe, a no return zone. This zone would spawn units but they will never come back if set to zero or with a probabilty of coming back with a maximum of 100 (Entry The selection of side, the unit-, behaviour-, and Camp-Configuration). A linked waypoint zone is possible (Entry Create Waypoint Zones in the manual).

 

No return zone (spawning infantry only): ["z1",[1,0,0,0],[8,2,50,8],[],[],[],[0,0,0,0,0]] spawn DAC_Zone;

Waypoint zone for infantry only (20 waypoints): ["z2",[1,0,0],[20],[],[],[],[0,0,0,0,0]] spawn DAC_Zone;

 

I knew about the no return zone but I haven't tried it. It sounded to me like they would still get waypoints from their master zone but if they left the master zone they would not return. I see in this setup that you are still generating waypoints (50 I believe but I don't have the manual in front of me) in the master zone. But why should you have to do that?

 

In any event, if I don't hear back from Silola I will give this a try as soon as I can.

Share this post


Link to post
Share on other sites

Also used this way in some missions, basically the same as Magnetar...

// spawn zone with "respawn camp"
["z1",   [1,0,0,0],[8,3,10,5],[],[],[2,2,50,0,100,10],[0,0,0,0]] spawn DAC_Zone;

// waypoint zone for "z1"
["z1_1", [1,0,0],[20],[],[],[],[0,0,0,0]] spawn DAC_Zone;

// chopper spawn zonw with waypoint zone
["z2",   [2,0,0,0],[ ],[ ],[ ],[3,2,5],[0,0,0,0]] spawn DAC_Zone;
["z2_1", [2,0,0],[ ],[ ],[ ],[30],[0,0,0,0]] spawn DAC_Zone;

Share this post


Link to post
Share on other sites

I knew about the no return zone but I haven't tried it. It sounded to me like they would still get waypoints from their master zone but if they left the master zone they would not return. I see in this setup that you are still generating waypoints (50 I believe but I don't have the manual in front of me) in the master zone. But why should you have to do that?

 

In any event, if I don't hear back from Silola I will give this a try as soon as I can.

 

It generates waypoints in the master zone but doesn't use them.. only the linked zone waypoints get used.

Share this post


Link to post
Share on other sites

DAC needs always some positions in order to spawn the units there.

If you create a "no return zone" with 10 infantry groups, but with only one waypoint, then all the groups will spawn at this waypoint.
That means, the more waypoints are generated the better the distribution of the spawned groups :)

 

Silola

  • Like 1

Share this post


Link to post
Share on other sites

Ah, thanks Silola and others. I was assuming the initial spawn point of units is separate from the waypoints but seems not. Seems the waypoints are used as spawn locations as well so need at least 1 waypoint in the master zone for units to spawn. I will create more of course but as long as the no return works as people are saying then all is good. I will test it hopefully tonight.

 

DAC needs always some positions in order to spawn the units there.

If you create a "no return zone" with 10 infantry groups, but with only one waypoint, then all the groups will spawn at this waypoint.
That means, the more waypoints are generated the better the distribution of the spawned groups :)

 

Silola

Share this post


Link to post
Share on other sites

I have another question.

 

Lets say you generate 50 waypoints in a zone and setup the units to get 20 waypoints each. What do they do after they have patrolled the 20 waypoints. Do they just stop at the last one there and not move again? If so, then I guess to keep them moving as long as possible can I give them a HUGE number of waypoints over the 50 that are available? Will they keep moving and even re-using waypoints? Or will they then stop after 50? Or do they cycle at some point in which case none of this matters and the units at least will continue patrolling / moving at the very least.

Share this post


Link to post
Share on other sites

Once they reach the number of assigned waypoints they get another batch of waypoints. They never stop running since DAC whips them constantly :D

Share this post


Link to post
Share on other sites

Once they reach the number of assigned waypoints they get another batch of waypoints. They never stop running since DAC whips them constantly :D

 

Wrong ... hehe, because each group gets only one pool of waypoints at the beginning (after a group is generated),

and they don't move the waypoints in a row, but totaly randomized, so they can't reach any end.

 

For example, a group gets 5  of 20 waypoits: (wp2, wp7, wp11, wp13, wp17)

This group is then spawned at one of these waypoints (also random selected, if more then one waypoint generated).

 

The group is not moving along the waypoint path like: start > wp2 > wp7 > wp11 > wp13 > wp17 > end

but totaly randomized like this: start > wp7 > wp13 > wp7 > wp2 > wp17 > wp2 > wp13 > wp7 > wp2 >>>>> no end

 

Hint: A respawned group gets exactly the same waypoint pool as the killed one.

 

 

Silola

  • Like 1

Share this post


Link to post
Share on other sites

Hey guys, I've run into a problem with custom waypoints. For some reason I can't get them to work and I have no idea what exactly I am doing wrong because I follow the manual to a word.

 

What I'm trying to achieve is this: a zone that spawns AI civilian vehicles that move from town to town using roads. Here's my situation: I have a DAC zone in usual rectangle trigger named "z1", with activation condition "time > 1" and following OnActivation code:

0 = ["z1",[1,0,0,0],[ ],[5, 5, 0, 5],[ ],[ ],[3,3,0,0]] spawn DAC_Zone;

In this zone I also have a nameless GameLogic with 10 "AND"-type waypoints liked to it. It has "this setDir 2" in it's init field. Both logic and its waypoints are inside the zone.

 

When I launch the mission DAC instantly reports that there is no waypoints assigned "z1" and that's it. I even tried to explicitly link the GameLogic to the zone by adding "this setVariable["Link", z1]" into Logic's init field with no luck. If I change the third value in wheeled array (that corresponds to DAC-generated waypoints), the system just generates them in random positions without taking into account predefined waypoints.

 

In the actual mission that big civilian zone overlaps with several smaller "combat" zones (that's why I tired to link GameLogic to a specific zone) but I've just created a simple mission on Stratis with clean DAC package and got the same results.
I'm using scripted version of DAC.

Any help will be greatly appreciated.

Share this post


Link to post
Share on other sites

 

... but I've just created a simple mission on Stratis with clean DAC package and got the same results.

 

Please send me exactly this mission :)

 

Silola

Share this post


Link to post
Share on other sites

Silola,

 

This is even better than I envisioned. I should expect this from you though :)

 

So there is no worries about the group stopping. I am going to test all of this tonight. WORKED LIKE A CHARM. Thanks again Silola and others.

 

Wrong ... hehe, because each group gets only one pool of waypoints at the beginning (after a group is generated),

and they don't move the waypoints in a row, but totaly randomized, so they can't reach any end.

 

For example, a group gets 5  of 20 waypoits: (wp2, wp7, wp11, wp13, wp17)

This group is then spawned at one of these waypoints (also random selected, if more then one waypoint generated).

 

The group is not moving along the waypoint path like: start > wp2 > wp7 > wp11 > wp13 > wp17 > end

but totaly randomized like this: start > wp7 > wp13 > wp7 > wp2 > wp17 > wp2 > wp13 > wp7 > wp2 >>>>> no end

 

Hint: A respawned group gets exactly the same waypoint pool as the killed one.

 

 

Silola

Share this post


Link to post
Share on other sites

 

Ok, you've done two mistakes.

 

The first one: wrong DAC zone settings

 

If you have a closer look @readme > page 3, then you will find the following picture:

 

1V0ntHX.png

 

The zone within your mission has no Activation defined. Activation must be Game Logic >>> Repeatedly

 

 

The second one: no waypoint count defined (waypoint pool)

 

Your script call: 0 = ["z1",[1,0,0,0],[ ],[5,5,0,5],[ ],[ ],[3,3,3,3]] spawn DAC_Zone;

That means, DAC has no chance to save any new waypoint within the zone, no randomized one, no user-defined one, because the (overall) count is 0.

 

Example how it works:

 

You have placed 10 user-defined waypoints and you will get the following results with these different script calls:

 

0 = ["z1",[1,0,0,0],[ ],[5,5,0,5],[ ],[ ],[3,3,3,3]] spawn DAC_Zone; >>> as before ... no waypoints saved

0 = ["z1",[1,0,0,0],[ ],[5,5,5,5],[ ],[ ],[3,3,3,3]] spawn DAC_Zone; >>> DAC will save 5 of 10 user-defined waypoints (wp1 up to wp5)

0 = ["z1",[1,0,0,0],[ ],[5,5,10,5],[ ],[ ],[3,3,3,3]] spawn DAC_Zone; >>> DAC will save exactly all the user-defined waypoints

0 = ["z1",[1,0,0,0],[ ],[5,5,15,5],[ ],[ ],[3,3,3,3]] spawn DAC_Zone; >>> DAC will save exactly all the user-defined waypoints, but in addition 5 random generated waypoints

 

So, that's all and I think it's easy to understand ;)

 

Silola

  • Like 1

Share this post


Link to post
Share on other sites

Hey Silola. I have turned

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

Units and zone markers dont show in editor preview, but while playing the single player mission through scenarios it turns them on. Anything I am missing?

 

I am making DAC zones on the fly like so:

 

_axis = [300,500] call BIS_fnc_randomInt;
_values = ["z1",[1,0,0],[7,1,15,10],[1,1,5,4],[],[1,1,6],[1,1,1,1]];
[_sidepos,_axis,_axis,0,0,_values] call DAC_fNewZone;

  • Like 1

Share this post


Link to post
Share on other sites
So, that's all and I think it's easy to understand ;)

Oh, I knew it was something on my part. Sorry, don't know how did I managed to overlook trigger's settings.

I've fixed it and everything works like magic now. Thank you very much for your help! :)

Share this post


Link to post
Share on other sites

Hey Silola. I have turned

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

Units and zone markers dont show in editor preview, but while playing the single player mission through scenarios it turns them on. Anything I am missing?

 

Sorry, but I don't know what you mean. Which single player mission, which scenarios ?

If you don't want to see any DAC marker, turn them off with DAC_Marker = 0;

 

The DAC markers were made only for some kind of control during the mission development.

If you play your mission (SP or MP) turn them off, especially during a MP mission.

 

Silola

Share this post


Link to post
Share on other sites

Yeah for some mysterious reason its working now. Lol :P

Share this post


Link to post
Share on other sites

Silola, what could be causing this error in the dynamic weather script of DAC: http://postimg.org/image/osqparbz5/

 

This is inside my dac config creator:

if(isNil "DAC_Dyn_Weather") then {   DAC_Dyn_Weather = [240,60,1,0.6]      };

Thanks

Share this post


Link to post
Share on other sites

Silola, what could be causing this error in the dynamic weather script of DAC: http://postimg.org/image/osqparbz5/

 

This is inside my dac config creator:

if(isNil "DAC_Dyn_Weather") then {   DAC_Dyn_Weather = [240,60,1,0.6]      };

Thanks

 

Don't know. I think the weather script is not working anymore with the current Arma version.

So, it's better to disable this feature and use another weather script ;)

 

Silola

Share this post


Link to post
Share on other sites

Don't know. I think the weather script is not working anymore with the current Arma version.

So, it's better to disable this feature and use another weather script ;)

 

Silola

Thanks.

Share this post


Link to post
Share on other sites

Actually your dynamic weather script is perfect. Truely random, but only this fog error pops up. Everything else is fine. Please look into it. Im sure its a small issue. :)

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

×