overwolf.games

Provides information about the currently running game.

Methods

getRunningGameInfo(callback )

Version added: 0.78

Returns an object with information about the currently running game (or active games, if more than one), or null if no game is running.

  • Parameter: callback <function>

    Called with the currently running or active game info (GameInfo).

Callback argument:
{
    "isInFocus": true,
    "isRunning": true,
    "allowsVideoCapture": true,
    "title": "Counter-Strike: Global Offensive",
    "id": 77641,
    "width": 1920,
    "height": 1080,
    "logicalWidth": 1920,
    "logicalHeight": 1080,
    "renderers": [
        "D3D9"
    ],
    "detectedRenderer": "D3D9",
    "executionPath": "D://Steam/steamapp/scommon/Counter-Strike Global Offensive/csgo.exe",
    "sessionId": "1a1b96a9d8bb439d8f21abc21faa1184",
    "commandLine": "D://Steam/steamapps/common/Counter-Strike Global Offensive/csgo.exe" -steam -novid +mat_vignette_enable 0"
}

getGameInfo(gameClassId, callback)

Version added: 0.93.1

Returns information about a game with a given game id.

  • Parameter: gameClassId <int>

    The class id of the game.
  • Parameter: callback <function>

    Called with the info about the game.
Callback argument:
{
    "status": "success",
    "gameInfo": {
        "GameInfoClassID": 7764,
        "GameInfoID": 77641,
        "ProcessPath": "D:\Steam\SteamApps\common\Counter-Strike Global Offensive\csgo.exe",
        "LauncherPath": "D:\Steam\steam.exe",
        "LauncherCommandLineParams": "-applaunch 730",
        "LastTimeVerified": "2016-04-25T06:56:18.180Z",
        "ManuallyAdded": false,
        "WasAutoAddedByProcessDetection": false,
        "GameInfo": {
            "ID": 77641,
            "GameTitle": "Counter-Strike: Global Offensive",
            "DisplayName": "CS: GO",
            "ProcessNames": [
                "SteamApps\*\Counter-Strike Global Offensive\csgo.exe"
            ],
            "LuancherNames": [
                "steam.exe"
            ],
            "CommandLine": null,
            ...
        }
    }
}

Events How to use events

onGameInfoUpdated

Version added: 0.78

Fired when the game info is updated, including game name, game running, game terminated, game changing focus, etc. Passes a GameInfoChangeData object.

Event value:
{
    "gameInfo": {
        "isInFocus": true,
        "isRunning": true,
        "allowsVideoCapture": true,
        "title": "Dota 2",
        "id": 73143,
        "width": 1920,
        "height": 1080,
        "logicalWidth": 1920,
        "logicalHeight": 1080,
        "renderers": [
            "D3D9",
            "D3D11"
        ],
        "detectedRenderer": "D3D9",
        "executionPath": "D:/Steam/steamapps/common/dota2/game/bin/win64/dota2.exe",
        "sessionId": "9b163a0c0ca74d2c8f01f85d4fade07f",
        "commandLine": "D:/Steam/steamapps/common/dota2/game/bin/win64/dota2.exe -steam"
    },
    "resolutionChanged": false,
    "focusChanged": true,
    "runningChanged": false,
    "gameChanged": false
}

onGameLaunched

Version added: 0.78

Fired when a game is launched.

Event value:
{
    "isInFocus": false,
    "isRunning": true,
    "allowsVideoCapture": true,
    "title": "Dota 2",
    "id": 73143,
    "width": 1920,
    "height": 1080,
    "logicalWidth": 1920,
    "logicalHeight": 1080,
    "renderers": [
        "D3D9",
        "D3D11"
    ],
    "detectedRenderer": "Unknown",
    "executionPath": "D:/Steam/steamapps/common/dota2/game/bin/win64/dota2.exe",
    "sessionId": "9b163a0c0ca74d2c8f01f85d4fade07f",
    "commandLine": "D:/Steam/steamapps/common/dota2/game/bin/win64/dota2.exe -steam"
}

onMajorFrameRateChange

Version added: 0.79

Fired when the rendering frame rate of the currently injected game changes dramatically. The “fps_status” field can be “None”, “Stable”, “Drop” and “Increase”.

Event value:
{
    "fps_status": "Increase",
    "fps": 35
}

onGameRendererDetected

Version added: 0.89.102

Fired when the rendering method of the game has been detected.

Event value:
{
    "detectedRenderer": "D3D9"
}

Types

GameInfo

Properties

isInFocus

Version added: 0.78

Returns whether the game represented is currently in focus.

Type: bool

isRunning

Version added: 0.78

Returns whether the game represented is currently running.

Type: bool

allowsVideoCapture

Version added: 0.78

Returns whether the game represented allows video to be captured.

Type: bool

title

Version added: 0.78

Returns the title of the represented game.

Type: string

id

Version added: 0.78

Returns the id of the represented game.

Type: int

width

Version added: 0.78

Returns the pixel width of the represented game window.

Type: int

height

Version added: 0.78

Returns the pixel height of the represented game window.

Type: int

logicalWidth

Version added: 0.78

Returns the game reported (logical) pixel width of the represented game window.

Type: int

logicalHeight

Version added: 0.78

Returns the game reported (logical) pixel height of the represented game window.

Type: int

renderers

Version added: 0.78

Returns an array of the rendering technology names supported by the running game.

Type: string[]

detectedRenderer

Version added: 0.89.102

Returns the rendering technology detected by the running game.

Type: string

commandLine

Version added: 0.78

Returns the game process commandline.

Type: string

GameInfoChangeData

An object containing the game info object in addition to a set of flags indicating the change from the last time that data was updated.

Properties

gameInfo

Version added: 0.78

The new game info data.

Type: GameInfo

resolutionChanged

Version added: 0.78

Indicates if there was a change in resolution (i.e. the width or height properties were changed).

Type: bool

focusChanged

Version added: 0.78

Indicates if there was a change in the game focus status.

Type: bool

runningChanged

Version added: 0.78

Indicates if there was a change in the game running status.

Type: bool

gameChanged

Version added: 0.78

Indicates if the gameInfo property represents a different game than before.

Type: bool