peek

Reads a field of a live object, or of the game’s own data, by a chain of offsets: from the start, every offset but the last is a pointer read and followed, and the value is read at the last, as type. Use it to check a reading of the exe against the running game: a field at +0x64 of the object a creature holds at +0x7B0 is {"object": "0x7d9", "offsets": ["0x7B0", "0x64"], "type": "f32"}. Each pointer on the way is named by its class (RTTI). A read that fails is answered with readable: false and where, never a crash. Nothing is written.

Read-only: it changes nothing in the game.

Arguments

Name Type Required What
object string   An object’s id, “0x7d9”, as creatures, placeables or party list them.
side "game" | "client"   With object: the game’s object (CGameObject, the scripts’ side), or the client’s (CCObject, what is drawn). Default game.
address string   In place of object: an address in the running game, “0x00b2b290”.
address_id integer   In place of object: an ID of the address library (DAOLib’s tools/address_ids.py names them), its address in the running build.
offsets array   The chain: numbers, or hex as text (“0x7B0”, “-0x10”). None reads at the start itself.
type "f32" | "i32" | "u32" | "u16" | "u8" | "ptr" | "vec3" | "quat" | "wstring" | "bytes"   What the value is: a float, an integer, a pointer (with its class), three or four floats, the engine’s std::wstring, or raw bytes as hex. Default u32.
count integer (≥ 1, ≤ 1024)   How many values one after another (bytes: how many bytes, default 16). Default 1.

Call it as peek over MCP, or POST /api/tool/peek with the arguments as JSON.