Story editor

From Divinity Engine Wiki
Revision as of 12:49, 25 November 2019 by Tinkerer (talk | contribs) (Known limitations)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
StoryEditor.png

Description

The Story editor is used to browse, edit and build Osiris scripts.

Building the story

There are multiple options to build the story under "File".

The most important one is Generate Definitions, Build and Reload. This will build all necessary files for your story to work, and reload the story so the new story becomes active.

Other options are:

  • Build: Only build story. This suffices if you know there have been no function definition changes, and if you only wish to check for errors.
  • Build and reload: To see your changes in the editor, you'll have to reload the level after building. This option does that auto-magically for you!
  • Generate Definitions and Build: Recreates definitions (required for the first story build after an editor update) and then builds the story, but does not reload it. Again, useful to check for errors.
  • Generate Definitions, Build and Reload: As mentioned, the most thorough option. Creates all necessary files and then reloads the story.
  • Generate Definitions: Only generate function definitions. This is useful to get code completion functionality without rebuilding story.

Code editing helper functionality

  • Code completion is available via ctrl-space. Note that in case of user-defined queries, code completion will add a (wrong) "__DEF" suffix that you will have to delete again.
  • When you are in the parameter list of a function call, the editor shows the parameter definitions at the top of the code editing window.

Known limitations

  • Every pane in the editor gets its own "Find" dialog box. However, if you press ctrl-f while a "Find" dialog box for this pane was already open, this "Find" dialog box will not regain focus. Either always close the Find dialog box after searching for something (e.g. by pressing Esc), or click on it for it to regain focus. The global search (ctrl-shift-f) dialog does not suffer from this issue.
  • The parameter list shown at the top of the window will always list the parameters of the last defined overload in Story. This means that other definitions of the same function with more parameters may exist.