-
Notifications
You must be signed in to change notification settings - Fork 65
autostart.lic Documentation
;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.
;autostartis game-agnostic: everything below works the same in GemStone and DragonRealms.
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).
Run these from inside the game.
;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
;autostart remove <script name>
;autostart remove --global <script name>
(;autostart del / ;autostart delete also work.)
;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
;autostart help
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
- go2Each entry may take one of three forms:
autostarts:
- lnet
- go2autostarts:
- lichbot start
- foreach steel mithril- lichbot start launches lichbot with the single argument start.
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 startand- { name: lichbot, args: [start] }do exactly the same thing.
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.
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 startboth 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.
At login, autostart skips or specially handles a few core scripts regardless of your lists:
-
repositoryandinfomonare run/synced automatically as part of startup; you do not need to list them. -
lich5-updateis skipped when your Lich provides its built-in updater. -
dependencyis 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, skippingnotice (check for typos). - Any script that is already running is not started again.
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;autostartdatabase 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).
- your profile YAML
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.
Autostart lichbot (with its required start argument), lnet, and go2 for
one character via YAML:
autostarts:
- lichbot start
- lnet
- go2The same, but keeping go2 global (all characters) via the database and the
rest per-character via YAML:
;autostart add --global go2
autostarts:
- lichbot start
- lnetAutostart a script with multiple arguments using the explicit hash form:
autostarts:
- { name: lichbot, args: [start, announce] };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.
-
A script started without its arguments. Run
;versionand check the autostart lists for a duplicate bare entry of the same script (for example a bare- lichbotalongside- 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 NEEDEDnotice at login. You had a script in the retiredUserVars.autostart_scriptsstore that is not in your YAML or database lists. Add it to either list as shown above.