Skip to main content

Modules for working with Valve's Source Engine file formats.

Project description

srctools

Documentation Status

Modules for working with Valve's Source Engine file formats, as well as a variety of tools using these.

Installation

Simply pip install srctools, you'll need Python 3.8+.

Core Modules:

  • math: Core vector, angles and matrix classes, with Cython accelerated versions.
  • cmdseq: Reads and writes Hammer's expert compile command list format.
  • filesys: Allows accessing VPKs, zips, folders etc using a unified interface, as well as a prioritised chain like the engine's game folder system.
  • logger: Wrappers around the logging module allowing str.format interpolation support, among others.
  • const: Various shared constants and enums.
  • tokenizer: Cython-accelerated tokenizer for parsing the various text files.
  • binformat: Some tools for handling binary file formats.

File formats:

  • keyvalues: Reads and writes KeyValues1 property trees.
  • dmx: Reads and writes DMX / KeyValues2 format files.
  • vmf: Reads and writes VMF map files.
  • bsp: Reads and writes compiled BSP maps files.
  • fgd: Reads and writes FGD entity definitions. A compressed database of definitions from most games is also included, from HammerAddons. Note that this parses a superset of the FGD format, including "tags" to allow specifying which entities and keyvalues are supported for different engine branches.
  • mdl: Reads some parts of compiled MDL/VTX/VVD/PHY models.
  • smd: Reads and writes SMD geometry data.
  • sndscript: Reads and writes soundscripts.
  • vmt: Reads and writes VMT material files.
  • vpk: Reads and writes VPK packages.
  • vtf: Reads and writes VTF images, including DXT compression.
  • particles: Reads and writes PCF particle systems.

Tools:

  • game: Parses gameinfo.txt files, and handles accessing the searchpaths.
  • instancing: Implements logic for collapsing func_instance into maps.
  • packlist: Stores a list of files of various types, then computes dependencies recursively. This also includes a database of resources required by game code for different entity classes.
  • run: Code to run a compiler, logging the output as it executes while still storing it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

srctools-2.3.15.tar.gz (2.2 MB view hashes)

Uploaded Source

Built Distributions

srctools-2.3.15-pp39-pypy39_pp73-win_amd64.whl (1.0 MB view hashes)

Uploaded PyPy Windows x86-64

srctools-2.3.15-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

srctools-2.3.15-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (1.1 MB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

srctools-2.3.15-pp38-pypy38_pp73-win_amd64.whl (1.0 MB view hashes)

Uploaded PyPy Windows x86-64

srctools-2.3.15-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

srctools-2.3.15-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (1.1 MB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

srctools-2.3.15-cp311-cp311-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

srctools-2.3.15-cp311-cp311-win32.whl (1.0 MB view hashes)

Uploaded CPython 3.11 Windows x86

srctools-2.3.15-cp311-cp311-musllinux_1_1_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

srctools-2.3.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

srctools-2.3.15-cp311-cp311-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

srctools-2.3.15-cp310-cp310-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

srctools-2.3.15-cp310-cp310-win32.whl (1.0 MB view hashes)

Uploaded CPython 3.10 Windows x86

srctools-2.3.15-cp310-cp310-musllinux_1_1_x86_64.whl (4.0 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

srctools-2.3.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

srctools-2.3.15-cp310-cp310-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

srctools-2.3.15-cp39-cp39-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

srctools-2.3.15-cp39-cp39-win32.whl (1.0 MB view hashes)

Uploaded CPython 3.9 Windows x86

srctools-2.3.15-cp39-cp39-musllinux_1_1_x86_64.whl (4.0 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

srctools-2.3.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

srctools-2.3.15-cp39-cp39-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

srctools-2.3.15-cp38-cp38-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

srctools-2.3.15-cp38-cp38-win32.whl (1.0 MB view hashes)

Uploaded CPython 3.8 Windows x86

srctools-2.3.15-cp38-cp38-musllinux_1_1_x86_64.whl (4.1 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

srctools-2.3.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

srctools-2.3.15-cp38-cp38-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page