Script editor

From Divinity Engine Wiki
Revision as of 18:52, 10 September 2017 by Rimevan (talk | contribs)
Jump to: navigation, search

Description

The Script Editor allows you to create and edit scripts. You can also use it to debug scripts.

Using the Script Editor

ScriptEditor StepByStep.png

The Script Editor with each component numbered and an absurd amount of errors to illustrate a stressful situation


The Script Editor consists of the following components:

  1. Menu
  2. Quick Menu
  3. Solution Explorer
  4. Script Editor
  5. Debug Panel


Menu

File

ScriptEditor Menu File.PNG

A closeup of the File menu

The File menu allows you to create, save, open, or reload script files. It also allows you to exit the editor.

Edit

ScriptEditor Menu Edit.PNG

A closeup of the Edit menu

The Edit menu allows you to undo or redo, cut/copy/paste, select all, or find within scripts.

View

ScriptEditor Menu View.PNG

A closeup of the View menu

The View menu allows you to show the Solution Panel, the Errors Panel, the Watch Panel, and the Output Panel.

Build

ScriptEditor Menu Build.PNG

A closeup of the Build menu

The Build menu allows you to build the current file, build all files, rebuild all files, and reload the object lists.

Debug

ScriptEditor Menu Debug.PNG

A closeup of the Debug menu

The Debug menu allows you to pause, continue, and step when debugging. These are not available while editing scripts. More information can be found here.


Quick Menu

The Quick Menu contains the most used options from the Menu and a couple more. All debugging related options on the Quick Menu are explained in detail on the debug scripts page. From left to right the Quick Menu buttons do the following:

  1. Create a new script file
  2. Open a script file
  3. Save a script file
  4. Save all script files
  5. Cut selected text
  6. Copy selected text
  7. Paste text
  8. Build the current script
  9. Build all scripts
  10. Rebuild all scripts
  11. Reload the object lists
  12. Collapse all regions by one level in the current script
  13. Expand all regions by one level in the current script


Solution Explorer

ScriptEditor Solution Panel.PNG

The solution explorer

The solution explorer shows the scripts in their respective project and folder as they appear in the Data folder. You can filter by typing in the filter textbox at the bottom and quickly clear the filter by pressing the X next to the filter. The Solution Explorer will only show files with the extensions .charScript, .itemScript, and .gameScript.


Script Editor

ScriptEditor Script Editor.PNG

The script editor


Debug Panel

ScriptEditor Debug Panel.PNG

The debug panel, containing the error panel, watch panel, and output panel


Find Panel

ScriptEditor Find Panel.PNG

The find panel

The find panel (CTRL+F) allows you to search in the current script or in all scripts, with the options to match case or match the whole word.