<h1><aclass="toc-backref"href="#id3">DF data structure wrapper</a></h1>
<h1><aclass="toc-backref"href="#id3">DF data structure wrapper</a></h1>
<p>DF structures described by the xml files in library/xml are exported
<p>Data structures of the game are defined in XML files located in library/xml
to lua code as a tree of objects and functions under the <ttclass="docutils literal">df</tt> global,
(and online at <aclass="reference external"href="http://github.com/DFHack/df-structures">http://github.com/DFHack/df-structures</a>), and automatically exported
which broadly maps to the <ttclass="docutils literal">df</tt> namespace in C++.</p>
to lua code as a tree of objects and functions under the <ttclass="docutils literal">df</tt> global, which
also broadly maps to the <ttclass="docutils literal">df</tt> namespace in the headers generated for C++.</p>
<p><strong>WARNING</strong>: The wrapper provides almost raw access to the memory
<p><strong>WARNING</strong>: The wrapper provides almost raw access to the memory
of the game, so mistakes in manipulating objects are as likely to
of the game, so mistakes in manipulating objects are as likely to
crash the game as equivalent plain C++ code would be. E.g. NULL
crash the game as equivalent plain C++ code would be. E.g. NULL