Difference between revisions of "Category:Osiris APIs"
m |
m |
||
(4 intermediate revisions by 2 users not shown) | |||
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 | ||
− | * Queries allow you to request information about an object or the game state, | + | * 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) |
* Calls instruct Osiris to change an object or the game state. Calls never directly return results in any way. | * 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. | 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]. | ||
+ | |||
+ | Once you have built the story for this mod, you can also find it in ".\Data\Mods\<mod name>\Story\RawFiles\story.div". You can open this file in any text editor, so you can search it while you have another mod open in the editor that may not depend on Divinity Origins | ||
+ | |||
+ | [[Category:Osiris]] |
Latest revision as of 14:57, 25 November 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. Occasionally, they also change the game state and return 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.
Once you have built the story for this mod, you can also find it in ".\Data\Mods\<mod name>\Story\RawFiles\story.div". You can open this file in any text editor, so you can search it while you have another mod open in the editor that may not depend on Divinity Origins
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.