The Game Definition File (GDF) Schema
The Game Definition File (GDF) Schema
Note This documentation is preliminary and is subject to change.
The first step in preparing your game title to be displayed in the Windows Vista Game Explorer is to write a Game Definition File (GDF). This file is an XML file that must adhere to the GDF schema, which is described in this document.
Base Types
The GDF schema refers to a set of base data types that are defined in a seperate schema. These types are as follows.
Name | Schema Component | Type | Description |
---|---|---|---|
fourPartVersion | simpleType | string (with facets) | A simple type that contains a regular expression for 4-part versions (0-65535.0-65535.0-65535.0-65535) |
guid | simpleType | string (with facets) | A simple type that contains a regular expression for guids. Guids must be of standard type, enclosed in braces. {AAAABBBB-CCCC-DDDD-EEEE-FFFFGGGGHHHH} |
boundedString | simpleType | string (with facets) | A string which preserves whitespace and is limited to 32768 characters. |
filePathAttributeGroup | attributeGroup | n/a | Two frequently used attributes for file paths combined into an AttributeGroup. |
filePathAttributeGroup: baseKnownFolderID | attribute | guid | A guid that represents a KnownFolder as the base path for folders. The path passed along is relative to this known folder. If this folder isn't specified then the path attribute below is relative to the game's installation directory. |
filePathAttributeGroup: path | attribute | boundedString | A bounded string for the file path represented by this group. This file path is relative to the baseKnownFolderID above. |
Root Element: GameDefinitionFile
This is the root element of the GDF XML file and contains all of the imported namespaces.
<GameDefinitionFile xmlns="urn:schemas-microsoft-com:GameDescription.v1" xmlns:baseTypes="urn:schemas-microsoft-com:GamesExplorerBaseTypes.v1">
GameDefinition
This is the actual root element of a game definition. It contains two attributes.
<GameDefinition gameID="{5C08D2FF-A48E-43ca-846C-08924563E5A7}" WMID="{5C08D2FF-A48E-43ca-846C-08924563E5A7}">
GameDefinition Attributes
Name | Type | Description |
---|---|---|
gameID | guid | The game's ID. This uniquely identifies your game title to the Game Explorer. This is generated by you, or, in the case of certain titles, has already been provided. See Legacy Game Support. |
WMID | guid | The game's ID for Windows Metadata Services. This should only be used for legacy games. |
Name (boundedString)
A boundedString type representing the name of the game.
<Name>Super Game 2005</Name>
Description (boundedString, optional)
A boundedString type representing a description of the game.
<Description>The Penultimate Game</Description>
ReleaseDate (date, optional)
The date of the game's release, in standard XML date format, YYYY-MM-DD.
<ReleaseDate>2004-06-30</ReleaseDate>
Version (version)
The version element is a choice type which contains one of the two ways of specifying the version number of your game One method is an explicit version number embedded in the XML. The other method is a path to an executable or DLL where the version number can be extracted.
VersionNumber (fourPartVersion)
A version number.
<Version> <VersionNumber versionNumber="1.2.3.4"/> </Version>
- OR -
VersionFile (element with filePathAttributeGroup)
The path to an executable or DLL which contains version information. This element can contain a baseKnownFolderID guid attribute to point to start the path from a known folder. Leaving out the baseKnownFolderID attribute will make the path relative to the game's installation directory.
<Version> <VersionFile path="bin\MyGame.exe"/> </Version>
Developers (multiple elements with link type, optional)
A set of 1-5 developer elements that specify the names and respective URLs of the game developer(s).
<Developers> <Developer URI="https://www.microsoft.com">Microsoft</Developer> </Developers>
Publishers (multiple elements with link type, optional)
A set of 1-5 publisher elements that specify the names and respective URLs of the game publisher(s).
<Publishers> <Publisher URI="https://www.microsoft.com">Microsoft</Publisher> </Publishers>
WindowsSystemPerformanceRating (untyped element with several attributes, optional)
Windows System Performance Rating (WSPR), a feature of Windows Vista, is an integer that specifies a level of performance that a particular computer operates on. The WindowsSystemPerformanceRating element specifies the recommended and minimum WSPR ratings that a computer should have to play a certain game with acceptable performance. This is for display purposes only and does not restrict access to the game.
<WindowsSystemPerformanceRating minimum="4" recommended="5"/>
WindowsSystemPerformanceRating Attributes
Name | Type | Description |
---|---|---|
minimum | int | The minimum WSPR rating that a computer should have in order to play this game. |
recommended | int | The recommended WSPR rating that a computer should have in order to play this game. |
Genres (multiple elements with boundedString type, optional)
A set of 1-5 publisher elements that specify the names and respective URLs of the game publisher(s).
<Genres> <Genre>Action</Genre> <Genre>Adventure</Genre> </Genres>
SavedGames (element with filePathAttribute, optional)
Note The saved games folder feature is not enabled in this release.
Identifies the folder where saved games will be placed. As with the VersionFile element, this element can have an optional baseKnownFolderID element that starts the path with a known folder. If it is omitted, the path attribute will be relative to the game's installation directory.
<SavedGames baseKnownFolderID="{5C08D2FD-A48E-43ca-846C-08924563E5B7}" path="Game2005"/>
Ratings (elements with sub-elements that contain guids, optional)
Describes the Parental Controls ratings associated with the game. Multiple ratings are allowed, from multiple rating systems. Each rating can optionally have one or more content descriptors that are associated with that rating. Ratings, rating systems, and descriptors are guids that are defined in ratings.dll.
<Ratings> <Rating ratingID="{5C08D2FD-A48E-43ca-846C-08924563E5B7}" ratingSystemID="{5C08D2FE-A48E-43ca-846C-08924563E5A7}"> <Descriptor descriptorID="{5C08D2FD-A48E-43ca-846C-08924563E5C7}" /> <Descriptor descriptorID="{5C08D2FD-A48E-43ca-846C-08924563E5B7}" /> </Rating> </Ratings>
Rating (element with a ratingID and ratingSystemID attributes)
The rating ID and rating system ID that specifies a game rating, such as "T for Teen" in the ESRB system.
Rating Attributes
Name | Type | Description |
---|---|---|
ratingID | guid | The specific rating, such as "T for Teen". |
ratingSystemID | guid | The rating system that the rating corresponds to, such as the ESRB rating system. |
Descriptor (element with a descriptorID attribute)
This is a content descriptor for a specific rating. You can have one or more descriptors for each rating.
Descriptor Attributes
Name | Type | Description |
---|---|---|
descriptorID | guid | A content descriptor for the rating. |
GameExecutables {type: multiple elements of type GameExecutable, optional}
This element is used to define a list of executables that are required for an application to run. It is very important that the application list out all of the executables that it installs or extracts (including copy protection which is extracted at runtime) in this section to ensure proper behavior with parental controls.
Parental Controls includes a feature called General Application Restrictions, which allows a user to execute only those applications that have been specifically approved by the Administrator. This blocking is achieved at the CreateProcess layer using Software Restriction Policies in Windows Vista.
When General Application Restrictions is enabled, the executables listed in the application's signed GDF are automatically exempted/allowed based on the Games Parental Controls settings.
Including this section in the GDF allows the application to run with minimal interference when General Applications Restrictions is enabled.
GameExecutable {type: none, with a path attribute of type: boundedString}
GameExecutables have a required path element which is relative to the application's installation directory.
If the path begins with an environment variable (such as %TEMP%) then the path is treated as an absolute path and Game Explorer will perform environment variable replacement at runtime.
BaseKnownFolderID is not supported in this context because it is not supported by the Software Restrictions Policy system.
Important: Environment variable replacement is supported only in the GameExecutable element, and is not applicable anywhere else in the Game Definition File. Since it is possible to create a file or directory surrounded by % signs, such as C:\%example%, avoid doing so if you plan to use the environment variable replacement feature.
<GameExecutables> <GameExecutable path="bin\game.exe"/> <GameExecutable path="bin\gamecopyprotection.exe"/> <GameExecutable path="support\gamesettingswizard.exe"/> <!-- The follow is an example of Macrovision Copy Protection which is extracted to the user temp Folder during game runtime. --> <GameExecutable path="%TEMP%\~e5.0001"/> </GameExecutables>