http://wiki.elmaonline.net/index.php?title=Lgrdk&feed=atom&action=historyLgrdk - Revision history2024-03-28T13:17:36ZRevision history for this page on the wikiMediaWiki 1.35.3http://wiki.elmaonline.net/index.php?title=Lgrdk&diff=28928&oldid=prevSunl: Created page with "== Readme.txt == <nowiki>==========================================================================</nowiki> Elasto Mania LGR file Development Kit Readme file. With the DK y..."2017-02-07T23:42:45Z<p>Created page with "== Readme.txt == <nowiki>==========================================================================</nowiki> Elasto Mania LGR file Development Kit Readme file. With the DK y..."</p>
<p><b>New page</b></p><div>== Readme.txt ==<br />
<nowiki>==========================================================================</nowiki><br />
<br />
Elasto Mania LGR file Development Kit Readme file.<br />
<br />
With the DK you can produce lgr files with your own graphics.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
Installation<br />
<br />
You should simply create a directory and uncompress the contents<br />
of the lgrdk10.zip file into it.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
Distribution<br />
<br />
You can distribute this DK freely as long as you don't modify it.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
What file types uses the program for the levels<br />
<br />
When you play a level, the topology of the polygons and the<br />
placement of the objects and pictures (like the trees) come from a<br />
level file (with the extension of '.lev' in the LEV subdirectory).<br />
But this file doesn't contain any graphics, like the texture of the<br />
background, the pictures of the trees, or the apples you have to<br />
gather. The graphics are stored in a separate file with the<br />
extension of '.lgr' in the LGR subdirectory. The level file<br />
contains only the name of the lgr file. In this way you can have<br />
many level files using one .lgr file, thus saving a lot of disk<br />
space because the .lgr files are usually much bigger than the level<br />
files. Actually all internal levels of the game use one lgr file,<br />
default.lgr.<br />
<br />
If you load a level file to play or to edit it, and there is no LGR<br />
file with the name that is specified in the level file, the<br />
default.lgr file will be used instead. Probably the names of the<br />
pictures in the level and LGR file won't match, so the non-matching<br />
objects won't appear on the screen when you play and will be<br />
removed from the level file if you load it into the editor and save<br />
it.<br />
<br />
The game works only with maximum 8 character long .lev, .rec and<br />
.lgr file names (plus extension).<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
Making your own LGR files<br />
<br />
For editing the level files you can use the built-in editor. But<br />
you can not change the LGR files with the editor. If you want to<br />
add pictures to an LGR file, you have to use a command line<br />
program, make_lgr.exe. This program is not part of the game, you<br />
have to download the LGR Development Kit separately from our site<br />
(www.elastomania.com). It is available for free and the same<br />
Development Kit can be used for the shareware and registered<br />
versions also.<br />
<br />
Since this Development Kit is not part of the game, I did not put<br />
as much effort into making it easy to use, and polishing it as I<br />
should have. I only made it available for the public so that those<br />
who want to include their own graphics into the game can do this,<br />
if they are willing to spend time understanding exactly how this<br />
program works. They should have prior knowledge about manipulating<br />
image files, using color palettes and using DOS command line tools.<br />
<br />
I do not promise to provide technical support for the DK even if<br />
you are a registered user of the game. However if I have time, I<br />
will try to reply every technical support questions.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
The make_lgr.exe program<br />
<br />
An LGR file is basically a collection of 8 bit color, pcx image<br />
files. The make_lgr.exe program is a command line program that<br />
gathers many pcx files and builds an LGR file for use in the game.<br />
To let the make_lgr.exe file know what pcx files it should store in<br />
the LGR file, you need to list the names of the pcx files and some<br />
other information in a file called pictures.lst. You should edit<br />
the pictures.lst file in a simple text editor (Notepad for example)<br />
and save it to disk as a plain text file (doc or rtf files won't<br />
work for example). About the exact format of this file you can read<br />
later in this document.<br />
<br />
There are pcx files that the LGR file must contain and there are<br />
pcx files that you can add freely to the LGR file. For example the<br />
LGR file must contain the pictures of the bike, the legs and hands<br />
of the biker, some pictures of objects you should eat and some more<br />
pictures. The objects that were added freely to the LGR file in the<br />
default.lgr file are the bushes, trees and other objects.<br />
In the pictures.lst file you only need to list the names of the<br />
picture files you want to add on your own.<br />
<br />
Before you can build an LGR file with the make_lgr.exe program, you<br />
have to put all pcx files into one single directory along with the<br />
pictures.lst file. The pcx files should be 8 bit palettized format<br />
using a common global palette (the LGR DK contains tools also about<br />
converting true color images into 8 bit common palette pcx files,<br />
read the paltools.txt file for more information about this).<br />
<br />
If the make_lgr.exe file successfully builds an LGR file, it saves<br />
it as noname.lgr in the same directory where the pcx files are<br />
stored. You have to rename it as you wish and copy it to the lgr<br />
subdirectory under the directory of the game. If you want to use it<br />
with a lev file, go into the level editor, load the lev file and<br />
choose 'Properties' in the menu. Choose 'Set LGR file' to select<br />
this new LGR file.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
The example pictures and the pictures.lst file<br />
<br />
To make things easier for you, I included in the DK all the 24 and<br />
8 bit color image files that are necessary to build the default.lgr<br />
file that ships with the program (this file is identical in the<br />
shareware and registered versions). The pictures.lst file is also<br />
included and all you have to do is running the make_lgr.exe file to<br />
build a valid LGR file.<br />
<br />
If you want to add your own picture to the LGR file, convert it to<br />
an 8 bit pcx file using the palette of the original pcx files and<br />
add its name to the pictures.lst file.<br />
I included the true color images too in order that if you add new<br />
pictures that don't look good with the original palette, you should<br />
be able to generate a new palette and convert the original true<br />
color pictures also to this new palette.<br />
There are no 24 bit versions of the mask pictures (their palette<br />
doesn't matter), so you should not delete these pcx files before<br />
a conversion from tga to pcx (you don't need to delete any of the<br />
pcx files, because the new ones will overwrite the old ones).<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
The pictures.lst file<br />
<br />
In the pictures.lst file every line contains description about one<br />
pcx file. First comes the name without an extension.<br />
Then comes the type of the picture that can be, PICT, TEXT or MASK.<br />
If the type is PICT, the image will be a simple picture with the<br />
top-left pixel signing the transparent color. If the type is TEXT,<br />
it is a texture and if the type is MASK, it is a mask (masks and<br />
textures can only be used together).<br />
If the type is not MASK you also have to give a default distance<br />
and clipping property. The distance must be in the 1..999 range,<br />
while the clipping property must be either 'U', 'S', or 'G'.<br />
If a picture has less distance than an other, it will hide the<br />
other picture. The motorbiker and the food-exit-killer objects have<br />
a distance of 500.<br />
The clipping property determines whether a picture is seen above<br />
the sky, the ground, or both (this is independent of the<br />
distances). So the U (Unclipped) means that the picture or texture<br />
will be seen above the whole picture (unless other pictures hide<br />
it). S (Sky) means the picture will be seen only above the Sky. G<br />
(Ground) means the picture will be seen only above the ground.<br />
<br />
Those pictures that are required for the LGR file (pictures of the<br />
bike for example) must not be listed in the pictures.lst file. The<br />
pcx file names that are required and should not be listed (except<br />
for the food animations and grass pictures, about these you can<br />
read later) in the pictures.lst file are beginning with the letter<br />
'Q' In this way you can find these files easily in an alphabetical<br />
list. You need to have all of these pcx files to be able to build<br />
an LGR file.<br />
<br />
---------------------------------------------------------------------------<br />
<br />
Animations<br />
<br />
The food, killer and exit objects are animations. In the LGR file<br />
they are represented by single pictures that contain all the frames<br />
of one animation. The QEXIT.PCX file is for example 50 pieces of 40<br />
pixel by 40 pixel frames put together horizontally making one 2000<br />
pixel by 40 pixel image. It is up to you how many frames you put<br />
into an animation picture, but it must be 40 pixel tall and 40*N<br />
pixel wide. If you set the 'Animated Objects' off in the options<br />
menu, the first frame will be visible all the time instead of the<br />
animation.<br />
<br />
---------------------------------------------------------------------------<br />
<br />
Food animations<br />
<br />
There is one animation for the exit object and one for the killer<br />
objects in one lgr file (QEXIT.PCX and QKILLER.PCX). But there may<br />
be multiple food animations. At least one food animation you have<br />
to add to the lgr file, so you must add the QFOOD1.PCX picture, but<br />
optionally you can add a QFOOD2.PCX, ..., QFOOD9.PCX picture also<br />
into your LGR file if you want. The game will stop loading the<br />
sequence of these pictures if one is missing (so if you have QFOOD<br />
1,2,3,4 and 6, only the first 4 will be loaded).<br />
If you set the 'Food anim number' property of a food object (by<br />
right clicking on it in the level editor) to 5 for example, the<br />
game will try to play the animation from the QFOOD5.PCX picture for<br />
this object. If this picture is not loaded, it will be substituted.<br />
You need to list the names of these food objects in pictures.lst<br />
(but not the exit and killer objects).<br />
<br />
---------------------------------------------------------------------------<br />
<br />
Grass pictures<br />
<br />
When the program displays grass on a level, it builds it up from a<br />
texture that is stored in QGRASS.PCX, and from little grass<br />
pictures that makes the lower border of the grass. The names of<br />
these little border pictures are in the form of QUP_*.PCX and<br />
QDOWN_*.PCX. That means QUP_AA.PCX for example will be a grass<br />
picture automatically, but you need to list it in the pictures.lst<br />
file along with the QGRASS.PCX picture (it doesn't matter what<br />
properties you give to these pictures). If the picture is an 'UP'<br />
picture, the grass should be higher on the right side of the<br />
picture than on the left (the opposite for the 'DOWN'). The<br />
horizontal size of these pictures are arbitrary. But the vertical<br />
size determines how much the grass on this picture goes down or up<br />
between the left and right sides. The program doesn't analyse a<br />
picture, but supposes that the grass level difference between the<br />
left and right side is VERTICAL_SIZE - 41 (so the height should be<br />
minimum 41 pixels, in which case it is supposed to be horizontal<br />
grass). For example if picture QDOWN_AB.PCX has a vertical size of<br />
50 pixels, the program will suppose that the level of the grass on<br />
the left side is at vertical pixel position 20 (if I assign the<br />
pixels from 0 to 49 from up to down) and 29 (49-20) on the right<br />
side. To understand how this works you should examine the grass<br />
pictures in the example pictures.<br />
<br />
If you do not list the QGRASS.PCX picture and at least two<br />
QUP_*.PCX or QDOWN_*.PCX pictures in the pictures.lst file, there<br />
will be no grass on the levels you play with this lgr file.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
Default Sky and ground textures<br />
<br />
If there is a SKY.PCX texture in an lgr file, it will be the<br />
default Sky. Similarly if there is a GROUND.PCX texture in an lgr<br />
file, it will be the default ground.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
The LGRLIST.TXT file<br />
<br />
If you create an lgr file that contains pictures with the same<br />
names that are the names of the pictures in the original<br />
default.lgr file, you can replace the original default.lgr file<br />
with your own file. This way when you play on the internal levels,<br />
the biker, the trees, the bushes and every picture will be replaced<br />
by your objects.<br />
<br />
If you do not want to replace the original default lgr file for all<br />
levels, you can do it, just create an lgrlist.txt file:<br />
Let's say you make your own file, called myfile.lgr, and you copy<br />
it to the lgr subdirectory. You create a file also in the lgr<br />
subdirectory, called lgrlist.txt, which has the following lines:<br />
5 myfile.lgr<br />
6 myfile.lgr<br />
8 myfile.lgr<br />
<br />
In this case if you play on internal level 5, 6 and 8, your lgr<br />
file will be loaded.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
COPYRIGHT INFORMATION<br />
<br />
Elasto Mania LGR file Development Kit is Copyright (C) 2000 Balazs<br />
Rozsa. All rights reserved.<br />
<br />
<nowiki>==========================================================================</nowiki><br />
<br />
DISCLAIMER<br />
<br />
<br />
This Development Kit is supplied as-is. The author disclaims all<br />
warranties, expressed or implied, including, without limitation,<br />
the warranties of merchantability and of fitness for any purpose.<br />
The author assumes no liability for damages, direct or<br />
consequential, which may result from the use of this Development<br />
Kit.<br />
<br />
You may not sell, modify, decompile, disassemble, otherwise reverse<br />
engineer, or transfer any part of this Development Kit.<br />
<br />
<nowiki>==========================================================================</nowiki></div>Sunl