base on Source 2 Viewer is a powerful tool that allows you to browse VPK archives, view, extract, and decompile Source 2 assets, including maps, models, materials, textures, sounds, and more. <h1 align="center"><img src="./Misc/Icons/source2viewer.png" width="64" align="center"> Source 2 Viewer</h1> <p align="center"> <a href="https://github.com/ValveResourceFormat/ValveResourceFormat/actions"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/ValveResourceFormat/ValveResourceFormat/build.yml?logo=github&style=for-the-badge&branch=master"></a> <a href="https://www.nuget.org/packages/ValveResourceFormat/"><img src="https://img.shields.io/nuget/v/ValveResourceFormat.svg?logo=nuget&style=for-the-badge"></a> <a href="https://app.codecov.io/gh/ValveResourceFormat/ValveResourceFormat"><img src="https://img.shields.io/codecov/c/github/ValveResourceFormat/ValveResourceFormat/master?logo=codecov&logoColor=ffffff&style=for-the-badge"></a> </p> *\* The library component of Source 2 Viewer is called ValveResourceFormat (VRF).* Valve's Source 2 resource file format parser, decompiler, and exporter. Source 2 files usually end with `_c`, for example `.vmdl_c`. This repository is split into three components: - **CLI Decompiler** - File data viewer, decompiler and a playground for testing new formats and features. - **GUI Viewer** - A vpk archive viewer and extractor. Also supports viewing resources such as sounds, textures, models, maps, and much more. - **Library** - Provides public API to parse resource files and some helpers. āš’ [View the official website for downloads](https://valveresourceformat.github.io/). ā„¹ļø [View the library documentation here](https://s2v.app/ValveResourceFormat/api/ValveResourceFormat.html). ## Join our Discord [![Join our Discord](https://discord.com/api/guilds/467730051622764565/embed.png?style=banner2)](https://steamdb.info/discord/) ## Eye catchy screenshots <table> <tr> <td><img src="https://valveresourceformat.github.io/static/screen_map.png"></td> <td><img src="https://valveresourceformat.github.io/static/screen_texture.png"></td> </tr> <tr> <td><img src="https://valveresourceformat.github.io/static/screen_package.png"></td> <td><img src="https://valveresourceformat.github.io/static/screen_cli.png"></td> </tr> </table> ## What's supported? - VPK viewer which supports opening and exporting files - Creating new vpk archives - Model viewer and decompiler to glTF and modeldoc - Map viewer and decompiler to glTF and vmap - Material decompiler to vmat - Sound player - Binary KeyValues3 parser - NTRO support ## Limitations This tool is based entirely on a reverse engineered effort because Valve does not provide any documentation or Source 2 code (SDK or engine code), while the Source 1 SDK and leaked engine code are helpful, a lot of systems and formats have changed. The code contained in this repository is based on countless hours of reverse engineering Source 2 games and not all intricate details have been figured out. If you are interested in helping, take a look at the open issues and join our Discord. Not all formats are 100% supported, some parameters are still unknown and not fully understood. ## Supported resource types Ext | Name | Support ------------- | --------------------------------- | ------- vagrp | Animation Group | šŸ‘ vanim | Animation | šŸ‘ vanmgrph | Animation Graph | šŸ‘ vcd | Choreo | šŸ‘ vcdlist | Choreo Scene File Data | šŸ‘ vcompmat | Composite Material | šŸ‘ vcss | Panorama Style | šŸ‘ vdata | Data | šŸ‘ vents | EntityLump | šŸ‘ vjs | Panorama Script | šŸ‘ vmap | Map | šŸ‘ vmat | Material | šŸ‘ vmdl | Model | šŸ‘ vmesh | Mesh | šŸ‘ vmix | VMix | šŸ‘ vmorf | MorphSet | šŸ‘ vnmclip | NmClip | šŸ‘ vnmgrph | NmGraph | šŸ‘ vnmskel | NmSkeleton | šŸ‘ vnmvar | NmGraph Variation | šŸ‘ vpcf | Particle System | šŸ‘ vpdi | Panorama Dynamic Images | No vphys | Physics Collision Mesh | šŸ‘ vpost | Postprocessing Settings | šŸ‘ vpram | Processing Graph Instance | šŸ‘ vpsf | Particle Snapshot | šŸ‘ vpulse | Pulse Graph Definition | šŸ‘ vrman | ResourceManifest | šŸ‘ vrmap | Resource Remap Table | No vrr | Response Rules | šŸ‘ vseq | Sequence Group | No vsmart | Smart Prop | Partially vsnap | Particle Snapshot | šŸ‘ vsnd | Sound | šŸ‘ vsndevts | Sound Event Script | šŸ‘ vsndstck | Sound Stack Script | šŸ‘ vsurf | Surface Properties | No vsvg | Panorama Vector Graphic | šŸ‘ vtex | Compiled Texture | šŸ‘ vts | Panorama TypeScript | šŸ‘ vvis | World Visibility | No vwnod | World Node | šŸ‘ vwrld | World | šŸ‘ vxml | Panorama Layout | šŸ‘ &nbsp; | &nbsp; | &nbsp; csgoitem | CSGO Item | šŸ‘ econitem | CSGO Economy Item | šŸ‘ herolist | Dota Hero List | šŸ‘ item | Artifact Item | šŸ‘ vdpn | Dota Patch Notes | šŸ‘ vdvn | Dota Visual Novels | šŸ‘ &nbsp; | &nbsp; | &nbsp; bin | Tools Asset Info | šŸ‘ Handled by `ToolsAssetInfo` dat | Closed Captions | šŸ‘ Handled by `ClosedCaptions` vcs | Compiled Shader | šŸ‘ Handled by `CompiledShader` vdacdefs | DAC Game Defs Data | No vfe | Flex Scene File | šŸ‘ Handled by `FlexSceneFile` vfont | Bitmap Font | šŸ‘ Decrypts `VFONT1`, supported in Source 1 and Source 2. vpk | Pak (package) | šŸ‘ Handled by [ValvePak](https://github.com/ValveResourceFormat/ValvePak) ## List of supported magics Magic | Description ------------ | ------------ `0x03564B56` | VKV\x03 - First binary keyvalues 3 encoding with custom block compression `0x4B563301` | KV3\x01 - Binary keyvalues 3 (version 1) `0x4B563302` | KV3\x02 - Binary keyvalues 3 (version 2) `0x4B563303` | KV3\x03 - Binary keyvalues 3 (version 3) `0x4B563304` | KV3\x04 - Binary keyvalues 3 (version 4) `0x4B563305` | KV3\x05 - Binary keyvalues 3 (version 5) `0x564B4256` | VBKV - binary keyvalues 1 (handled by ValveKeyvalue) `0x55AA1234` | VPK - valve package (handled by ValvePak) `0x44434356` | VCCD - closed captions `0xC4CCACE8` | tools asset info `0xC4CCACE9` | tools asset info (newer version) `0x32736376` | vcs2 - compiled shader `0x31415926` | murmurhash2 seed used by StringToken `0xEDABCDEF` | murmurhash64 seed used to encode resource IDs `VFONT1` | "encrypted" font file `0x00564645` | VFE - flex scene file # GUI Source 2 Viewer keeps its settings in `%LocalAppData%/Source2Viewer/settings.vdf`. ## GUI Keybinds ### General | Key | Action | | --- | ------ | | <kbd>Ctrl-O</kbd> | Open a new file | | <kbd>Ctrl-F</kbd> | Open find window (package or text viewer) | | <kbd>Ctrl-W</kbd> | Close current tab | | <kbd>Ctrl-Q</kbd> | Close all tabs | | <kbd>Ctrl-E</kbd> | Close all tabs to the right of the current one | | <kbd>Ctrl-R</kbd> or <kbd>F5</kbd> | Reload current tab | ### Map/model viewer ### Camera | Key | Action | | --- | ------ | | Hold <kbd>LMB</kbd> | Rotate the camera | | <kbd>ShiftLeft+LMB</kbd> | Pan the camera | | <kbd>AltLeft+LMB</kbd> | Move camera forward or backwards | | <kbd>W</kbd><kbd>A</kbd><kbd>S</kbd><kbd>D</kbd> | Move the camera | | <kbd>Q</kbd> | Move the camera up | | <kbd>Z</kbd> | Move the camera down | | Hold <kbd>Ctrl</kbd> and <kbd>LMB</kbd> | Move the light position (in model viewer) | #### Objects | Key | Action | | --- | ------ | | Click <kbd>LMB</kbd> | Pick an object | | <kbd>Ctrl+LMB</kbd> | Toggle object selection | | Double click <kbd>LMB</kbd> | Open entity info dialog | | Double click <kbd>Ctrl+LMB</kbd> | Open object in a new tab | | <kbd>Delete</kbd> | Temporarily hide the selected object (toggle world layers to restore) | #### Other | Key | Action | | --- | ------ | | <kbd>F11</kbd> | Enter/exit fullscreen | | <kbd>Ctrl-C</kbd> | Copy viewport screenshot to clipboard | ### Texture viewer | Key | Action | | --- | ------ | | Hold <kbd>LMB</kbd> | Move around the picture | | Arrow keys | Move around the picture | | <kbd>Ctrl-0</kbd> | Reset zoom | | <kbd>Ctrl</kbd> and <kbd>+</kbd> | Zoom in | | <kbd>Ctrl</kbd> and <kbd>-</kbd> | Zoom out | | <kbd>Ctrl-C</kbd> | Copy current texture to clipboard | | <kbd>Ctrl-S</kbd> | Save current texture to disk | | <kbd>F11</kbd> | Enter/exit fullscreen | # Misc ## License Contents of this repository are available under [MIT license](LICENSE), except for `Tests/Files` folder contains files which have likely come from Valve's games. ## Code signing policy Free code signing provided by [SignPath.io](https://about.signpath.io), certificate by [SignPath Foundation](https://signpath.org). ", Assign "at most 3 tags" to the expected json: {"id":"2758","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"