Guide: Explanation of dzai_config.sqf settings (75% Complete) Last Updated: 3/2/2014

Status
Not open for further replies.

Buttface

OpenDayZ Rockstar!
This guide is intended to help users better understand the settings available to them in the dzai_config.sqf file. Hopefully this will answer some questions about "how do I change this setting? This guide will go through multiple edits as I further improve it.

---

Section 1: DZAI Settings

These settings control how DZAI functions in the background, and aren't relevant to the AI units.

1. DZAI_debugLevel: Controls the amount of detail that DZAI reports into the arma2oaserver.RPT file. If enabled, DZAI will produce debug output into the log as it performs various tasks, such as spawning units, processing unit deaths, etc. This information lets you know what DZAI is doing in the background and is essential when trying to find the cause of a problem.

Possible values:
  • 0: No debug output. DZAI may still produce some output during server start but during gameplay DZAI should remain silent.
  • 1: Debug output with basic information. DZAI will report basic events without going into too much detail. Good if you want to know what's going on your server without being overloaded with too much information.
  • 2: Extended debug output with detailed information. DZAI will report as much information as possible, such as specific weapons and items spawned for each AI unit. Very useful when searching for causes of bugs, but not recommended for constant, everyday use unless a huge log file isn't a concern.
2. DZAI_monitorRate: Controls how often DZAI reports certain statistics into the server RPT file. It is enabled by default, and is a useful tool to keep track of DZAI's activity as time goes on.

What is reported by the DZAI monitor:

  • Server uptime in day:hour:minute:second format
  • Total number of active ground AI units (vehicle AI units are not counted until they exit their vehicles).
  • Number of active static spawns(includes both preset static spawns and custom static spawns).
  • Number of AI groups that are waiting for respawn.
  • Total number of active/existing dynamic spawns
    • "Active" means that a player is within the trigger area.
    • It is not unusual for this statistic to appear as 0/0 in your log file. This simply means that no dynamic spawns have been created yet.
  • Total/maximum number of air and land AI patrols (current/maximum)
    • The "current" number refers to how many alive patrols currently exist. As players destroy each patrol vehicle, this number will decrease. As the patrols respawn, this number will increase.
    • The "total" number is a fixed number and is determined by how many patrols you have specified to spawn.
Possible values:

  • Any number in seconds. This number determines how often DZAI reports statistical information into your log file.
  • If you don't plan on reading your log file regularly, consider increasing this number. If you don't plan on reading it at all, set it to 0 for no log output.

3. DZAI_verifyTables: This setting determines whether DZAI will check classnames defined in its configuration files. The verification process takes a short amount of time to complete during server startup (less than 3 seconds depending on number of classnames). During this process, DZAI will check whether classnames exist and are unbanned.

Notes:
  • DZAI cannot determine whether the classname is appropriately defined. For example, if you place a valid weapon name into the AI skin list, there will be no errors detected since the weapon name is valid and DZAI doesn't know what a "skin" is or is not. However, this will cause problems because obviously a weapon classname can't be used as a skin.
  • If DZAI doesn't report any invalid/banned classnames during server startup, then it is safe to disable this setting for future startups. However, you must remember to re-enable this setting if you update to a new DayZ mod version or modify any classnames.
Possible values: True (enable) or false (disable)

4. DZAI_objPatch: If this setting is enabled, DZAI will read DayZ's CfgTownGenerator file and spawn all objects defined there. Normally, clients read this file in order to spawn client-sided objects. This causes problems when server-sided AI is involved because AI cannot see or interact with these objects (since it doesn't exist on the server). By enabling this setting, DZAI will spawn all these objects as local objects on the server so AI will not see/shoot/walk through these objects.

Notes:

  • The script may take several minutes to complete spawning all server-sided objects.
  • It is always recommended to keep this setting enabled.
  • Only disable this setting if you are absolutely sure that it is not needed. For example, if the DayZ mod you're using does not spawn any client-sided objects using CfgTownGenerator.
  • This setting has no effect for DayZ Epoch because Epoch no longer uses the CfgTownGenerator.

Possible values: True (enable) or false (disable)

5. DZAI_cleanupDelay: Frequency of DZAI's dead body/destroyed vehicle cleanup script. DZAI will only clean up bodies and objects that it spawns, but DayZ's own cleanup script may interfere by performing its own cleanups.

