Add Non-Steam Game: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(File creation)
 
(→‎File format: fix odd English)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Adding Non-Steam Games}}
{{stub}}
{{stub}}
{{For|reading or writing with a script|[[Steam Library Shortcuts]]}}
{{For|more info about characters|[[Binary VDF]]}}
Non-Steam Games are saved in the file: <code><<Steam Installation>>\userdata\<<User ID>>\config\shortcuts.vdf</code>.
Null (<code>NUL</code>) characters are used to denote the end of a key.
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>)


Non-Steam Games are saved in the file: <code><<Steam Installation>>\userdata\<<User ID>>\config\shortcuts.vdf</code>.
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>)


The file always starts with '<code> shortcuts </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)
{{note|There is a space on either side of the word 'shortcuts'}}


All shortcuts are separated by two '<code>NULL</code>' characters.  
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 (NewLines added for clarity, '<code>|NULL|</code>' represents a null character):
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 in your actual shortcuts.vdf file.}}
{{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.}}


==File format==
{{Note|Quotes are optional, steam will find the application either way.}}
<pre>
<pre>
shortcuts  
|NUL|shortcuts|NUL|
0 |NULL|
    |NUL|0|NUL|
AppName NAME |NULL|
        |STX|appid|NUL||NUL||NUL||NUL||NUL|
Exe "EXE" |NULL|
        |SOH|AppName|NUL|APP NAME WITHOUT QUOTES|NUL|  
StartDir "STARTDIR" |NULL|
        |SOH|Exe|NUL|PATH TO EXE|NUL|
icon "ICON" |NULL|
        |SOH|StartDir|NUL|DIRECTORY TO START IN|NUL|
ShortcutPath |NULL|
        |SOH|icon|NUL|PATH TO ICON|NUL|
LaunchOptions |NULL|
        |SOH|ShortcutPath|NUL||NUL|
IsHidden     |NULL|
        |SOH|LaunchOptions|NUL||NUL|
AllowDesktopConfig |NULL|
        |STX|IsHidden|NUL||NUL||NUL||NUL||NUL|
   |NULL|
        |STX|AllowDesktopConfig|NUL||SOH||NUL||NUL||NUL|    (Disabled version: |STX|AllowDesktopConfig|NUL||NUL||NUL||NUL||NUL|)
AllowOverlay |NULL|
        |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
   |NULL|
        |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|   (Enabled version: |STX|OpenVR|NUL||SOH||NUL||NUL||NUL|)
OpenVR     |NULL|
        |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
Devkit     |NULL|
        |SOH|DevkitGameID|NUL||NUL|
DevkitGameID |NULL|
        |SOH|DevkitOverrideAppID|NUL||NUL|
LastPlayTime      tags |NULL|
        |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
0 favorite |NULL||NULL|
        |SOH|FlatpakAppID|NUL||NUL|
1 |NULL|
        |NUL|tags|NUL|
AppName APPNAME |NULL|
    |BS|
Exe "EXE" |NULL|
     |BS|
StartDir "STARTDIR" |NULL|
     |NUL|1|NUL|
icon "ICON" |NULL|
    ...
ShortcutPath  |NULL|
    |BS|
LaunchOptions  |NULL|
    |BS|
IsHidden    |NULL|
|BS|
AllowDesktopConfig |NULL|
|BS|
  |NULL|
AllowOverlay |NULL|
  |NULL|
OpenVR     |NULL|
Devkit     |NULL|
DevkitGameID  |NULL|
LastPlayTime      tags |NULL|
0 favorite |NULL||NULL|
</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.}}

Latest revision as of 17:16, 2 July 2025

Stub

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

For reading or writing with a script, see Steam Library Shortcuts.
For more info about characters, see Binary VDF.

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.

File format

Note.pngNote:Quotes are optional, steam will find the application either way.
|NUL|shortcuts|NUL|
    |NUL|0|NUL|
        |STX|appid|NUL||NUL||NUL||NUL||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|    (Disabled version: |STX|AllowDesktopConfig|NUL||NUL||NUL||NUL||NUL|)
        |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
        |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|    (Enabled version: |STX|OpenVR|NUL||SOH||NUL||NUL||NUL|)
        |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
        |SOH|DevkitGameID|NUL||NUL|
        |SOH|DevkitOverrideAppID|NUL||NUL|
        |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
        |SOH|FlatpakAppID|NUL||NUL|
        |NUL|tags|NUL|
    |BS|
    |BS|
    |NUL|1|NUL|
    ...
    |BS|
    |BS|
|BS|
|BS|