ValveResourceFormat 0.3.2.1621

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ValveResourceFormat --version 0.3.2.1621
                    
NuGet\Install-Package ValveResourceFormat -Version 0.3.2.1621
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ValveResourceFormat" Version="0.3.2.1621" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ValveResourceFormat" Version="0.3.2.1621" />
                    
Directory.Packages.props
<PackageReference Include="ValveResourceFormat" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ValveResourceFormat --version 0.3.2.1621
                    
#r "nuget: ValveResourceFormat, 0.3.2.1621"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ValveResourceFormat@0.3.2.1621
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ValveResourceFormat&version=0.3.2.1621
                    
Install as a Cake Addin
#tool nuget:?package=ValveResourceFormat&version=0.3.2.1621
                    
Install as a Cake Tool

VRF / Valve Resource Format

View VRF website

Valve's Source 2 resource file format parser, decompiler, and exporter. Source 2 files usually files end with _c, for example .vmdl_c.

Basic usage:

var file = "textures/debug.vtex_c";

using var resource = new Resource();
resource.Read(file);

// You can access blocks and data on `resource` object

Extract a texture as png bytes:

using var bitmap = ((Texture)resource.DataBlock).GenerateBitmap();
var bytes = TextureExtract.ToPngImage(bitmap);

Or use file extract helper which works for various resource types:

using var contentFile = FileExtract.Extract(resource, null);
var outFilePath = "dump";

DumpContentFile(outFilePath, contentFile);

void DumpContentFile(string path, ContentFile contentFile)
{
    DumpFile(path, contentFile.Data);

    foreach (var contentSubFile in contentFile.SubFiles)
    {
        DumpFile(Path.Combine(Path.GetDirectoryName(path), contentSubFile.FileName), contentSubFile.Extract.Invoke());
    }
}

void DumpFile(string path, ReadOnlySpan<byte> data)
{
    Directory.CreateDirectory(Path.GetDirectoryName(path));

    File.WriteAllBytes(path, data.ToArray());
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ValveResourceFormat:

Package Downloads
CS2CalloutExtractor

A library for extracting callouts from Counter-Strike 2 `.vpk` files.

ValveResourceFormat.Renderer

OpenGL-based rendering engine for Source 2 game assets. Supports models, maps, materials, particles, and animations with PBR lighting.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on ValveResourceFormat:

Repository Stars
MontagueM/Charm
Destiny 2 reverse engineering tool for extracting cool things from game files.
Version Downloads Last Updated
18.0.5805 539 2/5/2026
17.0.5499 216 1/2/2026
16.0.5103 799 11/20/2025
15.0.4937 315 9/26/2025
14.1.4764 448 8/1/2025
14.1.4763 137 8/1/2025
14.0.4733 571 7/24/2025
13.0.4499 1,120 6/3/2025
12.0.4261 466 4/18/2025
11.1.4050 956 12/19/2024
11.0.3961 271 12/3/2024
10.2.3850 617 9/3/2024
10.1.3729 4,384 7/13/2024
10.0.3595 252 5/27/2024
9.2.3481 253 4/26/2024
9.1.3441 245 4/16/2024
9.0.3293 266 3/14/2024
8.1.3021 273 2/6/2024
8.0.2968 200 1/31/2024
0.3.2.1621 498 4/4/2023
Loading failed