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".
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.
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)).
lmpc [--info|-i] lmpfile [lmpfile ...]
lmpfile
s
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.
lmpc (--lmp-to-ls|-s) [(--tic|-t) FROM(,|:)TO] lmpfile lsfile
lmpfile
lsfile
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.
lmpc (--ls-to-lmp|-l) lsfile [lsfile ...] lmpfile
lsfiles
lmpfile
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).
lmpc (--change-version|-v) VERSION lmpfile1 [lmpfile2]
lmpfile1
lmpfile1
or [lmpfile2]
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!!
lmpc (--change-player|-p) PLAYER lmpfile1 [lmpfile2]
lmpfile1
lmpfile1
or [lmpfile2]
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.
WT
tics to a LMP filelmpc (--add-WT|-w) SECONDS lmpfile1 [lmpfile2]
lmpfile1
lmpfile1
or [lmpfile2]
lmpfile1
and adds at the endSECONDS
* 35 * player numberWT
) game tics.
This results in a SECONDS
seconds longer LMP file.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.
lmpc (--remove-pause|-r) lmpfile1 [lmpfile2]
lmpfile1
[lmpfile2]
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.
lmpc (--info|
--change-version|
--change-player|
--lmp-to-ls|
--add-WT|
--remove-pause) (--game|-g) GAME lmpfile [filename ...]
lmpfile
--game
.
GAME
can be DOOM
, DOOM2
or HERETIC
or the short form D
, 2
or H
.
--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.
lmpc10.zip
(8/31/1994 posted in
alt.binaries.doom
,
alt.games.doom
)
lmpc101.arj
(9/1/1994 posted in
alt.binaries.doom
,
alt.games.doom
)
WT
statistics
lmpc10.zip
. Therefore I changed to the ARJ
archiv.
lmpc20.arj
(internal beta test release)
lmpc201.arj
(internal beta test release)
UT
/FW
and iNW
in the same game tic)
NW8
(8 gives you the chainsaw directly) added
lmpc21.arj
(10/25/1994 posted in
alt.binaries.doom
)
lmpc-2.27.tar.gz
(internal beta test release)
GAME
-token in the LS Header
lmpc-2.3.tar.gz
/lmpc23.zip
lmpc-2.4.tar.gz
/lmpc24.zip
(public release)
lmpc-2.5.tar.gz
/lmpc25.zip
(internal beta test release)
getopt_long
and long option
names are allowed too
--info
can handle many files on the command line
--lmp-to-ls
can recompile a specific part of the LMP file
(the new --tic
option)
--game
to force the game type of the LMP file
lmpc-2.6.tar.gz
/lmpc26.zip
(internal beta test release)
--ls-to-lmp
converts now several LS files to a LMP file.
--add-WT
to add WT
at the end of a
LMP file
lmpc-2.6.1.tar.gz
/lmpc261.zip
(internal beta release)
--gametic FROM(,|:)TO
: colon is allowed as a separator too
--ls-to-lmp
keeps track of PS
and PE
--remove-pause
to remove the Pause game tics
lmpc-2.7.0.tar.gz
(internal alpha release)
--gametic
changed to --tic
lmpc-2.7.1.tar.gz
/lmpc271.zip
(internal beta release)
lmpc-2.7.2.tar.gz
/lmpc272.zip
(internal beta release)
lmpc-2.8.0.tar.gz
/lmpc280.zip
(public release)
Plans for 2.9 (in order of importance):
SG
codes is easy to include.
man
-version of the documentation.
-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.html
There 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