Using the Automated Level Creation Tools
The Level Ripper tools have been embedded into the game program to help create levels
for use with HCGE. They are designed to take a PCX or TGA image and break it up into
tiles, creating a ".til" file, and rebuild a level out of those tiles, creating a
".lev" file. If no filenames are given, the data will be saved to the following files in the program folder:
riptil.til - The tiles
riplev.lev - The level
These files must be moved and renamed accordingly and fit with proper definition files and Functions
to be used within the game. However, if the appropriate
parameters are used, they can be automatically saved to their proper places if
a game already exists for them.
This utility takes input from files with specific names, which are described at
the end of this section. The input files must have the correct names.
The level ripper may be called by running the appropriate game exe with the proper
command line strings, or by using the in-program interface under the "Level Ripper" option in the "Utilities" menu.
To manually operate the utilities from the command-line, use the following
command-line options. Please also read them even if you intend to use the launcher;
the descriptions will be helpful. "HCGEWIN" may be replaced with the appropriate
filename to run other versions.
(The above does not apply to other versions.)
The level ripper parameters are as follows:
This parameter initiates the level ripper. The file(s) to be ripped must reside
in the game folder and have the proper names
This parameter allows the use of multiple images to build a level rather than
just one. It must include the number of images along both the X and Y axes, as well
as the size offset of the right-most and bottom-most images (how much smaller
they are on that axis than the others in tile size [pixel_size / 8]). In most
cases, it's easier to use only one large image, and the offsets are only used
in rare instances, so they will generally just be 0. All images except for the
right-most and bottom-most images must be the same size as the first
HCGEWIN -levrip -multi xnum ynum xoff yoff
HCGEWIN -levrip -multi 4 4 0 0
This parameter signifies that the palette in the destination tile file must be
altered (This option must be used when a new file is created, but when a
pre-existing file is being modified, it may be omitted, unless the palette needs
to be changed). It must be accompanied by the ID number of the palette to modify,
and the type of palette that it will become. The palette types are:
|64||-||64 colors for tiles, 64 global colors, 128 colors reserved for "water"|
|128||-||128 colors for tiles, 128 global colors|
|192||-||192 colors for tiles, 64 global colors|
This parameter may be used as follows:
HCGEWIN -levrip -pal palID paltype
HCGEWIN -levrip -pal 0 64
- -0-63 -64-127 -128-191 -192-255
These parameters are used to determine where colors from the source image go in
the tile file's palette. When a new tile file is created, at least one of these
parameters must be used to copy the tiles' colors from the image into the tile
file. In most basic levels, colors will come from indexes 0-63 in the image, and
will go into indexes 0-63 in the tile file. The parameter itself determines where
the color comes from, and it must be accompanied by the ID value of the palette
index it will occupy in the tile file. Valid values are:
|0||-||0-63, available in all color modes|
|128||-||128-191, available in 128- and 192-color modes|
|192||-||192-255, only available in 192-color mode|
A maximum of three of these parameters may be used
at one time, because although there are 4 source areas of the image palette that
colors can be taken from, there is a maximum of three tile palette areas that they
can be transferred to. The "-pal" option doesn't necesarily have to be used to copy
colors into the palette, unless the tile file is new, or the palette must be extended
to allow the incoming colors a place to go. If that option is omitted, the destination
palette for these parameters will default to 0. They may be used as in this example:
HCGEWIN -levrip -pal palID paltype -0-63 destination_start
HCGEWIN -levrip -pal 0 64 -0-63 0
Using a level with width and height 0 will omit the level ripping part and skip straight
to the tile palette section.
This parameter rips the level in "4-bit Mode". This mode treats all colors at indexes
0, 16, 32, and 48 as "transparent", changing those pixels to 0 so that they use the
"transparent" color. Images created from screenshots of certain games must use this mode so that
transparancy will be set properly if the first color on each of their 16-entry palette
rows is treated as "transparent" by that game (the game's art is using 4-bit color).
HCGEWIN -levrip -pal 0 64 -0-63 0 -4bit
This parameter will instruct the level ripper to load a pre-existing tile file, and
add any new tiles or colors to it. It must be accompanied by the name of the file, and
the ID number of the last tile that already exists in the file. The given file will be
overwritten, but a backup will be made in the program folder, named "til.bak".
HCGEWIN -levrip -pal palID paltype -0-63 destination_start -tilefile filename start_til
HCGEWIN -levrip -pal 0 64 -0-63 0 -tilefile c:\HCGE\tmplate\zone01\1.til 171
This parameter will instruct the level ripper to load a pre-existing level file, and add
the newly-created plane to it. It must be accompanied by the name of the file, and the
ID number of the plane that will recieve the ripped level data. If the plane exists, it
will be overwritten. If it doesn't, it will be created. The given file will be overwritten,
but a backup will be made in the program folder, named "lev.bak"
HCGEWIN -levrip -pal palID paltype -0-63 destination_start -tilefile filename start_til -levelfile filename planeID
HCGEWIN -levrip -pal 0 64 -0-63 0 -tilefile c:\HCGE\tmplate\zone01\1.til 171 -levelfile c:\HCGE\tmplate\zone01\1.lev 1
If the "-warp" parameter is also specified during the level ripper process, the program will
start the game, warp to the appropriate level, and open the level editor once the rip process
is complete. If the "-editor" parameter is specified instead, the program will start the
level editor with the newly-created files in non-gameplay mode once the rip process is finished.
In the case of the "-warp" command, if the desired game is not the default game, the "-game"
parameter must also be used to signify this.
When creating images for use with these files, they must be either 256 color PCX files (version 5) or 256-color RLE-compressed or uncompressed TGA,
and all art must only use colors from indexes 0-63 for 64 color tiles. Higher-color tiles
must use 0-63, and continue beginning at index 128. These are the colors reserved for level
art. Color 0 is always transparent, meaning that you can see through that pixel. If you want
to use a black, you must create a black color at a different index. Colors 64-127 are always
reserved for global colors, however, they may be used in the source image if the proper
parameters are used during the rip process to place them in valid areas of the tile palette. (More image and color information)
While creating art, you must make sure that all repeating patterns fit on an 8x8 grid, because
the images will be broken into 8x8 tiles. If the height and width of the patterns are not multiples
of 8, and they are not arranged on an 8x8 grid, they will not fit together properly, and it is
very possible that it will cause the ripper to create too many tiles, and possibly crash.
Once you are ready to begin ripping the image files into tiles and levels, you must save them
into the program folder with the proper names:
Where XX is a two-digit number representing where the image falls on the grid (for placing
multiple pictures together) horizontally, and YY is its position on the grid vertically.
Normally its wise to use only one large picture, so both numbers would be 0, meaning that
the files will be named
These images are where image data for the tile plane is stored (or just any patterns you want
to rip and paste onto a previously-made level). If both a PCX and a TGA file exist, the PCX
file will be used.