Dynamic AI Creator for JCOVE Lite

Dynamic AI Creator ( DAC )

DAC is a suite of scripts originally created for Operation Flashpoint by the folks over at Mapfact.net then later ported to ArmA. At it’s most basic, DAC allows the mission builder to dynamically spawn groups of AI and waypoints, but DAC’s features are many. Too many to list, so here is a partial list of my favorites in no particular order:

  • dynamic AI spawn camps
  • AI radio chatter
  • Player/AI artillery support
  • automatic dead body removal (for improved performance)
  • improved AI tactics
  • dynamic AI group reduction (for improved performance when not around the player)

DAC is one of my most favorite set of scripts, so I was very pleased to see that burns had added the VBS2 unit classes to DAC and made a sample mission for JCOVE (see Resources at bottom).

How to use DAC

DAC is very well documented and comes with sample missions, but even so it can be a bit daunting to setup and get working. To get you started I’ll walk you through setting up a simple mission that uses DAC to spawn civilians.

Creating the Mission

To start I’ll open the mission editor and insert a player unit, naming it “s1”. In order for the DAC AI to react to the players DAC needs to know the names of the player units. By default the DAC assumes playable units are named s1 to s16. This can be changed in a config script, but for simplicity I’ll just call my unit s1.

I now save the mission and give it a name, in my example “Morning Sweep”. Then I alt-tab out of JCOVE so I can open up “my documents” and navigate to the jcove, missions folder. Into my mission folder “Morning Sweep.Sama”, I copy the DAC folder as well as the Init.sqf file, both supplied by burns. I then alt-tab back into JCOVE and save the mission, so JCOVE will recognize the changes I’ve made.

Creating AI Zones

DAC creates and manages the AI using “zones” defined in the mission editor. A zone could be as big as the entire map, but for improved performance it’s better to use many smaller zones. In my example I want to have some civilians populate a village about 350 x 450 meters in size, so I start by inserting a trigger in the center of the village with the following settings:

Axis a: 350

Dynamic AI Creator DAC trigger example

DAC trigger example

Axis b: 450

Shape: Rectangle

Activation: Gamelogic, Repeatedly, Present, Countdown

Name: z1

Condition: true

On Act.: [“z1”,[1,0,0,350,450],[10,2,50,6],[10,2,30,5],[ ],[ ],[3,3,3,0]]exec “DAC\Scripts\DAC_Init_Zone.sqs”

Everything is straight forward until we get to that bit of script in the On Act. (On Activation) field, then things get a bit hairy. For those who have never programmed before, it’s an array of seven parameters that the trigger passes to the script DAC_Init_Zone.sqs to create my first zone. Here’s a breakdown of the seven parameters:

  1. “z1” – This is the name of the trigger that we have created.
  2. [1,0,0,350,450] – 1 is the DAC ID of this zone, 0 means the zone is active at mission start, the next 0 means I’m not using any special events, 350 is the trigger’s a axis, 450 is the trigger’s b axis.
  3. [10,2,50,6] – 10 infantry groups, 2 group size (2-6 units/group), 50 waypoints, 6 waypoints for each group.
  4. [10,2,30,5] – 10 wheeled vehicle groups, 2 group size (2-6 units/group), 30 waypoints, 5 waypoints for each group.
  5. [ ] – empty in my example, normally used for tracked vehicles.
  6. [ ] – empty in my example, normally used for helicopters or spawn camps
  7. [3,3,3,0]- side 3 (civilian), unit configuration 3 (JCOVE civilians), default behavior 3 (civilian), spawn camp type 0

So if I’ve typed everything correctly, when I preview my mission DAC should create a zone 350 x 450 meters populated by 10 civilian groups on foot and 10 groups mounted in vehicles.


Sample JCOVE mission created in this article: Morning Sweep v1

Related Posts:

DAC OpFor Linked Zones

DAC for ArmA includes documentation
Bis forum entry for more info.
DAC for JCOVE at www.jcovelite.co.uk (registration required).