<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.datagirl.xyz/w/index.php?action=history&amp;feed=atom&amp;title=Valve_Data_Format</id>
	<title>Valve Data Format - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.datagirl.xyz/w/index.php?action=history&amp;feed=atom&amp;title=Valve_Data_Format"/>
	<link rel="alternate" type="text/html" href="https://wiki.datagirl.xyz/w/index.php?title=Valve_Data_Format&amp;action=history"/>
	<updated>2026-05-13T14:56:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://wiki.datagirl.xyz/w/index.php?title=Valve_Data_Format&amp;diff=231&amp;oldid=prev</id>
		<title>Flurry: Created page with &quot;'''Valve Data Format (VDF)''' files are key-value stores used by Source games and Steam.  == Text VDF ==  Most VDF files you'll see are text-based. The spec is pretty well-defined on the [https://developer.valvesoftware.com/wiki/KeyValues Valve Developer Community wiki].  &lt;syntaxhighlight lang=&quot;c&quot;&gt; &quot;ParentElem&quot; {     &quot;Key1&quot; &quot;1.25&quot;     &quot;Key2&quot; &quot;String of text&quot;     &quot;ChildElem&quot;     {         &quot;Key3&quot; &quot;15&quot;         // and so on     } } &lt;/syntaxhighlight&gt;  == Compiled VDF ==  In...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.datagirl.xyz/w/index.php?title=Valve_Data_Format&amp;diff=231&amp;oldid=prev"/>
		<updated>2023-07-11T19:06:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Valve Data Format (VDF)&amp;#039;&amp;#039;&amp;#039; files are key-value stores used by Source games and Steam.  == Text VDF ==  Most VDF files you&amp;#039;ll see are text-based. The spec is pretty well-defined on the [https://developer.valvesoftware.com/wiki/KeyValues Valve Developer Community wiki].  &amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt; &amp;quot;ParentElem&amp;quot; {     &amp;quot;Key1&amp;quot; &amp;quot;1.25&amp;quot;     &amp;quot;Key2&amp;quot; &amp;quot;String of text&amp;quot;     &amp;quot;ChildElem&amp;quot;     {         &amp;quot;Key3&amp;quot; &amp;quot;15&amp;quot;         // and so on     } } &amp;lt;/syntaxhighlight&amp;gt;  == Compiled VDF ==  In...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Valve Data Format (VDF)''' files are key-value stores used by Source games and Steam.&lt;br /&gt;
&lt;br /&gt;
== Text VDF ==&lt;br /&gt;
&lt;br /&gt;
Most VDF files you'll see are text-based. The spec is pretty well-defined on the [https://developer.valvesoftware.com/wiki/KeyValues Valve Developer Community wiki].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;ParentElem&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;Key1&amp;quot; &amp;quot;1.25&amp;quot;&lt;br /&gt;
    &amp;quot;Key2&amp;quot; &amp;quot;String of text&amp;quot;&lt;br /&gt;
    &amp;quot;ChildElem&amp;quot;&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;Key3&amp;quot; &amp;quot;15&amp;quot;&lt;br /&gt;
        // and so on&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiled VDF ==&lt;br /&gt;
&lt;br /&gt;
In some cases, the VDF will be in a &amp;quot;compiled&amp;quot; form.&amp;lt;ref&amp;gt;As far as I've seen, this is only really with shortcuts.vdf.&amp;lt;/ref&amp;gt; Each entry is in the following format:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;type&amp;gt; &amp;lt;key&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; is exactly one byte, and appears to be related to the following enum:&amp;lt;ref&amp;gt;From [https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/public/tier1/KeyValues.h#L227-L238 ValveSoftware/source-sdk-2013] on Github.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
enum types_t&lt;br /&gt;
{&lt;br /&gt;
	TYPE_NONE = 0,&lt;br /&gt;
	TYPE_STRING,&lt;br /&gt;
	TYPE_INT,&lt;br /&gt;
	TYPE_FLOAT,&lt;br /&gt;
	TYPE_PTR,&lt;br /&gt;
	TYPE_WSTRING,&lt;br /&gt;
	TYPE_COLOR,&lt;br /&gt;
	TYPE_UINT64,&lt;br /&gt;
	TYPE_NUMTYPES, &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; is always a null-terminated string. Arrays appear to be emulated with numeric strings; e.g., &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, ...&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; format is determined by the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;. All values are little endian.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Data format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x00 (TYPE_NONE)&amp;lt;/code&amp;gt; || Represents a nested key-value map. The &amp;quot;value&amp;quot; is the first entry onward. All maps (including the &amp;quot;root&amp;quot; map) must be terminated with &amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x01 (TYPE_STRING)&amp;lt;/code&amp;gt; || Null-terminated string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x02 (TYPE_INT)&amp;lt;/code&amp;gt; || Little-endian 32-bit (unsigned?) integer.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Any types not mentioned above haven't been encountered, and I don't know if they exist in &amp;quot;compiled&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Flurry</name></author>
	</entry>
</feed>