AngelScript scripting quickstart guide.


Infamous Developer
Jan 31, 2018
Prague, CZ
We have a decently-capable scripting environment, and it will get expanded in a close future. This thread should be a catch-all introductory spot.
Credit is due: the scripting subsystem, along with a race manager script, was developed by former member 'neorej16' in circa 2010 - correct me if I'm wrong.

What's the programming language?

AngelScript is a high-performance scripting library written with games in mind. The author provides support at GameDev forums:

The language itself resembles C++/C#/Java, source files have extension ".as". The official documentation is exellently written:

What can scripts do?
What docs do we provide?

Online docs:

In game help:
How to run a script?

Either by including it with terrain or invoking by hand:
  1. By including the ".as" file(s) with terrain - see terrn2 fileformat, section '[Scripts]': This is the classic old method, used for i.e. races and event boxes. Note that if no script is provided, a bundled "" is invoked. It provides the basic handling for spawners, garages and races.
  2. By placing the ".as" file(s) in 'Documents\My Games\Rigs of Rods\Scripts' and:
    1. [since 2022.04] running the game with command line parameter '-runscript <filename>'. You can use this command multiple times at once.
    2. [since 2022.04] setting 'app_custom_scripts' in RoR.cfg to a comma-separated list of filenames. Spaces in filename are acceptable.
    3. [dev build only] in game, opening console (tilde key) and using command `loadscript <filename>`.
How to diagnose scripts?
Any questions?

Ask right in this thread!
Last edited: