Osiris API

From Baldur's Gate 3 Modding

The Osiris application programming interface, or API, has three categories of functions: events, queries, and calls. We often refer to these functions collectively as APIs. Click on the headers below to see a list of the respective Osiris APIs. For more on Osiris, see Introduction to Osiris.

Events

Events are Osiris' way to inform you that something happened, often to a particular object.

Queries

Queries allow you to request information about an object or the game state. Occasionally, they also change the game state and return the result of the change (e.g. creating a new item).

There are two types of queries:

  • User queries are the user-defined queries that start with QRY. As these are user-defined, they will not be documented.
  • Div queries are calls that script makes to the game and that return a value.

Calls

Calls instruct Osiris to change an object or the game state. Calls never directly return results in any way.