Conflicts:
	Readme.html
develop
Petr Mrázek 2013-04-24 16:13:27 +02:00
commit 3e59794733
7 changed files with 243 additions and 39 deletions

@ -3,13 +3,13 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.9.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title>Building DFHACK</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7434 2012-05-11 21:06:27Z milde $
:Id: $Id: html4css1.css 7514 2012-09-14 14:27:12Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
@ -77,7 +77,7 @@ div.tip p.admonition-title {
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
@ -253,13 +253,14 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { /* line numbers */
color: grey;
}
.code {
background-color: #eeeeee
}
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
@ -334,21 +335,24 @@ ul.auto-toc {
<li><a class="reference internal" href="#build" id="id7">Build</a></li>
</ul>
</li>
<li><a class="reference internal" href="#mac-os-x" id="id8">Mac OS X</a></li>
<li><a class="reference internal" href="#windows" id="id9">Windows</a><ul>
<li><a class="reference internal" href="#id1" id="id10">How to get the code</a></li>
<li><a class="reference internal" href="#id2" id="id11">Dependencies</a></li>
<li><a class="reference internal" href="#id3" id="id12">Build</a></li>
<li><a class="reference internal" href="#mac-os-x" id="id8">Mac OS X</a><ul>
<li><a class="reference internal" href="#snow-leopard-changes" id="id9">Snow Leopard Changes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#windows" id="id10">Windows</a><ul>
<li><a class="reference internal" href="#id1" id="id11">How to get the code</a></li>
<li><a class="reference internal" href="#id2" id="id12">Dependencies</a></li>
<li><a class="reference internal" href="#id3" id="id13">Build</a></li>
</ul>
</li>
<li><a class="reference internal" href="#build-types" id="id13">Build types</a></li>
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id14">Using the library as a developer</a><ul>
<li><a class="reference internal" href="#df-data-structure-definitions" id="id15">DF data structure definitions</a></li>
<li><a class="reference internal" href="#remote-access-interface" id="id16">Remote access interface</a></li>
<li><a class="reference internal" href="#contributing-to-dfhack" id="id17">Contributing to DFHack</a><ul>
<li><a class="reference internal" href="#coding-style" id="id18">Coding style</a></li>
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id19">How to get new code into DFHack</a></li>
<li><a class="reference internal" href="#memory-research" id="id20">Memory research</a></li>
<li><a class="reference internal" href="#build-types" id="id14">Build types</a></li>
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id15">Using the library as a developer</a><ul>
<li><a class="reference internal" href="#df-data-structure-definitions" id="id16">DF data structure definitions</a></li>
<li><a class="reference internal" href="#remote-access-interface" id="id17">Remote access interface</a></li>
<li><a class="reference internal" href="#contributing-to-dfhack" id="id18">Contributing to DFHack</a><ul>
<li><a class="reference internal" href="#coding-style" id="id19">Coding style</a></li>
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id20">How to get new code into DFHack</a></li>
<li><a class="reference internal" href="#memory-research" id="id21">Memory research</a></li>
</ul>
</li>
</ul>
@ -406,6 +410,7 @@ program.</p>
</div>
<div class="section" id="mac-os-x">
<h1><a class="toc-backref" href="#id8">Mac OS X</a></h1>
<p>If you are building on 10.6, please read the subsection below titled &quot;Snow Leopard Changes&quot; FIRST.</p>
<ol class="arabic">
<li><p class="first">Download and unpack a copy of the latest DF</p>
</li>
@ -458,12 +463,34 @@ make install
</pre>
</li>
</ol>
<div class="section" id="snow-leopard-changes">
<h2><a class="toc-backref" href="#id9">Snow Leopard Changes</a></h2>
<ol class="arabic">
<li><dl class="first docutils">
<dt>Add a step 6.2a (before Install XML::LibXSLT)::</dt>
<dd><p class="first last">In a separate Terminal window or tab, run:
<tt class="docutils literal">sudo ln <span class="pre">-s</span> /usr/include/libxml2/libxml /usr/include/libxml</tt></p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Add a step 7a (before building)::</dt>
<dd><dl class="first last docutils">
<dt>In &lt;dfhack directory&gt;/library/LuaTypes.cpp, change line 467 to</dt>
<dd><p class="first last"><tt class="docutils literal">int len = <span class="pre">strlen((char*)ptr);</span></tt></p>
</dd>
</dl>
</dd>
</dl>
</li>
</ol>
</div>
</div>
<div class="section" id="windows">
<h1><a class="toc-backref" href="#id9">Windows</a></h1>
<h1><a class="toc-backref" href="#id10">Windows</a></h1>
<p>On Windows, DFHack replaces the SDL library distributed with DF.</p>
<div class="section" id="id1">
<h2><a class="toc-backref" href="#id10">How to get the code</a></h2>
<h2><a class="toc-backref" href="#id11">How to get the code</a></h2>
<p>DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
You will need some sort of Windows port of git, or a GUI. Some examples:</p>
<blockquote>
@ -484,7 +511,7 @@ git submodule update
<p>If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).</p>
</div>
<div class="section" id="id2">
<h2><a class="toc-backref" href="#id11">Dependencies</a></h2>
<h2><a class="toc-backref" href="#id12">Dependencies</a></h2>
<p>First, you need <tt class="docutils literal">cmake</tt>. Get the win32 installer version from the official
site: <a class="reference external" href="http://www.cmake.org/cmake/resources/software.html">http://www.cmake.org/cmake/resources/software.html</a></p>
<p>It has the usual installer wizard. Make sure you let it add its binary folder
@ -501,7 +528,7 @@ Grab it from Microsoft's site.</p>
<p>If you already have a different version of perl (for example the one from cygwin), you can run into some trouble. Either remove the other perl install from PATH, or install libxml and libxslt for it instead. Strawberry perl works though and has all the required packages.</p>
</div>
<div class="section" id="id3">
<h2><a class="toc-backref" href="#id12">Build</a></h2>
<h2><a class="toc-backref" href="#id13">Build</a></h2>
<p>There are several different batch files in the <tt class="docutils literal">build</tt> folder along with a script that's used for picking the DF path.</p>
<p>First, run set_df_path.vbs and point the dialog that pops up at your DF folder that you want to use for development.
Next, run one of the scripts with <tt class="docutils literal">generate</tt> prefix. These create the MSVC solution file(s):</p>
@ -523,7 +550,7 @@ So pick either Release or RelWithDebInfo build and build the INSTALL target.</p>
</div>
</div>
<div class="section" id="build-types">
<h1><a class="toc-backref" href="#id13">Build types</a></h1>
<h1><a class="toc-backref" href="#id14">Build types</a></h1>
<p><tt class="docutils literal">cmake</tt> allows you to pick a build type by changing this
variable: <tt class="docutils literal">CMAKE_BUILD_TYPE</tt></p>
<pre class="literal-block">
@ -535,7 +562,7 @@ cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE
'RelWithDebInfo'. 'Debug' is not available on Windows.</p>
</div>
<div class="section" id="using-the-library-as-a-developer">
<h1><a class="toc-backref" href="#id14">Using the library as a developer</a></h1>
<h1><a class="toc-backref" href="#id15">Using the library as a developer</a></h1>
<p>Currently, the most direct way to use the library is to write a plugin that can be loaded by it.
All the plugins can be found in the 'plugins' folder. There's no in-depth documentation
on how to write one yet, but it should be easy enough to copy one and just follow the pattern.</p>
@ -553,29 +580,29 @@ The main license is zlib/libpng, some bits are MIT licensed, and some are BSD li
<p>Feel free to add your own extensions and plugins. Contributing back to
the dfhack repository is welcome and the right thing to do :)</p>
<div class="section" id="df-data-structure-definitions">
<h2><a class="toc-backref" href="#id15">DF data structure definitions</a></h2>
<h2><a class="toc-backref" href="#id16">DF data structure definitions</a></h2>
<p>DFHack uses information about the game data structures, represented via xml files in the library/xml/ submodule.</p>
<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>
<p>Global object addresses are stored in symbols.xml, which is copied to the dfhack release package and loaded as data at runtime.</p>
</div>
<div class="section" id="remote-access-interface">
<h2><a class="toc-backref" href="#id16">Remote access interface</a></h2>
<h2><a class="toc-backref" href="#id17">Remote access interface</a></h2>
<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 <tt class="docutils literal"><span class="pre">dfhack-run</span></tt> command uses this interface to invoke ordinary console commands.</p>
<p>Currently the supported set of requests is limited, because the developers don't know what exactly is most useful.</p>
<p>Protocol client implementations exist for Java and C#.</p>
</div>
<div class="section" id="contributing-to-dfhack">
<h2><a class="toc-backref" href="#id17">Contributing to DFHack</a></h2>
<h2><a class="toc-backref" href="#id18">Contributing to DFHack</a></h2>
<p>Several things should be kept in mind when contributing to DFHack.</p>
<div class="section" id="coding-style">
<h3><a class="toc-backref" href="#id18">Coding style</a></h3>
<h3><a class="toc-backref" href="#id19">Coding style</a></h3>
<p>DFhack uses ANSI formatting and four spaces as indentation. Line
endings are UNIX. The files use UTF-8 encoding. Code not following this
won't make me happy, because I'll have to fix it. There's a good chance
I'll make <em>you</em> fix it ;)</p>
</div>
<div class="section" id="how-to-get-new-code-into-dfhack">
<h3><a class="toc-backref" href="#id19">How to get new code into DFHack</a></h3>
<h3><a class="toc-backref" href="#id20">How to get new code into DFHack</a></h3>
<p>You can send patches or make a clone of the github repo and ask me on
the IRC channel to pull your code in. I'll review it and see if there
are any problems. I'll fix them if they are minor.</p>
@ -585,7 +612,7 @@ this is also a good place to dump new ideas and/or bugs that need
fixing.</p>
</div>
<div class="section" id="memory-research">
<h3><a class="toc-backref" href="#id20">Memory research</a></h3>
<h3><a class="toc-backref" href="#id21">Memory research</a></h3>
<p>If you want to do memory research, you'll need some tools and some knowledge.
In general, you'll need a good memory viewer and optionally something
to look at machine code without getting crazy :)</p>