Notes:

  • DZAI will clean up all dead AI bodies as well as the fly sounds
  • If DayZ's cleanup script manages to remove AI bodies before DZAI is able to, the fly sounds may not be properly removed
  • DZAI will not clean up a dead AI body if a player is within 20 meters of the body.
  • If AI skins are removed by the Remove Skin addon, DZAI will not be able to properly clean up the body, since the addon deletes the old body and creates a new one in its place. This new body will not have the necessary variables that DZAI relies on to perform the cleanup.
  • DZAI will clean up destroyed/disabled AI vehicles

Possible values: Script frequency in seconds.

6. DZAI_readOverrideFile: If enabled, DZAI will read additional user-defined settings in dzai_settings_override.sqf. This file is useful to store settings that you plan on re-using when upgrading to a newer version of DZAI, simply store it and overwrite it after upgrading. The settings in this file have priority over the ones in dzai_config.sqf

Notes:

  • Remember to check if any of the stored settings have changed between DZAI versions! For example, if a setting is an integer in one version but has been changed to a boolean value in the next version, you must change the setting accordingly, otherwise problems will happen!
  • If you suddenly experience problems after upgrading to a newer version of DZAI, try clearing your dzai_settings_override.sqf file. Some of your old settings may be incompatible with the new ones. I will always announce warnings about incompatible settings in rolling changelogs.
  • If you modify a setting in dzai_config.sqf and it doesn't seem to have any effect, first check if you have the same setting already defined in dzai_settings_override.sqf. Your settings may be overwritten by this file.

7. DZAI_modName: Refer to the comment section in dzai_config.sqf. In most cases, you won't need to touch this setting.
 
Section 2: AI Unit Settings

The settings here generally affect all AI units spawned by DZAI, and includes individual units as well as air/land vehicle AI.

DZAI_weaponNoise (Possible values: true or false, default: false)
  • If enabled, then gunshots by individual AI units will produce zed aggro just like players.
  • DZAI places a limit of one aggro "call" every 5 seconds to prevent script overload, since the server has to process a script for each bullet fired.
  • Not recommended to enable on mid/high population servers.
  • Note that zombies cannot attack AI. This is because zombie movement and attack behaviors are controlled completely by clients. When you are attacked by a zombie, it is your own client that is animating the zombie and dealing damage to your own character.
DZAI_refreshRate (Possible values: any number in seconds, default: 15)
  • Controls the cycle rate between ammo and fuel checks for all vehicle AI types.
  • If set at a lower number, ammo/fuel checks will be more frequent. Ammo for armed vehicles will be replaced more frequently.
  • Tip: If armed AI helicopters are too difficult, consider increasing the delay between checks.
DZAI_zDetectRange (Possible values: any number in meters, default: 200)
  • Radius of zombie detection around each individual AI group leader.
  • All zombies within this radius are marked as hostile to the AI group and "revealed" so that the group can recognize the zombie as enemy. This allows the AI to engage zombies.
  • Note: AI sometimes ignore the presence of zombies. This is largely due to the limitations of the Arma2 AI.
  • Note: This option has no effect if DZAI_zombieEnemy is set to false.
DZAI_zombieEnemy (Possible values: true or false, default: true)
  • true: Zombies within detection range of AI group leader are marked as hostile
  • false: AI will ignore all zombies
  • Note: Vehicle AI will ignore zombies unless another AI group has already marked them as hostile.
DZAI_freeForAll (Possible values: true or false, default: false)
  • Enable this to have all infantry AI groups to be hostile to each other, and hostile towards all vehicle-type AI.
  • Enabling this option allows slightly more reasonable bandit AI behavior, as player bandits are not all allied with each other.
  • Custom-spawned AI created by the DZAI_spawn function are exempt, but static spawn AI will attack custom-spawned AI if they encounter each other.
  • Note: AI killed by non-player sources will have all items removed from their inventory, except for their primary weapon and backpack.
  • WARNING: This option works by setting the EAST side hostile to itself, so enabling this option will cause all AI in this side to attack each other - even AI spawned by other scripts/addons.
