Next Previous Contents

7. LS format

This chapter describes the ASCII text based source of a LMP or DMO file. I created this language for myself. This means neither id Software nor 3D Realms use this for game development or the like. It is simply a way to show what is in these miraculous recording files.

7.1 Introduction

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

LMPC produces (with --to-txt) a well formatted LS file. So you can learn by example. I hope, that the text parser in LMPC (with --to-bin) can parse most LMP source. It can't parse DMO source files.

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

LMP

DOOM (][) LMP file:  filename of the LMP file
Number of players:   derived from the number of used colours
Total play time:     derived from the number of game tics
Number of game tics: derived from the file length
DMO

Duke Nukem 3D DMO file:  filename of the DMO file
Total play time:         derived from the number of game tics
Number of game tics:     taken from the header, it stays better in a comment

7.2 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 or DMO file:

Game:

game type (DOOM, DOOM ][, HERETIC, HEXEN, STRIFE, Duke Nukem 3D, Redneck Rampage)

Version:

version number or version byte (new DOOM/DOOM ][, STRIFE) or 0 (old DOOM/HERETIC/HEXEN), the real version for Duke Nukem 3D and Redneck Rampage

Skill:

player skill (LMP: 1-5, DMO: 1-4)

Episode:

episode (DOOM/HERETIC/Duke Nukem 3D: 1-4, DOOM ][/HEXEN: 1, not in STRIFE), Redneck Rampage: 1 (I don't know it better yet, should be 1-4)

Map:

starting map (DOOM/HERETIC/Duke Nukem 3D: 1-9, DOOM ][: 1-32, HEXEN 1-40, STRIFE: 32-??), Redneck Rampage: 1-11

In multi-player LMP files comes now a table with the colours (0-3) of the players (0-3) (0-7 in STRIFE and HEXEN 1.1)
Player0:      Colour of player 0
Player1:      Colour of Player 1
etc.
Player:

Number of players (does exist in DMO source only)

The following lines are special for new DOOM, DOOM ][ and STRIFE LMP files.

MultiRule:

Multi-Player Playing Rule (Cooperative, DeathMatch or Altdeath)

Respawn:

number (This line appears only if the LMP was recorded with -respawn. 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:

colour (The LMP is recorded from the view of the player with this colour, (0<=colour<=3))

The following lines are special for new Duke Nukem 3D and Redneck Rampage DMO files.
MultiRule:

Multi-Player Playing Rule (DukeMatch (RedneckMatch) (with spawn), Coop, Dukematch (Redneckmatch) (without spawn))

Respawn Monsters:

number (This line appears only if the DMO file was recorded with /t1.)

Respawn Items:

number (This line appears only if the DMO file was recorded with /t2.)

Respawn Inventory:

number (This line appears only if the DMO file was recorded with /t3.)

NoMonsters:

number (This line appears only if the DMO file was recorded with /m.)

The following lines are special for Redneck Rampage DMO files.
FakePlayerAI:

number (This line appears only if the DMO was recorded with /a.)

Name:

"string" (The standard name is "LEONARD" but it can be changed with the -name option.)

Sometimes lmpc --to-txt can't distinguish between new DOOM and DOOM ][ LMP files: In the Game line appears ``DOOM or DOOM ][''.

The version byte can easily be derived from the game version.


0 :
DOOM 1.1, 1.2
101: STRIFE 1.0, 1.1
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
110: published source code
LMP version bytes

In HEXEN LMP files appears the player class (0: fighter, 1: cleric, 2: mage) too:

Class:        single player class (0-2)
or in multi-player LMP files:
Class0:       player 0 class
Class1:       player 1 class
etc.

7.3 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 multi-player LMP there is one line for each player per game tic.

LMPC may append (with the --mark-step option) a comment with the game tic and the time passed until this game tic at the line of the first player.

Movements

A movement consists of a 2 letter word and an amount n.


code
action game range
GFn Go Forward n LMP 1<=n<=127
GBn Go Backward n LMP 1<=n<=127
SLn Strafe Left n LMP 1<=n<=127
SRn Strafe Right n LMP 1<=n<=127
GXn Go X-direction n DMO -32768<=n<=32767
GYn Go Y-direction n DMO -32768<=n<=32767
TLn Turn Left n LMP 1<=n<=127
TLn Turn Left n DMO 1<=n<=32767
TRn Turn Right n LMP 1<=n<=127
TRn Turn Right n DMO 1<=n<=32767
Movement commands

Use (LMP only)


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)
Use commands

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

Fly and Look (HERETIC and HEXEN 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 Centre (landing, drop)
LC Look Centre (look forward)
Fly and Look commands

Use Artifact (HERETIC and HEXEN only)

The Use Artifact command consist of the code AT and a letter (a..j) equivalent to the gimme-cheat of HERETIC. In HEXEN such a cheat code does not exist but the command remains the same:

HERETIC:


ATa
ring of invincibility
ATb shadowsphere
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
HERETIC artifacts
HEXEN:


ATa
icon of the defender
ATb quartz flask
ATc mystic urn
ATd clerical healing key
ATe dark servant
ATf torch
ATg porkalator
ATh wings of wrath
ATi chaos device
ATj flechette
ATk banishment device
ATl boots of speed
ATm krater of might
ATn dragonskin bracers
ATo disc of repulsion
UA use all (panic button)
HEXEN artifacts

STRIFE Artifacts

You can only the use STRIFE artifacts with the IN or DR actions.

The Use Artifact command consist of the code A and an artifact number. Up to now I know only 12 artifacts.


code
name
0x74 toughness
0x75 accuracy
0x76 full health
0x7B teleportor beacon
0x7C metal armor
0x7D leather armor
0xA1 med patch
0xA2 medical kit
0xA3 coin
0xA7 shadow armor
0xA8 environmental suit
0xB7 offering chalice
STRIFE artifacts

Jump (HEXEN and STRIFE only)

In HEXEN and STRIFE you can jump up.


JU
jump
Jump command

STRIFE actions

There are some more STRIFE actions. Remember: no talks are stored in the LMP file.


LU
Look Up
LD Look Down
RU Run
IN Use Inventory
DR Drop Inventory
JU Jump Up
U6 Unknown Action Number 6
HE Use Health
STRIFE actions

Use (DMO only)

There are 28 actions in DMO files (and 4 bits for weapon change). As far as it works I use the same codes for the same or similar thing as in LMP sources. To describe the actions I use the terms for key definitions in DUKE3D.CFG.


JU
Jump
CR Crouch
FW Fire
AU Aim_Up
AD Aim_Down
RU Run
LU Look_Up
LD Look_Down
VI NightVision
MK MedKit
AR AutoRun
LC Center_View
HW Holster_Weapon
IL Inventory_Left
HD Holo_Duke
JP Jetpack
IR Inventory_Right
TA TurnAround
UT Open
IN Inventory
AC6 ??
AC7 ??
AC12 ??
PA Pause
AC22 ??
AC23 ??
AC26 ??
AC31 ??
NWn New Weapon (1<=n<=10) (change the weapon manually)
DMO actions

Special Codes


WT
Wait a Tic
*n Repeats the current line n times
Special commands


Next Previous Contents