|
|
|
@ -37,6 +37,12 @@ Plugins can also register handlers to run on every tick, and can interface with
|
|
|
|
|
the built-in `enable` and `disable` commands. For the full plugin API, see the
|
|
|
|
|
skeleton plugins or ``PluginManager.cpp``.
|
|
|
|
|
|
|
|
|
|
Installed plugins live in the ``hack/plugins`` folder of a DFHack installation,
|
|
|
|
|
and the `load` family of commands can be used to load a recompiled plugin
|
|
|
|
|
without restarting DF.
|
|
|
|
|
|
|
|
|
|
See `plugins-index` for a list of all plugins included in DFHack.
|
|
|
|
|
|
|
|
|
|
Scripts
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
@ -45,7 +51,7 @@ is more complete and currently better-documented, however. Referring to existing
|
|
|
|
|
scripts as well as the API documentation can be helpful when developing new
|
|
|
|
|
scripts.
|
|
|
|
|
|
|
|
|
|
DFHack scripts live in a separate `scripts repository <https://github.com/dfhack/scripts>`_.
|
|
|
|
|
`Scripts included in DFHack <scripts-index>` live in a separate `scripts repository <https://github.com/dfhack/scripts>`_.
|
|
|
|
|
This can be found in the ``scripts`` submodule if you have
|
|
|
|
|
`cloned DFHack <compile-how-to-get-the-code>`, or the ``hack/scripts`` folder
|
|
|
|
|
of an installed copy of DFHack.
|
|
|
|
@ -53,17 +59,17 @@ of an installed copy of DFHack.
|
|
|
|
|
Core
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
The DFHack core has a variety of low-level functions. It is responsible for
|
|
|
|
|
hooking into DF (via SDL), providing a console, and providing an interface
|
|
|
|
|
for plugins and scripts to interact with DF.
|
|
|
|
|
The `DFHack core <dfhack-core>` has a variety of low-level functions. It is
|
|
|
|
|
responsible for hooking into DF (via SDL), providing a console, and providing an
|
|
|
|
|
interface for plugins and scripts to interact with DF.
|
|
|
|
|
|
|
|
|
|
Modules
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
|
A lot of shared code to interact with DF in more complicated ways is exposed by
|
|
|
|
|
**modules**. For example, the Units module contains functions for checking
|
|
|
|
|
various traits of units, changing nicknames properly, and more. Generally,
|
|
|
|
|
code that is useful to multiple plugins and scripts should go in the appropriate
|
|
|
|
|
A lot of shared code to interact with DF in more complicated ways is contained
|
|
|
|
|
in **modules**. For example, the Units module contains functions for checking
|
|
|
|
|
various traits of units, changing nicknames properly, and more. Generally, code
|
|
|
|
|
that is useful to multiple plugins and scripts should go in the appropriate
|
|
|
|
|
module, if there is one.
|
|
|
|
|
|
|
|
|
|
Several modules are also `exposed to Lua <lua-cpp-func-wrappers>`, although
|
|
|
|
|