@ -491,6 +491,7 @@ access DF memory and allow for easier development of new tools.</p>
</li>
</ul>
</li>
<<<<<<< HEAD
<li><a class="reference internal" href="#scripts" id="id116">Scripts</a><ul>
<li><a class="reference internal" href="#fix" id="id117">fix/*</a></li>
<li><a class="reference internal" href="#gui" id="id118">gui/*</a></li>
@ -547,6 +548,63 @@ access DF memory and allow for easier development of new tools.</p>
</ul>
</li>
<li><a class="reference internal" href="#add-spatter" id="id163">Add Spatter</a></li>
=======
<li><a class="reference internal" href="#scripts" id="id115">Scripts</a><ul>
<li><a class="reference internal" href="#fix" id="id116">fix/*</a></li>
<li><a class="reference internal" href="#gui" id="id117">gui/*</a></li>
<li><a class="reference internal" href="#binpatch" id="id118">binpatch</a></li>
<li><a class="reference internal" href="#quicksave" id="id119">quicksave</a></li>
<li><a class="reference internal" href="#setfps" id="id120">setfps</a></li>
<li><a class="reference internal" href="#siren" id="id121">siren</a></li>
<li><a class="reference internal" href="#growcrops" id="id122">growcrops</a></li>
<li><a class="reference internal" href="#removebadthoughts" id="id123">removebadthoughts</a></li>
<li><a class="reference internal" href="#slayrace" id="id124">slayrace</a></li>
<li><a class="reference internal" href="#magmasource" id="id125">magmasource</a></li>
<li><a class="reference internal" href="#digfort" id="id126">digfort</a></li>
<li><a class="reference internal" href="#superdwarf" id="id127">superdwarf</a></li>
<li><a class="reference internal" href="#drainaquifer" id="id128">drainaquifer</a></li>
<li><a class="reference internal" href="#deathcause" id="id129">deathcause</a></li>
<li><a class="reference internal" href="#lua" id="id130">lua</a></li>
<li><a class="reference internal" href="#embark" id="id131">embark</a></li>
<li><a class="reference internal" href="#lever" id="id132">lever</a></li>
<li><a class="reference internal" href="#stripcaged" id="id133">stripcaged</a></li>
<li><a class="reference internal" href="#create-items" id="id134">create-items</a></li>
</ul>
</li>
<li><a class="reference internal" href="#in-game-interface-tools" id="id135">In-game interface tools</a><ul>
<li><a class="reference internal" href="#dwarf-manipulator" id="id136">Dwarf Manipulator</a></li>
<li><a class="reference internal" href="#search" id="id137">Search</a></li>
<li><a class="reference internal" href="#automaterial" id="id138">AutoMaterial</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id139">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id140">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id141">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id142">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id143">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id144">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id145">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id146">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id147">gui/assign-rack</a></li>
<li><a class="reference internal" href="#gui-advfort" id="id148">gui/advfort</a></li>
<li><a class="reference internal" href="#gui-gm-editor" id="id149">gui/gm-editor</a></li>
</ul>
</li>
<li><a class="reference internal" href="#behavior-mods" id="id150">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id151">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id152">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id153">Configuration UI</a></li>
</ul>
</li>
<li><a class="reference internal" href="#power-meter" id="id154">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id155">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id156">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id157">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id158">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id159">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id160">Save files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#add-spatter" id="id161">Add Spatter</a></li>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
</ul>
</li>
</ul>
@ -2556,8 +2614,9 @@ disables labors. It tries to keep as many dwarves as possible busy but
also tries to have dwarves specialize in specific skills.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Warning: autolabor will override any manual changes you make to labors
<p>Warning: autolabor will override any manual changes you make to labors
while it is enabled.</p>
<p class="last">To prevent particular dwarves from being managed by autolabor, put them in any burrow.</p>
</div>
<p>For detailed usage information, see 'help autolabor'.</p>
</div>
@ -2855,7 +2914,11 @@ stripcaged weapons 25321 34228
</pre>
</div>
<div class="section" id="create-items">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id135">create-items</a></h2>
=======
<h2><a class="toc-backref" href="#id134">create-items</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Spawn arbitrary items under the cursor.</p>
<p>The first argument gives the item category, the second gives the material,
and the optionnal third gives the number of items to create (defaults to 20).</p>
@ -2876,6 +2939,7 @@ create-items bar CREATURE:CAT:SOAP
create-items bar adamantine
</pre>
</div>
<<<<<<< HEAD
<div class="section" id="soundsense-season">
<h2><a class="toc-backref" href="#id136">soundsense-season</a></h2>
<p>It is a well known issue that Soundsense cannot detect the correct
@ -2888,6 +2952,11 @@ call the script from <tt class="docutils literal">dfhack.init</tt>.</p>
</div>
<div class="section" id="in-game-interface-tools">
<h1><a class="toc-backref" href="#id137">In-game interface tools</a></h1>
=======
</div>
<div class="section" id="in-game-interface-tools">
<h1><a class="toc-backref" href="#id135">In-game interface tools</a></h1>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>These tools work by displaying dialogs or overlays in the game window, and
are mostly implemented by lua scripts.</p>
<div class="note">
@ -2900,7 +2969,11 @@ existing DF screens, they deliberately use red instead of green for the key.</p>
guideline because it arguably just fixes small usability bugs in the game UI.</p>
</div>
<div class="section" id="dwarf-manipulator">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id138">Dwarf Manipulator</a></h2>
=======
<h2><a class="toc-backref" href="#id136">Dwarf Manipulator</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Implemented by the manipulator plugin. To activate, open the unit screen and
press 'l'.</p>
<img alt="images/manipulator.png" src="images/manipulator.png" />
@ -2939,7 +3012,11 @@ cursor onto that cell instead of toggling it.</li>
directly to the main dwarf mode screen.</p>
</div>
<div class="section" id="search">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id139">Search</a></h2>
=======
<h2><a class="toc-backref" href="#id137">Search</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The search plugin adds search to the Stocks, Animals, Trading, Stockpile,
Noble (assignment candidates), Military (position candidates), Burrows
(unit list), Rooms, Announcements, Job List and Unit List screens.</p>
@ -2969,7 +3046,11 @@ only fat or tallow by forbidding fats, then searching for fat/tallow, and
using Permit Fats again while the list is filtered.</p>
</div>
<div class="section" id="automaterial">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id140">AutoMaterial</a></h2>
=======
<h2><a class="toc-backref" href="#id138">AutoMaterial</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The automaterial plugin makes building constructions (walls, floors, fortifications,
etc) a little bit easier by saving you from having to trawl through long lists of
materials each time you place one.</p>
@ -2996,7 +3077,11 @@ materials, it returns you back to this screen. If you use this along with severa
enabled materials, you should be able to place complex constructions more conveniently.</p>
</div>
<div class="section" id="gui-liquids">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id141">gui/liquids</a></h2>
=======
<h2><a class="toc-backref" href="#id139">gui/liquids</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>To use, bind to a key (the example config uses Alt-L) and activate in the 'k' mode.</p>
<img alt="images/liquids.png" src="images/liquids.png" />
<p>This script is a gui front-end to the liquids plugin and works similar to it,
@ -3016,7 +3101,11 @@ rivers power water wheels even when full and technically not flowing.</p>
<p>After setting up the desired operations using the described keys, use <tt class="docutils literal">Enter</tt> to apply them.</p>
</div>
<div class="section" id="gui-mechanisms">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id142">gui/mechanisms</a></h2>
=======
<h2><a class="toc-backref" href="#id140">gui/mechanisms</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>To use, bind to a key (the example config uses Ctrl-M) and activate in the 'q' mode.</p>
<img alt="images/mechanisms.png" src="images/mechanisms.png" />
<p>Lists mechanisms connected to the building, and their links. Navigating the list centers
@ -3026,7 +3115,11 @@ focus on the current one. Shift-Enter has an effect equivalent to pressing Enter
re-entering the mechanisms ui.</p>
</div>
<div class="section" id="gui-rename">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id143">gui/rename</a></h2>
=======
<h2><a class="toc-backref" href="#id141">gui/rename</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Backed by the rename plugin, this script allows entering the desired name
via a simple dialog in the game ui.</p>
<ul>
@ -3049,7 +3142,11 @@ their species string.</p>
unit profession change to Ctrl-Shift-T.</p>
</div>
<div class="section" id="gui-room-list">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id144">gui/room-list</a></h2>
=======
<h2><a class="toc-backref" href="#id142">gui/room-list</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>To use, bind to a key (the example config uses Alt-R) and activate in the 'q' mode,
either immediately or after opening the assign owner page.</p>
<img alt="images/room-list.png" src="images/room-list.png" />
@ -3057,7 +3154,11 @@ either immediately or after opening the assign owner page.</p>
list, and allows unassigning them.</p>
</div>
<div class="section" id="gui-choose-weapons">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id145">gui/choose-weapons</a></h2>
=======
<h2><a class="toc-backref" href="#id143">gui/choose-weapons</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Bind to a key (the example config uses Ctrl-W), and activate in the Equip-&gt;View/Customize
page of the military screen.</p>
<p>Depending on the cursor location, it rewrites all 'individual choice weapon' entries
@ -3068,7 +3169,11 @@ only that entry, and does it even if it is not 'individual choice'.</p>
and may lead to inappropriate weapons being selected.</p>
</div>
<div class="section" id="gui-guide-path">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id146">gui/guide-path</a></h2>
=======
<h2><a class="toc-backref" href="#id144">gui/guide-path</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Bind to a key (the example config uses Alt-P), and activate in the Hauling menu with
the cursor over a Guide order.</p>
<img alt="images/guide-path.png" src="images/guide-path.png" />
@ -3076,7 +3181,11 @@ the cursor over a Guide order.</p>
computes it when the order is executed for the first time.</p>
</div>
<div class="section" id="gui-workshop-job">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id147">gui/workshop-job</a></h2>
=======
<h2><a class="toc-backref" href="#id145">gui/workshop-job</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Bind to a key (the example config uses Alt-A), and activate with a job selected in
a workshop in the 'q' mode.</p>
<img alt="images/workshop-job.png" src="images/workshop-job.png" />
@ -3112,7 +3221,11 @@ and then try to change the input item type, now it won't let you select <em>plan
you have to unset the material first.</p>
</div>
<div class="section" id="gui-workflow">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id148">gui/workflow</a></h2>
=======
<h2><a class="toc-backref" href="#id146">gui/workflow</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Bind to a key (the example config uses Alt-W), and activate with a job selected
in a workshop in the 'q' mode.</p>
<img alt="images/workflow.png" src="images/workflow.png" />
@ -3159,7 +3272,11 @@ the current stock value. The bright green dashed line is the target
limit (maximum) and the dark green line is that minus the gap (minimum).</p>
</div>
<div class="section" id="gui-assign-rack">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id149">gui/assign-rack</a></h2>
=======
<h2><a class="toc-backref" href="#id147">gui/assign-rack</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Bind to a key (the example config uses P), and activate when viewing a weapon
rack in the 'q' mode.</p>
<img alt="images/assign-rack.png" src="images/assign-rack.png" />
@ -3183,7 +3300,11 @@ the intended user. In order to aid in the choice, it shows the number
of currently assigned racks for every valid squad.</p>
</div>
<div class="section" id="gui-advfort">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id150">gui/advfort</a></h2>
=======
<h2><a class="toc-backref" href="#id148">gui/advfort</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>This script allows to perform jobs in adventure mode. For more complete help
press '?' while script is running. It's most confortable to use this as a
keybinding. (e.g. keybinding set Ctrl-T gui/advfort). Possible arguments:</p>
@ -3196,7 +3317,11 @@ implies -a</li>
</ul>
</div>
<div class="section" id="gui-gm-editor">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id151">gui/gm-editor</a></h2>
=======
<h2><a class="toc-backref" href="#id149">gui/gm-editor</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>There are three ways to open this editor:</p>
<ul class="simple">
<li>using gui/gm-editor command/keybinding - opens editor on what is selected
@ -3211,7 +3336,11 @@ in-game help.</p>
</div>
</div>
<div class="section" id="behavior-mods">
<<<<<<< HEAD
<h1><a class="toc-backref" href="#id152">Behavior Mods</a></h1>
=======
<h1><a class="toc-backref" href="#id150">Behavior Mods</a></h1>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>These plugins, when activated via configuration UI or by detecting certain
structures in RAWs, modify the game engine behavior concerning the target
objects to add features not otherwise present.</p>
@ -3222,20 +3351,32 @@ technical challenge, and do not represent any long-term plans to produce more
similar modifications of the game.</p>
</div>
<div class="section" id="siege-engine">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id153">Siege Engine</a></h2>
=======
<h2><a class="toc-backref" href="#id151">Siege Engine</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The siege-engine plugin enables siege engines to be linked to stockpiles, and
aimed at an arbitrary rectangular area across Z levels, instead of the original
four directions. Also, catapults can be ordered to load arbitrary objects, not
just stones.</p>
<div class="section" id="rationale">
<<<<<<< HEAD
<h3><a class="toc-backref" href="#id154">Rationale</a></h3>
=======
<h3><a class="toc-backref" href="#id152">Rationale</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>Siege engines are a very interesting feature, but sadly almost useless in the current state
because they haven't been updated since 2D and can only aim in four directions. This is an
attempt to bring them more up to date until Toady has time to work on it. Actual improvements,
e.g. like making siegers bring their own, are something only Toady can do.</p>
</div>
<div class="section" id="configuration-ui">
<<<<<<< HEAD
<h3><a class="toc-backref" href="#id155">Configuration UI</a></h3>
=======
<h3><a class="toc-backref" href="#id153">Configuration UI</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The configuration front-end to the plugin is implemented by the gui/siege-engine
script. Bind it to a key (the example config uses Alt-A) and activate after selecting
a siege engine in 'q' mode.</p>
@ -3258,7 +3399,11 @@ menu.</p>
</div>
</div>
<div class="section" id="power-meter">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id156">Power Meter</a></h2>
=======
<h2><a class="toc-backref" href="#id154">Power Meter</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The power-meter plugin implements a modified pressure plate that detects power being
supplied to gear boxes built in the four adjacent N/S/W/E tiles.</p>
<p>The configuration front-end is implemented by the gui/power-meter script. Bind it to a
@ -3269,11 +3414,19 @@ in the build menu.</p>
configuration page, but configures parameters relevant to the modded power meter building.</p>
</div>
<div class="section" id="steam-engine">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id157">Steam Engine</a></h2>
<p>The steam-engine plugin detects custom workshops with STEAM_ENGINE in
their token, and turns them into real steam engines.</p>
<div class="section" id="id1">
<h3><a class="toc-backref" href="#id158">Rationale</a></h3>
=======
<h2><a class="toc-backref" href="#id155">Steam Engine</a></h2>
<p>The steam-engine plugin detects custom workshops with STEAM_ENGINE in
their token, and turns them into real steam engines.</p>
<div class="section" id="id1">
<h3><a class="toc-backref" href="#id156">Rationale</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The vanilla game contains only water wheels and windmills as sources of
power, but windmills give relatively little power, and water wheels require
flowing water, which must either be a real river and thus immovable and
@ -3284,7 +3437,11 @@ it can be done just by combining existing features of the game engine
in a new way with some glue code and a bit of custom logic.</p>
</div>
<div class="section" id="construction">
<<<<<<< HEAD
<h3><a class="toc-backref" href="#id159">Construction</a></h3>
=======
<h3><a class="toc-backref" href="#id157">Construction</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The workshop needs water as its input, which it takes via a
passable floor tile below it, like usual magma workshops do.
The magma version also needs magma.</p>
@ -3308,7 +3465,11 @@ short axles that can be built later than both of the engines.</p>
</div>
</div>
<div class="section" id="operation">
<<<<<<< HEAD
<h3><a class="toc-backref" href="#id160">Operation</a></h3>
=======
<h3><a class="toc-backref" href="#id158">Operation</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>In order to operate the engine, queue the Stoke Boiler job (optionally
on repeat). A furnace operator will come, possibly bringing a bar of fuel,
and perform it. As a result, a &quot;boiling water&quot; item will appear
@ -3339,7 +3500,11 @@ decrease it by further 4%, and also decrease the whole steam
use rate by 10%.</p>
</div>
<div class="section" id="explosions">
<<<<<<< HEAD
<h3><a class="toc-backref" href="#id161">Explosions</a></h3>
=======
<h3><a class="toc-backref" href="#id159">Explosions</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>The engine must be constructed using barrel, pipe and piston
from fire-safe, or in the magma version magma-safe metals.</p>
<p>During operation weak parts get gradually worn out, and
@ -3348,7 +3513,11 @@ toppled during operation by a building destroyer, or a
tantruming dwarf.</p>
</div>
<div class="section" id="save-files">
<<<<<<< HEAD
<h3><a class="toc-backref" href="#id162">Save files</a></h3>
=======
<h3><a class="toc-backref" href="#id160">Save files</a></h3>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>It should be safe to load and view engine-using fortresses
from a DF version without DFHack installed, except that in such
case the engines won't work. However actually making modifications
@ -3359,7 +3528,11 @@ being generated.</p>
</div>
</div>
<div class="section" id="add-spatter">
<<<<<<< HEAD
<h2><a class="toc-backref" href="#id163">Add Spatter</a></h2>
=======
<h2><a class="toc-backref" href="#id161">Add Spatter</a></h2>
>>>>>>> 9140961afe88e4c6bc80afba0e4c16eee7288622
<p>This plugin makes reactions with names starting with <tt class="docutils literal">SPATTER_ADD_</tt>
produce contaminants on the items instead of improvements. The produced
contaminants are immune to being washed away by water or destroyed by

@ -1714,6 +1714,8 @@ also tries to have dwarves specialize in specific skills.
Warning: autolabor will override any manual changes you make to labors
while it is enabled.
To prevent particular dwarves from being managed by autolabor, put them in any burrow.
For detailed usage information, see 'help autolabor'.
Other

@ -1 +1 @@
Subproject commit 4d2afc3a0bcebdb17415dc2827b44fd35986a368
Subproject commit cacb0b9a347aaadc2b4b052a7cda40e58104f04f

@ -679,6 +679,8 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug
" also tries to have dwarves specialize in specific skills.\n"
" Warning: autolabor will override any manual changes you make to labors\n"
" while it is enabled.\n"
" To prevent particular dwarves from being managed by autolabor, put them\n"
" in any burrow.\n"
"Examples:\n"
" autolabor MINE 2\n"
" Keep at least 2 dwarves with mining enabled.\n"

@ -1 +1 @@
Subproject commit 69f28dd6a5a7b9a18215eb066738bb64112c711d
Subproject commit aa3b1bd51f269c07b3235392fd7ed21fe9171f3f

@ -1 +1 @@
Subproject commit 86a2f350ce6a63503022eb1faced6c2f146b98e2
Subproject commit 0d41614ff3dae9245e786ad667b0e463fe0dea3e