slpc is a small utility for converting SLP files used in Age of Empires
(particularly version 1) to PNG images. SLP (Sprite Language Processor) is a
custom format used in the game series to encode sprite animations as a sequence
of drawing commands instead of raw pixel data.
This tool specifically supports SLP version 2.0N, which is the format used in the original Age of Empires. It is not guaranteed to work with later versions used in Age of Empires II or other titles in the series such as Age of Mythology or Age of Kingdoms.
slpc -p PAL_FILE [-j PLAYER_ID] [-f] SLP_FILE…
-
-p PAL_FILE
Path to the PaintShop Pro Color Palette file (PAL).
This file is typically found ininterface.drs, located in thedata/folder of an Age of Empires installation. The standard palette is file50500.bina. -
-j PLAYER_ID
(Optional) ID of the player for which the graphics are rendered.
Accepts values from1to8. If not specified, no player-color remapping is applied. -
-f
(Optional) Flip the image horizontally.
Useful for mirrored sprite rendering, but not required for typical usage.
Each SLP file can contain multiple frames. This tool exports each frame as a separate PNG in the current directory, overwriting any existing files with the same name.
For an input file named ship.slp, the output might be testf0.png testf1.png ...
SLP (Sprite Language Processor) is a binary format developed for the Age of Empires engine. Rather than storing image data as pixels, it represents graphics through a sequence of commands such as draw, copy, shadow, etc.
- Each SLP file may contain multiple animation frames
- Version 2.0N uses 11 different command types
The implementation is based on the following specifications:
- https://gist.github.com/phrohdoh/2bbfe1ef324db9d7f4d24d23c2568938
- https://github.com/SFTtech/openage/blob/master/doc/media/slp-files.md
To extract SLP and PAL files from .drs archives, you can use my other utility:
- DRS-Builder — a tool to extract
content from
.drsfiles used in the same game engine
The project is designed for UNIX-like systems and adheres to POSIX standards. However, the source code is written in portable C and should not be difficult to adapt for other platforms.
- Clang compiler
- Standard C development tools (Make, shell)
On Linux:
./build-for-linux.shOn Mac:
/build-for-mac.sh