Game#

The Game classes provide a Python interface for the game properties of the Souls games.

They abstract the memory manipulation into properties and functions that write into the appropriate game memory addresses.

Note

The interface is essentially a wrapper around the MemoryManipulator. As such it inherits the same cache restrictions. See MemoryManipulator.cache, Game.clear_cache() and MemoryManipulator.clear_cache() for more information.

Warning

Writing into the process memory is not guaranteed to be “stable”. Race conditions with the main game loop will occur and overwrite values. Coordinates are most affected by this.

class soulsgym.games.game.StaticGameData(game_id: str)#

Bases: object

A container for the static game data.

Only loads the static data required for the specific game to not clutter the game interface.

__init__(game_id: str)#

Load the static data for the specific game.

Parameters:

game_id – The game ID.

class soulsgym.games.game.Game#

Bases: ABC

Base class for all game interfaces.

The game interface exposes the game properties as class properties and methods. Almost all properties and methods write directly into the game memory. The only exception is the camera_pose. We haven’t found a method to directly manipulate the camera pose and instead use a GameInput instance to manually control the camera with keystrokes.

__init__()#

Initialize the interface tools to target the specified game.

Load the static data and initialize the memory manipulator, the game window, game input and speed hack connector.

abstract property game_id: str#

The game ID.

Returns:

The game ID.

abstract property process_name: str#

The game process name.

Returns:

The game process name.