An open API service indexing awesome lists of open source software.

https://github.com/craftablescience/sourcepp

Several modern C++20 libraries for sanely parsing Valve's formats
https://github.com/craftablescience/sourcepp

cpp cpp-library source-engine

Last synced: 8 days ago
JSON representation

Several modern C++20 libraries for sanely parsing Valve's formats

Awesome Lists containing this project

README

          


The Source Pretty Parsers logo. A printer-esque device is scanning a page with hex codes and printing a picture of Cordon Freeman.

Source Pretty Parsers



Build Status
License
Discord
Ko-Fi

Several modern C++20 libraries for sanely parsing Valve formats.

## Other Languages


Version
Python Versions

Wrappers for libraries considered complete exist for C, C#, and/or Python, depending on the library.

The Python wrappers can be found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.

## Included Libraries


Library
Supports
Read
Write
Bindings



bsppp

BSP v17-27

• Console modifications

• Left 4 Dead 2 modifications

Strata Source modifications



Python



fspp*
Source 1 filesystem accessor






gamepp
Get Source engine instance window title/position/size


C
Python



Run commands in a Source engine instance remotely





kvpp

DMX

• Legacy binary v1-2 encoding (binary_vN)

• Legacy SFM v1-9 encoding (sfm_vN)

• Binary v1-5, v9 encodings (binary, binary_seqids)

srctools encodings (unicode_*)



Python



KeyValues v1 Binary





KeyValues v1 Text





mdlpp*
MDL v44-49






VTX v7





VVD v4





sndpp*
WAV






XWV v0-1, v4





steampp
Find Steam install folder

-
C
Python



Find installed Steam games

-



Find Steam game library assets

-



toolpp

FGD (Source 1)

J.A.C.K. modifications

Hammer++ modifications

Strata Source modifications



Python




WC (CmdSeq) v0.1-0.2

Strata Source modifications






vcryptpp
VICE encrypted files


C
C#
Python



VFONT encrypted fonts





vpkpp
007 v1.1, v1.3 (007 - Nightfire)


C
C#
Python



APK (Fairy Tale Busters)





FGP v2-3 (PS3, Orange Box)





FPX v10 (Tactical Intervention)





GCF v6





