When contributing new code, run dotnet format and make sure tests pass with dotnet test.
If you need help or pointers, join our Discord
All new code should preferably go into the library component, which is shared by the GUI, CLI, and the library itself is published on NuGet for others to use.
If you are adding support for new file formats (or new file versions), add the smallest possible test files to the Tests/Files folder.
If it's not a generic _c file, then you will have to add a test case to
actually load and test the new files.
If you are modifying shaders, you need to run shader validator to ensure all shaders compile successfully, as we use runtime compilation. To perform full validation:
dotnet run --project misc/shadervalidatorTo perform filtered validation:
dotnet run --project misc/shadervalidator "water"New file formats should preferably also be readable by the CLI, at the very least just print information from the parsed file to console.
There are places in VRF which define certain mappings that are required to be updated manually. This is a list of these places to make them easier to track.
GUI/Icons/AssetTypes folder contains png files of assets that have unique icons in the
package viewer. For example mp3.png will be used for files ending with .mp3.
These icons should all have the same size. Use TinyPNG to optimize them.
If a high resolution icon is available (from Source 2 tools), put it in Misc/Icons/AssetTypes folder.
Map files have entity lumps and every entity has a key value, but the keys use murmur hashes instead of strings. To map them back to strings we have a big list of known key names which are hashed at runtime and a backwards lookup is performed.
The list is in EntityLumpKnownKeys.cs file. All keys must be lowercase, and the list is sorted alphabetically.
CLI Decompiler can help collect unknown hashes by using --stats --dump_unknown_entity_keys.
When scanning vents_c files, a unknown_keys.txt file will be created.
This file can be used with MurmurHashMatcher utility which bruteforces game files and binaries to find strings.
There is also a VrfFgdParser tool which parses FGD files to extract all possible key names and entity icons.
HammerEntities.cs contains a mapping of entity names and their Hammer icons (sprite or model). Unfortunately different games may have different paths for these icons, so they may not always be available.
Use VrfFgdParser to extract them.
MapExtract.cs contains various mappings of entity/collision tags to Hammer tool textures. These are used in map decompiler and to display an adequate texture in map physics viewer.
ShaderDataProvider.cs contains a list of shader names and which texture files are used, along with which channels they use.
This is required for correct material extraction. These mappings are used as a fall-back when querying VCS files fails in some way.
- Run
dotnet run misc/release.cs X.X git push --follow-tags
- Bump
ProjectBaseVersioninDirectory.Build.propsfile - Commit it with a message like
Bump version to X.X - Create a signed tag:
git tag -s X.X(or-aif not signed) git push --follow-tags
- Wait for CI build to publish a release on GitHub
- Login to SignPath and approve the signing
- Update release with changelog
See AGENTS.md for more information.