LMPC
****The LMP Control Center
======================Public Version 2.8.0, 5 October, 1995
by Uwe Girlich ( girlich@aix520.informatik.uni-leipzig.de)1. Introduction
===============LMPC is a small utility to handle old (<1.4) and new DOOM, DOOM ][ and
HERETIC LMP files.It is based upon the information in the " Unofficial LMP format description".
With LMPC you can get information about a LMP, change the version and viewing
player's number, add some wait tics at the end, remove the pause tics and (this is the
main part) you can compile and recompile a LMP from and to a LS file. LS stands
for "Lmp Source".2. Command line parameters
==========================LMPC is a command line oriented program. It uses getopt_long for the
command line parsing. The LMP file convert options (--change-version,
--change-player, --add-WT and --remove-pause) can be used used
together.2.1 Syntax description
++++++++++++++++++++++Syntax:
LMPC
Description:
If you start LMPC without any command line parameters you receive the
following syntax message:LMP Control Center
LMPC (c) U. Girlich, 1994, 1995, Release 2.8.0 10/5/95
lmpc [option ...] filename [filename ...]
-h, --help display this help and exit.
-V, --version output version information and exit.
-i, --info prints out informations about the LMP-files.
-s, --lmp-to-ls recompiles a LMP-file to a LS-file.
-l, --ls-to-lmp compiles one or more LS-files to a LMP-file.
-v, --change-version VERSION changes the version of a LMP-file to VERSION
(0 means old DOOM).
-p, --change-player PLAYER changes the recording player of a LMP-file to
PLAYER (0..3).
-w, --add-WT SECONDS adds SECONDS WT game tics to the LMP file
(SECONDS must be integer).
-r, --remove-pause remove the game tics between PS and PE.
-t, --tic FROM(,|:)TO converts only a part of the LMP-file
(in connection with -s only).
-g, --game GAME forces input game (GAME=DOOM, DOOM2 or HERETIC)
short: D,2,H (in connection with -(i|s|v|p|w|r)).2.2 Information about a LMP
+++++++++++++++++++++++++++Syntax:
lmpc [--info|-i] lmpfile [lmpfile ...]
InputFile:
lmpfiles
Description:
LMPC reads each lmpfile and prints out some information like game,
version number, episode, map, skill, number of players, deathmatch/altdeath,
nomonsters etc. Please note: in the old DOOM format there is no version
information, so if you check ie a 1.2 LMP file you receive only the vague
information v<1.4 instead of v1.2. LMPC doesn't reports any version for
HERETIC LMP files.2.3 LMP Recompiler
++++++++++++++++++Syntax:
lmpc (--lmp-to-ls|-s) [(--tic|-t) FROM(,|:)TO]
lmpfile lsfile
InputFile:
lmpfile
OutputFile:
lsfile
Description:
LMPC reads the LMP file lmpfile, recompiles it to the LMP source and
stores the result in the LS file lsfile.If the --tic option is used, only the part between gametic FROM and TO
(inclusive) will be stored in the LS file. A missing FROM means the start of
the LMP file and a missing TO means the end of the LMP file. FROM and TO
are separated by a comma (,) or a colon (:). The DOS version may have
dificulties with comma as a separator because COMMAND.COM (4dos as
well) splits a command line at spaces and commas. The TO part will become a
different argument and might be interpreted as a file name.LMPC appends at the end of the LS file some useful additional informations.
For each player there is a statistics about his favorite movement codes and the
portion of WT. Since you can achive with keyboard/joystick only a few special
movement codes, is is very easy to detect, if the player used a keyboard or a
mouse. Some newbies don't use strafe, so LMPC shows also this handicap.
The statistic takes in account always the full LMP file.From the favorite movement codes you can easily deduce the number behind a
prospective -turbo parameter. Until now you have to do this for yourself,
but I hope, that in the next version a heuristic algorithm calculates this
number.2.4 LMP Compiler
++++++++++++++++Syntax:
lmpc (--ls-to-lmp|-l) lsfile [lsfile ...] lmpfile
InputFile:
lsfiles
OutputFile:
lmpfile
Description:
LMPC reads the first LS file, determines the game type and produces a LMP
file of all LS files on the command line. The LMP file is always the last
argument.I added the "more then one LS file" feature just for fun. Up to now I have
never seen a successful addition of two LMP files (i.e. from 2 consecutive
levels).2.5 Version change
++++++++++++++++++Syntax:
lmpc (--change-version|-v) VERSION lmpfile1
[lmpfile2]
InputFile:
lmpfile1
OutputFile:
lmpfile1 or [lmpfile2]
Description:
LMPC reads the LMP file lmpfile1, changes the version number byte in
lmpfile1 to the apropriate value or stores the result in lmpfile2.The VERSION can be the version byte itself (0 for the old LMP's) or
anything like 1.4beta, 1.9 or whatever.There is no guarantee for a special LMP file to work with the new version!!
2.6 Player's view change
++++++++++++++++++++++++Syntax:
lmpc (--change-player|-p) PLAYER lmpfile1
[lmpfile2]
InputFile:
lmpfile1
OutputFile:
lmpfile1 or [lmpfile2]
Description:
LMPC reads the LMP file lmpfile1, changes the number of the player
(0,1,2,3) with the main view (status bar, sound) in lmpfile1 or stores the
result in lmpfile2.To change only the main player byte works only with new LMP's, since old
LMP's are always recorded from the view of the first player (no. 0) and there
is no information about this in the header.2.7 Add WT tics to a LMP file
+++++++++++++++++++++++++++++Syntax:
lmpc (--add-WT|-w) SECONDS lmpfile1 [lmpfile2]
InputFile:
lmpfile1
OutputFile:
lmpfile1 or [lmpfile2]
Description:
LMPC reads the lmpfile1 and adds at the end
SECONDS * 35 * player number
empty (WT) game tics. This results in a SECONDS seconds longer LMP file.
With lmpfile2 the result will be written in lmpfile2. Without this
parameter, lmpfile1 will be changed.This option is very useful for contest LMP files with a long visible summary
screen.2.8 Remove Pause game tics
++++++++++++++++++++++++++Syntax:
lmpc (--remove-pause|-r) lmpfile1 [lmpfile2]
InputFile:
lmpfile1
OutputFile:
[lmpfile2]
Description:
LMPC reads the lmpfile1 and copies all game tics to lmpfile2. During
the copy process LMPC scans the contents for Pause Start game tics (PS) and
Pause End game tics (PE).The PS game tic will be copied to lmpfile2 but with an empty "use byte";
the game tics between PS and PE (inclusive PE) wont be copied.Without the second filename LMPC will write to a temporary file and
replaces at the end lmpfile1.The game tic numbers of PS and PE are printed during the conversion.
You may have difficulties with play back such a patched LMP file. This is the
case if you patch a LMP file of a level with a revenant (skeleton). The
revenants use a random number generator to choose between a self controlled
rocket and a normal rocket. The input of this generator are the last two bits of
the game tic number. This means you have to make sure that you cut a number
of game tics divisible by 4. In general this is impossible so do not use pause in
levels with a revenant. An arch vile make similar difficulties but I don't even
know how to prevent it.2.9 Game type determination
+++++++++++++++++++++++++++Syntax:
lmpc (--info|
--change-version|
--change-player|
--lmp-to-ls|
--add-WT|
--remove-pause) (--game|-g) GAME lmpfile [filename ...]InputFile:
lmpfile
OutputFile:
action dependend
Description:
LMPC determines the game type of a LMP file very good. But it can't good
distinguish between HERETIC and old DOOM LMP files. Moreover it can't
distiguish at all between DOOM ][ Map 1-9 and new DOOM Episode 1 LMP
files. The latter case is not very important but the first is more severe. To
force LMPC to use a particular game type use --game. GAME can be DOOM,
DOOM2 or HERETIC or the short form D, 2 or H.3. Known bugs and limitations
=============================To distinguish between old DOOM LMP's and HERETIC LMP's I use a simple
turn-byte-average algorithm. This fails, if the LMP is too short or you turn always
in the same direction and never go forward. If you produced a good LMP file (at least
some minutes and with some action) and LMPC can not detect the game type, please
send it to me. Up to a corrected version make sure to use the --game option.The LS text parser is very simple and may produce sometimes wrong things. Please
inform me, if you wrote (or produced with lmpc --lmp-to-ls) a correct LS file
('correct' is described in ls.html) and lmpc --ls-to-lmp can not compile it.The *number repeat code really repeats this line number times and does not care
about multi player game tics.The DOS binary converts all file names to lower case to simplify the name handling.
The tolower function doesn't converts any kind of special characters like ö or è.
This can cause some severe data lost.The DOS extender go32 does the command line expansion of wild card characters.
It handles * only but not ?. LMPC doesn't do it either.4. History of LMPC
==================1.0 (8/30/1994) lmpc10.zip (8/31/1994 posted in alt.binaries.doom,
alt.games.doom)
o first public version
1.01 (8/31/1994) lmpc101.arj (9/1/1994 posted in alt.binaries.doom,
alt.games.doom)
o bug fixed in WT statistics
o LS description / LMPC program reference splitted in LS.DOC /
LMPC.DOC
o New heuristic algorithm to discover former version changes.
o History added in LMPC.DOC
o Terry (terry@usis.com) wrote also a DOOM utility (I don't know it)
with the archiv name lmpc10.zip. Therefore I changed to the ARJ
archiv.
2.0 (10/11/1994) lmpc20.arj (internal beta test release)
o the LMP compiler is ready after all!
2.01 (10/12/1994) lmpc201.arj (internal beta test release)
o recompiler bug fixed (UT/FW and iNW in the same game tic)
o compiler parser improved (token length test)
o NW8 (8 gives you the chainsaw directly) added
2.1 (10/24/1994) lmpc21.arj (10/25/1994 posted in alt.binaries.doom)
o after a error free beta test phase nothing changed, new public version
2.20 (January/February 1995) (never published)
.
. rewritten from scratch (Turbo Pascal 6.0 -> ANSI C)
.
2.26
2.27 (2/25/1995) lmpc-2.27.tar.gz (internal beta test release)
o LS format emproved (new HERETIC movements)
o can handle DOOM ][ and HERETIC LMP's
o GAME-token in the LS Header
o version change expects now the real version byte
o 1.5 times faster (2.27/2.1, checked with a >300K LMP)
o includes now a executable for DOS and LINUX
2.3 (4/29/1995) lmpc-2.3.tar.gz/lmpc23.zip
o full source code included
o version change expects a real version string or the version byte
o zip and tar.gz release
o includes now go32.exe and stub.exe too
2.4 (8/7/1995) lmpc-2.4.tar.gz/lmpc24.zip (public release)
o DOS binary cross compiled with go32crs
o documentation in HTML and plain text (created with Mosaic from the
HTML version)
o Ultimate DOOM with 4th episode tested (nothing changed)
2.5 (8/23/1995) lmpc-2.5.tar.gz/lmpc25.zip (internal beta test release)
o command line parsing now with getopt_long and long option
names are allowed too
o to compile lmpc.exe (DOS-binary) I included the getopt-package
from the GNU C library (my copy of DJGPP doesn't include getopt)
o --info can handle many files on the command line
o --lmp-to-ls can recompile a specific part of the LMP file (the
new --tic option)
o the buggy version number string function repaired
o the new option --game to force the game type of the LMP file
2.6 (8/26/1995) lmpc-2.6.tar.gz/lmpc26.zip (internal beta test release)
o --ls-to-lmp converts now several LS files to a LMP file.
o new option --add-WT to add WT at the end of a LMP file
2.6.1 (8/28/1995) lmpc-2.6.1.tar.gz/lmpc261.zip (internal beta release)
o 3 parts of the version number
o --gametic FROM(,|:)TO: colon is allowed as a separator too
o --ls-to-lmp keeps track of PS and PE
o --remove-pause to remove the Pause game tics
2.7.0 (9/3/1995) lmpc-2.7.0.tar.gz (internal alpha release)
o --gametic changed to --tic
o total new code to convert LMP files (all in one)
o do multiple LMP file changes at the same time
o convert LMP files with the help of a temporary file (if necessary)
2.7.1 (9/5/1995) lmpc-2.7.1.tar.gz/lmpc271.zip (internal beta release)
o small bug fixes in the new code
o DOS binary converts now all filenames to lower case
2.7.2 (9/6/1995) lmpc-2.7.2.tar.gz/lmpc272.zip (internal beta release)
o small bug in the DOS binary corrected
2.8.0 (10/5/1995) lmpc-2.8.0.tar.gz/lmpc280.zip (public release)
o Nothing important changed after one month of intensive beta testing.
The code is ok.Plans for 2.9 (in order of importance):
1. The most awaited feature is a speed improvement (file buffering).
2. A new option to remove the SG codes is easy to include.
3. I plan to create a man-version of the documentation.
4. I will add a heuristic algorithm to calculate the -turbo value from the
favorite movement bytes. (I wrote this last sentence long ago, maybe I will
never code this.)The newest regular version of LMPC will be announced in
rec.games.doom.announce, you can download it from any DOOM ftp mirror
site, and directly from my WWW-site:
http://www.physik.uni-leipzig.de/~girlich/doom/index.htmlThere you will find always the latest beta release with new features and brand new
bugs.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