Skip to content
10Dozen edited this page Mar 2, 2017 · 24 revisions

What is it?

dzn_dynai (Dynamic AI) is the lite and user-friendly script tool to generate areas full of angry AI-controlled units.

Features:

  • Single- and multiplayer compatible
  • Spawn infntry and vehicles with selected crew
  • Units patrol their zones, call for reinforcements if they have loses or met more powerful force
  • CQB units that hold positions in houses and advance when hostiles come close enough
  • Caching of units placed far from players (270+ units per mission)
  • Easy to set up zone via user-friendly html interface (using any modern web browser)
  • Ability to create zone both via editor and during the mission via scripts
  • Ability to control spawned units (behavior, assign new waypoints)

Installation

  • Download latest master branch from repository
  • Extract files to your mission folder

dzn_dynai also includes dzn_commonFunctions (obligatory) and dzn_gear (not obligatory, but allows to easily gear up spawned units with custom gear).

Step 1: Editor objects

  • Place single GameLogic object and name it - dzn_dynai_core.
  • Add another GameLogic object with appropriate name (e.g. NATO_BasePatrol), use only english letters and avoid spaces and special symbols (except _).
  • Synchronize GameLogic with dzn_dynai_core object.
  • Place one or several triggers, that represent area where units will be spawned and what area they will patrol after.
  • Synchronize trigger(s) with GameLogic.
  • If you want to mark key points for zone (points that will be used to create waypoints for zone's groups) -- place several (2+) Location - Area objects (Location_Area_F). Keypoints may be placed outside the zone to make groups advance from their home zone to keypoints.
  • Synchronize Location Area(s) with zone's GameLogic.

Step 2: DynAI Helper

  • Go to dzn_dynai/Tools and open DynAI-Helper.html.html file with any browser (e.g. Google Chrome).
  • Populate all fields:

     Name - a name of GameLogic object (e.g. NATO_BasePatrol)
     Side  - side of the zone. Default Arma3 unit classnames of selected side will be used at Unit References section.
     Is Zone Active - if checked - activates zone on mission start.

     Speed Mode - speed of the units.
     Behavior - behavior settings for units.
     Combat Mode - combat settings for units (use Yellow or Red to make units faster in engaging).
     Formation - formation of groups.

     Group Templates - section that describe what groups will be spawned in zone:
              Count of groups - number of the groups of given type that will be spawned in zone.
              Edit Group - button to add infantry/vehicle to group template:
                       Class of unit - unit/vehicle classname, for unit - prepopulated if Side is chosen.
                       Kit for unit - name of dzn_gear kit that will be assigned to this unit.
                       Patrol/In building/In Vehicle - type of unit behavior. Patrol - unit will move on foot, In building - unit will hold position inside buildings, In Vehicle - unit will take specified role in vehicle.                     
  • Click Get SQF button and copy generated array to dzn_dynai\Zones.sqf file.
  • If there are several zones - do not forget to separate arrays with comma

Step 3: Setup of dzn_dynai settings

  • Open dzn_dynai\Settings.sqf file
  • dzn_dynai_allowGroupResponse - if true - groups can call and provide reinforcement to each other.
  • dzn_dynai_forceGroupResponse - if true - all editor-placed groups will call and provide reinforcements.
  • dzn_dynai_responseDistance - max. distance for groups to response to reinforcement call.
  • dzn_dynai_makeZoneAlertOnRequest - uf true - all zone's groups will be alerted if any reinforcement request will be sent.
  • dzn_dynai_complexSkill - if true - dzn_dynai_skill will use detailed skill values, if false - single number will be used to define units skill.
  • dzn_dynai_allowedHouses - list of allowed buildings for In building unit behaviour (units will be spawned in the buildings of listed types).
  • zn_dynai_restrictedBuildingClasses - list of restricted buildings for In building unit behaviour (units will not be spawned in the buildings of listed types).
  • dzn_dynai_enableCaching - if true - unit caching will be used.
  • dzn_dynai_cacheDistance - max. distance from players where units are not cahced, all units outside this distance will be cached
  • dzn_dynai_enableZeusCompatibility - if ture - add Dynai Zeus tool for GameMasters (invoke special menu via 'T' key in Zeus mode)

Step 4: Scripting

Wait until dzn_dynai become initialized by waitUntil { !isNil "dzn_dynai_initialized" && { dzn_dynai_initialized } }; expression.
After dzn_dynai is initialized - you can use functions like dzn_fnc_dynai_activateZone.

When using Behaviour functions (like dzn_fnc_dynai_moveGroups) wait until zone become activated and then additional 20-30 seconds before calling any Behaviour functions (we should wait until all groups became spawned and their waypoints added)

Clone this wiki locally