SourcePP
SourcePP is an MIT-licensed open source collection of several libraries, which can read and write many Source engine file formats.
Precompiled builds are distributed for
Windows,
Linux, and
macOS, and should work without issue on any little-endian system (big-endian support is mostly untested, some libraries will not work).
SourcePP is written in C++20. Bindings of varying completeness exist for C, C#, and Python, and bindings for JavaScript and Rust are planned. C++ and Python are the languages with the most support and development focus.
Created by craftablescience, with contributions from many lovely people.
Included Libraries
Please see the project's GitHub readme for more details. The information here is heavily abbreviated. Most file formats in this list can be created from scratch, read from, and written to.
| Library | File Formats | Wrappers |
|---|---|---|
bsppp |
BSP (Source) | Python |
dmxpp* |
DMX | |
fspp* |
Source 1 filesystem recreation | |
gamepp |
Access information about/send data to a running game instance | C, Python |
kvpp |
KeyValues text† and binary | |
mdlpp* |
MDL, VTX, VVD | |
sndpp* |
WAV, XWV | |
steampp |
Parses Steam configs, find library folders, library assets, etc. | C, Python |
toolpp |
FGD, WC | Python |
vcryptpp |
VICE, VFONT | C, C#, Python |
vpkpp |
007, FGP, FPX, GCF, GMA, HOG, HROT, OL, ORE, PAK, PCK, SIN, VPK, VPK (V:TMB), VPP, WAD, XZP, XZP2, ZIP | C, C#, Python |
vtfpp |
FRAMES, PPL, SHT, TTH/TTZ, VTF, VTFX, VTF3, XTF (as well as many image formats) | C, Python |
* These libraries are incomplete and still in development. Their interfaces are unstable and will likely change in the future. Libraries not starred should be considered stable, and their existing interfaces will not change much if at all. Note that wrappers only exist for stable libraries.
† Many text-based formats in Source are close to (if not identical to) KeyValues, such as VMT and VMF.
Production Ready
Performance is an important consideration during development, and libraries are written with performance in mind from the outset.
For example, the vtfpp library has been benchmarked as being many times faster than VTFLib, likely due to a combination of the "pay for what you use" API, usage of threading for easily parallelized tasks, and optimized image format conversion routines.
These libraries are used by
VPKEdit, MareTF, and many other tools written by craftablescience and others.
They are used (directly and indirectly) by
Portal 2: Community Edition and
Momentum Mod to package and/or create some bundled assets. The project's GitHub readme has a more complete list of known consumers.
External links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||