2022-07-18 11:58:35 -06:00
|
|
|
sc-script
|
2022-07-20 00:01:25 -06:00
|
|
|
=========
|
2022-07-18 11:58:35 -06:00
|
|
|
|
2022-08-09 23:37:24 -06:00
|
|
|
.. dfhack-tool::
|
|
|
|
:summary: Run commands when game state changes occur.
|
2022-08-12 00:34:37 -06:00
|
|
|
:tags: dfhack
|
2022-08-09 23:37:24 -06:00
|
|
|
|
|
|
|
This is similar to the static `init-files` but is slightly more flexible since
|
|
|
|
it can be set dynamically.
|
2022-07-18 11:58:35 -06:00
|
|
|
|
2022-07-18 12:10:56 -06:00
|
|
|
Usage:
|
2022-07-18 11:58:35 -06:00
|
|
|
|
2022-07-23 17:03:40 -06:00
|
|
|
``sc-script [help]``
|
2022-07-18 12:16:05 -06:00
|
|
|
Show the list of valid event names.
|
2022-07-23 17:03:40 -06:00
|
|
|
``sc-script list [<event>]``
|
2022-07-18 12:16:05 -06:00
|
|
|
List the currently registered files for all events or the specified event.
|
2022-07-23 17:03:40 -06:00
|
|
|
``sc-script add|remove <event> <file> [<file> ...]``
|
2022-07-18 12:16:05 -06:00
|
|
|
Register or unregister a file to be run for the specified event.
|
2022-07-18 12:10:56 -06:00
|
|
|
|
2022-07-23 17:03:40 -06:00
|
|
|
Example
|
|
|
|
-------
|
2022-07-18 12:10:56 -06:00
|
|
|
|
2022-07-23 17:03:40 -06:00
|
|
|
``sc-script add SC_MAP_LOADED spawn_extra_monsters.init``
|
2022-07-18 12:16:05 -06:00
|
|
|
Registers the ``spawn_extra_monsters.init`` file to be run whenever a new
|
|
|
|
map is loaded.
|