ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Group: Difference between revisions

From ModEnc
Jump to navigation Jump to search
E1 Elite (talk | contribs)
mNo edit summary
Crimsonum (talk | contribs)
Added a note on player-assigned groups (teams)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Flag
{{Flag
|name={{PAGENAME}}
|name={{PAGENAME}}
|files={{Categ|Rules(md).ini}}
|files={{Categ|ini=ai}}, {{Categ|maps}}
|values={{Values|Integer}}
|values={{Values|Integer}}
|default=−1
|default=−1
Line 13: Line 13:


== For TeamTypes ==
== For TeamTypes ==
Specifies the group ID this team type applies to. All units recruited for this team will switch over to this group. Defaults to -1 (no group). If the value is -1, the attached task force's {{f|Group}} is used. A value of -2 means "any group" and effectively disables the group check.
Specifies the group ID this [[TeamTypes|team type]] applies to. All units recruited for this team will switch over to this group. Defaults to {{tt|-1}} (no group). If the value is {{tt|-1}}, the attached task force's {{f|Group}} is used. A value of {{tt|-2}} means "any group" and effectively disables the group check.


By default teams only recruit units from the same group. This restriction can be lifted using {{f|Recruiter|link}}.
By default teams only recruit units from the same group. This restriction can be lifted using {{f|Recruiter|link}}.


Note that if units are recruited using a {{f|Group|-2}} team type, the units are assigned to group -2. Group -2 on team types matches any unit's group, but a group ID of -2 on a unit does not match any team type; it only matches {{f|Group|-2}} team types.
Note that if units are recruited using a {{f|Group|-2}} team type, the units are assigned to group {{tt|-2}}. Group {{tt|-2}} on team types matches any unit's group, but a group ID of {{tt|-2}} on a unit does not match any team type; it only matches {{f|Group|-2}} team types.


== For TaskForces ==
== For TaskForces ==
Specifies the group ID this task force applies to. Only used in case the team type using this task force has {{f|Group|-1}} set.
Specifies the group ID this [[TaskForces|task force]] applies to. Only used in case the team type using this task force has {{f|Group|-1}} set.


== Groups ==
== Notes ==
Groups help to differentiate between units when managing teams. AI built units are assigned to the group defined in its TeamType/TaskForce. AI auto-produced units like harvesters which doesn't have a TeamType/TaskForce in AI ini are assigned with group -1(no group). Starting units, freeunits, droppod/paradrop units, units from crates, escaping units from destroyed buildings etc. also get group -1. Units preplaced on the map can be assigned to a group, and when creating a team that is allowed to recruit, it will take this unit group into account. Map action 84 can wake up objects with a certain group ID (setting it from sleeping or harmless to guard).
*Groups help to differentiate between units when managing teams. AI built units are assigned to the group defined in its TeamType/TaskForce. AI auto-produced units like harvesters which don't have a TeamType/TaskForce in {{ai}} are assigned with group {{tt|-1}} (no group). Starting units, [[FreeUnit|free units]], droppod/paradrop units, units from crates, escaping units from destroyed buildings etc. also get group {{tt|-1}}. Units preplaced on the map can be assigned to a group, and when creating a team that is allowed to recruit, it will take this unit group into account. [[Actions_(maps)|Map action]] {{tt|84}} can wake up objects with a certain group ID (setting it from {{tt|sleeping}} or {{tt|harmless}} to {{tt|guard}}).
*Players can assign units into nine different teams, 1–9 (not to be confused with [[TeamTypes|team types]]). These teams correspond to groups 0–8, respectively.
**Note that this can disrupt recruiting: When using [[triggers]] to recruit player-owned units into a team type, if the player assigns the units into a team that does not match the recruiting team type's group ID, the recruitment will fail. This can be avoided with the use of {{f|Recruiter|link}} or {{f|Group|-2}}.

Latest revision as of 20:39, 1 January 2024

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: Group
File(s): ai(md).ini, maps
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: −1
Applicable to: TeamTypes, TaskForces


For TeamTypes

Specifies the group ID this team type applies to. All units recruited for this team will switch over to this group. Defaults to -1 (no group). If the value is -1, the attached task force's Group is used. A value of -2 means "any group" and effectively disables the group check.

By default teams only recruit units from the same group. This restriction can be lifted using Recruiter.

Note that if units are recruited using a Group=-2 team type, the units are assigned to group -2. Group -2 on team types matches any unit's group, but a group ID of -2 on a unit does not match any team type; it only matches Group=-2 team types.

For TaskForces

Specifies the group ID this task force applies to. Only used in case the team type using this task force has Group=-1 set.

Notes

  • Groups help to differentiate between units when managing teams. AI built units are assigned to the group defined in its TeamType/TaskForce. AI auto-produced units like harvesters which don't have a TeamType/TaskForce in Ai(md).ini are assigned with group -1 (no group). Starting units, free units, droppod/paradrop units, units from crates, escaping units from destroyed buildings etc. also get group -1. Units preplaced on the map can be assigned to a group, and when creating a team that is allowed to recruit, it will take this unit group into account. Map action 84 can wake up objects with a certain group ID (setting it from sleeping or harmless to guard).
  • Players can assign units into nine different teams, 1–9 (not to be confused with team types). These teams correspond to groups 0–8, respectively.
    • Note that this can disrupt recruiting: When using triggers to recruit player-owned units into a team type, if the player assigns the units into a team that does not match the recruiting team type's group ID, the recruitment will fail. This can be avoided with the use of Recruiter or Group=-2.