Hcoll AI Pods and spawning

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

Author: [THC] Cunamo

Last revision: 24 Mar, 2025 at 17:57 UTC

File size: 136.76 KB

On Steam Workshop

Description:
Hermit Collective AI pods and spawning

This mod aims to make it easier to set up AI spawns for during a mission and allows for enabling/disabling groups of AI based on a trigger. It offers the following features:

– sync units to a "spawn group" module to create a spawn group
– spawn a group or groups via a trigger
– spawn based on a "spawn group" or a given array
– setup waypoints to be given to a spawned group
– make ai units enable and disable via triggers

Setup

The setup can become a little complicated as "spawn groups" and waypoints can be used by several spawn points, and spawn points can spawn several different "spawn groups". I will first give a breakdown of the different modules and then some example setups.

Spawn Group
This module is for creating a "spawn group" that can be linked to spawn points. Simply place the module and sync units to it. At the start of the mission the synced units will be mapped for future spawning and then deleted. The module can be synced to 1 or multiple "AI spawn" modules. Note that all units synced to the same "Spawn group" module will be spawned together as one squad.

Waypoint
A waypoint module defines a waypoint that is to be added to a group spawned from a synced "AI spawn" module. Waypoints are to be linked together in a chain, one after the other in the order that the groups should follow them. Only the start or end of a chain can be linked to an "AI spawn" module, but multiple "AI spawn" modules can be linked. The following parameters can be set:
– Type (move, cycle, get in, etc)
– Type override (for typing in mod waypoints, overrides the type dropdown above it)
– Completion radius
– Formation
– Speed
– Behaviour
– Code (to run on waypoint completion)

AI Spawn
This module spawns one or multiple groups when the synced trigger is activated. Each "Spawn group" module linked to this module will create its own squad containing the units that were synced to that specific "Spawn group" module. Units are spawned on the module’s position. Once spawned, all groups will be given waypoints as set in the chain of waypoint modules. The following parameters can be set:
– Side
– Group Override (takes an array of class names of the units to spawn and makes the module ignore any synced "Spawn group" modules)
– Direction Azimuth (360 degrees, 0 = facing north)
– Include vehicle crew (vehicles are always spawned with a default crew but the module can delete them)
– Mount nearest vehicle (will add a waypoint to first mount the nearest vehicle, like one that is spawned with them)

AI Pod
This module is separate from the others and allows you to, enable and show / disable and hide, units synced to the module based on trigger activation and deactivation. It is effectively dynamic sim but it also makes the units invisible and is controlled via the synced trigger. The following parameters can be set:
– Enable Only (only enable synced objects when on a repeatable trigger, not disable them on trigger deactivation)
– Start disabled (should it disable the synced units at mission start)

AiPod Inverted
This module works in opposite to the AiPod, disabling on trigger activation and (optionally) enabling on trigger deactivation. The following parameters can be set:
– Disable Only (only disable synced objects when on a repeatable trigger, not enable them on trigger deactivation)

Example

4 infantry units are synced to a "Spawn group" module, that module is synced to an "AI Spawn" module. The "AI Spawn" module is then synced to a trigger to control its activation, and synced to the first and only the first of the waypoint modules. Each waypoint module is then synced to the next one in line. DO NOT CREATE A SYNC LOOP, if you want a loop, make your last waypoint a "Cycle" waypoint and place it near the waypoint you want to cycle back to, but do not sync it.