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 are defined in iff_defs.tbl, not in the mission
file. The common defaults are:
| Team | Typical role |
|---|---|
| Friendly | Player's side. Ships the player can target for orders and that friendly AI protects. |
| Hostile | Enemy. Ships that actively attack Friendly ships. |
| Neutral | Neither side. Not attacked unless attacked first. |
| Unknown | Unidentified. Treated as neutral until scanned or otherwise identified. |
| Traitor | Formerly 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.
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.