|
|
@ -69,6 +69,7 @@ on how to write one yet, but it should be easy enough to copy one and just follo
|
|
|
|
|
|
|
|
|
|
|
|
Other than through plugins, it is possible to use DFHack via remote access interface,
|
|
|
|
Other than through plugins, it is possible to use DFHack via remote access interface,
|
|
|
|
or by writing scripts in Lua or Ruby. There are plenty of examples in the scripts folder.
|
|
|
|
or by writing scripts in Lua or Ruby. There are plenty of examples in the scripts folder.
|
|
|
|
|
|
|
|
The `lua-api` is quite well documented.
|
|
|
|
|
|
|
|
|
|
|
|
The most important parts of DFHack are the Core, Console, Modules and Plugins.
|
|
|
|
The most important parts of DFHack are the Core, Console, Modules and Plugins.
|
|
|
|
|
|
|
|
|
|
|
@ -85,7 +86,9 @@ The most important parts of DFHack are the Core, Console, Modules and Plugins.
|
|
|
|
|
|
|
|
|
|
|
|
Rudimentary API documentation can be built using doxygen (see build options
|
|
|
|
Rudimentary API documentation can be built using doxygen (see build options
|
|
|
|
in ``CMakeCache.txt`` or with ``ccmake`` or ``cmake-gui``). The full DFHack
|
|
|
|
in ``CMakeCache.txt`` or with ``ccmake`` or ``cmake-gui``). The full DFHack
|
|
|
|
documentation is built with Sphinx, which runs automatically at compile time.
|
|
|
|
documentation is built with Sphinx_, which runs automatically at compile time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _Sphinx: http://www.sphinx-doc.org
|
|
|
|
|
|
|
|
|
|
|
|
DFHack consists of variously licensed code, but invariably weak copyleft.
|
|
|
|
DFHack consists of variously licensed code, but invariably weak copyleft.
|
|
|
|
The main license is zlib/libpng, some bits are MIT licensed, and some are
|
|
|
|
The main license is zlib/libpng, some bits are MIT licensed, and some are
|
|
|
@ -101,14 +104,14 @@ in the ``library/xml/`` submodule.
|
|
|
|
|
|
|
|
|
|
|
|
See https://github.com/DFHack/df-structures, and the documentation linked in the index.
|
|
|
|
See https://github.com/DFHack/df-structures, and the documentation linked in the index.
|
|
|
|
|
|
|
|
|
|
|
|
Data structure layouts are described in files following the ``df.\*.xml`` name pattern.
|
|
|
|
Data structure layouts are described in files following the ``df.*.xml`` name pattern.
|
|
|
|
This information is transformed by a perl script into C++ headers describing the
|
|
|
|
This information is transformed by a perl script into C++ headers describing the
|
|
|
|
structures, and associated metadata for the Lua wrapper. These headers and data
|
|
|
|
structures, and associated metadata for the Lua wrapper. These headers and data
|
|
|
|
are then compiled into the DFHack libraries, thus necessitating a compatibility
|
|
|
|
are then compiled into the DFHack libraries, thus necessitating a compatibility
|
|
|
|
break every time layouts change; in return it significantly boosts the efficiency
|
|
|
|
break every time layouts change; in return it significantly boosts the efficiency
|
|
|
|
and capabilities of DFHack code.
|
|
|
|
and capabilities of DFHack code.
|
|
|
|
|
|
|
|
|
|
|
|
Global object addresses are stored in ``symbols.xml``, which is copied to the dfhack
|
|
|
|
Global object addresses are stored in :file:`symbols.xml`, which is copied to the dfhack
|
|
|
|
release package and loaded as data at runtime.
|
|
|
|
release package and loaded as data at runtime.
|
|
|
|
|
|
|
|
|
|
|
|
Remote access interface
|
|
|
|
Remote access interface
|
|
|
@ -118,13 +121,13 @@ socket. Both the core and plugins can define remotely accessible methods. The
|
|
|
|
``dfhack-run`` command uses this interface to invoke ordinary console commands.
|
|
|
|
``dfhack-run`` command uses this interface to invoke ordinary console commands.
|
|
|
|
|
|
|
|
|
|
|
|
Currently the supported set of requests is limited, because the developers don't
|
|
|
|
Currently the supported set of requests is limited, because the developers don't
|
|
|
|
know what exactly is most useful. ``remotefortressreader`` provides a fairly
|
|
|
|
know what exactly is most useful. `remotefortressreader` provides a fairly
|
|
|
|
comprehensive interface for visualisers such as Armok Vision.
|
|
|
|
comprehensive interface for visualisers such as :forums:`Armok Vision <146473>`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Documentation Standards
|
|
|
|
Documentation Standards
|
|
|
|
=======================
|
|
|
|
=======================
|
|
|
|
DFHack documentation is built with Sphinx, and configured automatically
|
|
|
|
DFHack documentation is built with Sphinx_, and configured automatically
|
|
|
|
through CMake. If you want to build the docs *only*, use this command::
|
|
|
|
through CMake. If you want to build the docs *only*, use this command::
|
|
|
|
|
|
|
|
|
|
|
|
sphinx-build . docs/html
|
|
|
|
sphinx-build . docs/html
|
|
|
@ -134,10 +137,10 @@ there are a few important standards for completeness and consistent style. Trea
|
|
|
|
this section as a guide rather than iron law, match the surrounding text, and you'll
|
|
|
|
this section as a guide rather than iron law, match the surrounding text, and you'll
|
|
|
|
be fine.
|
|
|
|
be fine.
|
|
|
|
|
|
|
|
|
|
|
|
Everything should be documented! For plugins, it's a work in progress - use
|
|
|
|
Everything should be documented! If it's not clear *where* a particular
|
|
|
|
``docs/Plugins.rst`` for now. Core functions and general explanations should
|
|
|
|
thing should be documented, ask on IRC or in the DFHack thread on Bay12 -
|
|
|
|
go in the documents for that component; if it's not clear add a new section
|
|
|
|
as well as getting help, you'll be providing valuable feedback that
|
|
|
|
as some may be missing.
|
|
|
|
makes it easier for future readers!
|
|
|
|
|
|
|
|
|
|
|
|
Scripts can use a custom autodoc function, based on the Sphinx ``include``
|
|
|
|
Scripts can use a custom autodoc function, based on the Sphinx ``include``
|
|
|
|
directive and Ruby docstring conventions - any lines between ``=begin`` and
|
|
|
|
directive and Ruby docstring conventions - any lines between ``=begin`` and
|
|
|
|