Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
sopwith-mission(5)	      File Formats Manual	    sopwith-mission(5)

NAME
	.sop - Sopwith mission format

DESCRIPTION
       The  Sopwith  mission  format allows sopwith(6) to load custom user-de-
       fined 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:

       level  This  section  contains level data. If present, the game's level
	      is replaced with an entirely new level defined within this  sec-
	      tion. See	LEVEL SECTION below.

       symbols
	      This section allows the game's symbols (sprites) to be replaced.
	      This  allows  graphical  modifications  to the game. See SYMBOLS
	      SECTION below.

       sounds This section allows the game's music to be replaced. See	SOUNDS
	      SECTION below.

LEVEL SECTION
       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 fu-
       ture.   Each  level contains two	types of subsection: ground, which de-
       fines 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:

       type   See OBJECT TYPES below.

       x      The X coordinate within the level	where the object appears.  The
	      Y	 coordinate  is	set automatically depending on the object type
	      and can not be specified.

       orient For planes, defines  the	direction  in  which  planes  face:  0
	      (right) or 1 (left).  For	ground targets,	this controls the type
	      of ground	target;	see TARGET TYPES below.

       faction
	      Specifies	 the faction to	which the object belongs. See FACTIONS
	      below.

       transform
	      For ground targets, this specifies a "transformation"  to	 apply
	      to the symbol.  Eight different transformations are supported: 0
	      (no  transformation);  1 (rotate 90 degrees counterclockwise); 2
	      (rotate upside-down); 3 (rotate 90 degrees clockwise);  4	 (flip
	      vertically);  5  (mirror,	 then  rotate 90 degrees counterclock-
	      wise); 6 (mirror); 7 (mirror and then rotate 90  degrees	clock-
	      wise).   If  you	want  to see an	Ox do a	headstand, this	is the
	      property to use, although	it's more likely you'll	want to	use it
	      to make tanks face the right direction.

       territory_l
	      For planes, the left boundary of the  range  of  the  level  the
	      plane defends.

       territory_r
	      For  planes,  the	 right	boundary of the	range of the level the
	      plane defends.

       The following is	an example of a	minimal	level section that  just  con-
       tains 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
	   }
	 }

OBJECT TYPES
       The following object types can appear in	a level:

       PLANE  Defines  either  a player	or computer-controlled plane. The fac-
	      tion property controls whether it	is a human player or computer-
	      controlled  player;  see	FACTIONS  below.   Computer-controlled
	      planes  will defend their	"territory", the range of which	is de-
	      fined by the territory_l	and  territory_r  properties.  If  the
	      player enters this territory, they will take off from their base
	      and attack.

       TARGET A	 ground	 target.  The value of the orient property defines the
	      type of target, see TARGET TYPES below. The value	of the faction
	      property specifies the faction to	which the target belongs. When
	      one player destroys all targets owned by all enemy factions, the
	      game advances to the next	level.

       BALLOON
	      Observation balloon. The value of	the  orient  property  defines
	      the  type	 of  balloon; 0	= spherical balloon, 1 = Caquot-style.
	      The value	of the faction property	specifies the faction to which
	      the balloon belongs.

       OX     An Ox (type of cattle). The Ox does nothing except act as	an ob-
	      stacle, and does not need	to be killed to	advance	 to  the  next
	      level. Does not appear in	novice mode.

       BIRD   A	single bird flies the randomly around the level. The bird acts
	      as an obstacle that the player(s)	must avoid. Does not appear in
	      novice mode.

       FLOCK  A	 flock	of  birds moves	along the top of the screen. The flock
	      acts an obstacle and may disperse	into many different  birds  if
	      disturbed. Does not appear in novice mode.

FACTIONS
       Military	 objects  belong to a "faction"; objects allied	to a different
       faction are considered enemies. The color of the	object	indicates  the
       faction:

       PLAYER1
	      For planes, cyan fuselage	and magenta wings. This	corresponds to
	      the  human  player in single player mode,	and player 1 in	multi-
	      player mode.

       PLAYER2
	      For planes, magenta fuselage and cyan wings. This	corresponds to
	      the computer opponent in single player mode,  and	 player	 2  in
	      multiplayer mode.

       NONE   Used for animals / non-military targets.

       The  following  values  are also	recognized; they are currently (effec-
       tively) unused, but may be used in the future if	the  multiplayer  fea-
       ture is extended	to support more	than two players.

       PLAYER3
	      Maps to PLAYER2 in single	player mode, or	PLAYER1	in multiplayer
	      mode.  Planes  of	 this  faction are currently ignored in	multi-
	      player mode.

       PLAYER4
	      Maps to PLAYER2. Planes of this faction are currently ignored in
	      multiplayer mode.

       PLAYER5,	PLAYER7
	      Maps to PLAYER1, but planes with this faction are	currently  ig-
	      nored.

       PLAYER6,	PLAYER8
	      Maps  to PLAYER2,	but planes with	this faction are currently ig-
	      nored.

