Qlumpy

From Valve Developer Community
Jump to navigation Jump to search

Qlumpy is an open-source texturing tool created by John Carmack for Quake and modified by Valve for Half-Life. It is capable of creating WAD and LMP files. It is included in Half-Life SDK and Half-Life Texture SDK.

It can be loaded by drag and dropping .ls (stands for QLumpy Script) file or by launching the application with .ls file as an argument.

Script file

The script files can be created either by making them manually using a text editor or using makels tool (included in SDK, takes three arguments: directory of BMP files, output WAD name, output .ls name).

Tokens

$SINGLEDEST <directory name>
Sets a directory of resulting LMP (format: uint32 width, uint32 height, width*height data, uint16 numcolors, byte palette) files.
$DEST <path to WAD file>
Sets a path to resulting WAD file.
$LOAD <path to LMP file>
Loads source LMP file.
$LOADBMP <path to BMP file>
Loads source BMP file.

All paths except $SINGLEDEST and $DEST are absolute.

Loading images

To add an image to a script, load it with $LOAD or $LOADBMP, then write the following line:

<filename> <command> <parameters>

Commands

palette

Creates a gradient palette between two colors. Takes 6 parameters: 3 for startcolor, 3 for endcolor.

colormap

Creates colormap.lmp. Takes 2 parameters: levels and fullbrights.

Color maps are used by Quake for lighting information.

It is not used by Half-Life.

colormap2

Experimental. Creates colormap.lmp. Takes 3 parameters: range, levels, fullbrights.

Identical to colormap, except it also allows you to specify the range of the lighting, enabling you to specify overbright values.

It is not used by Half-Life.

qpic

Simple image RGB image with last color in palette transparent. Takes 4 parameters: x, y, width, height. If a parameter is -1, it will be grabbed from source image.

Used by the "Loading…" text in Half-Life.

miptex

Image with mipmaps, like in Half-Life WADs. Size must be multiples of 16. Takes 4 parameters: x, y, width, height. If a parameter is -1, it will be grabbed from source image.

font

Example font sheet. Row 1 starts from character #32, row 8 starts from #160. Associated script:
conchars font 12
32 0 0 159 90
160 0 91 159 181
-1
. The green background is color #255, and the red pixels are colored #254.

Fonts. Takes three parameters: height of glyphs, blocks, numrows (-1 automatic). Block format is <starting glyph> <x> <y> <width> <height>.

Crops glyphs between dots with color #254 in palette, #255 is transparent.

Can take infinite amount of blocks. Usually starting glyph for first block is 32, for second it's 160.

Rounds font sizes to 256x and compresses them so they become unrecompilable with Qlumpy.

GoldSrc fonts are incompatible with Quake fonts because Quake uses monospaced 128x128 fonts, while GoldSrc uses 256x fonts with dynamic width and height.