[AI] Efficient Pursuit

If you liked this item, please rate it up on Steam Workshop page.

Author: LegendWood

Last revision: 18 Jan, 2024 at 09:19 UTC

File size: 26.62 KB

On Steam Workshop

Description:

Video 1: EP mod in singleplayer. Video 2: EP mod + EIS mod in singleplayer.

General

Provide an interface for converting any specified groups into groups who will pursue nearby targets automatically. We name such group as Pursuer Group. Multiplayer compatible.

Function

A pursuer group will automatically carry out pursuit operation when detecting enemies in the pursuit range, and automatically exit after area clear.

Pursuit Operation Explained
  • A pursuer group will undertake pursuit operation on detected enemies on one of these conditions: 1. The group has no waypoint or has finished all waypoints. 2. The type of current waypoint is “MOVE” or “Search and Destroy” or "LOITER".
  • When there is enemy detected in pursuit range and any pursuit condition is met, the pursuer group will pick the most important or dangerous target and start moving towards the anticipated position of that target. During the pursuit operation, the group will reevaluate situation and check if the pursued target is dead or if there’s any more important or more dangerous target. If so, the group will update pursuit target and start moving towards that new target.
  • The pursuer group will exit pursuit operation only after there’s no detected enemy in the pursuit range (they will search the area around the anticipated enemy position to make sure), and then come back to previous waypoint if there’s one or stay idle.
  • Undertaking a pursuit operation will NOT change the combat behavior, stance, combat mode, speed mode of the pursuer group. The combatBehavior of the group will be set to “SAFE” after exiting the operation, though.
  • During a pursuit operation, a group can only reevaluate the situation after a period of time, to ensure game performance. This interval can be changed in Addon Setting, in which the maximum pursuit range can be changed too.

How to Use
  • For non-mission editor, we provide an option to automatically register all EXISTING groups on mission start as pursuer groups. Check out the video for details. However, this is not recommended because the game may suffer low performance. Furthermore, some events may be delayed or even canceled (For example, a squad enters pursuit mode when they are supposed to retreat and ends up with getting killed).
  • For mission-editor, we provide a function to register an array of groups as pursuer groups, ep_EpApp. For example, say we want enable a few groups to be able to pursue enemies, suppose the group variables of these groups are
    grp_1, grp_2, grp_3, grp_4

    . We can simply execute

    [grp_1, grp_2, grp_3, grp_4] spawn ep_EpApp;

    at anytime during a mission. And it’s done. The array can contain only one group, of course.

Some Notes
  • However, a registered pursuer group cannot be prevented from carrying out pursuit operations, as of now. Already fixed. Check out change notes of version 1.0.5 for details.
  • A player-leading group won’t be registered as a pursuer group even though it’s is included in the parameter when spawning the ep_EpApp function. Since version 1.3.0, player-leading groups can be registered as pursuer groups. However, the player-leading group will not be assigned any pursuit operation until AI takes command of the group.
  • If a player takes command of a pursuer group (AI leader dies or team switch), the pursuer group will NOT be assigned any or update current pursuit operation. Existing pursuit operation will also be cancelled (by adding a new waypoint at leader position and instantly switching to this waypoint).

Important Change Notes
  • Since version 1.3.2, AI group will not pursue if they possess non-combat vehicles or there’re passengers from other squads in the cargo space of their vehicles. Ammo trucks and ambulances no longer chase enemies.🤣
  • Since version 1.3.2, a new parameter Repeat Interval for AutoStart mode is provided in addon settings. This parameter defines the interval between each execution of checking and registering any new groups on the map as EP enabled. 0 value will disable registering new groups created by Zeus or script after mission start. Again here I have to point out that the AutoStart mode is not recommended and it’s not the intended way to use this mod.

Blacklist and Whitelist System

Please refer to change notes of version 1.1.1.

Multiplayer Support

Compatible on both player-hosted and dedicated servers.
All decisions are made on server side.
All clients must follow addon settings on the server unless the client logs in as a server admin.

Known Bugs & Issues
  • Since this mod will create a new waypoint for pursuer groups after they spot hostiles, expect conflict with any mod that fiddle with AI behaviors.

Future Plan
  • Multiplayer support. Added since version 1.3.0.
  • Pursuer-Blacklist to discontinue pursuer groups. Pursuit-Whitelist to emulate enemy having anti-tracking capability. Finished. Check out change notes of version 1.1.0 for details.
Download
Required items:

Click the title to search on this site.


CBA_A3Steam Workshop