Skip to content

editor.tbl

github-actions[bot] edited this page Nov 8, 2026 · 7 revisions

Revision information OFP Revision: #43 Set the revision to your PR when your PR changes what this page documents. Leave it alone for edits that only fix or improve the documentation.

OFP 26.3.0 This table exists only in OFP.

The editor.tbl configures the mission editors for a mod: editor settings, and the custom data fields the mod expects its missions, campaigns and ships to use (each field's name, type, default value and description).

Custom data is a set of named values attached to a mission, a campaign, or an individual ship. It has no built-in effect on gameplay; scripts and SEXPs read it. Ship custom data is the headline use: a ship can carry values like Bounty = 75, Role = escort or Veteran = true, set in qtFRED and changed during the mission by SEXPs and Lua. This table is optional: without it, custom data still works as free-form text.

This table is one of the Modular Tables and can be extended with xxx-edt.tbm.

Code: /mission/missionparse.cpp. See Tables for every table.

Editor only. FRED2 and qtFRED read this table; the game never does. At runtime every custom data value is plain text, and a key exists only if the mission or campaign saved it or a SEXP or script set it.

Contents

  1. Format
  2. #Settings
    1. $Disable Hard Coded Message Head Ani Files:
    2. $Add Message Head Ani Files:
    3. $Enable scripting in FRED:
    4. $Ignore Music Files In Music Player:
    5. $FRED spacemouse nonlinearities:
  3. Custom data sections
  4. Custom data fields
    1. $Key:
    2. +Type:
    3. +Default:
    4. +Description:
  5. #End
  6. What the editor does with custom data
  7. Loading rules
  8. Ship custom data in the mission file
  9. Sample
Field index (every field, one per line in table order; click one to jump to it)

#Settings

Custom data fields


Format

  • Up to four sections, each ending with #End: #Settings, then the custom data sections #MissionCustomData, #CampaignCustomData and #ShipCustomData.
  • By convention #Settings comes first. The editor accepts the sections in any order, and any of them can be left out, so a *-edt.tbm can hold just the one section it changes.
  • Each custom data section holds any number of entries, each beginning with $Key:.

#Settings

Editor settings. These are the same entries as the #FRED SETTINGS section of game_settings.tbl, which the editors still read (first), so mods that also target SCP keep working:

  • Single values (true/false and numbers): the last file read wins. editor.tbl overrides game_settings.tbl, and a later *-edt.tbm overrides editor.tbl.
  • Name lists (+Head:, +File:): every file adds to the list. A name already listed, in any table, is skipped (case and file extension are ignored).
  • The entries must appear in the order below; each one is optional.
  • $FRED Briefing window resolution: (FRED2 only) and $Skybox internal depth consistency: (a rendering setting) remain in game_settings.tbl only.

$Disable Hard Coded Message Head Ani Files:

OFP 26.3.0

  • Removes the built-in head animations from the head ani list in the Events editor's message properties, leaving only the mod's own heads.
  • Syntax: Boolean
  • Optional. Default: false.

$Add Message Head Ani Files:

OFP 26.3.0

  • Adds head animations to that list, one +Head: line each. The file extension is optional.
  • Syntax:
    • +Head: String, repeated
  • Optional.

$Enable scripting in FRED:

OFP 26.3.0

  • Runs the mod's scripts in the editors, for example so Lua SEXPs appear in the SEXP menus and On Game Init hooks can register custom data with mn.addDefaultCustomData().
  • Off by default because many mods' scripts aren't written to run in the editor.
  • Syntax: Boolean
  • Optional. Default: false.

$Ignore Music Files In Music Player:

OFP 26.3.0

  • Hides music files from the editor's Music Player, one +File: line each. The file extension is optional.
  • Syntax:
    • +File: String, repeated
  • Optional.

$FRED spacemouse nonlinearities:

OFP 26.3.0

  • Response curve of a 3D mouse (spacemouse) for the viewport camera, per axis: the input is raised to the exponent, then multiplied by the scale.
  • Axes, in this order: Sideways, Forwards, Upwards, Pitch, Bank, Heading. Each axis has an exponent and a scale field; any field can be left out, and only the fields given change.
  • Syntax:
    • +<Axis> exponent: Float
    • +<Axis> scale: Float
  • Optional.

Custom data sections

Section Applies to Edited in qtFRED from
#MissionCustomData the mission Mission Specs → Custom Data
#CampaignCustomData the campaign Campaign Editor → Custom Data
#ShipCustomData each individual ship Ship Editor → Custom Data

Custom data fields

$Key:

OFP 26.3.0

  • The field's name. Scripts and SEXPs refer to the value by it.
  • Keys can't contain spaces or tabs.
  • Keys are unique within a section, like $Name: in the object tables. Repeating a key that already exists (typically in a *-edt.tbm) modifies that entry: any field left out, including +Type:, keeps its current value. Repeating a key within the same file gives a warning.
  • Syntax: String
  • Required.

+Type:

OFP 26.3.0

  • string, int or bool. Controls how the editor lets you enter the value: plain text, whole numbers only, or a true/false dropdown.
  • An unknown type gives a warning and is treated as string.
  • Syntax: String
  • Required for a new key; optional when modifying an existing one.

+Default:

OFP 26.3.0

  • The value a new mission, campaign or ship starts with, and the value the dialog's Reset to Default button restores.
  • If omitted: empty for string, 0 for int, false for bool.
  • A default that doesn't match the type (e.g. many for an int) gives a warning and falls back to 0 or false. bool defaults are stored as lowercase true / false.
  • Syntax: String
  • Optional.

+Description:

OFP 26.3.0

  • Help text shown in the Custom Data dialog when the key is selected.
  • One line. XSTR is supported.
  • Syntax: String
  • Optional.

#End

Closes each section, including #Settings.

What the editor does with custom data

  • Defaults: a new mission gets every #MissionCustomData key, a new campaign (and one opened without them) gets the missing #CampaignCustomData keys, and a newly placed ship gets every #ShipCustomData key, each at its default. Missions and ships loaded from a file keep exactly the keys that were saved.
  • The Custom Data dialog uses the table for its value control (text, number-only, or true/false), key completion, the description box and Reset to Default.
  • Free-form keys: any key can still be added. A key that isn't in this table shows its type as free-form: it has no type, default or description. The mission and campaign files only store a key and its value, never its type, so define a key here if it needs type checking.
  • SEXP editor: the key argument of the ship custom data SEXPs offers the #ShipCustomData keys (plus keys already used on ships in the mission) as a dropdown, while still accepting any typed key.
  • Scripts can also register mission keys with mn.addDefaultCustomData() in an On Game Init hook; those are added alongside the table's.

Loading rules

  • The editor loads editor.tbl and then every *-edt.tbm, once at startup: after game_settings.tbl, and before scripts run (which is why $Enable scripting in FRED: works here).
  • Entries from modular tables are added to those from editor.tbl; a key that already exists is modified instead (see $Key:).

Ship custom data in the mission file

qtFRED writes a ship's custom data as a block on the ship entry (not in retail-format saves):

$begin_custom_data
	+Val: Bounty 75
	+Val: Role patrol
$end_custom_data

Each +Val: line is the key, a space, then the value (the rest of the line).

Sample

#Settings

$Disable Hard Coded Message Head Ani Files: false
$Add Message Head Ani Files:
	+Head: Head-Kilo1
	+Head: Head-Kilo2
$Enable scripting in FRED: true
$Ignore Music Files In Music Player:
	+File: Credits_Theme
$FRED spacemouse nonlinearities:
	+Pitch exponent: 2.0
	+Pitch scale: 0.75

#End

#MissionCustomData

$Key:         Theater
+Type:        string
+Default:     Aquitaine
+Description: Operational theater shown in the briefing.

$Key:         HardMode
+Type:        bool
+Default:     false

#End

#CampaignCustomData

$Key:         Act
+Type:        int
+Default:     1
+Description: Current campaign act.

#End

#ShipCustomData

$Key:         Bounty
+Type:        int
+Default:     50
+Description: Credits paid for the kill.

$Key:         Role
+Type:        string
+Default:     escort

$Key:         Veteran
+Type:        bool
+Default:     false

#End

Clone this wiki locally