SCRIPTING BASICS

Reading through this tutorial is a good way to get acquainted with the fundamentals of SPG scripts.

To keep things simple, here's a list of important notes on SAL script language:

  1. scripts are saved as *.sal (Script Assembly Language) files
  2. always declare a variable before using it
  3. assigning a default value to a variable (initializing) is highly advised
  4. SPG scripts aren't compiled, they are run as is
  5. each segment of a declaration (variables, functions, keywords etc.) is separated by either space or tab
  6. each declaration ends in a semicolon [ ; ] (also preceded by a space or tab)
  7. each script MUST end with the keyword End. It is best placed in its separate line.

A tool was added into the game root directory that should help both experienced and new scripters.
Scripterion is a glossary of all existing script functions, events etc. used in the game. This lil' guy is quite useful for scripters.

Make sure you don't declare the same variable in the same script twice!

Using Notepad++ for scripting is advised. For more information see DOWNLOADS section.