This page describes the new functionality introduced in the upcoming SpaceEngine 0.981, which has not been released yet.
This manual describes how to make scenario scripts in SpaceEngine. Before continuing, it is recommended to read this manual: Introduction
SpaceEngine console and *.se files
SpaceEngine 0.981 introduced a new type of file – *.se. These are scenario script files. They contains code which can be executed by SpaceEngine. A great example of what scenarios are capable of are Tutorials, introduced in 0.981. The default location for *.se files is data/scripts/ or addons/*/scripts/. You can run an *.se file from SpaceEngine by opening console ([~] key by default) and typing this command:
If the file filename.se exists in the mentioned folders, it will be executed. Another way to run *.se files is passing them to SpaceEngine’s executable through a command line argument. The best way to do that is to associate the *.se extension with SpaceEngine.exe in your system. In that case double-clicking on the file will launch SpaceEngine and order it to execute the scenario script. If SpaceEngine is already running, this running instance will execute the script.
All commands could be executed in the ‘direct mode’ by typing them in the console, or executed from a *.se script file. Commands and most of their parameters are not case-sensitive, but string constants such as names of GUI widgets and names of triggers are case-sensitive.
Some commands can have (or even must have) an additional parameters, provided in the curved braces block (i.e. that commands are actually tags). Example:
Additional parameters could be typed in a single row:
Using the single-row style sometimes makes the script code more compact and easy to read and understand.
All commands are split in a groups according to their functions. Unroll the blacks below to read details.