GMA v1-3 (Garry's Mod)





HOG (Descent)





OL (Worldcraft Object Library)





ORE (Narbacular Drop)






PAK (Quake, WON Half-Life)

SiN modifications

HROT modifications






PCK v1-2 (Godot Engine)






VPK pre-v1, v1-2, v54

Counter-Strike: 2 modifications

Counter-Strike: Source ClientMod modifications






VPK (Vampire: The Masquerade - Bloodlines)





VPP v1-3 (Red Faction)





WAD v3





XZP v6 (Xbox, Half-Life 2)






ZIP

BEE_PACK alias (BEE2.4 Package)

BMZ alias (Source 1 Bonus Maps)

• FPK alias (Tactical Intervention)

PK3 alias (Quake III)

PK4 alias (Quake IV, Doom 3)

• PKZ alias (Quake II RTX)

• XZP2 modifications (X360 & PS3, misc. Source 1 titles)






vtfpp
APNG


C
Python



BMP





EXR v1





FRAMES (PS3, Orange Box)





GIF





HDR





JPEG





PIC





PNG





PNM (PGM, PPM)





PPL v0





PSD





QOI





SHT v0-1





TGA





TTX (TTH, TTZ) v1.0





VBF v3






VTF v7.0-7.6

Strata Source modifications

XTF v5.0 (Xbox, Half-Life 2)

VTFX v8 (X360 & PS3, Orange Box)

VTF3 v8 (PS3, Portal 2 & CS:GO)






WebP


(\*) 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 v1, such as [VMT](https://developer.valvesoftware.com/wiki/VMT) and [VMF](https://developer.valvesoftware.com/wiki/VMF_(Valve_Map_Format)).

## Gallery

Anything using the `sourcepp` parser set that I know of, directly or indirectly.

These are only the tools and games using `sourcepp` that I know of. If you would like to be listed here, [email me](mailto:lauralewisdev@gmail.com) or [join my Discord server](https://discord.gg/ASgHFkX), I'd love to hear from you!

### Tools

- [fgptool](https://github.com/craftablescience/fgptool): A tool to crack the filepath hashes in The Orange Box PS3 file groups.
- [gimp-vtf](https://github.com/chev2/gimp-vtf): A GIMP plugin to load and save VTF files.
- [gm_addon_optimization_tricks](https://github.com/wrefgtzweve/gm_addon_optimization_tricks): A desktop tool to optimize Garry's Mod addons/maps.
- [GodotSource](https://github.com/craftablescience/godotsource): A work-in-progress set of bindings to connect the `sourcepp` libraries to Godot. Allows GDScript to work with the libraries, and allows Godot to directly load Source engine assets from a user project or from installed Source games.
- [MareTF](https://github.com/craftablescience/MareTF): An open source MIT-licensed CLI/GUI tool that can create, extract from, preview the contents of and write to every variant of VTF file. Replicates the functionality of Valve's `vtex.exe` and VTFEdit.
- [Myst IV: Revolution](https://github.com/tomysshadow/M4Revolution): Performs various fixes for the game Myst IV: Revelation.
- [PBR-2-Source](https://github.com/koerismo/PBR-2-Source): A Python-powered GUI for converting PBR materials into materials compatible with the Source engine.
- [QVTF++](https://github.com/craftablescience/qvtfpp): A QImageIO plugin to load VTF textures, based on panzi's QVTF plugin.
- [RectMaker](https://github.com/cplbradley/RectMaker): A freeware GUI tool that can create and modify `.rect` files used in Hammer++'s hotspotting algorithm.
- [reloaded2ps3](https://github.com/craftablescience/reloaded2ps3): Convert the PC version of Portal Reloaded to a playable PS3 game.
- [Verifier](https://github.com/StrataSource/verifier): A small program that can build an index of a game's files, and validate existing files based on that index. Similar to Steam's "Verify integrity of game files" option, but without overwriting any files.
- [VPKEdit](https://github.com/craftablescience/VPKEdit): An open source MIT-licensed CLI/GUI tool that can create, extract from, preview the contents of and write to several pack file formats. Replicates the functionality of Valve's `vpk.exe` and GCFScape.
- [bsp-linux-fix](https://github.com/dresswithpockets/bsp-linux-fix): Patches maps which have improperly cased packed assets by repacking the assets, fixing an issue on Linux.
- [CS2-EomVotesFix](https://github.com/Kitof/CS2-EomVotesFix): Fixes displaying workshop map names and thumbnails during end-of-match voting for LAN events.
- [dham](https://github.com/Seraphli/dham): Modifies Dota 2 hero aliases based on a configuration file and packages the changes.
- [Linux BSP Case Folding Workaround](https://github.com/scorpius2k1/linux-bsp-casefolding-workaround): A bash script designed to resolve issues with improperly cased packed map assets in Source engine games on Linux. Extracting the assets allows the game to find them properly.
- [props_scaling_recompiler](https://github.com/Ambiabstract/props_scaling_recompiler): Allows converting `prop_scalable` into a static prop, effectively implementing static prop scaling outside CS:GO.
- [rock:sail](https://github.com/Le0X8/rocksail): CS2 client-side tool to use skins for free (only visible to the user of the tool).
- [vpk2wad_nd](https://github.com/p2r3/vpk2wad_nd): Converts textures in a VPK to a WAD that can be used by Narbacular Drop maps.
- [VTF Forge](https://github.com/Trico-Everfire/VTF-Forge): A modern multiplatform recreation of VTFEdit, using Qt.
- [VTF Thumbnailer](htps://github.com/craftablescience/vtf-thumbnailer): Adds previews for VTF files in your file explorer of choice on Windows and Linux.

### Games


Portal 2: Community Edition


  • Local addon assets are packed with sourcepp.

  • Verifier and VPKEdit are shipped with the game.





Momentum Mod


  • Some bundled textures are created and/or compressed with MareTF.

  • Some bundled assets are packed with VPKEdit.





Nightmare House: The Original Mod


  • Game assets are packed with VPKEdit.



## Special Thanks

- `bsppp` partial library redesign, lump compression and game lump parsing/writing support contributed by [@Tholp](https://github.com/Tholp1).
- `dmxpp`'s support for srctools formats was contributed by [@TeamSpen210](https://github.com/TeamSpen210).
- `steampp` is based on the [SteamAppPathProvider](https://github.com/Trico-Everfire/SteamAppPathProvider) library by [@Trico Everfire](https://github.com/Trico-Everfire) and [Momentum Mod](https://momentum-mod.org) contributors.
- `vpkpp`'s 007 parser is based on [reverse-engineering work](https://raw.githubusercontent.com/SmileyAG/dumpster/refs/heads/src_jb007nightfirepc_alurazoe/file_format_analysis.txt) by Alhexx.
- `vpkpp`'s GCF parser was contributed by [@eepycats](https://github.com/eepycats) and [@ymgve](https://github.com/ymgve).
- `vpkpp`'s HOG parser was contributed by [@erysdren](https://github.com/erysdren).
- `vpkpp`'s OL parser is based on [reverse-engineering work](https://github.com/erysdren/scratch/blob/main/kaitai/worldcraft_ol.ksy) by [@erysdren](https://github.com/erysdren).
- `vpkpp`'s ORE parser is based on [reverse-engineering work](https://github.com/erysdren/narbacular-drop-tools) by [@erysdren](https://github.com/erysdren).
- `vpkpp`'s VPP parser was contributed by [@erysdren](https://github.com/erysdren).
- `vpkpp`'s WAD3 parser/writer was contributed by [@ozxybox](https://github.com/ozxybox).
- `vtfpp`'s NICE/Lanczos-3 resize filter support was contributed by [@koerismo](https://github.com/koerismo).
- `vtfpp`'s SHT parser/writer was contributed by [@Trico Everfire](https://github.com/Trico-Everfire).
- `vtfpp`'s initial VTF write support was loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
- `vtfpp`'s HDRI to cubemap conversion code is modified from the [HdriToCubemap](https://github.com/ivarout/HdriToCubemap) library by [@ivarout](https://github.com/ivarout).