Add Non-Steam Game: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Fix the format)
(→‎File format: fix odd English)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Adding Non-Steam Games}}
{{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>.
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.
Null (<code>NUL</code>) characters are used to denote the end of a key.
Line 15: Line 15:
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>)
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):
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|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.}}
{{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>
|NUL|shortcuts|NUL|
|NUL|shortcuts|NUL|
|NUL|0|NUL|
    |NUL|0|NUL|
  |SOH|AppName|NUL|APP NAME WITHOUT QUOTES|NUL|
        |STX|appid|NUL||NUL||NUL||NUL||NUL|
  |SOH|Exe|NUL|"PATH TO EXE"|NUL|
        |SOH|AppName|NUL|APP NAME WITHOUT QUOTES|NUL|  
  |SOH|StartDir|NUL|"DIRECTORY TO START IN"|NUL|
        |SOH|Exe|NUL|PATH TO EXE|NUL|
  |SOH|icon|NUL|"PATH TO ICON"|NUL|
        |SOH|StartDir|NUL|DIRECTORY TO START IN|NUL|
  |SOH|ShortcutPath|NUL||NUL|
        |SOH|icon|NUL|PATH TO ICON|NUL|
  |SOH|LaunchOptions|NUL||NUL|
        |SOH|ShortcutPath|NUL||NUL|
  |STX|IsHidden|NUL||NUL||NUL||NUL||NUL|
        |SOH|LaunchOptions|NUL||NUL|
  |STX|AllowDesktopConfig|NUL||SOH||NUL||NUL||NUL|
        |STX|IsHidden|NUL||NUL||NUL||NUL||NUL|
  |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
        |STX|AllowDesktopConfig|NUL||SOH||NUL||NUL||NUL|   (Disabled version: |STX|AllowDesktopConfig|NUL||NUL||NUL||NUL||NUL|)
  |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|
        |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
  |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
        |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|   (Enabled version: |STX|OpenVR|NUL||SOH||NUL||NUL||NUL|)
  |SOH|DevkitGameID|NUL||NUL|
        |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
  |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
        |SOH|DevkitGameID|NUL||NUL|
  |NUL|tags|NUL|
        |SOH|DevkitOverrideAppID|NUL||NUL|
  |SOH|0|NUL|favorite|NUL|
        |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
  |BS|
        |SOH|FlatpakAppID|NUL||NUL|
|BS|
        |NUL|tags|NUL|
|NUL|1|NUL|
    |BS|
  ...
    |BS|
|BS|
    |NUL|1|NUL|
    ...
    |BS|
    |BS|
|BS|
|BS|
|BS|
</pre>
</pre>

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|