DZAI_findKiller (Possible values: true or false, default: true)
  • This option allows AI groups to respond to player aggression by hunting down player responsible for killing one of their group members.
  • AI groups will pursue responsible player for up to 3 minutes or 300m, whichever condition is reached first.
  • For each additional AI group member killed by the responsible player, the pursuit timer is extended by 20 seconds.
  • Responsible player is instantly revealed to AI group upon killing a group member. Remaining group members will orient themselves to face the player and return fire.
  • If the DZAI_radioMsgs option is enabled and player has a Radio in their inventory, they will be able to overhear messages from the pursuing AI group leader if the group has at least 2 living units. Other nearby players within 50m of the target player will also receive radio messages.
DZAI_tempNVGs (Possible values: true or false, default: false)
  • If enabled, all AI spawned with military-grade weaponry will also have temporary Night Vision Goggles equipped if it is night time.
  • These temporary NVGs will be removed upon unit death and are unlootable.
  • Enable this option if your server has night time and you want AI with military weapons to be a challenge (since AI in the darkness are essentially blind).
DZAI_humanityGain (Possible values: any number, default: 0)
  • Amount of humanity points to award player for killing each AI unit.
  • Units killed using vehicles may not award humanity, similar to killing players.
  • It is recommended to be conservative about how much humanity is awarded, since having too large of a value will cause inflation and devaluation of humanity points.
DZAI_radioMsgs (Possible values: true or false, default: true)
  • If player has a Radio in their inventory, they will be able to hear radio messages transmitted by AI group leaders who are pursuing a player.
  • Player must be within 125m of AI group leader to receive messages.
  • No messages will be transmitted if the AI group has a single unit, or group leader is dead/unconscious.
  • Radio messages will include information about the target player, such as their: name, character skin, distance.
DZAI_useRadioAddon (Possible values: true or false, default: false)
  • By default, DZAI sends radio messages using remote execution. This method requires no client addons but is sometimes unreliable because messages may quickly disappear from players' screens.
  • If the client-side DZAI addon is installed (see the DZAI_client folder in the DZAI installation package) and this option is enabled, clients will generate the radio messages, which will be more clearly displayed on screen.
 
Section 3: AI Spawning Settings (Static AI spawns)

DZAI_staticAI (possible values: true to enable or false to disable)
  • If set true, DZAI will create predefined static AI spawns in most cities, towns, and military locations.
  • The difficulty level of the AI have been set so that they increase with the value of the location. For example, military bases will have the highest difficulty AI with highest quality loadouts, while small towns will have lower-difficulty AI with lower quality loadouts.
DZAI_respawnTimeMin and DZAI_respawnTimeMax (possible values: respawn time in seconds)
  • These two settings define the minimum and maximum amount of time it takes to respawn a static AI group.
  • NOTE: If the AI spawn area is despawned due to lack of players nearby, this timer no longer applies to the group since the group no longer exists. If a spawn area is despawned, AI will spawn again immediately if the area is activated again. This timer only applies if the spawn area is active for the entire duration (plus the time required for the area to despawn).
DZAI_despawnWait (possible values: despawn time in seconds)
  • This setting allows static AI groups to be despawned if there are no players nearby, which helps reduce the cost on server performance.
  • A lower value means that AI will be despawned sooner after all players have left the area. It will also mean more frequent spawn/despawn cycles if many players enter/leave the area frequently .
  • A higher value means that AI will remain for a longer amount of time without requiring players nearby. This reduces the frequency of spawn/despawn cycles but also means that more AI will exist on your server at any given moment - this may negatively affect server performance.

Section 4: Dynamic AI Spawning Settings

DZAI_dynAISpawns (possible values: true to enable, false to disable)
  • If this setting is enabled, DZAI will randomly spawn AI groups that will seek out targeted players.
  • DZAI will not spawn AI near players if:
    • They are in an air vehicle
    • They are in a city or town area
    • They are in a blacklisted area defined by DZAI_dynAreaBlacklist (see below)
    • They are in water
    • DayZ Epoch-only: If players are within 200m of a trader area or 100m of a plot pole.
    • If the calculated spawn position falls within a blacklisted area.
    • If there has been a dynamic spawn in the area within the last 15 minutes.
  • Players carrying a Radio will be able to intercept messages from the pursuing AI group if there are at least 2 pursuing units.
  • These AI units will actively seek out the target player for a short distance.
  • DZAI will select up to 30% of online players as possible targets for dynamic AI spawns.
  • There is an upper limit of 10 active dynamic AI spawns per cycle.
  • The time between each spawn cycle varies between 5-7 minutes.