SYMBOLS	SECTION
       The symbols section allows the game's graphics to be replaced. The sec-
       tion can	contain	a number of subsections, one for each type of graphic.
       Graphics	are defined as multiline text strings. The following is	an ex-
       ample 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	/  oc-
       tothorpe).   Cyan  and  magenta	are  swapped  for enemy	planes (single
       player) and player 2 (multiplayer).

       The following graphics are defined:

       swplnsym	(16x16)
	      Plane. There are four frames, for	facing right (0), rotated 22.5
	      degrees counterclockwise (1), 45 degrees (2)  and	 67.5  degrees
	      (3).

       swhitsym	(16x16)
	      Crashing plane. There are	two frames of animation.

       swwinsym	(16x16)
	      Plane flying into	the distance after completing the level. There
	      are four frames of animation.

       swtrgsym	(16x16)
	      Ground  target.  Each  frame  is a different target type and the
	      values are those from TARGET TYPES below.

       swhtrsym	(16x16)
	      Destroyed	ground target. Each frame a different target type; the
	      values are those from TARGET TYPES below.	The number  of	pixels
	      in  the symbol control the size of the explosion when the	target
	      is destroyed.

       swballoonsym (16x16)
	      Observation balloon. Each	type of	balloon	 has  three  animation
	      frames:  drifting	 left, centered, and drifting right. Spherical
	      balloon starts at	frame 0	and  Caquot-style  balloon  begins  at
	      frame 3.

       swoxsym (16x16)
	      Ox. There	is one frame.

       swflksym	(16x16)
	      Bird  flock. There are two frames, for the "flapping wings" ani-
	      mation.

       swbrdsym	(4x2)
	      Bird. There are two frames, for the "flapping wings" animation.

       swbmbsym	(8x8)
	      Falling bomb. There are two frames, for facing right (0) and ro-
	      tated 45 degrees counterclockwise	(1).

       swmscsym	(8x8)
	      Missile. There are four frames, for facing  right	 (0),  rotated
	      22.5  degrees  counterclockwise (1), 45 degrees (2) and 67.5 de-
	      grees (3).

       swbstsym	(8x8)
	      Starburst	(flare). There are two frames of animation.

       swexpsym	(8x8)
	      Debris after an explosion. There are eight frames	for  different
	      types of debris.

       swmedalsym (8x12)
	      Medals. There are	three frames for each different	type.

       swribbonsym (8x2)
	      Ribbons. There are six frames for	each different type.

       swshtsym	(16x16)
	      Shot out window. There is	a single frame.

       swsplsym	(32x32)
	      Bird "splatted" into window. There is a single frame.

TARGET TYPES
       0      Hangar

       1      Factory

       2      fuel tank

       3      Tank

       4      Truck

       5      Tanker truck

       6      Flag

       7      Tent

       8-12   User-defined  target; the	symbols	section	should be used to sup-
	      ply the graphics (see SYMBOLS SECTION above). Type 12 produces a
	      big explosion like an oil	tank when destroyed.

       13-17  "Passive"	user-defined target (does not fire at  enemy  planes).
	      Type  17	produces  a  big  explosion  like an oil tank when de-
	      stroyed.

       18     Radio tower

       19     Water tower

SOUNDS SECTION
       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)	 sepa-
       rated  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 quar-
       ter-note, etc. The following additional syntax is also supported:

             For  a  rest, use	"r" instead of a note character. The syntax is
	      otherwise	identical to that for a	normal	note,  with  the  only
	      difference being that no note will be played.

             To  play	a  sharp,  append a '+'	character. For example,	"g+4/"
	      represents a quarter-length G#. Alternatively you	can  append  a
	      '-'  to  play a flat; for	example	"e-2/" is a half-length	E-flat
	      (aka D#).

             Prefix a note with < or >	to shift down or  up  an  octave.  All
	      subsequent notes will be played in this octave.

             Append  a	 '.'  character	 to  play a dotted note. A dotted note
	      plays for	50% longer than	a normal note.

       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.

SEE ALSO
       sopwith(6),

AUTHORS
       This manual page	was written by Simon Howard.

HISTORY
       The original DOS	version	of Sopwith only	supported a single level,  al-
       though  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  Jen-
       ner  even  developed  a	basic level editor that	allowed	people to make
       their own maps, although	the changes that can be	made using this	 tech-
       nique are inherently limited.

       Full  support  for custom maps did not appear until 2024, with SDL Sop-
       with'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.

							    sopwith-mission(5)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=sopwith-mission&sektion=5&manpath=FreeBSD+Ports+14.3.quarterly>

home | help