LMP Source Description

Public Version 2.8.0, 5 October, 1995
by Uwe Girlich ( girlich@aix520.informatik.uni-leipzig.de)

The LMP Source format (LS) is a (ASCII text based) readable description of the contents of a (binary) LMP file.

LMPC produces (with --lmp-to-ls) a well formatted LS file. So you can learn by example. I hope, that the text parser in LMPC (with --ls-to-lmp) can parse most LS files.

The LS language is a line oriented language.
Empty lines are ignored.
The keywords aren't case sensitive.
The characters between # and 'new line' will be ignored.

At the very beginning of a LS file (produced by lmpc --lmp-to-ls) there are some comment lines with derived informations:

LMP file:            filename of the LMP file
Number of players:   derived from the number of used colors
Total play time:     derived from the number of game tics
Number of game tics: derived from the file length

I can only hope, that next versions of LMPC will use the same LMP source language or are at least compatible.

1. Header Area

The Header Area starts with the keyword HeaderStart and ends with the keyword HeaderEnd.

Between HeaderStart and HeaderEnd there are lines with general information about the LMP file:

Game:         Game type (DOOM, DOOM ][, HERETIC)
Version:      Version Number or Version Number Byte (old LMP's: 0)
Skill:        Player Skill (1-5) 
Episode:      Episode (DOOM: 1-4, DOOM ][: 1, HERETIC 1-4) 
Map:          Starting Map (DOOM and HERETIC: 1-9, DOOM ][: 1-32)

in multiplayer LMP's comes now a table with the colors of the players

Player0:      Color of player 0 (0: green, 1: indigo, 2: brown, 3: red)
Player1:      Color of Player 1
etc.

The following lines are special for new LMP's.

MultiRule:    Multiplayer Playing Rule (Cooperative, DeathMatch or Altdeath)
Respawn:      number   (This line appears only if the LMP was recorded 
                        with -respwan. The number is the number of the 
                        command line parameter -respawn.)
Fast:         number   (This line appears only if the LMP was recorded 
                        with -fast. The number is the number of the 
                        command line parameter -fast.)
NoMonsters:   number   (This line appears only if the LMP was recorded 
                        with -nomonsters. The number is the number of the 
                        command line parameter -nomonsters.)
ViewOfPlayer: color    (The LMP is recorded from the view of the player 
                        with this color, (0<=color<=3))

Sometimes lmpc --lmp-to-ls can't distinguish between new DOOM and DOOM ][ LMP's: In the Game line appears 'DOOM or DOOM ]['.

The version bytes can easily derived from the game version:

0  : DOOM 1.1, 1.2
104: DOOM 1.4beta
105: DOOM 1.5beta
106: DOOM 1.6beta, DOOM 1.666, DOOM ][ 1.666
107: DOOM ][ 1.7, DOOM ][ 1.7a
108: DOOM 1.8, DOOM ][ 1.8
109: (Ultimate) DOOM 1.9, DOOM ][ 1.9

2. Data Area

The Data Area starts with the keyword DataStart and ends with the keyword DataEnd.

All actions of one game tic have to be in one text line. In a multiplayer LMP there is one line for each player per game tic.

LMPC appends at the line of the first player a comment with the game tic number and the time passed until this game tic.

2.1 Movements

A movement consists of a 2 letter word and an amount n (1<=n<=127)
GFn     Go Forward n    
GBn     Go Backward n   
SLn     Strafe Left n  
SRn     Strafe Right n  
TLn     Turn Left n
TRn     Turn Right n

2.2 Use

UT      Use Thing  (press button, open door etc.)
NWn     New Weapon (1<=n<=8) (change the weapon manually)
FW      Fire Weapon

PS      Pause Start
PE      Pause End
SGn     Save Game in slot n (0<=n<=7)

You can not combine PS, PE and SG with other Use commands. But you can combine the other Use commands (ie UT and FW at the same time).

2.3 Fly and Look (HERETIC only)

A fly and look command consists of a 2 letter word and an amount (1<=n<=15)
FUn     Fly Up n
FDn     Fly Down n
LUn     Look Up n
LDn     Look Down n

FC      Fly Center (landing)
LC      Look Center (look horizontal)

2.4 Use Artifact (HERETIC only)

The Use Artifact command consist of the code AT and a letter (a..j) equivalent to the gimme-cheat:
ATa     ring of invincibility
ATb     shadowshere
ATc     quartz flask
ATd     chaos device
ATe     tome of power
ATf     torch
ATg     time bomb of the ancients
ATh     morph ovum
ATi     wings of wrath
ATj     mystic urn

2.5 Special Codes

WT      Wait a Tic
*n      Repeats the current line n times; useful for long waits. 
        LMPC --lmp-to-ls does not produce such lines but 
        LMPC --ls-to-lmp understands.

For further information on LMP's look in the "Unofficial LMP format description". The current version is 1.21: http://www.physik.uni-leipzig.de/~girlich/doom/lmp-1.21.html


Uwe Girlich, 5 October, 1995