You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COMPILE.rst
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,10 +152,13 @@ Valid and useful build types include 'Release', 'Debug' and
152
152
================================
153
153
Using the library as a developer
154
154
================================
155
-
Currently, the only way to use the library is to write a plugin that can be loaded by it.
155
+
156
+
Currently, the most direct way to use the library is to write a plugin that can be loaded by it.
156
157
All the plugins can be found in the 'plugins' folder. There's no in-depth documentation
157
158
on how to write one yet, but it should be easy enough to copy one and just follow the pattern.
158
159
160
+
Other than through plugins, it is possible to use DFHack via remote access interface, or by writing Lua scripts.
161
+
159
162
The most important parts of DFHack are the Core, Console, Modules and Plugins.
160
163
161
164
* Core acts as the centerpiece of DFHack - it acts as a filter between DF and SDL and synchronizes the various plugins with DF.
@@ -171,6 +174,24 @@ The main license is zlib/libpng, some bits are MIT licensed, and some are BSD li
171
174
Feel free to add your own extensions and plugins. Contributing back to
172
175
the dfhack repository is welcome and the right thing to do :)
173
176
177
+
DF data structure definitions
178
+
=============================
179
+
180
+
DFHack uses information about the game data structures, represented via xml files in the library/xml/ submodule.
181
+
182
+
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 structures, and associated metadata for the Lua wrapper. These headers and data are then compiled into the DFHack libraries, thus necessitating a compatibility break every time layouts change; in return it significantly boosts the efficiency and capabilities of DFHack code.
183
+
184
+
Global object addresses are stored in symbols.xml, which is copied to the dfhack release package and loaded as data at runtime.
185
+
186
+
Remote access interface
187
+
=======================
188
+
189
+
DFHack supports remote access by exchanging Google protobuf messages via a TCP socket. Both the core and plugins can define remotely accessible methods. The ``dfhack-run`` command uses this interface to invoke ordinary console commands.
190
+
191
+
Currently the supported set of requests is limited, because the developers don't know what exactly is most useful.
192
+
193
+
Protocol client implementations exist for Java and C#.
<h2><aclass="toc-backref" href="#id14">DF data structure definitions</a></h2>
493
+
<p>DFHack uses information about the game data structures, represented via xml files in the library/xml/ submodule.</p>
494
+
<p>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 structures, and associated metadata for the Lua wrapper. These headers and data are then compiled into the DFHack libraries, thus necessitating a compatibility break every time layouts change; in return it significantly boosts the efficiency and capabilities of DFHack code.</p>
495
+
<p>Global object addresses are stored in symbols.xml, which is copied to the dfhack release package and loaded as data at runtime.</p>
<p>DFHack supports remote access by exchanging Google protobuf messages via a TCP socket. Both the core and plugins can define remotely accessible methods. The <ttclass="docutils literal"><spanclass="pre">dfhack-run</span></tt> command uses this interface to invoke ordinary console commands.</p>
500
+
<p>Currently the supported set of requests is limited, because the developers don't know what exactly is most useful.</p>
501
+
<p>Protocol client implementations exist for Java and C#.</p>
502
+
</div>
488
503
<divclass="section" id="contributing-to-dfhack">
489
-
<h2><aclass="toc-backref" href="#id14">Contributing to DFHack</a></h2>
504
+
<h2><aclass="toc-backref" href="#id16">Contributing to DFHack</a></h2>
490
505
<p>Several things should be kept in mind when contributing to DFHack.</p>
0 commit comments