Skip to content

Structure

Sven Rahn edited this page Jul 14, 2018 · 12 revisions

The config folder is like the following:

+ config
  + kt-skript
     - general.conf
     - default.imports
     + scripts
        - script1.ktskript
        - otherScript.ktskript
        + complex
          - complex.ktskript
          - complex.imports

'+' are folders
'-' are files

Let's breaks this down:

general.conf

Here are some settings for the plugin:

# How often the script files should be checked for changes.
script-update-interval="3s"

# Useful for debugging the imports.
output-scripts-to-console=true

# Read the docs to learn more.
warn-about-multiple-compile-requests=true

The script-update-interval is a duration like described here.

warn-about-multiple-compile can safely be switched on or off, doesn't matter really. If enabled, you will be warned in the console when a plugin tries to compile an already read script. This can be activated when setting up all your scripts to ensure everything works correctly, but can be turned off once you're finished with it.

default.imports

Read the .imports page to learn more about the syntax of imports. This 'default' file acts globally to import certain things to all scripts. You can edit this file if you know what you're doing.

scripts folder

In this folder you will put all your scripts .ktskript and script-specific .imports files. All those are loaded by default. You can group them into folders if you have many scripts.

Scripts themselves can get already loaded scripts or load new ones outside the scripts folder.

Learn more about scripts

Once a script is created, modified or deleted, all scripts are unloaded and then loaded again. The script-update-interval can be set in the general.conf.

Clone this wiki locally