Skip to content

Editor

The Editor view allows you to manage all your scripts that can be used in Actions.

img

To create an Editor view, check the Layout organization section.

Scripts

Kratos Scripts are written in javaScript.

Naostage has a collection of tested and proven Scripts corresponding to a large panel of use cases and third-party systems that we are constantly updating and expanding. But you can of course write you own Scripts to create any custom interaction with any third party system possible.

You can find the latest Script library on the Naostage website.

Scripts are show based. A new show has no pre-filled scripts and you need a Script to create an Action. That is why we recommend to always keep the Script library we provide at your disposal.

Precautions to take when modifying a Script

If you make a modification to a script that leads to an error, all Actions using this script will have their parameters reinitialized. We suggest to create a new script instead of modifying an existing one if you are not sure of the consequences of your modifications.

General controls

Name Description Image
Script list At the left of the view is the list of all the Scripts of the show. img
Create Script button At the bottom of the Script list, this button allows you to create a new Script. img
Deleted Script button At the top right of the view, the trash icon allows you to delete the selected Script. img
Script library menu This menu allows you to :
  • Import Script(s) From File(s) : import one or mutiple script(s) from any location.
    The name, category and description fields are automatically filled in during an import if the script format is respected in the imported file.
    The validity of the script isn't checked when imported, and duplicates are not checked either at the moment.
  • Update Script(s) with latest release : Update the Scripts in your library with their latest version embeded in your current Kratos version.
    This can be used to update Scripts from a show created on an older version of Kratos; or to roll back Scripts version when going from the latest to an older version of Kratos.
img
Code editor window Page where you can edit the script's code and run the scripts. img
Configuration tab The configuration tab allows you to:
  • Set a name for a script
  • Set a category to the script. The category allows to filter the scripts when creating an Action (See Actions categories).
  • Set a description to the script. The description will be displayed under the script’s name in the script list when creating an Action
img
Preview tab The preview tab allows you to see what an Action using the Script will look like. To see the Preview, you have to run the Script (see the run a script section). img
Console tab The console tab allows you to see the console output of the script when it runs. It is useful to debug your script. img

Run a script

To test a script without creating an Action, you can run it in the Editor view. Some controls are present at the top right of the code editor window.

Button Image
Click on the play button to run the selected script. img
Click on the stop button to stop the selected script from running. img
If a script is bugged, you can force its reload. img
Same function as the reload button img
A icon shows you the status of the script :
  • grey : script is not running
  • green : script is running
  • red : script has an error
img
img
img

When you run a script, Kratos will create a virtual Action using the script and run it.

If you select a module in the preview tab you will be able to send and receive information via this module. This virtual Action will be deleted once you pause the script or when you leave the page containing the Editor (even if you don't pause the script).