Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slpc - SLP to PNG Converter

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.

Synopsis

slpc -p PAL_FILE [-j PLAYER_ID] [-f] SLP_FILE…

Options

  • -p PAL_FILE
    Path to the PaintShop Pro Color Palette file (PAL).
    This file is typically found in interface.drs, located in the data/ folder of an Age of Empires installation. The standard palette is file 50500.bina.

  • -j PLAYER_ID
    (Optional) ID of the player for which the graphics are rendered.
    Accepts values from 1 to 8. 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.

Output Format

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 ...

About the SLP Format

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

Documentation Sources

The implementation is based on the following specifications:

Additional Tools

To extract SLP and PAL files from .drs archives, you can use my other utility:

  • DRS-Builder — a tool to extract content from .drs files used in the same game engine

Installation

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.

Requirements

  • Clang compiler
  • Standard C development tools (Make, shell)

Build Instructions

On Linux:

./build-for-linux.sh

On Mac:

/build-for-mac.sh

About

A command-line utility to convert Age of Empires 1 SLP sprite files (version 2.0N) into PNG images. Written in portable posix C.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages