# Campaign Editor

Opens via File › Campaign Editor. The Campaign Editor opens as its own window rather than a modal dialog.

Links individual missions into a branching campaign. Each mission is a node in a graph; directed edges between nodes carry SEXP conditions that determine which mission the player flies next.

Use retail campaign file format - saves the campaign in the older retail-compatible format. Leave unchecked for new campaigns. Check campaign runs the error checker against the current campaign. Both controls are available on both tabs.

## Campaign Specs tab

### Identity

Field | Description
--- | ---
Name | Campaign name shown in the campaign selection screen.
Type | Single player, multiplayer co-op, or multiplayer team vs. team.
Description | Long-form campaign description shown in the selection screen.
Reset tech room | When checked, the player's tech room is cleared at the start of the campaign and only ships and weapons unlocked during play are available.
Custom data | Opens the Custom Data dialog for attaching arbitrary key-value pairs to the campaign file, used by scripting and mods.

### Starting ships and weapons

Check which ships and weapons are available to the player at the very start of the campaign, before any missions have been completed.

## Campaign Flow tab

### Mission list

Lists all `.fs2` mission files available to add to the campaign. Select a mission from the list then right-click in the graph view to add it as a node.

### Mission properties

Select a mission node in the graph to edit its properties:

Field | Description
--- | ---
Briefing cutscene | Video played before the briefing for this mission.
Debriefing persona | Index of the debriefing persona used after this mission.
Mainhall | Which main hall is shown between missions.
Substitute mainhall | Preferred main hall to use if present in the currently loaded mod, analogous to alt music.

### Branches

Shows all outgoing branches from the selected mission. Each branch has a SEXP condition; the first branch whose condition is true is the one taken. New branches are automatically given a `true` formula. Use the up/down arrows to reorder branch priority.

Branch type | Description
--- | ---
Branch to Mission | Proceeds to another mission in the campaign. The SEXP dot is black.
Branch to Campaign Loop | An optional loop the player can accept or skip. The SEXP dot is blue.
Repeat Mission | Loops back to the current mission, allowing the player to retry it. The SEXP dot is black.
End Campaign | Ends the campaign. The SEXP dot is black.

Selecting a loop branch reveals additional fields:

Field | Description
--- | ---
Loop description | Text shown on the loop accept/skip screen in-game.
Animation | Animation played on the loop screen.
Voice file | Narration audio for the loop screen.

### Graph view

Missions appear as boxes; drag connectors between them to create branches:

Connector | Creates
--- | ---
Blue → Green | A normal branch. The SEXP condition determines whether this path is taken.
Orange → Green | A loop branch. The player is given the option to accept or skip the loop before it executes.
Blue → End Campaign node | An end-of-campaign branch. The campaign ends when this branch is taken. The same SEXP priority rules apply.

The End Campaign node is created automatically. Right-click a node in the graph for additional options, including Add Repeat Mission, which creates a branch that loops back to the same mission, the standard way to let the player retry a mission after failure.