Difference between revisions of "Story editor"

From Divinity Engine Wiki
Jump to: navigation, search
m (Known limitations)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[File:StoryEditor.png]]
+
[[File:StoryEditor.png|800px|center]]
  
 
== Description ==
 
== Description ==
The Story editor is used to browser, edit and build [[Osiris]] scripts.
+
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.

Latest revision as of 11:49, 25 November 2019

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.