DZAI_maxSpawnTime (possible values: time in seconds)
  • This setting defines the rate of increase of probability to spawn AI units per player.
  • Higher number means that it will take longer for to reach the maximum probability to spawn AI units. Lower number means a shorter amount of time will be required to spawn AI units.
  • Analogy: Think of this setting as a "bucket" that is gradually filled with drops of water over time. The more full the bucket, the more likely that AI spawns will happen, and more AI will be spawned (minimum of 1, maximum of 3). Once AI are spawned, the bucket is emptied and the process begins again. Think of DZAI_maxSpawnTime as the rate at which the bucket is filled (Higher: bigger bucket, lower: smaller bucket)
  • The purpose of variable spawning probability is to prevent AI from spawning too frequently for each player, and to prevent too few AI from spawning as well. If AI recently spawned for a player, there is less chance for AI to spawn for some time afterwards. Likewise, a player who hasn't recently encountered dynamic AI is more likely to meet dynamic AI.
DZAI_heliReinforceChance (probability of helicopter reinforcement: 0-1)
  • This setting defines how likely it is for a dynamic AI group to call an AI helicopter for reinforcement.
  • Examples: 0: Never call, 1: Always call, 0.5: 50% chance of calling helicopter.
  • Note: The helicopter is not immediately sent to the area. Scenarios where the helicopter may be delayed:
    • If the helicopter is still traveling to its current waypoint.
    • If the helicopter is busy engaging players.
    • If there are no active helicopters (ie: all destroyed)
    • If the helicopter is very far away from the call location.
  • The helicopter will search the area for 40-60 seconds upon arrival.
  • It is recommended for players to quickly destroy or evade the dynamic AI units before the helicopter reinforcement arrives, or to wait for the helicopter to leave the area before engaging the ground units.
  • This setting has no effect if there are no AI helicopters spawned (if
    DZAI_maxHeliPatrols is set to zero)
DZAI_dynDespawnWait (time to despawn units in seconds)
  • This setting determines how long the dynamic AI units can exist if there are no players within 600m of the original spawn position.
  • Remember, there is an upper limit of 10 dynamic spawns at any given moment. If this setting is set too high and this limit is reached, no more dynamic spawns are possible until some are despawned.
    • The actual upper limit of dynamic spawns is 30% of the number of online players (rounded up) or 10, whichever number is lower.
 
Section 5: AI Air Vehicle Patrol Settings

(Guide to be continued here)


Section 6: AI Land Vehicle Patrol Settings

IMPORTANT: The AI land vehicle patrol is a demonstration version only. The actual implementation will be different. Because this is a demonstration version, there is absolutely no guarantee whether or not it will function properly or at all. If it doesn't work - disable it.
(Guide to be continued here)
 
Section 7: AI Weapon Selection Settings, AI Loot Quantity Settings, and AI Loot Probability Settings

Under the "AI Weapon Selection Settings" section is where you can configure settings affecting AI weapon choices. Here is a description of each setting available in this section:

1. DZAI_dynamicWeaponList: If enabled (set to "true") then DZAI will read DayZ's loot tables and build a list of weapons that AI can spawn with and use. For example, weapons from low-grade loot tables such as Residential or Farm will be assigned to low-level units, while weapons from high-grade loot tables such as MilitarySpecial (Barracks loot) or HeliCrash will be assigned to high-level units. With this setting enabled, AI have equal footing to players - any weapon that a player could potentially loot ingame could be used by AI as well.

If this setting is disabled, the user will have to manually manage the AI weapon tables in /init/world_classname_configs/default/default_classnames.sqf. It is highly recommended to have the DZAI_verifyTables option enabled if you choose to do this to avoid invalid/typoed classnames causing problems.

2. DZAI_banAIWeapons: This is an array where you can define weapons that you don't want AI to ever spawn with if DZAI_dynamicWeaponList is enabled (this setting is ignored if the dynamic weapon list is disabled). For example, if you think the DMR is too overpowered in the hands of AI, then add the DMR classname in the array. For example:

Code:
DZAI_banAIWeapons = ["DMR_DZ"]; //Note: This is an example only - I don't know if this is the actual DMR classname

