sopwith-mission(5) | File Formats Manual | sopwith-mission(5) |
.sop - Sopwith mission format
The Sopwith mission format allows sopwith(6) to load custom user-defined levels and other modifications to the game. The files use Yocton as their basic format:
https://github.com/fragglet/yocton
Each .sop file can contain three different sections:
The level section allows a complete new level to be defined. At present only a single level can be defined, although this may change in the future. Each level contains two types of subsection: ground, which defines the level's terrain, and multiple object sections, each of which defines an in-game object.
The ground subsection is a list of decimal integer values that describe the level's terrain. Each value is defined through a Yocton property named _. Values should be in the range 16-199, and there should be a minimum of 320 (ie. one screen's worth). The following is an example:
ground { _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 ... }
Each object subsection defines an object that appears in the level. The following is an example:
object { type: PLANE x: 30 orient: 0 territory_l: 0 territory_r: 0 faction: PLAYER1 }
As seen, each object has a number of different properties:
The following is an example of a minimal level section that just contains a flat ground with no objects other than the player's plane:
level { object { type: PLANE x: 30 orient: 0 territory_l: 0 territory_r: 0 faction: PLAYER1 } ground { _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 _: 64 } }
The following object types can appear in a level:
Military objects belong to a "faction"; objects allied to a different faction are considered enemies. The color of the object indicates the faction:
The following values are also recognized; they are currently (effectively) unused, but may be used in the future if the multiplayer feature is extended to support more than two players.
The symbols section allows the game's graphics to be replaced. The section can contain a number of subsections, one for each type of graphic. Graphics are defined as multiline text strings. The following is an example of a symbols section that changes the hangar graphic to add an extra (white) flag:
symbols { swtrgsym { 0: " - - \n" & " - # # # # - * * * * \n" & " - # # # # - * * * * \n" & " - - \n" & " - - \n" & " - - \n" & " - - \n" & "* * * * * * * * * * * * * * * * \n" & "* * * * * * * * * * * * * * * * \n" & "* * - - - - - - - - - - - - * * \n" & "* * - * * * * * * * * * * - * * \n" & "* * - * * * * * * * * * * - * * \n" & "* * - * * * * * * * * * * - * * \n" & "* * - * * * * * * * * * * - * * \n" & "* * - * * * * * * * * * * - * * \n" & "* * - * * * * * * * * * * - * * \n" } }
Graphics are limited to the original four CGA colors: black (space); cyan (asterisk); magenta (hyphen) and white (number sign / pound / octothorpe). Cyan and magenta are swapped for enemy planes (single player) and player 2 (multiplayer).
The following graphics are defined:
The sounds section allows the in-game music to be replaced. There is only one property at present, named title_tune; its value is a string containing a sequence of notes to play. The following is an example of a sounds section that replaces the title music with the beginning of "Au Clair de la Lune":
sounds { title_tune: "g4/r8/g4/r8/g4/r8/a4/r8/b2/r4/a2/r2/" & "g4/r8/b4/r8/a4/r8/a4/r8/g2/r2/" }
As seen, the format consists of a number of musical notes (a-g) separated by '/' characters. The notes are in the C major scale. Each note is followed by a number that indicates the length of the note as a fraction of a whole note; for example, 2 means half-note, 4 means quarter-note, etc. The following additional syntax is also supported:
The original DOS version of Sopwith interpreted notes as being in the A minor scale, but this is believed to have been a mistake and notes are now assumed to be in the more common C major scale. This does, however, mean that tunes from DOS .exe hacks will play differently; any A or B notes will need to be shifted down one octave to convert to the C major scale.
sopwith(6),
This manual page was written by Simon Howard.
The original DOS version of Sopwith only supported a single level, although later versions increased the difficulty by repeatedly playing the same level again at increasing speeds. Some modifications were made by fans by hex-editing the DOS .exe file.
Some simple hacks just changed the name shown on the title screen (one changed it to "Red Baron", for example). Some more elaborate mods that changed the level itself included "Blokwit" and "Sokwith". Andrew Jenner even developed a basic level editor that allowed people to make their own maps, although the changes that can be made using this technique are inherently limited.
Full support for custom maps did not appear until 2024, with SDL Sopwith's v2.4 release. There will likely be further future extensions to this format to allow people to share more elaborate modifications to the game.