-
Notifications
You must be signed in to change notification settings - Fork 6
DAC Plugin
Working with DAC can be confusing and painful, especially considering the vast amount of features and customizations. With that in mind, the Framework includes a way to create DAC zones using nothing but verbose sentences, all Headless Client compatible.
The mission_AI.sqf file, located in "mission\objectives", is the main file behind the whole area generation process. Upon opening the file, you will be greeted by a comment on top of the page, two lines designated:
1. "if ("spawn_ai" in usedPlugins)..."
2. "if ("dac_plugin" in usedPlugins)..."
The former line controls the AI spawning script, which will be detailed in a future document. We will instead work with the latter line.
if ("dac_plugin" in usedPlugins) then { waitUntil{(!isNil "BRM_DAC_fnc_new")};
The line above works as follows:
- Check if "dac_plugin" is activated in plugins.cpp (framework\plugins)
- If the condition is met, the script will execute but wait until the function designated
"BRM_DAC_fnc_new"
is called after the script initializes.
"BRM_DAC_fnc_new"
is the function that we will call after setting the parameters for said DAC zone. This, essentially, executes the text recognition function in the script folder, reads through all the text, and creates a functional DAC zone with the parameters given by the user.
Before trying anything in the mission_AI.sqf, we must first learn how the text-recognition function handles parameters. Correct usage of words will lead to success towards generating DAC zones using the framework's automated script.
Usable words and aliases are listed below:
These words are ignored by the text processing function.
hey
, please
, a
, an
, with
, also
, and
, but
, however
, of
, amounts
, amount
, named
, called
,
respawns
, respawn
, reinforcements
, supporting
, assisting
, helping
, in
, on
, network
, id
-
blufor
,west
-
opfor
,redfor
,east
-
independent
,resistance
,indfor
,guerilla
,guer
-
civilian
,civilians
,civies
,civ
-
infantry
,units
,soldiers
-
vehicles
,technicals
,lavs
-
tanks
,armor
-
aircrafts
,helicopters
-
all
,both
,combined-arms
,everything
-
easy
,rookie
,amateur
,novice
,stupid
,dumb
-
normal
,average
,decent
,trained
-
stealth
,stealthy
,silent
,cowardly
-
hard
,elite
,professional
,smart
-
group
,groups
,unit
,units
,team
,teams
-
fire-team
,fire-teams
-
section
,sections
-
squad
,squads
As was said before, the text-processor will ignore any of the ignored words. The bare parameters the text-processor will require for a zone to be generated are as follows:
- Trigger initialization
- Activation
- Difficulty
- Loadout
- Affiliation
- Zone name
- Network number
- Group quantities
- Group class
This parameter has to match with the name of the trigger the mission-maker desires to place the zone in. For example, if 'trg1' is placed on the editor, and 'trg1' is placed in the zone generating sentence, then the zone will generate within trg1's radius.
Zones generated by the DAC plugin will require a keyword designating their activation.
Option | Description |
---|---|
automatic |
Broken, avoid using. |
activated |
Zone AI will spawn at mission start. This is best used for main objectives and enemy zones close to the player HQ, but be aware that more activated zones means more AI and hence less frames. |
deactivated |
Zone AI will never spawn. This an advanced option and will require manually activating the zone. |
Difficulty of a zone can be defined in four ways: easy
, normal
, hard
, or stealth
.
Though you are free to choose the difficulty, it is recommended to use normal
.
If you do decide to use a different difficulty, you'll need to also take into consideration the opposing faction and the distance away from the players.
stealth
is a special parameter that will command the units inside of the DAC zone to move with more caution. They will be prone or have a reduced silhouette profile most of the time and will have a more restricted ROE than any other zones.
Option | Description |
---|---|
default |
Framework faction loadout. |
vanilla |
Vanilla loadout. |
This parameter defines the side of the spawned units.
Option | Description | Aliases |
---|---|---|
blufor |
The BLUFOR (Blue Forces) side. | west |
opfor |
The OPFOR (Opposing Forces) side. |
redfor , east
|
indfor |
The INDFOR (Independent Forces/Guerilla) side. |
independent , resistance , guerilla , guer
|
civilian |
The civilian side. |
civilians , civies , civ
|
side_a |
side_a_side | friendly |
side_b |
side_b_side | enemy |
side_c |
side_c_side | neutral |
This parameter can be customized by the mission maker by using named X
, or written to be randomized, named random
.
The zone name will be listed in the DAC initialization script at the start of each mission:
keep in mind that, if you choose to make zones randomized, they will be randomized EACH time the mission is played, not only once.
The network parameter works with numbers. Any number from 1 to infinite will designate a specific network number. Zones with the same network number will be linked to and will support eachother within DAC's working functions. This parameter, like the zone name, can also be randomized.
The group quantity, alike the network parameter, will be measured in numbers. Sentences like '3 groups', '2 fire-teams', '4 squads', and the like will be accepted by the text processor.
Infantry, Wheeled, Helicopter:
Units | Aliases |
---|---|
2 - 4 |
group , groups , unit , units , team , teams
|
3 - 6 |
fire-team , fire-teams
|
4 - 8 |
section , sections
|
6 - 12 |
squad , squads
|
Tracked:
Units | Aliases |
---|---|
1 |
group , groups , unit , units , team , teams
|
1 - 2 |
fire-team , fire-teams
|
1 - 3 |
section , sections
|
2 - 4 |
squad , squads
|
The class of the group, as we defined previously, can be one of the following:
Description | Aliases |
---|---|
Infantry |
infantry , units , soldiers
|
Vehicles (Wheeled) |
vehicles , technicals , lavs
|
Armored (Tracked) |
tanks , armor
|
Air-based |
aircrafts , helicopters
|
Combined |
all , both , combined-arms , everything
|
[trg1, "Create an activated easy default enemy zone named random on network random, with 1 squad of infantry."] spawn BRM_DAC_fnc_new;
As you can see, the sentence has all of the elements defined previously. This line will tell the text-processing function to create an activated, easy difficulty, default loadout, enemy affiliated zone with a random name DACZone#
, a random network #
, and one squad of infantry on the surroundings of trigger trg1
. The spawn BRM_DAC_fnc_new;
at the end of the line will call the text-processor to sweep through the sentence, eliminate irrelevant clutter and process the information to the zone creator, which will put everything in DAC's parameters.
[op1, "Create an automatic hard TKMILITIA enemy zone named zone1 on network 1, with 2 squads of infantry, 2 fire-teams of vehicles and 1 group of armor."] spawn BRM_DAC_fnc_new;"
This sentence, in change, will create an automatically-activated, hard difficulty, loadout relative to what is written in TKMILITIA.sqf, enemy affilated zone named zone1
, on network 1 with two squads of infantry, two fire-teams of vehicles, and 1 group of armor.
Maintained by BromA - ArmA for the refined autist.