3. DZAI_launcherTypes: Array of launcher-type weapons for AI to use. This is a useful setting if you want AI to be more dangerous against vehicles, especially armored ones that normal weapons can't damage effectively. Add only launcher-type weapons here, I do not know what will happen if you decide to add another rifle-type weapon here for whatever reason. Not all AI will have access to launcher weapons - only AI of specified levels ("weapongrades") will be able to use them, and only one per group. Example:

Code:
DZAI_launcherTypes = ["M136"];

Note: Launcher weapons are unlootable and will disappear from AI inventory upon death. This is intended behavior to avoid players being able to easily farm anti-vehicle weapons.

4. DZAI_launcherLevels: This array defines what level of AI are able to spawn with launcher weapons (remember - only 1 per group). By default, all AI with military-grade weapons will also have one group member with a launcher weapon if any are defined.
 
Section 8: AI Weapon/Skill Probabilities and AI Skill Settings

One of the most common questions about AI skill settings is whether a high number equals high skill or low number equals low skill or vice versa. With skills named "aimingShake" and "aimingAccuracy" it can be easy to be confused. The simple answer is: higher number means higher skill (more competent), lower number means lower skill (less competent) - for all skills.

Valid skill settings range from 0 (absolute worst) to 1 (absolute best). Any number outside this range will produce unexpected results, so just don't do it. DZAI limits each AI skill to a maximum of 1 but no minimum.

The next most common question is "what does each skill name mean?". Rather than giving you a link and expecting you to follow it, I'll copy and paste the information for you.

Information taken from: http://community.bistudio.com/wiki/AI_Sub-skills
My own comments and interpretation of each skill are in italics next to the name of each skill.

aimingAccuracy (How accurate the AI is)
  • Affects how well the AI can lead a target
  • Affects how accurately the AI estimate range and calculates bullet drop
  • Affects how well the AI compensates for weapon dispersion
  • Affects how much the AI will know to compensate for recoil (Higher value = more controlled fire)
  • Affects how certain the AI must be about its aim on target before opening fire
aimingShake (Lock-on speed of AI aiming)
  • Affects how steadily the AI can hold a weapon (Higher value = less weapon sway)
aimingSpeed (How fast the AI can swing its weapon around to aim)
  • Affects how quickly the AI can rotate and stabilize its aim (Higher value = faster, less error)
commanding (Speed of inter-group AI communication)
  • Affects how quickly recognized targets are shared with the group (Higher value = faster reporting)
courage (How likely the AI is likely to put itself into a dangerous position. Basically AI aggressiveness/recklessness)
  • Affects unit's subordinates' morale (Higher value = more courage)
endurance (How easily AI aim is affected by running. Similar to how weapon sways for players after a long running session)

Disabled in Arma3

general
  • Raw "Skill", value is distributed to sub-skills unless defined otherwise. Affects the AI's decision making.
reloadSpeed
  • Affects the delay between switching or reloading a weapon (Higher value = less delay)
spotDistance (Quality of AI eyesight and hearing. Affects probability of recognizing an enemy as hostile)
  • Affects the AI ability to spot targets within it's visual or audible range (Higher value = more likely to spot)
  • Affects the accuracy of the information (Higher value = more accurate information)
spotTime (AI reaction time)
  • Affects how quick the AI react to death, damage or observing an enemy (Higher value = quicker reaction)

How AI skills are defined in DZAI:

This is an example of how skills are defined for a low-level AI type:

Code:
DZAI_skill0 = [  
        ["aimingAccuracy",0.10,0.125],
        ["aimingShake",0.45,0.55],
        ["aimingSpeed",0.45,0.55],
        ["endurance",0.40,0.50],
        ["spotDistance",0.30,0.45],
        ["spotTime",0.30,0.45],
        ["courage",0.40,0.60],
        ["reloadSpeed",0.50,0.60],
        ["commanding",0.40,0.50],
        ["general",0.40,0.60]
];

As you can see, each row has a skill name (ie: aimingAccuracy) as well as two numbers. The first number is the base amount, the second number is the maximum amount. (Correction: Originally, I said the maximum skill amount is the two numbers added together. This is incorrect - the two numbers are actually the lower and upper limits)

So for aimingAccuracy, the lowest possible skill level is 0.10, and the maximum possible skill level is 0.125. In reality, the actual skill level could be anywhere in between 0.10 - 0.125.
 
Status
Not open for further replies.
Back
Top