Skip to content

autostart.lic Documentation

Mahtra edited this page Jul 3, 2026 · 1 revision

Autostart

;autostart controls which scripts Lich launches automatically each time you log in a character. It runs once at login and starts your chosen scripts (optionally with arguments), skipping anything that is already running or does not exist.

This page covers both ways to configure autostarts, how to pass arguments, how the two mechanisms interact, and the one-time migration off the retired UserVars.autostart_scripts store.

;autostart is game-agnostic: everything below works the same in GemStone and DragonRealms.


The two autostart mechanisms

There are two independent lists of scripts to autostart. Both are honored at login; a script is started if it appears in either list (and is not already running).

Database list YAML profile list
Configured with the ;autostart command your profile YAML file
Stored in Lich's database (Settings / CharSettings) <Character>-setup.yaml (or base.yaml)
Scope per-character, or global (all characters) per-character (and shared base)
Best for quick changes from inside the game version-controlled / shared profiles
Supports arguments Yes Yes

You can use either or both. If a script is listed in more than one place it is only started once (the already-running guard prevents a double start).


Method 1: the ;autostart command (database list)

Run these from inside the game.

Add a script

;autostart add <script name> [args...]
;autostart add --global <script name> [args...]
  • Without --global, the script is added to the current character's list.
  • With --global, it is added to the list shared by all characters.
  • Any words after the script name are stored as that script's arguments.

Examples:

;autostart add lichbot start
;autostart add --global go2
;autostart add foreach steel,mithril

Remove a script

;autostart remove <script name>
;autostart remove --global <script name>

(;autostart del / ;autostart delete also work.)

List configured scripts

;autostart list

Shows the global list and the current character's list, including any arguments:

--- Global autostart scripts: alias, go2
--- Quilsilgas's autostart scripts: lichbot (args: start), lnet

Help

;autostart help

Method 2: the YAML profile list (autostarts:)

Your profile YAML (for example Quilsilgas-setup.yaml, or the shared base.yaml) may contain an autostarts: list. This is read at login through Lich's settings system and works for both GemStone and DragonRealms.

autostarts:
  - lichbot start
  - lnet
  - go2

Each entry may take one of three forms:

1. Bare script name (no arguments)

autostarts:
  - lnet
  - go2

2. Name followed by arguments (split on spaces)

autostarts:
  - lichbot start
  - foreach steel mithril

- lichbot start launches lichbot with the single argument start.

3. Explicit { name:, args: } hash

Use this when you want to be unambiguous, or when an argument itself would be awkward to space-split:

autostarts:
  - { name: lichbot, args: [start, announce] }

This launches lichbot with the arguments start and announce.

All three forms are interchangeable. - lichbot start and - { name: lichbot, args: [start] } do exactly the same thing.

Duplicate handling in the YAML list

If the same script name appears more than once in the list, it is started only once. When one entry has arguments and another does not, the entry with arguments wins -- so a stray bare - lichbot will not cancel out a - lichbot start elsewhere in the list. If two entries both specify arguments, the first one wins.


Passing arguments to a script

Arguments configured either way are delivered to the target script exactly as if you had typed them after the script name on the command line. The script reads them through its normal argument parsing (parse_args), so, for example:

;autostart add lichbot start

and

autostarts:
  - lichbot start

both start lichbot as though you had run ;lichbot start yourself.

This is why some scripts can now be autostarted that previously could not: for instance, lichbot requires a start argument as an accidental-launch guard. With argument support you can autostart it directly (- lichbot start) instead of maintaining a modified copy of the script.


Scripts that are handled specially

At login, autostart skips or specially handles a few core scripts regardless of your lists:

  • repository and infomon are run/synced automatically as part of startup; you do not need to list them.
  • lich5-update is skipped when your Lich provides its built-in updater.
  • dependency is never autostarted from your lists (DragonRealms loads it automatically when needed). If it is found in a database list on DragonRealms, autostart removes it and tells you.
  • Any listed script that does not exist on disk is skipped with a not found, skipping notice (check for typos).
  • Any script that is already running is not started again.

Migrating off the old UserVars.autostart_scripts store

Older DragonRealms setups kept a separate autostart list in UserVars.autostart_scripts. That store is retired -- it is no longer used to launch anything. The profile YAML autostarts: list and the ;autostart database list are now the only sources.

The first time you log in after updating, autostart checks whether you still have entries in that old store and reacts in one of two ways:

  • Everything is already covered. If every script in the old store is already in your YAML autostarts: list or your ;autostart database list, autostart simply clears the old store and prints a short note. No action is needed.

  • Something would be lost. If the old store contains a script that is not in your YAML list or your database list, autostart prints a loud *** ACTION NEEDED *** notice naming exactly which script(s) would stop autostarting, then clears the old store. To keep those scripts starting at login, add each one to either:

    • your profile YAML autostarts: list (for example - lichbot start), or
    • the database: ;autostart add <script> [args] (or --global).

Autostart never moves entries for you -- you decide where each script should live. The check runs only once; after the old store is cleared you will not see the notice again.


Examples

Autostart lichbot (with its required start argument), lnet, and go2 for one character via YAML:

autostarts:
  - lichbot start
  - lnet
  - go2

The same, but keeping go2 global (all characters) via the database and the rest per-character via YAML:

;autostart add --global go2
autostarts:
  - lichbot start
  - lnet

Autostart a script with multiple arguments using the explicit hash form:

autostarts:
  - { name: lichbot, args: [start, announce] }

Seeing what will autostart

;version lists your autostart configuration by source, so you can confirm at a glance what is set to start and from where:

Autostart global (DB):     go2
Autostart Quilsilgas (DB):
Autostart profile (YAML):  lichbot(args: start), lnet
  • Autostart global (DB) -- scripts added with ;autostart add --global.
  • Autostart (DB) -- scripts added with ;autostart add.
  • Autostart profile (YAML) -- scripts in your profile's autostarts: list.

Arguments are shown in parentheses. This is the quickest way to spot a script that is configured in more than one place, or one whose arguments are not what you expected.

Troubleshooting

  • A script started without its arguments. Run ;version and check the autostart lists for a duplicate bare entry of the same script (for example a bare - lichbot alongside - lichbot start). The arguments-bearing entry should win, but removing the redundant bare entry makes your intent clear.
  • autostart: '<name>' not found, skipping. The script name is misspelled or the script is not installed. Verify with ;<name> or check your scripts folder.
  • A script did not start at all. It may already have been running, or it may be one of the specially-handled core scripts above.
  • You saw an ACTION NEEDED notice at login. You had a script in the retired UserVars.autostart_scripts store that is not in your YAML or database lists. Add it to either list as shown above.

Clone this wiki locally