Naming Scripts
When creating a new script, the first thing you need to do is decide on a name. It is important to remember at this point that starting certain characters or keywords are treated slightly differently by the msci.
Starting with a keyword
setup, init, al.plugin, and galaxy are all keywords that have a special meaning to the script editor.
init
init scripts are run each time a game is loaded. They run before anything else, which can cause problems if they try to act upon something in a universe that hasn't been created yet.
setup
setup scripts, like init scripts, are run each time the game is loaded. Setup scripts however, run after all the other loading processes have been completed.
Setup scripts are used to initialise 3rd party script packages, binding scripts to commands, creating new wares and placing them on sale at various stations.
al.plugin
scripts stating with al.plugin are the setup scripts for Artificial Life plugins. They tell the AL engine the names of the plugin's scripts and what it should do and when.
galaxy
These are used in conjunction with new galaxy maps. They define the player's starting ship for the map. They should take the format: galaxy.<mapname>
Starting with an exclamation mark (!)
A script that starts with a ! is considered to be uneditable. You cannot select it in the script editor to view or edit. You can however select it when choosing a script to run from within another script you are editing.
In addition to this, a setup script starting with ! will cause any game to switch into modified mode, enabling 3rd party scripts even though the script editor has not been enabled! This is discouraged since just a single script like this in the scripts directory will prevent you from playing a clean game
Starting with a keyword
setup, init, al.plugin, and galaxy are all keywords that have a special meaning to the script editor.init
init scripts are run each time a game is loaded. They run before anything else, which can cause problems if they try to act upon something in a universe that hasn't been created yet.setup
setup scripts, like init scripts, are run each time the game is loaded. Setup scripts however, run after all the other loading processes have been completed.Setup scripts are used to initialise 3rd party script packages, binding scripts to commands, creating new wares and placing them on sale at various stations.
al.plugin
scripts stating with al.plugin are the setup scripts for Artificial Life plugins. They tell the AL engine the names of the plugin's scripts and what it should do and when.galaxy
These are used in conjunction with new galaxy maps. They define the player's starting ship for the map. They should take the format: galaxy.<mapname>Starting with an exclamation mark (!)
A script that starts with a ! is considered to be uneditable. You cannot select it in the script editor to view or edit. You can however select it when choosing a script to run from within another script you are editing.In addition to this, a setup script starting with ! will cause any game to switch into modified mode, enabling 3rd party scripts even though the script editor has not been enabled! This is discouraged since just a single script like this in the scripts directory will prevent you from playing a clean game