Skip to content

Group

Changed in 0.3.0

The recruitment group a team draws its members from, taken from the TaskForce when the TeamType leaves its own unset.

Team recruitment group

Specification — Team recruitment group
Applies to
TeamType
File
ai.ini or map file
Section
[<ObjectType ID>]
Value
integer
When omitted
-1A TeamType left at -1 takes the group of its TaskForce, which is itself -1 unless that section sets one.

A team recruits only objects in its group. Each object that joins is put in the team’s group, so the next team to look for members finds it there.

Two settings widen the search:

  • Group=-2 lets the team consider every object, but any object not already in group -2 counts as 50 cells farther away than it is. Its members are put in group -2 when they join.
  • Recruiter=yes also lets the team consider every object, but it still prefers objects in its group. Any other candidate counts as 50 cells farther away than it is.

An object’s group starts at -1. Besides joining a team, two things can put it in another group: a map’s placed-object record and the Set Group ID trigger action. Unless it is Recruiter=yes, a TeamType that leaves both its own and its TaskForce’s Group unset therefore recruits only objects still in group -1. A vehicle that deploys into a structure, and a structure that undeploys into a vehicle, keep their group.

The group is the same number that Set Group ID assigns and that Wakeup group matches. Joining a team therefore replaces a group a trigger gave the object.

The player’s control groups are kept apart from the group. Assigning an object to a control group with the hotkeys does not change its group, so a team of the player’s house can still recruit it. Nothing that sets the group changes the control group either: an object a team recruits stays in its control group. A deploy or undeploy keeps the control group too.

TaskForce recruitment group

Specification — TaskForce recruitment group
Applies to
TaskForce
File
ai.ini or map file
Section
[<ObjectType ID>]
Value
integer
When omitted
-1

A TeamType that uses this TaskForce and leaves its own Group at -1 uses this value in its place, both as its recruitment group and as the group it gives its members. A TeamType that sets its own Group to any other value, including the wildcard -2, ignores this one.

History

  1. Changed0.3.0In development

    Keep the player's control groups apart from scenario groups — teamtype