Difference between revisions of "Military AI Commander"
Line 12: | Line 12: | ||
|} | |} | ||
+ | ==How OPCOM Works== | ||
OPCOM prioritises a list of objectives and then plans and executes missions with available units. Op Commanders will react to the changing environment and attack, defend, withdraw or resupply depending on the current tactical situation. OPCOM continues to work with profiled groups, controlling a virtual battlefield out of visual range of players. | OPCOM prioritises a list of objectives and then plans and executes missions with available units. Op Commanders will react to the changing environment and attack, defend, withdraw or resupply depending on the current tactical situation. OPCOM continues to work with profiled groups, controlling a virtual battlefield out of visual range of players. | ||
Line 19: | Line 20: | ||
OPCOM is a Virtual AI Commander, as it controls only profiled groups. TACOM is a low level tactical commander that deals with Visual AI groups when players are nearby. This means it is possible to transfer the status of groups and objectives seamlessly between the Visual (spawned) Layer and the Virtual (unspawned or cached) Layer. This allows huge ongoing virtual battles, from offensive operations with blazing battlefronts to insurgency deployments with a high degree of realism and minimal impact on performance. | OPCOM is a Virtual AI Commander, as it controls only profiled groups. TACOM is a low level tactical commander that deals with Visual AI groups when players are nearby. This means it is possible to transfer the status of groups and objectives seamlessly between the Visual (spawned) Layer and the Virtual (unspawned or cached) Layer. This allows huge ongoing virtual battles, from offensive operations with blazing battlefronts to insurgency deployments with a high degree of realism and minimal impact on performance. | ||
− | + | ==Usage== | |
+ | |||
+ | Place an OPCOM module in the editor and select a faction from the dropdown. Custom factions can be entered in the “override default faction” box. Choose the Control Type in the drop down menu: | ||
+ | |||
*''Occupy'': units will be placed at objectives throughout the TAOR and will attempt to occupy and defend installations. | *''Occupy'': units will be placed at objectives throughout the TAOR and will attempt to occupy and defend installations. | ||
*''Invasion'': units will start in the vicinity of the Placement module(s) and will move to take objectives as ordered by a synchronised OPCOM. | *''Invasion'': units will start in the vicinity of the Placement module(s) and will move to take objectives as ordered by a synchronised OPCOM. | ||
+ | |||
By default, OPCOM will take command of all available virtual units (profiles) for its faction. To limit OPCOM to a set number of units, manually place some units in the editor and Synch (F5) them to the SYS PROFILES module with appropriate settings to ‘convert’ them to profiles. Make sure you select Objectives Only on the Placement Module to prevent it spawning any units! | By default, OPCOM will take command of all available virtual units (profiles) for its faction. To limit OPCOM to a set number of units, manually place some units in the editor and Synch (F5) them to the SYS PROFILES module with appropriate settings to ‘convert’ them to profiles. Make sure you select Objectives Only on the Placement Module to prevent it spawning any units! | ||
− | + | ==Editor Notes== | |
− | OPCOM activity can be | + | '''Halting OPCOM activity''' |
+ | |||
+ | OPCOM can be stopped and started by synching a trigger to the module. When all trigger states are TRUE, OPCOM will commence attacking the next unsecured objective. If the trigger state returns to False, OPCOM will complete any currently assigned objectives then stop. This can be used to stop OPCOM if no players are present. | ||
[[File:CustomObj.png|thumb|upright|Custom Objectives used to occupy a front line (Thanks to ''Oktyabr'' for this pic)]] | [[File:CustomObj.png|thumb|upright|Custom Objectives used to occupy a front line (Thanks to ''Oktyabr'' for this pic)]] | ||
− | |||
− | ''this setvariable ["size",150]; this setvariable ["priority", 500]; | + | '''Custom Objectives''' |
+ | |||
+ | Additional objectives can be placed using the [[Custom Objectives Placement]] module synced to OPCOM. Additionally, advanced editors can place a location gamelogic of any type on the map and sync it to the OPCOM module(s). Optionally put in init field of the gamelogic: | ||
+ | |||
+ | <syntaxhighlight lang="php"> | ||
+ | this setvariable ["size",150]; this setvariable ["priority", 500]; | ||
+ | </syntaxhighlight> | ||
*Size is in metres | *Size is in metres | ||
− | *Priority | + | *Priority can be any number greater than 1 (999 would be extremely high prio!) |
− | + | The following function can be used to add Objectives from a script | |
− | + | <syntaxhighlight lang="php"> | |
+ | [_OPCOM,"addObjective",[_id, _pos, _size]] call ALiVE_fnc_OPCOM | ||
+ | </syntaxhighlight> | ||
− | + | Cameroon has made a useful script that can be used to add and remove objectives for a chosen side: [https://dl.dropboxusercontent.com/u/8018430/cjb_alive_extensions.sqf|cjb_ALiVE_Extensions] | |
+ | |||
+ | |||
+ | ==Dev Notes== | ||
+ | |||
+ | Subject to change as OPCOM is balanced. | ||
"invasion": | "invasion": | ||
Line 56: | Line 75: | ||
− | Occupation builds a priority list using an algorithm for size, cluster priority, height over sea and distance from module. | + | Occupation builds a priority list using an algorithm for size, cluster priority, height over sea and distance from module. Invasion (for now) only uses distance to determine the next objective. |
− | + | ||
− | Invasion (for now) only uses distance to determine the next objective. | + |
Revision as of 04:14, 27 July 2014
Part of: | |||
---|---|---|---|
| |||
Requirements: | Synced | ||
|
How OPCOM Works
OPCOM prioritises a list of objectives and then plans and executes missions with available units. Op Commanders will react to the changing environment and attack, defend, withdraw or resupply depending on the current tactical situation. OPCOM continues to work with profiled groups, controlling a virtual battlefield out of visual range of players.
OPCOM consists of two core elements: Operational Command (OPCOM) and Tactical Command (TACOM). OPCOM takes the objectives of any synced Military or Civilian Placement modules and prioritises them depending on the user defined variables. It also regularly analyses the map, relative troop strengths and available assets required to capture and hold objectives in its area of operations. OPCOM gives missions to TACOM, which in turn executes the tactical level orders to units and reports back its state once that mission is complete.
OPCOM is a Virtual AI Commander, as it controls only profiled groups. TACOM is a low level tactical commander that deals with Visual AI groups when players are nearby. This means it is possible to transfer the status of groups and objectives seamlessly between the Visual (spawned) Layer and the Virtual (unspawned or cached) Layer. This allows huge ongoing virtual battles, from offensive operations with blazing battlefronts to insurgency deployments with a high degree of realism and minimal impact on performance.
Usage
Place an OPCOM module in the editor and select a faction from the dropdown. Custom factions can be entered in the “override default faction” box. Choose the Control Type in the drop down menu:
- Occupy: units will be placed at objectives throughout the TAOR and will attempt to occupy and defend installations.
- Invasion: units will start in the vicinity of the Placement module(s) and will move to take objectives as ordered by a synchronised OPCOM.
By default, OPCOM will take command of all available virtual units (profiles) for its faction. To limit OPCOM to a set number of units, manually place some units in the editor and Synch (F5) them to the SYS PROFILES module with appropriate settings to ‘convert’ them to profiles. Make sure you select Objectives Only on the Placement Module to prevent it spawning any units!
Editor Notes
Halting OPCOM activity
OPCOM can be stopped and started by synching a trigger to the module. When all trigger states are TRUE, OPCOM will commence attacking the next unsecured objective. If the trigger state returns to False, OPCOM will complete any currently assigned objectives then stop. This can be used to stop OPCOM if no players are present.
Custom Objectives
Additional objectives can be placed using the Custom Objectives Placement module synced to OPCOM. Additionally, advanced editors can place a location gamelogic of any type on the map and sync it to the OPCOM module(s). Optionally put in init field of the gamelogic:
this setvariable ["size",150]; this setvariable ["priority", 500];
- Size is in metres
- Priority can be any number greater than 1 (999 would be extremely high prio!)
The following function can be used to add Objectives from a script
[_OPCOM,"addObjective",[_id, _pos, _size]] call ALiVE_fnc_OPCOM
Cameroon has made a useful script that can be used to add and remove objectives for a chosen side: [1]
Dev Notes
Subject to change as OPCOM is balanced.
"invasion":
"sectionsamount_attack", 3 "sectionsamount_reserve", 1 "sectionsamount_defend", 2
"occupation":
"sectionsamount_attack", 4 "sectionsamount_reserve", 1 "sectionsamount_defend", 2
Occupation builds a priority list using an algorithm for size, cluster priority, height over sea and distance from module. Invasion (for now) only uses distance to determine the next objective.