KeyValues2 0.4.0
See the version list below for details.
dotnet add package KeyValues2 --version 0.4.0
NuGet\Install-Package KeyValues2 -Version 0.4.0
<PackageReference Include="KeyValues2" Version="0.4.0" />
<PackageVersion Include="KeyValues2" Version="0.4.0" />
<PackageReference Include="KeyValues2" />
paket add KeyValues2 --version 0.4.0
#r "nuget: KeyValues2, 0.4.0"
#:package KeyValues2@0.4.0
#addin nuget:?package=KeyValues2&version=0.4.0
#tool nuget:?package=KeyValues2&version=0.4.0
Datamodel.NET is a CLR library which implements the Datamodel structure and Datamodel Exchange file format.
Datamodel is a strongly-typed generic data structure designed by Valve Corporation for use in their games. Datamodel Exchange is a Datamodel container file format with multiple possible encodings; binary and ASCII ("keyvalues2") are included.
Datamodel Attributes
The following CLR types are supported as Datamodel attributes:
intfloatboolstringbytebyte[]ulongSystem.TimeSpan
Additionally, the following Datamodel.NET types are supported:
Element(a named collection of attributes)Vector2Vector3/QAngleVector4/QuaternionMatrix(4x4)
IList<T> collections of the above types are also supported. (This can be a bit confusing given that both byte and byte[] are valid attribute types; use the ByteArray type if you run into trouble.)
Datamodel.NET features
- Threaded, thread-safe
- Support for all known versions of Valve's
binaryandkeyvalues2DMX encodings - Convenient
IEnumerable,INotifyPropertyChangedandINotifyCollectionChangedimplementations - Supports partial trust
- Inline documentation
- Binary codec supports just-in-time attribute loading
- Write your own codecs with the
ICodecinterface - Support for property based attributes, Datamodel.Element subclassing (serialize only)
Quick example
var HelloWorld = new Datamodel.Datamodel("helloworld", 1); // must provide a format name (can be anything) and version
HelloWorld.Root = new Datamodel.Element(HelloWorld, "my_root");
HelloWorld.Root["Hello"] = "World"; // any supported attribute type can be assigned
var MyString = HelloWorld.Root.Get<string>("Hello");
HelloWorld.Save("hello world.dmx", "keyvalues2", 1); // must provide an encoding name and version
<--! dmx encoding keyvalues2 1 format helloworld 1>
{
"Hello" "string" "World"
}
| Product | Versions 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. |
-
net6.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on KeyValues2:
| Package | Downloads |
|---|---|
|
ValveResourceFormat
Library to decompile Valve Source 2 files |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on KeyValues2:
| Repository | Stars |
|---|---|
|
ValveResourceFormat/ValveResourceFormat
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.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.0-beta | 185 | 6/5/2025 |
| 0.8.0 | 3,799 | 5/25/2025 |
| 0.7.0 | 142 | 5/24/2025 |
| 0.5.0 | 2,422 | 9/25/2024 |
| 0.5.0-beta | 5,794 | 3/11/2024 |
| 0.4.0 | 879 | 1/22/2024 |
| 0.3.0 | 6,766 | 6/30/2023 |
| 0.2.0 | 306 | 5/3/2023 |