IFF & Teams

IFF stands for Identification Friend or Foe. Every ship in a mission belongs to a team, and every team has a defined relationship with every other team. Those relationships determine how ships behave toward one another: whether they attack, ignore, or treat each other as allies.

Team relationships

Team relationships are defined in iff_defs.tbl, not in the mission file. The common defaults are:

TeamTypical role
FriendlyPlayer's side. Ships the player can target for orders and that friendly AI protects.
HostileEnemy. Ships that actively attack Friendly ships.
NeutralNeither side. Not attacked unless attacked first.
UnknownUnidentified. Treated as neutral until scanned or otherwise identified.
TraitorFormerly friendly ships that have turned hostile. Attacked by all sides.

Mods can define additional teams and custom relationships between them. The teams available in your mission depend on what iff_defs.tbl provides for the loaded mod.

What team membership affects

Changing team at runtime

A ship's team can be changed during the mission using SEXPs. This is how defection scenarios work: reassigning a ship to the Traitor or Hostile team immediately causes former allies to engage it.

The Team field in the Ship Editor sets the team at mission start. Runtime changes are made through SEXPs and are not reflected back in the editor.