Game Data
Introduction
A data wrapper around the Steam's concept of "game". This provides quick and efficient access to features and functions related to a Steam Game and lets you use GameData interchangeably with any of the related types AppId_t, CGameID, uint, ulong
Game Data is used by Steam to uniquely identify a "game". It can often be useful to convert the various forms in which Steam identifies a "game" such that you can get its name or open its store page.
For example Steam identifies which game a user is the User's Game Info via CGameID which can be converted to an AppId_t which can be used to get the uint and passed to the Web ID to get the name of the game the friend is playing.
Heathen makes this much simpler GameData.Get(gameId).App.Name
as you can see our approach has far fewer steps thanks to GameData and AppData which provides the translation layer for the various ways Steam represents a Game and its related App ID.
Fields and Attributes
Me
This gets the GameData for the currently initialized app if any. I.e. this is your App ID represented as a GameData as in the one running right now as far as Steam API is aware. Its often useful to test this and make sure its the value you expect and that your user isn't trying to spoof as some other app.
gameId
The Steamworks native data type representation of this game
App
Gets the AppData representation of this GameData. GameData and AppData are very similar with AppData being the more commonly used of the two. GameData is used in a few of Steam's systems such as GameInfo. Switching between them is made trivial with our data layer as a GameData will convert to an AppData and an AppData will convert to a GameData.
IsMe
Returns true if this GameData represents the game that is running this code e.g. the same as
Id
The primitive data type that represents an app
Name
Gets the local display name Steam store uses for this game for this user ... this expects that you have already loaded the names via the LoadNames method here on the AppData object or in the API.App.Client class.
Names Loaded
Returns true if app names have already been loaded
Methods
Get
The Get method can be used to "get" an GameData matching whatever input it is you have
Get Name
Returns true if the name is loaded and found and if so then name will be populated with the name, this is the same as reading the Name field.
This is an async version that will check if the name is loaded, if not it will load it, when completed it will invoke the callback which takes the form of
Open Steam Store
This is an instanced version of the method meaning you call it on a given AppData such as AppData.Me.OpenSteamStore();
A static option for calling the same method that can handle any convertable value for AppData for exmple
Assuming 123456789 was a valid App ID that would open the steam overlay to the store page for that app
Open My Steam Store
A static method to open the store for the current App
Last updated