Add Non-Steam Game: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Removed duplicate entries and correct casing)
(Fix the format)
Line 4: Line 4:
Non-Steam Games are saved in the file: <code><<Steam Installation>>\userdata\<<User ID>>\config\shortcuts.vdf</code>.
Non-Steam Games are saved in the file: <code><<Steam Installation>>\userdata\<<User ID>>\config\shortcuts.vdf</code>.


The file always starts with '<code> shortcuts </code>'.
{{note|There is a space on either side of the word 'shortcuts'}}


All shortcuts are separated by two '<code>NULL</code>' characters.  
Null (<code>NUL</code>) characters are used to denote the end of a key.


Typical format is as follows (NewLines added for clarity, '<code>|NULL|</code>' represents a null character):
A key surrounded by two Null (<code>NUL</code>) characters denote the beginning of a set. (e.g. <code>NUL</code>Set Name<code>NUL</code>)
{{note|There should not be '''any''' new lines in your actual shortcuts.vdf file.}}
 
Start of Header (<code>SOH</code>) characters are used to denote that next key is actually a value to assign to this key. (e.g. <code>SOH</code>Key<code>NUL</code>Value<code>NUL</code>)
 
Start of Text (<code>STX</code>) characters are used to denote that the next several keys are values to assign to this key. (Always four special characters - Could be one <code>SOH</code> and three <code>NUL</code>, or four <code>NUL</code> in a row)
 
Backspace (<code>BS</code>) characters are used to denote the end of a set. (e.g. <code>NUL</code>Set Name<code>NUL</code>Definition<code>BS</code>)
 
 
Typical format is as follows (New lines and indentation added for clarity; characters within two vertical separators [e.g. |NUL|] represent special characters):
{{note|There should not be '''any''' new lines or indentation in your actual shortcuts.vdf file.}}
{{note|Indentation is only a best guess attempt at determining the format of the .vdf file.}}


<pre>
<pre>
shortcuts  
|NUL|shortcuts|NUL|
  0 |NULL|
  |NUL|0|NUL|
appname NAME |NULL|
  |SOH|AppName|NUL|APP NAME WITHOUT QUOTES|NUL|
exe "EXE" |NULL|
  |SOH|Exe|NUL|"PATH TO EXE"|NUL|
StartDir "STARTDIR" |NULL|
  |SOH|StartDir|NUL|"DIRECTORY TO START IN"|NUL|
icon "ICON" |NULL|
  |SOH|icon|NUL|"PATH TO ICON"|NUL|
ShortcutPath |NULL|
  |SOH|ShortcutPath|NUL||NUL|
LaunchOptions |NULL|
  |SOH|LaunchOptions|NUL||NUL|
IsHidden     |NULL|
  |STX|IsHidden|NUL||NUL||NUL||NUL||NUL|
AllowDesktopConfig |NULL|
  |STX|AllowDesktopConfig|NUL||SOH||NUL||NUL||NUL|
  |NULL|
  |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
AllowOverlay |NULL|
  |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|
  |NULL|
  |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
openvr    |NULL|
  |SOH|DevkitGameID|NUL||NUL|
Devkit     |NULL|
  |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
DevkitGameID |NULL|
  |NUL|tags|NUL|
LastPlayTime     tags |NULL|
  |SOH|0|NUL|favorite|NUL|
0 favorite |NULL||NULL|
  |BS|
  1 |NULL|
|BS|
  |NUL|1|NUL|
  ...
|BS|
|BS|
</pre>
</pre>
{{note|The spaces before the '<code>NULL</code>' character - where no Key and no Value are assigned - are necessary to prevent two '<code>NULL</code>'s in a row, which would improperly denote the end of one shortcut and the start of another.}}
{{confirm|The number of spaces after a Key without a value may be important.}}

Revision as of 16:25, 16 June 2020

Stub

This article or section is a stub. You can help by expanding it.

Non-Steam Games are saved in the file: <<Steam Installation>>\userdata\<<User ID>>\config\shortcuts.vdf.


Null (NUL) characters are used to denote the end of a key.

A key surrounded by two Null (NUL) characters denote the beginning of a set. (e.g. NULSet NameNUL)

Start of Header (SOH) characters are used to denote that next key is actually a value to assign to this key. (e.g. SOHKeyNULValueNUL)

Start of Text (STX) characters are used to denote that the next several keys are values to assign to this key. (Always four special characters - Could be one SOH and three NUL, or four NUL in a row)

Backspace (BS) characters are used to denote the end of a set. (e.g. NULSet NameNULDefinitionBS)


Typical format is as follows (New lines and indentation added for clarity; characters within two vertical separators [e.g. |NUL|] represent special characters):

Note.pngNote:There should not be any new lines or indentation in your actual shortcuts.vdf file.
Note.pngNote:Indentation is only a best guess attempt at determining the format of the .vdf file.
|NUL|shortcuts|NUL|
 |NUL|0|NUL|
  |SOH|AppName|NUL|APP NAME WITHOUT QUOTES|NUL|
  |SOH|Exe|NUL|"PATH TO EXE"|NUL|
  |SOH|StartDir|NUL|"DIRECTORY TO START IN"|NUL|
  |SOH|icon|NUL|"PATH TO ICON"|NUL|
  |SOH|ShortcutPath|NUL||NUL|
  |SOH|LaunchOptions|NUL||NUL|
  |STX|IsHidden|NUL||NUL||NUL||NUL||NUL|
  |STX|AllowDesktopConfig|NUL||SOH||NUL||NUL||NUL|
  |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
  |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|
  |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
  |SOH|DevkitGameID|NUL||NUL|
  |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
  |NUL|tags|NUL|
   |SOH|0|NUL|favorite|NUL|
  |BS|
 |BS|
 |NUL|1|NUL|
  ...
 |BS|
|BS|