Add documentation for the search plugin.

develop
Alexander Gavrilov 2012-11-03 15:49:34 +04:00
parent 9bf24bde10
commit d6f1bb93b5
2 changed files with 87 additions and 42 deletions

@ -500,33 +500,34 @@ access DF memory and allow for easier development of new tools.</p>
</li>
<li><a class="reference internal" href="#in-game-interface-tools" id="id126">In-game interface tools</a><ul>
<li><a class="reference internal" href="#dwarf-manipulator" id="id127">Dwarf Manipulator</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id128">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id129">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id130">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id131">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id132">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id133">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id134">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id135">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id136">gui/assign-rack</a></li>
<li><a class="reference internal" href="#search" id="id128">Search</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id129">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id130">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id131">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id132">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id133">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id134">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id135">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id136">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id137">gui/assign-rack</a></li>
</ul>
</li>
<li><a class="reference internal" href="#behavior-mods" id="id137">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id138">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id139">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id140">Configuration UI</a></li>
<li><a class="reference internal" href="#behavior-mods" id="id138">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id139">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id140">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id141">Configuration UI</a></li>
</ul>
</li>
<li><a class="reference internal" href="#power-meter" id="id141">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id142">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id143">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id144">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id145">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id146">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id147">Save files</a></li>
<li><a class="reference internal" href="#power-meter" id="id142">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id143">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id144">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id145">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id146">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id147">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id148">Save files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#add-spatter" id="id148">Add Spatter</a></li>
<li><a class="reference internal" href="#add-spatter" id="id149">Add Spatter</a></li>
</ul>
</li>
</ul>
@ -2691,14 +2692,33 @@ cursor onto that cell instead of toggling it.</li>
<p>Pressing ESC normally returns to the unit screen, but Shift-ESC would exit
directly to the main dwarf mode screen.</p>
</div>
<div class="section" id="search">
<h2><a class="toc-backref" href="#id128">Search</a></h2>
<p>The search plugin adds search to the Stocks, Trading and Unit List screens.</p>
<p>Searching works the same way as the search option in &quot;Move to Depot&quot; does.
You will see the Search option displayed on screen with a hotkey (usually 's').
Pressing it lets you start typing a query and the relevant list will start
filtering automatically.</p>
<p>Pressing ENTER, ESC or the arrow keys will return you to browsing the now
filtered list, which still functions as normal. You can clear the filter
by either going back into search mode and backspacing to delete it, or
pressing the &quot;shifted&quot; version of the search hotkey while browsing the
list (e.g. if the hotkey is 's', then hitting 'shift-s' will clear any
filter).</p>
<p>Leaving any screen automatically clears the filter.</p>
<p>In the Trade screen, the actual trade will always only act on items that
are actually visible in the list; the same effect applies to the Trade
Value numbers displayed by the screen. Because of this, pressing the 't'
key while search is active clears the search instead of executing the trade.</p>
</div>
<div class="section" id="gui-liquids">
<h2><a class="toc-backref" href="#id128">gui/liquids</a></h2>
<h2><a class="toc-backref" href="#id129">gui/liquids</a></h2>
<p>To use, bind to a key and activate in the 'k' mode.</p>
<p>While active, use the suggested keys to switch the usual liquids parameters, and Enter
to select the target area and apply changes.</p>
</div>
<div class="section" id="gui-mechanisms">
<h2><a class="toc-backref" href="#id129">gui/mechanisms</a></h2>
<h2><a class="toc-backref" href="#id130">gui/mechanisms</a></h2>
<p>To use, bind to a key and activate in the 'q' mode.</p>
<p>Lists mechanisms connected to the building, and their links. Navigating the list centers
the view on the relevant linked buildings.</p>
@ -2707,7 +2727,7 @@ 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">
<h2><a class="toc-backref" href="#id130">gui/rename</a></h2>
<h2><a class="toc-backref" href="#id131">gui/rename</a></h2>
<p>Backed by the rename plugin, this script allows entering the desired name
via a simple dialog in the game ui.</p>
<ul>
@ -2723,14 +2743,14 @@ It is also possible to rename zones from the 'i' menu.</p>
<p>The <tt class="docutils literal">building</tt> or <tt class="docutils literal">unit</tt> options are automatically assumed when in relevant ui state.</p>
</div>
<div class="section" id="gui-room-list">
<h2><a class="toc-backref" href="#id131">gui/room-list</a></h2>
<h2><a class="toc-backref" href="#id132">gui/room-list</a></h2>
<p>To use, bind to a key and activate in the 'q' mode, either immediately or after opening
the assign owner page.</p>
<p>The script lists other rooms owned by the same owner, or by the unit selected in the assign
list, and allows unassigning them.</p>
</div>
<div class="section" id="gui-choose-weapons">
<h2><a class="toc-backref" href="#id132">gui/choose-weapons</a></h2>
<h2><a class="toc-backref" href="#id133">gui/choose-weapons</a></h2>
<p>Bind to a key, 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
in the selected squad or position to use a specific weapon type matching the assigned
@ -2740,13 +2760,13 @@ 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">
<h2><a class="toc-backref" href="#id133">gui/guide-path</a></h2>
<h2><a class="toc-backref" href="#id134">gui/guide-path</a></h2>
<p>Bind to a key, and activate in the Hauling menu with the cursor over a Guide order.</p>
<p>The script displays the cached path that will be used by the order; the game
computes it when the order is executed for the first time.</p>
</div>
<div class="section" id="gui-workshop-job">
<h2><a class="toc-backref" href="#id134">gui/workshop-job</a></h2>
<h2><a class="toc-backref" href="#id135">gui/workshop-job</a></h2>
<p>Bind to a key, and activate with a job selected in a workshop in the 'q' mode.</p>
<p>The script shows a list of the input reagents of the selected job, and allows changing
them like the <tt class="docutils literal">job <span class="pre">item-type</span></tt> and <tt class="docutils literal">job <span class="pre">item-material</span></tt> commands.</p>
@ -2774,7 +2794,7 @@ 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">
<h2><a class="toc-backref" href="#id135">gui/workflow</a></h2>
<h2><a class="toc-backref" href="#id136">gui/workflow</a></h2>
<p>Bind to a key, and activate with a job selected in a workshop in the 'q' mode.</p>
<p>This script provides a simple interface to constraints managed by the workflow
plugin. When active, it displays a list of all constraints applicable to the
@ -2796,7 +2816,7 @@ as described in <tt class="docutils literal">workflow</tt> documentation above.
can be used for troubleshooting jobs that don't match the right constraints.</p>
</div>
<div class="section" id="gui-assign-rack">
<h2><a class="toc-backref" href="#id136">gui/assign-rack</a></h2>
<h2><a class="toc-backref" href="#id137">gui/assign-rack</a></h2>
<p>Bind to a key, and activate when viewing a weapon rack in the 'q' mode.</p>
<p>This script is part of a group of related fixes to make the armory storage
work again. The existing issues are:</p>
@ -2816,7 +2836,7 @@ the intended user.</p>
</div>
</div>
<div class="section" id="behavior-mods">
<h1><a class="toc-backref" href="#id137">Behavior Mods</a></h1>
<h1><a class="toc-backref" href="#id138">Behavior Mods</a></h1>
<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>
@ -2827,20 +2847,20 @@ 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">
<h2><a class="toc-backref" href="#id138">Siege Engine</a></h2>
<h2><a class="toc-backref" href="#id139">Siege Engine</a></h2>
<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">
<h3><a class="toc-backref" href="#id139">Rationale</a></h3>
<h3><a class="toc-backref" href="#id140">Rationale</a></h3>
<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">
<h3><a class="toc-backref" href="#id140">Configuration UI</a></h3>
<h3><a class="toc-backref" href="#id141">Configuration UI</a></h3>
<p>The configuration front-end to the plugin is implemented by the gui/siege-engine
script. Bind it to a key and activate after selecting a siege engine in 'q' mode.</p>
<p>The main mode displays the current target, selected ammo item type, linked stockpiles and
@ -2861,7 +2881,7 @@ menu.</p>
</div>
</div>
<div class="section" id="power-meter">
<h2><a class="toc-backref" href="#id141">Power Meter</a></h2>
<h2><a class="toc-backref" href="#id142">Power Meter</a></h2>
<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
@ -2870,11 +2890,11 @@ key and activate after selecting Pressure Plate 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">
<h2><a class="toc-backref" href="#id142">Steam Engine</a></h2>
<h2><a class="toc-backref" href="#id143">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="#id143">Rationale</a></h3>
<h3><a class="toc-backref" href="#id144">Rationale</a></h3>
<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
@ -2885,7 +2905,7 @@ 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">
<h3><a class="toc-backref" href="#id144">Construction</a></h3>
<h3><a class="toc-backref" href="#id145">Construction</a></h3>
<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>
@ -2909,7 +2929,7 @@ short axles that can be built later than both of the engines.</p>
</div>
</div>
<div class="section" id="operation">
<h3><a class="toc-backref" href="#id145">Operation</a></h3>
<h3><a class="toc-backref" href="#id146">Operation</a></h3>
<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
@ -2940,7 +2960,7 @@ decrease it by further 4%, and also decrease the whole steam
use rate by 10%.</p>
</div>
<div class="section" id="explosions">
<h3><a class="toc-backref" href="#id146">Explosions</a></h3>
<h3><a class="toc-backref" href="#id147">Explosions</a></h3>
<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
@ -2949,7 +2969,7 @@ toppled during operation by a building destroyer, or a
tantruming dwarf.</p>
</div>
<div class="section" id="save-files">
<h3><a class="toc-backref" href="#id147">Save files</a></h3>
<h3><a class="toc-backref" href="#id148">Save files</a></h3>
<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
@ -2960,7 +2980,7 @@ being generated.</p>
</div>
</div>
<div class="section" id="add-spatter">
<h2><a class="toc-backref" href="#id148">Add Spatter</a></h2>
<h2><a class="toc-backref" href="#id149">Add Spatter</a></h2>
<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

@ -1898,6 +1898,31 @@ Pressing ESC normally returns to the unit screen, but Shift-ESC would exit
directly to the main dwarf mode screen.
Search
======
The search plugin adds search to the Stocks, Trading and Unit List screens.
Searching works the same way as the search option in "Move to Depot" does.
You will see the Search option displayed on screen with a hotkey (usually 's').
Pressing it lets you start typing a query and the relevant list will start
filtering automatically.
Pressing ENTER, ESC or the arrow keys will return you to browsing the now
filtered list, which still functions as normal. You can clear the filter
by either going back into search mode and backspacing to delete it, or
pressing the "shifted" version of the search hotkey while browsing the
list (e.g. if the hotkey is 's', then hitting 'shift-s' will clear any
filter).
Leaving any screen automatically clears the filter.
In the Trade screen, the actual trade will always only act on items that
are actually visible in the list; the same effect applies to the Trade
Value numbers displayed by the screen. Because of this, pressing the 't'
key while search is active clears the search instead of executing the trade.
gui/liquids
===========