ValveResourceFormat
Valve’s Source 2 resource file format parser, decompiler, and exporter. ValveResourceFormat (VRF) is a powerful C# library that enables you to work with Source 2 game assets programmatically.Installation
Get started with NuGet package installation
Quick Start
Parse your first Source 2 resource in minutes
API Reference
Explore the complete API documentation
GitHub
View source code and contribute
Key Features
Comprehensive Format Support
Parse 50+ Source 2 resource types including models, textures, materials, maps, particles, animations, and more
VPK Package Reading
Extract and read files from Valve’s VPK archives using the integrated ValvePak library
Asset Export
Export textures to PNG/EXR, models to glTF, and materials to standard formats
Modern C# API
Built with .NET 10.0 featuring nullable reference types, AOT compatibility, and modern patterns
Supported Resource Types
ValveResourceFormat supports a wide range of Source 2 compiled resource files (files ending with_c):
Models & Meshes
Models & Meshes
- vmdl - Model files with geometry and materials
- vmesh - Mesh data
- vanim - Animation data
- vanmgrph - Animation graphs
- vagrp - Animation groups
- vmorf - Morph sets
- vphys - Physics collision meshes
Textures & Materials
Textures & Materials
- vtex - Compiled textures with multiple format support
- vmat - Material definitions
- vcompmat - Composite materials
Maps & Worlds
Maps & Worlds
- vmap - Map files
- vwrld - World files
- vwnod - World nodes
- vents - Entity lumps
- vvis - World visibility data
Particles & Effects
Particles & Effects
- vpcf - Particle systems
- vpsf/vsnap - Particle snapshots
- vpost - Post-processing settings
Audio
Audio
- vsnd - Compiled sounds
- vsndevts - Sound event scripts
- vsndstck - Sound stack scripts
- vmix - Audio mixing data
UI (Panorama)
UI (Panorama)
- vxml - Panorama layouts
- vcss - Panorama styles
- vjs - Panorama scripts
- vts - Panorama TypeScript
- vsvg - Panorama vector graphics
- vpdi - Panorama dynamic images
Other Formats
Other Formats
- vdata - Generic data files
- vsmart - Smart props
- vcd/vcdlist - Choreo scenes
- vrr - Response rules
- vpulse - Pulse graph definitions
- vcs - Compiled shaders
- vpk - Package files (via ValvePak)
Supported Games
ValveResourceFormat works with assets from all Source 2 games:- Half-Life: Alyx
- Dota 2
- Counter-Strike 2
- Artifact
- Dota Underlords
- The Lab
- Destinations
- SteamVR Home
- And any other Source 2 game or mod
Source 2 resource files typically end with
_c suffix (e.g., weapon.vmdl_c, texture.vtex_c). This indicates they are compiled binary formats, not the original source assets.Binary Format Support
The library handles various binary formats and encodings:| Magic | Description |
|---|---|
0x4B563301-05 | Binary KeyValues3 (versions 1-5) |
0x03564B56 | VKV\x03 - Binary KV3 with compression |
0x564B4256 | VBKV - Binary KeyValues1 |
0x55AA1234 | VPK - Valve packages |
0x44434356 | VCCD - Closed captions |
0x32736376 | vcs2 - Compiled shaders |
0xC4CCACE8/9 | Tools asset info |
0x414D5A4C | LZMA compression |
0xFEEDFACE | Navigation meshes |
VFONT1 | Encrypted font files |
Source 2 Viewer Application
This library powers the Source 2 Viewer desktop application, which provides a GUI for browsing and exporting Source 2 assets.Download Source 2 Viewer
Get the free desktop application for Windows, macOS, and Linux
Requirements
- .NET 10.0 or later
- Works on Windows, macOS, and Linux
- Native AOT compatible
Next Steps
Explore More
Check out the Quick Start guide and Guides for complete examples