Difference between revisions of "Category:Osiris APIs"
From Divinity Engine Wiki
m (Protected "Category:Osiris APIs" ([Edit=⧼protect-level-larianeditonly⧽] (indefinite) [Move=⧼protect-level-larianeditonly⧽] (indefinite))) |
(Tips for discovering available APIs and figuring out what they do) |
||
Line 1: | Line 1: | ||
− | === | + | === Overview === |
Osiris core APIs come in three categories: | Osiris core APIs come in three categories: | ||
* Events are Osiris' way to inform you that something happened, often to a particular object | * Events are Osiris' way to inform you that something happened, often to a particular object | ||
Line 6: | Line 6: | ||
Additionally, this page also links to a number of useful helper routines and databases from the Shared mod. | Additionally, this page also links to a number of useful helper routines and databases from the Shared mod. | ||
+ | |||
+ | === List of All APIs === | ||
+ | The Osiris API documentation is a work in progress, as there are hundreds of them. However, you can always have a look at the declarations of all Osiris APIs in the [[Story_editor|Story editor]] to see what is available: | ||
+ | # [[Story_editor#Story_editor#Building_the_story|Generate definitions]] | ||
+ | # Choose File -> Open Story Header. You can also find this file in ".\Data\Mods\<mod name>\Story\RawFiles\story_header.div" | ||
+ | |||
+ | In many cases, the usage of an API is fairly straightforward. If you are unsure about it, | ||
+ | # Create an [[Working_with_projects#Project_Type:_Adventure_or_Add-on.3F|Adventure Add-on]] that targets story and that depends on DivinityOrigins | ||
+ | # [[Story_editor#Story_editor#Building_the_story|Build story]] for that mod | ||
+ | # In the Story editor, press ctrl-shift-f and enter the name of the API. You will get a list of all locations in our scripting where this call is used | ||
+ | # If you are still unsure and the API is not documented yet here, ask on the [http://larian.com/forums/ubbthreads.php?ubb=postlist&Board=77&page=1 Scripting Forum]. | ||
[[Category:Osiris]] | [[Category:Osiris]] |
Revision as of 07:04, 13 October 2017
Overview
Osiris core APIs come in three categories:
- Events are Osiris' way to inform you that something happened, often to a particular object
- Queries allow you to request information about an object or the game state, and occasionally also change the game state and returning the result of the change (e.g. creating a new item)
- Calls instruct Osiris to change an object or the game state. Calls never directly return results in any way.
Additionally, this page also links to a number of useful helper routines and databases from the Shared mod.
List of All APIs
The Osiris API documentation is a work in progress, as there are hundreds of them. However, you can always have a look at the declarations of all Osiris APIs in the Story editor to see what is available:
- Generate definitions
- Choose File -> Open Story Header. You can also find this file in ".\Data\Mods\<mod name>\Story\RawFiles\story_header.div"
In many cases, the usage of an API is fairly straightforward. If you are unsure about it,
- Create an Adventure Add-on that targets story and that depends on DivinityOrigins
- Build story for that mod
- In the Story editor, press ctrl-shift-f and enter the name of the API. You will get a list of all locations in our scripting where this call is used
- If you are still unsure and the API is not documented yet here, ask on the Scripting Forum.
Subcategories
This category has the following 11 subcategories, out of 11 total.
O
Pages in category "Osiris APIs"
The following 6 pages are in this category, out of 6 total.