Difference between revisions of "FreeSpace 2 Mission File Format"

From FreeSpace Wiki
Jump to: navigation, search
(Added Fiction Viewer section)
(#Sexp_variables)
Line 82: Line 82:
 
===#Sexp_variables===
 
===#Sexp_variables===
  
$Variables: ??
+
$Variables:  
 
----
 
----
 +
 
===#Plot Info===
 
===#Plot Info===
  

Revision as of 21:07, 24 September 2009

FS2 files are simple text files defining how FS2 will 'execute' a given mission. It refers to external files for the actual assets used in the mission, including Model files and Tables.

General Format

File section headers start with the "#" character. Each file section should be separated by a blank line.

Statements start with either the "$" or "+" characters, and may last for multiple lines. Comments are indicated by ";!", and continue to the end of the line.

STRING refers to a String data. The game parses these from the ":" at the end of the flag it belongs to until the next flag begins.

XSTR is a single XSTR entry, formatted like this: XSTR("Text data", -1) . The "-1" refers to the entry in tstrings.tbl that contains the translated version.

INT is a single integer.

FLOAT is a floating point number, usually used with 6 digits after the decimal point

Sections

#Mission Info

Fields:

$Version: STRING

  • contains the version number for this mission

$Name: XSTR

  • contains the name of this mission. Uses tstrings.tbl for translation.

$Author: STRING

  • The author's name

$Created: STRING

  • The time and date that this mission was created on. Format is "MM/DD/YY at HH:MI:SS", where MM = Month, DD = Day, YY = Year, HH = Hours (24 hour format), MI = minutes and SS = seconds.

$Notes: STRING

  • Contains any notes the mission designer wishes to add.

$End Notes: ??

$Mission Desc: XSTR

  • Contains a short description of this mission. Uses tstrings.tbl for translation.

$end_multi_text

+Game Type Flags: INT

+Flags: INT +NebAwacs: FLOAT

+Storm: STRING +Red Alert: INT +Scramble: INT

+Disallow Support: 0 or 1

  • Whether or not support ships are available on this mission

+Hull Repair Ceiling: FLOAT

+Subsystem Repair Ceiling: FLOAT

+Player Entry Delay: FLOAT

+Viewer pos: FLOAT, FLOAT, FLOAT

  • FRED camera position

+Viewer orient:

       FLOAT, FLOAT, FLOAT, 
       FLOAT, FLOAT, FLOAT, 
       FLOAT, FLOAT, FLOAT
  • Orientation Matrix for FRED camera

+SquadReassignName: STRING

+SquadReassignLogo: STRING

  • Squadron the player is reassigned to

$Skybox Model: STRING

  • Which skybox model to use

$AI Profile: STRING

  • Which AI profile is used

#Fiction Viewer

$File: STRING

  • Name of the text file that will be displayed in the fiction viewer. The file needs to be in data/fiction, and interface art for the fiction viewer must be present.

#Sexp_variables

$Variables:


#Plot Info

$Tour: XSTR

$Pre-Briefing Cutscene: STRING

$Pre-Mission Cutscene: STRING

$Next Mission Success: STRING

$Next Mission Partial: STRING

$Next Mission Failure: STRING


#Command Briefing

  • Defines the Command Briefing section of the briefing. If no command briefing is required, leave this blank.

Stages are defined like this:

$Stage Text: XSTR

  • The text to be displayed in this stage

$end_multi_text

$Ani Filename: STRING

  • The ani that will be played while the above text is displayed

+Wave Filename: STRING

  • The filename of the voiceover

#Briefing

  • Defines the Mission Briefing. Leaving this blank will cause 'no briefing' to be shown instead of a mission briefing.

#Players

  • Defines the players for the mission. At least one player must be defined.

#Objects

  • Defines all the objects in the mission and their initial state.
  • This includes all ships (including the player ships), installations and other objects.
  • Does not include asteroid (debris) fields.

#Wings

  • Defines all wings in the mission, friendly and hostile

#Events

  • The SEXPs that make up the Events List.

$Formula:

$Formula: ( SEXP_TEXT 
   FIRST_OPERAND
   SECOND_OPERAND
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Chained: 30 ;! Indicates that Event is chained to the previous Event and the chain time in seconds.
+Team: 0

#Goals

  • The mission directives

#Waypoints


#Messages


#Reinforcements


#Background bitmaps


#Asteroid Fields


#Music


#End

  • The end of the file.