This is a collection of tools/helpers for use with the Osiris Extender/OsiTools.
Currently the main helper is generating lua definitions for use with the Lua Visual Studio Code addon by sumneko. These definitions are all the story (Osiris) functions for Divinity: Original Sin 2 - Definitive Edition, and the new functions from the extender.
- Download this repository (Clone or Download -> Download as zip) and extract it somewhere.
- Install the vscode extension.
- Find "Workspace: Library" under File -> Preferences -> User -> Extensions -> Lua settings (search for it), then click "Edit in settings.json".
- In your settings.json, paste the following:
"Lua.workspace.library": {
"Path/To/definitions": true
},
- Replace "Path/To/definitions" with the path to your lua definitions folder from this repository, i.e. "C:/DivinityTools/OsirisExtenderTools/definitions".
Replace backslashes\
with forward slashes/
. - Reload VSCode if you already have your mod's lua file(s) open.
If your workspace contains different root folders, you may need to add this same setting value to the folder's workspace settings.
- Find "Workspace: Library" under File -> Preferences -> Folder -> Your FolderName (click the dropdown) -> Extensions -> Lua settings (search for it), then click "Edit in settings.json".
- In your settings.json, paste the following:
"Lua.workspace.library": {
"Path/To/definitions": true
},
- Replace "Path/To/definitions" with the path to your lua definitions folder from this repository.
Replace backslashes\
with forward slashes/
. - Reload VSCode if you already have your mod's lua file(s) open.
The folder you'll want to do this for is the one that contains your lua files. This can also be done for the workspace (Preferences -> Workspace).
If you'd like to tweak the script and generate your own definitions, you'll need Python.
The script uses relative pathways, and reads the definitions from the included story_header.div file.