Read first: where your scripts go and how they load

DrBoon

Administrator
Staff member
Nov 26, 2026
15
0
1
Ask anything about writing scripts in a thread of your own. Here is what most first questions are about.

Where they go
The game's own scripts are in server/scripts/game: its spells, skills, creatures, shops, townsfolk and systems. Your own go in a folder of your own, named by scriptsDir in the shard's config. Every .ts and .js file in it is read, however deep. A script of yours with the same name as one of the game's takes its place.

Reloading
After changing a script, press Reload scripts on the panel's Scripts page. Nothing restarts. Creatures and items already in the world take up their kind's new behaviour at once.

When it goes wrong
A script that will not load, or one that throws while running, is caught. The server carries on, the fault is written to its log, and the panel's Scripts page lists it with the moment it happened.

Settings instead of edits
A script can offer settings that staff change on the Scripts page without touching the file. If you are sharing a script, that is the friendly way to let people make it theirs.

A small example
The Welcome script in Resources is a whole system in one file: it greets players, has a message of the day, adds three commands and offers its messages as settings. It is a good one to read.

When you ask, post the script (or the part that matters) in a [CODE] block, and say what you expected and what happened.