<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ralpha</id>
	<title>Dwarf Fortress Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ralpha"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php/Special:Contributions/Ralpha"/>
	<updated>2026-04-16T03:47:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utilities&amp;diff=260490</id>
		<title>Utilities</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utilities&amp;diff=260490"/>
		<updated>2022-01-03T16:37:25Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added DF RAW Language server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Masterwork|13:28, 28 September 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
A collection of third-party '''Utilities''' that are useful for ''[[Dwarf Fortress]]'' players and [[modding|modders]] alike, and this page serves as a list of them. ''Dwarf Fortress'' is a difficult game to play, and any help that can be had in the task is welcome help. If you would like to add an article on a ''specific'' game utility to the wiki, please do so under the &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://dwarffortresswiki.org/index.php?title=Special%3AAllPages&amp;amp;from=&amp;amp;to=&amp;amp;namespace=102 Utility]&amp;lt;/span&amp;gt; namespace. Not included on this page: [[Main:Tileset repository|tileset repositories]] and [[Main:Graphics set repository|graphics set repositories]], due to having been given their own, separate pages. [[Modding|Mods]] have also been listed under their own &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://dwarffortresswiki.org/index.php?title=Special%3AAllPages&amp;amp;from=&amp;amp;to=&amp;amp;namespace=104 Modification] namespace. To avoid namespace clutter, websites ''are'' considered utilities, though they really aren't, and have been included.&lt;br /&gt;
&lt;br /&gt;
A [http://www.bay12forums.com/smf/index.php?board=29.0 subsection of the Bay12 forums] is devoted to such third-party programs, and contains development threads for most of them.&lt;br /&gt;
&lt;br /&gt;
The [[Utilities#Lazy Newb Pack|Lazy Newb Pack]] is an effort to make ''Dwarf Fortress'' more accessible for new players by bundling and configuring utilities, graphics and tilesets, and extras such as reference material or more intuitive controls.  &lt;br /&gt;
&lt;br /&gt;
==Launchers==&lt;br /&gt;
&lt;br /&gt;
=== [[Utility:Lazy_Newb_Pack|Lazy Newb Pack]] ===&lt;br /&gt;
&amp;lt;gallery widths=90px heights=150px&amp;gt;&lt;br /&gt;
File:Lnp-gui1.png|The original LNP launcher, options tab&lt;br /&gt;
File:Lnp-gui2.png|The graphics tab&lt;br /&gt;
File:Lnp-gui3.png|The utilities tab&lt;br /&gt;
File:Lnp-gui5.png|The advanced tab&lt;br /&gt;
File:lnp-dfhack.png|The DFHack tab&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
A commonly-used software bundle with a nice launcher. Allows you to start playing DF really quickly on a new machine - no need to download and integrate [[Graphics set repository|tilesets]] and tools like Dwarf Therapist, SoundSense, etc. - or even know what you need to get.  The newer packs also include many third-party fixes for common bugs, which work automatically, and a large number of significant user interface improvements.  The launcher makes changing settings or graphics options much easier (press button, instead of editing files) and can even remember to launch selected utilities whenever you open a game of ''Dwarf Fortress''.  See the [[Utility:Lazy_Newb_Pack|Lazy Newb Pack]] page for more information, or the forum thread for your platform. &lt;br /&gt;
&lt;br /&gt;
*[http://www.bay12forums.com/smf/index.php?topic=126076 PeridexisErrant's Starter Pack] (Windows)&lt;br /&gt;
*[http://www.bay12forums.com/smf/index.php?topic=128960 MacNewbie Pack] (OS X)&lt;br /&gt;
*[http://www.bay12forums.com/smf/index.php?topic=156011 Unofficial Linux LNP] (Linux)&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=140808 PyLNP] ===&lt;br /&gt;
A cross-platform LNP port, written in Python.  The launcher and configuration interface for all of the Lazy Newb Packs.  PyLNP is under active development for bugfixes, addition of features pioneered by other launchers, and creation of entirely new features - such as rebuilding the raws of modded saves to change graphics packs.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=102316 Manila Launcher] ===&lt;br /&gt;
A Java interface that allows easy option toggling, update and devlog checking, and tileset, mod and color scheme switching.  Designed for players who prefer vanilla DF to a bundle like the above.&lt;br /&gt;
&lt;br /&gt;
== 3D Visualizers ==&lt;br /&gt;
=== [[Utility:Stonesense|Stonesense]] ===&lt;br /&gt;
[[File:stonesense_prev.jpg|left|frameless|200px|none]]&lt;br /&gt;
Stonesense is a third party visualizer, implemented as a [[Utility:DFHack|DFHack]] plugin, that lets you view your fortress in a classic isometric perspective. It runs alongside ''Dwarf Fortress'', and can follow the main game's view, updating in real-time. It is included in DFHack, and can be opened by typing &amp;lt;code&amp;gt;stonesense&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ssense&amp;lt;/code&amp;gt; into the console window.&lt;br /&gt;
&lt;br /&gt;
* Links: [[Utility:Stonesense]]&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
=== Fortress Overseer ===&lt;br /&gt;
[[File:fortress_viewer.jpg|left|frameless|200px|none]]&lt;br /&gt;
Fortress Overseer is the only 3D visualizer supporting v0.31. It has been completely rewritten and is currently updated to support v0.34.11 and v0.31.25. Overseer works indirectly, by using [[Utility:DFHack|DFHack]]'s &amp;lt;code&amp;gt;mapexport&amp;lt;/code&amp;gt; to export a file which can then be rendered in 3D.  DirectX 9 must be installed, though this requirement is not documented. Has not been tested for 0.40.13.&lt;br /&gt;
&lt;br /&gt;
* Links: [http://www.bay12forums.com/smf/index.php?topic=63484 Bay12forums Thread]&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
=== Armok Vision ===&lt;br /&gt;
[[File:armok_vision.png|left|frameless|200px|none]]&lt;br /&gt;
Armok Vision is a 3D real-time visualizer using Unity for version 0.40.24. It works as a separate program communicating with the game through fast network interfaces.&lt;br /&gt;
&lt;br /&gt;
* Links: [http://www.bay12forums.com/smf/index.php?topic=146473.0 Bay12forums Thread]&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
=== Isoworld ===&lt;br /&gt;
[[File:isoworld_prev.png|left|frameless|200px|none]]&lt;br /&gt;
Isoworld is an isometric world map viewer, which can display each of the detailed maps exported from [[Legends mode]]. It also has a pictographic view which makes finding waterfalls easy.  &lt;br /&gt;
&lt;br /&gt;
Isoworld can link with [[Utility:DFHack|DFHack]] to display a game view at full spatial resolution in wider context, including tracking the player's view.  This is particularly useful for adventure mode.&lt;br /&gt;
&lt;br /&gt;
* Links: [http://www.bay12forums.com/smf/index.php?topic=70700.0 Bay12forums Thread]&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
===  Voxel Fortress ===&lt;br /&gt;
[[File:voxel_prev.png|left|frameless|200px|none]]&lt;br /&gt;
Voxel Fortress is a converter from DF worlds to a voxel format. It takes an export of one of the two elevation maps (for the voxels coordinates), and any other one (for the colors).&lt;br /&gt;
The map is saved in .xraw format. An additional utility (e.g. [https://ephtracy.github.io/index.html?page=mv_renderer MagicaVoxel Viewer]) is required to see the voxel representation of the map.&lt;br /&gt;
&lt;br /&gt;
* Link: [http://www.bay12forums.com/smf/index.php?topic=159578.0 Bay12forums Thread]&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
== Music and Sounds ==&lt;br /&gt;
=== [[Utility:SoundSense|SoundSense]] ===&lt;br /&gt;
[[File:soundsense_prev.png|left|frameless|100px]]&lt;br /&gt;
SoundSense is a sound engine that parses game logs and reacts to game events with sound effects, incidental music and dwarfy comments.  You can look it up on the [http://www.bay12forums.com/smf/index.php?topic=60287 forum thread], or directly download it at [http://df.zweistein.cz/soundsense/ the SoundSense homepage]. Due to it being written in Java, Soundsense is portable to all platforms.&lt;br /&gt;
&lt;br /&gt;
Due to development having slowed down, a [https://github.com/calmhorizons/soundsense fork] was released that most notably disables the broken auto-updater and adds the option to minimize Soundsense to the system tray.&lt;br /&gt;
&lt;br /&gt;
Note that older Soundsense users may have different default seasonal soundtracks, which were removed and replaced in early 2011. These are available [http://www.krauselabs.net/dump/music.zip here].&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
=== SoundCenSe ===&lt;br /&gt;
[[File:soundCenSe_prev.png|left|frameless|100px|]]&lt;br /&gt;
A C# port of SoundSense, it uses the existing sound pack files and XML's present in SoundSense, but with some added enhancements. More information regarding what specific type of enhancements and how to install SoundCenSe can be gathered at the [http://www.bay12forums.com/smf/index.php?topic=159567.0 official forum thread]. If problems emerge while trying to get SoundSense to work with the latest versions of Java, this port may prove to be a useful alternative.&lt;br /&gt;
&lt;br /&gt;
* links: [http://www.bay12forums.com/smf/index.php?topic=159567.0 Bay12forums Thread]. Downloads for the windows and linux binaries are available [https://github.com/Algorithman/SoundCenSe/releases here], while code releases can be obtained from the [https://github.com/Algorithman/SoundCenSe GitHub site].&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
== Game manipulation tools ==&lt;br /&gt;
===[[Utility:DFHack|DFHack]]===&lt;br /&gt;
[[File:dfhack_cmd.png|thumb|right|250px|DFHack's console.]] &lt;br /&gt;
DFHack is an advanced ''Dwarf Fortress'' memory access library and a set of tools and scripts using this library, providing direct object-oriented access to Dwarf Fortress's internals as if it were compiled into the game itself. Runs on Windows, Linux, and OS X.  The standard configuration enables a variety of included bugfixes and interface upgrades, and provides many useful tools such as &amp;quot;clean all&amp;quot;.  See [[Utility:DFHack]] for summary of features and common use in.&lt;br /&gt;
&lt;br /&gt;
* Links: [https://docs.dfhack.org/en/stable/# DFHack's Documentation] site offers all relevant information on how download, install, and use the utility. Including an up-to-date list of all available and optional Plugins. [http://www.bay12forums.com/smf/index.php?topic=164123 Official Bay12 forum thread].&lt;br /&gt;
&lt;br /&gt;
==== Unit Management Plugins ====&lt;br /&gt;
[[File:Klokerscreen0.png|thumb|right|250px|Kloker's main screen]]&lt;br /&gt;
Kloker, A DFhack in-game UI for inspecting and managing units, with colorful summaries and accessible features including automatic labor assignment. &lt;br /&gt;
&lt;br /&gt;
* Links: [http://www.bay12forums.com/smf/index.php?topic=169329 Bay12Forum Thread]&lt;br /&gt;
&lt;br /&gt;
==== Feature plugins ====&lt;br /&gt;
These plugins add features to the game.&lt;br /&gt;
* [http://www.bay12forums.com/smf/index.php?topic=128487 Rendermax], a plugin that implements a lighting system at the graphics level.&lt;br /&gt;
* [http://www.bay12forums.com/smf/index.php?topic=136155 Dwarven Emigration], a script that allows unhappy dwarves to emigrate with their families.&lt;br /&gt;
&lt;br /&gt;
==== Interaction plugins ====&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=135597 DFHack scripts designed for modders to use as &amp;quot;spells&amp;quot;] (not in standard package)&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous plugins ====&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=135506 DFHack script collection] (not in standard package)&lt;br /&gt;
&lt;br /&gt;
=== remotefortressreader ===&lt;br /&gt;
&lt;br /&gt;
A critical internal DFHack plugin, [https://github.com/DFHack/dfhack/tree/develop/plugins/remotefortressreader developed within the same repository].  It provides a protobuf-based (currently v2.4.1) RPC connection to the game, enabling remote clients like Armok Vision.  The service listens on &amp;lt;code&amp;gt;127.0.0.1:5000&amp;lt;/code&amp;gt; (configurable within &amp;lt;code&amp;gt;dfhack-config/remote-server.json&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Currently there are no change-based or change-driven notifications, so remote fortress clients must perform the expensive operation of polling the desired volume every frame (via e.g. &amp;lt;code&amp;gt;GetBlockList&amp;lt;/code&amp;gt;).  Additionally, the sidebar menu state is shared with the native view, to avoid reimplementing construction material dependencies.&lt;br /&gt;
&lt;br /&gt;
==Dwarf Therapist==&lt;br /&gt;
===Dwarf Therapist===&lt;br /&gt;
[[File:dwarf_therapist.png|frameless|right|250px|]]&lt;br /&gt;
Dwarf Therapist gives you an advanced GUI to manage and check dwarf job allocations, military assignments, statistics (such as attributes, personality traits and happiness), sort dwarves by various criteria (e.g. profession, migration wave, happiness, number of assigned jobs etc.) and generally manage the Dwarven Resources of your fortress in a very convenient way. This version contains the &amp;quot;labor optimizer&amp;quot; semi-automatic labor management system. &lt;br /&gt;
&lt;br /&gt;
Splinterz' fork of Dwarf Therapist is the currently updated version, and available for Windows, Mac and GNU + Linux.  &lt;br /&gt;
&lt;br /&gt;
* Links: See the [http://www.bay12forums.com/smf/index.php?topic=168411.0 forum thread] for current downloads. Besides the Bay12 forum thread, there's more information on the [https://github.com/Dwarf-Therapist/Dwarf-Therapist GitHub project page].&lt;br /&gt;
&lt;br /&gt;
====[[Utility:Dwarf Therapist/Addons Repository|Dwarf Therapist Addons Repository]]====&lt;br /&gt;
&lt;br /&gt;
A collection of customizations for Dwarf Therapist submitted by the community.&lt;br /&gt;
&lt;br /&gt;
Addons include:&lt;br /&gt;
&lt;br /&gt;
* custom professions&lt;br /&gt;
* custom roles&lt;br /&gt;
* optimization plans&lt;br /&gt;
* filter scripts&lt;br /&gt;
* new grid views&lt;br /&gt;
&lt;br /&gt;
== Fortress layout tools ==&lt;br /&gt;
=== [https://github.com/joelpt/quickfort Quickfort] ===&lt;br /&gt;
Quickfort is a utility for ''Dwarf Fortress'' that helps you build fortresses from &amp;quot;blueprint&amp;quot; .CSV files (comma separated values). These files are easily created and edited in an app like Excel. Most building-oriented DF commands are supported through the use of multiple .CSV files to describe the different phases of DF construction (designation, building, stockpiles, and making adjustments. Recent versions of Quickfort work by converting the blueprint into a native macro for ''Dwarf Fortress'', then executing the macro.  This allows for enormously faster playback compared to early versions or DF Designator.&lt;br /&gt;
&lt;br /&gt;
====[https://www.mediafire.com/folder/u38qsqr1bq6wu/Community_Quickfort_Blueprints_v2 Quickfort Community Blueprints]====&lt;br /&gt;
&lt;br /&gt;
A large collection of blueprints, published to remove the last hint of hassle in creating a fortress.  You can download the lot without a paid account [http://www.mediafire.com/download/n6im1ok6z02n8nc/Community_Quickfort_Blueprints_v2.zip here].&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=55025 ChromaFort]===&lt;br /&gt;
Chromafort is a tool designed to complement [[Utilities#Quickfort|Quickfort]], by converting images into quickfort-compatible .csv files.  It works with 24-bit bitmap (.bmp) files.  There are a number of known issues that can affect any image that is not square, and the size must be an exponent of two (8, 16, 32, 64...); other images may show nonexistent colours and/or come out highly distorted.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=138590 Picturefort]===&lt;br /&gt;
Picturefort is an attempt to make &amp;quot;Chromafort, but ''better''&amp;quot; - it performs the same function of converting an image to a [[Utilities#Quickfort|Quickfort]]-compatible .csv file.  Unlike Chromafort, Picturefort can handle a large number of image formats (though .bmp or .png are recommended); images can be of any shape and within reason size; and while as of May 2014 it is only available on Windows, there are plans for a Linux version.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=154849.0 Symmetricity]===&lt;br /&gt;
A fortress planner with a focus on multiple planes of symmetry. It can output csv for quickfort. It's early in development so it's probably not suitable for serious use cases.&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=140853.0 Rubble]===&lt;br /&gt;
&lt;br /&gt;
A useful plugin-based modding tool that generates raws and supports easy installation of reactions, tilesets, macros, modding fixes and DFHack scripts. It is a fork of the now abandoned [http://www.bay12forums.com/smf/index.php?topic=125997.0 Blast]. Binaries are available for Linux 32-bits, OS X 32-bits and Windows 64-bits, as well as the source (written in Go with building instructions). As of 4.0, a GUI is available for Windows.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=150857.0 PyDwarf] ===&lt;br /&gt;
&lt;br /&gt;
For players, PyDwarf is an easy way to manage and configure preferred mods in a way that avoids almost entirely the problems of outdated mods or incompatible groups of mods. For modders, PyDwarf's mod manager exposes a powerful Python API for interacting with raws and other data files.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=103360 Raw Explorer] ===&lt;br /&gt;
A tree-based raw files browser, editor and manager.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=174431.0 Dwarf_RAW] ===&lt;br /&gt;
A GUI for editing raw files, updated 2019.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=140645.0 Dwarf Fortress real-life material helper] ===&lt;br /&gt;
A Python script that generates raws based on custom real-life material values.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=140688.0 Roses' Random Creature Script] ===&lt;br /&gt;
A Python script that generates random creature raws.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=175695.0 DF Diagnosipack] ===&lt;br /&gt;
A collection of modding tools, with a focus on diagnosing problems and getting statistics on what is found within the raws.&lt;br /&gt;
It includes:&lt;br /&gt;
* DF Duplisearch - checks your raws folder for duplicated objects, and counts the number of objects of each type (creature, entity, reaction, etc.).&lt;br /&gt;
* DF Creatureclasser - tells you what [[cv:Creature_token#CREATURE_CLASS|creature classes]] are in your raws, and what they are used for.&lt;br /&gt;
* DF CVunpack - unpacks creature variations, so you can see how the raws for e.g. wolf men really look (spoiler: they have 7 fingers).&lt;br /&gt;
* DF Creaturescale - calculates creature weights, and the proportions of each body part and tissue.&lt;br /&gt;
* DF Biomeviewer - shows what creature/plants can be found in which biomes.&lt;br /&gt;
&lt;br /&gt;
=== [https://gitlab.com/df-modding-tools/df-raw-language-server DF RAW Language server] ===&lt;br /&gt;
Modding support for DF RAW files in IDE/Code/Text editors.&lt;br /&gt;
Checks syntax of files, detects errors and syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
Current extensions:&lt;br /&gt;
* [https://marketplace.visualstudio.com/items?itemName=df-modding-tools.dwarf-fortress-raw-vscode VS Code]&lt;br /&gt;
* [https://gitlab.com/df-modding-tools/df-raw-language-server#supported-editors-and-ides (more are coming)]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=200px&amp;gt;&lt;br /&gt;
File:DF_RAW_Language_server_Logo.png|DF RAW Language server Logo&lt;br /&gt;
File:DF_RAW_Language_server_VSCode_screenshot_1.png|DF RAW Language server in VSCode&lt;br /&gt;
File:DF_RAW_Language_server_VSCode_screenshot_2.png|DF RAW Language server in VSCode&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Language_Server_Protocol|Language server]] is a shared component that can be used to easily add support for more IDE's.&lt;br /&gt;
&lt;br /&gt;
== World Map / World Gen tools ==&lt;br /&gt;
=== [http://dffd.wimbli.com/file.php?id=2354 Perfect World DF] ===&lt;br /&gt;
Requires an additional (tiny) download to be functional for current versions (40.#): [http://dffd.wimbli.com/file.php?id=8756 WorldGen.xml] .  Easy access to world settings for quick modification to allow highly customized world generation far easier and faster than DF's ingame advanced map maker.  [http://www.bay12forums.com/smf/index.php?topic=57428.0 forum thread]&lt;br /&gt;
&lt;br /&gt;
=== [http://pastebin.com/jdVKPzpt Fortress World Generator] ===&lt;br /&gt;
A bash script for automating world generation of large numbers of worlds on GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=73095 Dwarf Map Maker] ===&lt;br /&gt;
A Photoshop action script which turns legends mode exported maps into a much prettier fantasy map.  There is also a version available [http://www.bay12forums.com/smf/index.php?topic=73095.msg2261106#msg2261106 for GIMP].&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=137076.msg5085575#msg5085575 Satellite Map Maker] ===&lt;br /&gt;
A GIMP script based on the Dwarf Map Maker that creates a satellite image of ''Dwarf Fortress'' world maps.&lt;br /&gt;
&lt;br /&gt;
==Legends tools==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=72702 Legends Viewer] ===&lt;br /&gt;
&amp;lt;gallery widths=200px&amp;gt;&lt;br /&gt;
File:legends_prev.png|Historical Figures view&lt;br /&gt;
File:legends_prev2.png|Infrastructure view&lt;br /&gt;
File:legends_prev3.png|Other/Eras view&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=154617 Unofficial Branch for 0.47.XX version of DF]&lt;br /&gt;
&lt;br /&gt;
Legends Viewer loads up the legends you can export in a much more usable format than the [[Legends mode]] of DF itself.  Legends Viewer can open pages in new tabs, filter information on a wide range of criteria, and display information on the map as well. Binaries are only available for Windows, as well as the source (written in C#).&lt;br /&gt;
&lt;br /&gt;
It takes four files as input:  the legends XML file, the sites and pops text, world history text, and a map image.  It can load these separately, but it is recommended to load them as a single compressed archive (folder) - the XML can be multiple GB uncompressed for long histories, and reduce to less than 5% of its size.  &lt;br /&gt;
&lt;br /&gt;
If you have played a fortress and then exported legends, you may get an error about unreadable HEX characters.  This is caused by Workflow, which saves its settings as unreadable historical figures.  There are several ways to fix this: &lt;br /&gt;
* Clear the workflow settings in fortress mode before exporting legends&lt;br /&gt;
* Edit the XML by hand, [http://www.bay12forums.com/smf/index.php?topic=72702.msg4629392#msg4629392 as described here] (any platform)&lt;br /&gt;
* Use the [http://www.bay12forums.com/smf/index.php?topic=131307 Legends Processing script] (windows only), which fixes the XML and also creates a compressed folder as described above&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=128932.0 World Viewer] ===&lt;br /&gt;
[[File:world_viewer_prev.png|thumb|200px|none|&amp;quot;Race&amp;quot; tab view]]&lt;br /&gt;
An alternative to Legends Viewer that most specifically features a timeline of historical events. Binaries are only available for Windows, as well as the source (written in C#).&lt;br /&gt;
&lt;br /&gt;
=== [http://www.uristmaps.org Uristmaps] ===&lt;br /&gt;
[[File:uristmaps_prev.png|thumb|200px|none|Zoomed-in area of a map view.]]&lt;br /&gt;
A web-based interface that displays worlds in the way of an interactive map complete with features and structures.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=155307.0 Legends Browser] ===&lt;br /&gt;
[[File:legendsbrowser.png|thumb|200px|none|Civilizations view]]&lt;br /&gt;
A web-based multi-platform (Win, Linux, OSX) Viewer. It displays an interactive map and legends information (using legends_plus.xml generated via DFHack).&lt;br /&gt;
&lt;br /&gt;
=== [https://dfstoryteller.com/ DF Storyteller] ===&lt;br /&gt;
&amp;lt;gallery widths=200px&amp;gt;&lt;br /&gt;
File:DF_Storyteller_Logo.svg|DF Storyteller Logo&lt;br /&gt;
File:DF_Storyteller_explain_workings.png|Explains how DF Storyteller works&lt;br /&gt;
File:The_Bard_historical_figure_screenshot.png|Screenshot of Historical Figure in The Bard visualizer&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Dwarf Fortress Storyteller (DF Storyteller, DF ST) is an application that parses ''Dwarf Fortress'' legends files, stores them internally and makes them queryable using API's. (Cross platform: Windows, Linux, macOS)&lt;br /&gt;
This utility can be used to easily create new visualizers to view the legends data. A list of visualizers can be found [https://gitlab.com/df_storyteller/df-storyteller/-/blob/master/docs/paintings.md here].&lt;br /&gt;
An example of a visualizer is [https://gitlab.com/df_storyteller/the-bard The Bard] created in DF ST.&lt;br /&gt;
&lt;br /&gt;
== Remote playing tools ==&lt;br /&gt;
&lt;br /&gt;
=== [[Utility:Dfterm3|Dfterm3]]===&lt;br /&gt;
&lt;br /&gt;
[[Utility:Dfterm3|Dfterm3]] is a remote ''Dwarf Fortress''-playing software for multiple users through a web interface. DFterm3 enables play through a web interface, and games can also be viewed on mobile - or even played if a bluetooth keyboard is attached.  The web interface should work with Chrome or Firefox browsers, but there are known problems using Internet Explorer. DFTerm3 functions via a DFHack plugin, and is thus dependent on each version of DFHack.&lt;br /&gt;
&lt;br /&gt;
It is a successor to [[Utility:dfterm2|dfterm2]], which functions similarly using telnet instead of a web browser. This utility only works with version 0.34.11 or earlier.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=139167.0 Webfort] ===&lt;br /&gt;
[[File:webfortress.png|thumb|200px|none|Playable in Mac browser.]]&lt;br /&gt;
A newer alternative to dfterm3 that functions similarly, but players must wait in a queue before assuming control for a given period of time. It also functions via a DFHack plugin. Binaries are available for Windows, as well as the source (written in C++).  ''(Note: [https://github.com/mifki/df-webfort main repo] unmaintained.  [https://github.com/Ankoku/df-webfort New repo] last updated 5/22/2015.)''&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=140892.0 DorfServer] ===&lt;br /&gt;
[[File:dorfserver.png|thumb|200px|none|Like Twitch, without Twitch.]]&lt;br /&gt;
A remote SSH-based ''Dwarf Fortress'' host software.  ([http://www.bay12forums.com/smf/index.php?topic=140892.0 repo])&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=139975.0 DFEverywhere] ===&lt;br /&gt;
&lt;br /&gt;
A utility that connects a locally-run ''Dwarf Fortress'' instance to a proprietary remote website, allowing remote browser-based play. ''(Note: Main website no longer available.  [https://github.com/tpainter/df_everywhere Client source here.])''&lt;br /&gt;
&lt;br /&gt;
=== [http://mifki.com/df Dwarf Fortress Remote] ===&lt;br /&gt;
&lt;br /&gt;
iOS app (paid) that allows one to play ''Dwarf Fortress'' remotely with native UI. A server can be set up at home, or on DigitalOcean, AWS or other hosting service.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=176070.msg DFPlex ] ===&lt;br /&gt;
&lt;br /&gt;
DFPlex is a plugin for DFHack which introduces simultaneous, real-time online co-op to fortress mode: each player has their own independent view, cursor, menus, etc. so nobody has to wrestle for control. It's a fork of webfort, so players join just by connecting from their web browser.&lt;br /&gt;
&lt;br /&gt;
==Language tools==&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=47332.0 DFLang]===&lt;br /&gt;
A language creating tool.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=136098.0 Toadese Language Utility]===&lt;br /&gt;
A language editing and translating tool.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=140432.0 DFlangOpt]===&lt;br /&gt;
A little tool meant to prevent redundancy when importing or updating language files.&lt;br /&gt;
&lt;br /&gt;
===[http://dffd.wimbli.com/file.php?id=8288 Python language extraction and injection script]===&lt;br /&gt;
This simple script will extract words from language files and put them a word per line, for easy automatic translation or treatment. It can also read that list and put the translated words back in their place.&lt;br /&gt;
&lt;br /&gt;
==Announcement tools==&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=130590 DFMon] ===&lt;br /&gt;
&lt;br /&gt;
An announcement monitoring/filtering program, useful to hide some types of job cancellation spam or other more advanced filtering. Note that you can set the game to announce no job cancellations ''without'' any utilities or mods from the {{k|o}}rders menu, with {{k|x}}.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=130030 DF Announcement Filter]===&lt;br /&gt;
&lt;br /&gt;
An alternative to DFMon written in Java (and thus portable to Linux and OS X).&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=153777 Announcement Window+]===&lt;br /&gt;
&lt;br /&gt;
Announcement Window+ is a Python application that interfaces with ''Dwarf Fortress'' to print announcements and combat reports to a separate window. It was written to fix some annoying bugs that are present in DF Announcement Filter, which is no longer being updated.&lt;br /&gt;
&lt;br /&gt;
[[File:announce+_prev.png|thumb|300px|none|One less game-pausing hotkey.]]&lt;br /&gt;
&lt;br /&gt;
==Filesharing websites==&lt;br /&gt;
&lt;br /&gt;
=== [http://dffd.wimbli.com/ Dwarf Fortress File Depot] ===&lt;br /&gt;
The Dwarf Fortress File Upload Service - an excellent place to store mods, community games, tilesets and other files. Courtesy of [[User:Janus|Janus]]; for files related to Dwarf Fortress only.&lt;br /&gt;
&lt;br /&gt;
=== [http://mkv25.net/dfma/ Dwarf Fortress Map Archive] ===&lt;br /&gt;
{{main|Utility:Dwarf Fortress Map Archive}}&lt;br /&gt;
&lt;br /&gt;
The Dwarf Fortress Map Archive is a large collection of user-submitted maps and videos and a nice flash viewer for perusing them. Maps are uploaded, stored, and downloaded in a special compressed format created by the DF Map Compressor; videos are stored in a compressed version of Toady One's own video-recording format.&lt;br /&gt;
&lt;br /&gt;
Read more about the [[User:Markavian/DF_Map_Archive|DF Map Archive]] on Markavian's User page.&lt;br /&gt;
&lt;br /&gt;
== Other/miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== [http://shadowlord13.googlepages.com/dfmap-index.html DF Map Compressor] ===&lt;br /&gt;
[[File:dfmapcomp.png|thumb|200px|none|Main program window.]]&lt;br /&gt;
The DF Map Compressor encodes multiple bitmaps exported from ''Dwarf Fortress'' into a single, very compressed, .fdf-map file. The fdf-map file can then be shared with your friends by uploading to the DF Map Archive.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.mindwerks.net/projects/exita/ Exita] ===&lt;br /&gt;
Exita is a Python program that takes your DF world map exports and dump them into several different text outputs.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=132153.0 DwarfFamily]===&lt;br /&gt;
A tool that lets you import your legends XML file and converts all dwarf entries to a .GED file, which you can use in Family Tree programs like MyHeritage to display a family tree for the dwarves.&lt;br /&gt;
&lt;br /&gt;
===[https://www.dropbox.com/s/dea50wrs557w283/kobold.py Kobold name generator]===&lt;br /&gt;
A Python script that generates random names in the way of kobold utterances&lt;br /&gt;
&lt;br /&gt;
===[https://play.google.com/store/apps/details?id=dae.dfnews Dwarf Fortress News - Android App]===&lt;br /&gt;
Watches the ''Dwarf Fortress'' devblog. Receives Push Notifications on new updates.&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Community}}&lt;br /&gt;
[[ru:Utilities]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=File:DF_RAW_Language_server_Logo.png&amp;diff=260489</id>
		<title>File:DF RAW Language server Logo.png</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=File:DF_RAW_Language_server_Logo.png&amp;diff=260489"/>
		<updated>2022-01-03T16:31:15Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Logo of the [https://gitlab.com/df-modding-tools/df-raw-language-server DF Language server]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Logo of the [https://gitlab.com/df-modding-tools/df-raw-language-server DF Language server]&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{cc-by-3.0}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=File:DF_RAW_Language_server_VSCode_screenshot_2.png&amp;diff=260488</id>
		<title>File:DF RAW Language server VSCode screenshot 2.png</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=File:DF_RAW_Language_server_VSCode_screenshot_2.png&amp;diff=260488"/>
		<updated>2022-01-03T16:25:12Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Wrong argument number, to many.
Image of VSCode using the [https://gitlab.com/df-modding-tools/df-raw-language-server DF Language server]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Wrong argument number, to many.&lt;br /&gt;
Image of VSCode using the [https://gitlab.com/df-modding-tools/df-raw-language-server DF Language server]&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{cc-by-sa-3.0}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=File:DF_RAW_Language_server_VSCode_screenshot_1.png&amp;diff=260487</id>
		<title>File:DF RAW Language server VSCode screenshot 1.png</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=File:DF_RAW_Language_server_VSCode_screenshot_1.png&amp;diff=260487"/>
		<updated>2022-01-03T16:08:41Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Image of VSCode using the [https://gitlab.com/df-modding-tools/df-raw-language-server DF Language server]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Image of VSCode using the [https://gitlab.com/df-modding-tools/df-raw-language-server DF Language server]&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{cc-by-sa-3.0}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257995</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257995"/>
		<updated>2021-05-29T15:19:13Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Update fire and magma safe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge, so must be blunt. Sharp stones (produced using knapping) and most types of weapon/ammo can not be used with this token.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered [[fire-safe]] (stable [[temperature]] below {{ct|11000}}) - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - Reagent must be considered [[magma-safe]] (stable [[temperature]] below {{ct|12000}}).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not have an edge, so must be blunt. Sharp stones (produced using knapping) and most types of weapon/ammo can not be used with this token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257964</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257964"/>
		<updated>2021-05-22T16:27:27Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Clarify description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge, so must be blunt. Sharp stones (produced using knapping) and most types of weapon/ammo can not be used with this token.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not have an edge, so must be blunt. Sharp stones (produced using knapping) and most types of weapon/ammo can not be used with this token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257963</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257963"/>
		<updated>2021-05-22T16:26:42Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Clarify description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge, so must be blunt. Sharp stones (produced using knapping) and most types of weapon/ammo can not be used with this token.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257962</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257962"/>
		<updated>2021-05-22T16:26:01Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Clarify description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge, so must be blunt. Sharp stones (produced using knapping) and most types of weapon/ammo can not be used with this token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257961</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257961"/>
		<updated>2021-05-22T16:17:10Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Clarify description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257960</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257960"/>
		<updated>2021-05-22T16:16:33Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Clarify description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257959</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257959"/>
		<updated>2021-05-22T16:15:44Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Clarify description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item can not be engraved. For example, a memorial slab can not be engraved.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257958</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257958"/>
		<updated>2021-05-22T16:09:04Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Marked `POTASHABLE` as Deprecated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257957</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257957"/>
		<updated>2021-05-22T16:08:14Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Marked `POTASHABLE` as Deprecated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}] (Deprecated)&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257956</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257956"/>
		<updated>2021-05-22T16:00:12Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: reordered item alphabetically&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. A reaction with no skill associated will always be instant.&lt;br /&gt;
&lt;br /&gt;
One may also adjust how much skill is gained using the [SKILL_IP:&amp;lt;integer&amp;gt;] token. The default is 30; more will increase the amount of skill gain. Attribute gain from the skill gain can also be adjusted with [ATTRIBUTE_IP:&amp;lt;integer&amp;gt;], with the default being 10.{{version|0.47.01}}&lt;br /&gt;
&lt;br /&gt;
It's also possible to change how much skill affects the outcome (i.e. quality) of the reaction using the [SKILL_ROLL_RANGE:&amp;lt;basic range&amp;gt;:&amp;lt;multiplier&amp;gt;] token.{{version|0.47.01}} The default is [SKILL_ROLL_RANGE:11:5]. The first number is the base roll and the second number is how much the dwarf's skill can affect the reaction; the skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1), where random(x) gives a random number from 0 to x-1, inclusive (which also means that the minimum for the basic range is 1). The higher result on the roll, the better. Both numbers can be lowered to the skill harder. For example, a dwarf who is proficient in a skill has a skill level of 5; their roll will be random(11)+random(13)+random(13), meaning this dwarf can roll anywhere from 0 to 34; similarly, unskilled dwarves can have 0 to 10 while legendary+0 (skill 15) dwarves can have 0 to 84. If this is changed to [SKILL_ROLL_RANGE:1:8], then instead a proficient dwarf will have random(1)+random(21)+random(21), giving a range from 0 to 40 for proficient dwarves, with unskilled dwarves always having 0 and legendary dwarves going all the way up to 120.&lt;br /&gt;
&lt;br /&gt;
As a consequence, increasing the multiplier will '''always''' make legendary dwarves more effective, even if base roll is reduced to its minimum of 1, with the default going up to 84 for default and 90 for [SKILL_ROLL_RANGE:1:6].&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ATTRIBUTE_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of attributes given per skill improvement. Default is 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_IP}}{{version|0.47.01}}&lt;br /&gt;
| integer&lt;br /&gt;
| Amount of skill given per product made. Default is 30. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL_ROLL_RANGE}}{{version|0.47.01}}&lt;br /&gt;
| &lt;br /&gt;
* basic range&lt;br /&gt;
* multiplier&lt;br /&gt;
| The skill roll is random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1). random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11. The default multiplier is 5. Higher skill rolls give better results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257955</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257955"/>
		<updated>2021-05-22T15:15:59Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: reordered item alphabetically&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257954</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257954"/>
		<updated>2021-05-22T15:03:15Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: reordered item alphabetically&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257953</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257953"/>
		<updated>2021-05-22T14:59:31Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: reordered item alphabetically&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=DF2014_Talk:Building_token&amp;diff=257952</id>
		<title>DF2014 Talk:Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=DF2014_Talk:Building_token&amp;diff=257952"/>
		<updated>2021-05-22T14:20:35Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: /* Key Token? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Key Token? ==&lt;br /&gt;
What exactly is a &amp;quot;Key Token&amp;quot;?--[[Special:Contributions/87.143.19.205|87.143.19.205]] 22:52, 27 September 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
This refers to the [[Interface.txt#Key_bindings|key bind]], Updated the article. --[[User:Ralpha|Ralpha]] ([[User talk:Ralpha|talk]]) 14:19, 22 May 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257951</id>
		<title>Building token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Building_token&amp;diff=257951"/>
		<updated>2021-05-22T14:17:55Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added key bind clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:42, 20 September 2016 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Building tokens''' control the functionality of custom buildings.&lt;br /&gt;
&lt;br /&gt;
All custom buildings are defined as objects of type BUILDING_WORKSHOP or BUILDING_FURNACE; workshops show up in the {{K|b}}-{{K|w}} menu, while furnaces show up in the {{K|b}}-{{K|e}} menu.&lt;br /&gt;
&lt;br /&gt;
You also must add any new custom buildings to the [[Entity token|civilization]] that you want to use it.&lt;br /&gt;
&lt;br /&gt;
Additionally, furnaces must be designed by an [[architect]] before being constructed (and will gain [[quality]] accordingly), though they will always use the labor(s) specified in the building definition, rather than ones based on the materials being used.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| The name of the custom building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME_COLOR}}&lt;br /&gt;
| [[Color#Modding_color|fg:bg:bright]]&lt;br /&gt;
| The color of the building's name when {{K|q}}uerying it. Seemingly ignored for furnaces, which are hardcoded to 4:0:1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DIM}}&lt;br /&gt;
| width:height&lt;br /&gt;
| The size of the custom building, in number of tiles. Defaults to 3:3. Maximum possible size is 31x31.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORK_LOCATION}}&lt;br /&gt;
| x:y&lt;br /&gt;
| The tile (1:1 for upper-left) in which dwarves will stand when they are performing tasks. Defaults to 3:3 (bottom-right).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_LABOR}}&lt;br /&gt;
| [[labor token]]&lt;br /&gt;
| The labor required to construct the custom building. If multiple BUILD_LABOR tokens are specified, then any of the indicated labors can be used to construct the building; if none are specified, then no labors are required.&amp;lt;br /&amp;gt;For furnaces, this labor does not come into play until after the workshop has been designed by an [[architect]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_KEY}}&lt;br /&gt;
| [[Interface.txt#Key_bindings|key bind]]&lt;br /&gt;
| The shortcut key used in the Build menu for selecting the custom building. For example: &amp;quot;CUSTOM_SHIFT_S&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BLOCK}}&lt;br /&gt;
|&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies whether or not each workshop tile blocks movement. The first parameter is the row (1 = top), and each subsequent parameter is a 0 (nonblocking) or 1 (blocking) for each column, left to right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TILE}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* tiles...&lt;br /&gt;
| Specifies the characters used to represent the custom building. The first parameter is the building stage, varying from 0 (awaiting construction) to N (completed) where N is between 1 and 3, the 2nd parameter is the row number, and each subsequent parameter is a character number (or literal character enclosed in 'quotes').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COLOR}}&lt;br /&gt;
|&lt;br /&gt;
* stage&lt;br /&gt;
* row&lt;br /&gt;
* colors...&lt;br /&gt;
| Specifies the colors in which the custom building's tiles will be displayed. The first parameter is the building stage, the 2nd parameter is the row number, and subsequent parameters are either sets of 3 numbers (foreground:background:brightness) or the token &amp;quot;MAT&amp;quot; to use the color of the primary building material. MAT may not be available on BUILDING_FURNACEs.{{verify}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILD_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Specifies one of the objects necessary to construct the custom building. Each BUILD_ITEM can be followed by zero or more modifiers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NEEDS_MAGMA}}&lt;br /&gt;
|&lt;br /&gt;
| Specifies that one of the building's tiles (other than the WORK_LOCATION) must be hanging over [[magma]] in order for the building to function. Buildings with this token also ignore the [FUEL] token in their reactions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Item Modifiers==&lt;br /&gt;
Building items have many of the same modifiers as [[Reactions#Modifiers|reagents]] in custom reactions.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|REACTION_CLASS}}:X]&lt;br /&gt;
| Item's material has a [REACTION_CLASS] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}:X]&lt;br /&gt;
| Item's material has a [MATERIAL_REACTION_PRODUCT] token with the appropriate ID.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|UNROTTEN}}]&lt;br /&gt;
| Item must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CONTAINS_LYE}}]&lt;br /&gt;
| Item must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|POTASHABLE}}]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_WEB}}]&lt;br /&gt;
| Item must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WEB_ONLY}}]&lt;br /&gt;
| Item must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|EMPTY}}]&lt;br /&gt;
| If the item is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_CONTAIN_BARREL_ITEM}}]&lt;br /&gt;
| If the item is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BAG}}]&lt;br /&gt;
| Item must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|GLASS_MATERIAL}}] &lt;br /&gt;
| Item material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|BUILDMAT}}]&lt;br /&gt;
| Item must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|FIRE_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MAGMA_BUILD_SAFE}}]&lt;br /&gt;
| Item material must be stable at temperatures below 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|CAN_USE_ARTIFACT}}]&lt;br /&gt;
| Item can be an Artifact.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|WORTHLESS_STONE_ONLY}}]&lt;br /&gt;
| Item material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PLANT_MATERIAL}}] &lt;br /&gt;
| Item material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SILK_MATERIAL}}] &lt;br /&gt;
| Item material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_YARN_MATERIAL}}] &lt;br /&gt;
| Item material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SOAP_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_LEATHER_MATERIAL}}]&lt;br /&gt;
| Item material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_BONE_MATERIAL}}]&lt;br /&gt;
| Item material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_STRAND_TISSUE}}]&lt;br /&gt;
| Item is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_SHELL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_TOOTH_MATERIAL}}]&lt;br /&gt;
| Item material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_HORN_MATERIAL}}]&lt;br /&gt;
| Item material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|ANY_PEARL_MATERIAL}}]&lt;br /&gt;
| Item material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|USE_BODY_COMPONENT}}]&lt;br /&gt;
| Item must be a body part (CORPSE or CORPSEPIECE).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NO_EDGE_ALLOWED}}]&lt;br /&gt;
| Item must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|NOT_ENGRAVED}}]&lt;br /&gt;
| Item has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|METAL_ORE}}:X]&lt;br /&gt;
| Item material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|MIN_DIMENSION}}:X]&lt;br /&gt;
| Item's dimension must be at least this large. The item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [{{text anchor|HAS_TOOL_USE}}:X]&lt;br /&gt;
| Item must be a [[tool]] with the specific TOOL_USE value. The item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Building token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Tissue_definition_token&amp;diff=257877</id>
		<title>Tissue definition token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Tissue_definition_token&amp;diff=257877"/>
		<updated>2021-05-01T21:36:08Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added info to descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|12:23, 18 May 2015 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_NAME}}&lt;br /&gt;
|&lt;br /&gt;
*name&lt;br /&gt;
*plural&lt;br /&gt;
|plural can alternatively be NP (No Plural) or STP (Standard Plural, adds an 's' on the end).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_MATERIAL}}&lt;br /&gt;
| &lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Defines the tissue material.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|RELATIVE_THICKNESS}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| The relative thickness of the tissue. A higher thickness is harder to penetrate, but raising a tissue's relative thickness decreases the thickness of all other tissues.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HEALING_RATE}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Lower is faster. Omitting the token will result in a tissue that never heals.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|VASCULAR}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Related to how much said tissue bleeds. Higher = More bleeding (Which is why the heart has the highest value.)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PAIN_RECEPTORS}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Related to how much pain your character will suffer when said tissue is damaged. Higher = More pain when damaged (Which is why the bone tissue has a much higher value than other tissues. A broken bone hurts a lot more than a flesh cut.)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|THICKENS_ON_STRENGTH}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The thickness of the tissue increases when character strength increases.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|THICKENS_ON_ENERGY_STORAGE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Thickness of said tissue increases when the character eats and doesn't exercise sufficiently.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ARTERIES}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue contains arteries. Edged attacks have the chance to break an artery, increasing blood loss.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SCARS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Simply, whether or not the tissue will be scarred once healed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|STRUCTURAL}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Holds the body part together. A cut or a fracture disables the body part it's in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONNECTIVE_TISSUE_ANCHOR}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Any ligaments or tendons are part of this tissue. Vulnerable to edged attacks, damage disables the limb.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SETTABLE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue will not heal, or heals slower, until it is set by a bone doctor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SPLINTABLE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The broken tissue can be fixed with a cast or a splint to restore function while it heals.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUNCTIONAL}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue performs some sort of special function (e.g. sight, hearing, breathing, etc.)  An organ with such a function will stop working if a sufficient amount of damage is sustained by its FUNCTIONAL tissues. If an organ has no FUNCTIONAL tissues, it will stop working only if it is severed or destroyed entirely by heat or cold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NERVOUS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Nervous function - not used. This token is used in [[Body_token#NERVOUS|[OBJECT:BODY]]] tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|THOUGHT}}&lt;br /&gt;
| N/A&lt;br /&gt;
| If a creature has no functioning parts with the THOUGHT token, it will be unable to move or breathe.  NO_THOUGHT_CENTER_FOR_MOVEMENT bypasses this limitation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MUSCULAR}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Seems to affect where sensory or motor nerves are located, and whether damage to this tissue will render a limb useless.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SMELL}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Used to smell - not used. This token is used in [[Body_token#SMELL|[OBJECT:BODY]]] tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HEAR}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Used to hearing - not used. This token is used in [[Body_token#HEAR|[OBJECT:BODY]]] tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FLIGHT}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Unknown - not used. Most likely related to flying, see [[Body_token#FLIER|[FLIER] in [OBJECT:BODY]]]. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BREATHE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Used to breathing - not used. This token is used in [[Body_token#BREATHE|[OBJECT:BODY]]] tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SIGHT}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Used to seeing - not used. This token is used in [[Body_token#SIGHT|[OBJECT:BODY]]] tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONNECTS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Holds body parts together.  A body part will not be severed unless all of its component tissues with the CONNECTS tag are severed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAJOR_ARTERIES}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Causes tissue to sometimes severely bleed when damaged.  This is independent of its VASCULAR value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|INSULATION}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Tissue supplies the creature with heat insulation. Higher values result in more insulation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COSMETIC}}&lt;br /&gt;
| N/A&lt;br /&gt;
| ?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|STYLEABLE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue can be styled as per a tissue style (defined in an [[Entity_token|entity]] entry)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_SHAPE}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Value can be one of the following:&lt;br /&gt;
;LAYER&lt;br /&gt;
:Regular layer tissue.&lt;br /&gt;
;STRANDS&lt;br /&gt;
:Can be spun into thread at a farmer's workshop. Edge attacks will pass right through the tissue.&lt;br /&gt;
;FEATHERS&lt;br /&gt;
:Edge attacks will pass right through the tissue.&lt;br /&gt;
;SCALES&lt;br /&gt;
:?&lt;br /&gt;
;CUSTOM&lt;br /&gt;
:?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SUBORDINATE_TO_TISSUE}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Tissue is implicitly attached to another tissue and will fall off if that tissue layer is destroyed. Used for hair and feathers, which are subordinate to skin.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_MAT_STATE}}&lt;br /&gt;
|&lt;br /&gt;
*SOLID, SOLID_POWDER, LIQUID, or GAS&amp;lt;br&amp;gt;&lt;br /&gt;
(possibly others, as well. Needs testing.)&lt;br /&gt;
| Sets/forces a default material state for the selected tissue.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_LEAKS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The selected tissue leaks out of the creature when the layers above it are pierced.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tissue layer tokens ==&lt;br /&gt;
&lt;br /&gt;
These are used in creature raws to override the above for whatever reason.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Token&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Arguments&lt;br /&gt;
! width=&amp;quot;60%&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SET_LAYER_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
* tissue&lt;br /&gt;
| Sets a tissue layer to be made of a different tissue.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_RELATIVE_THICKNESS}}&lt;br /&gt;
|&lt;br /&gt;
* value&lt;br /&gt;
| Sets a new relative thickness for selected tissue layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_CONNECTS}}&lt;br /&gt;
|&lt;br /&gt;
| Gives the CONNECTS attribute to selected layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_MAJOR_ARTERIES}}&lt;br /&gt;
|&lt;br /&gt;
| Gives Major Artery attribute to selected layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_HEALING_RATE}}&lt;br /&gt;
|&lt;br /&gt;
* value&lt;br /&gt;
| Sets a new HEALING_RATE of the selected tissue layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_VASCULAR}}&lt;br /&gt;
|&lt;br /&gt;
| Sets a new VASCULAR value (which modulates bleeding) for selected tissue layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_PAIN_RECEPTORS}}&lt;br /&gt;
|&lt;br /&gt;
| Sets a new number of pain receptors for selected tissue layers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Default tissues ==&lt;br /&gt;
&lt;br /&gt;
=== Values ===&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}  style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 70%;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! TISSUE_NAME !! TISSUE_MATERIAL !! TISSUE_MAT_STATE !! RELATIVE_THICKNESS !! HEALING_RATE !! VASCULAR !! PAIN_RECEPTORS !! SUBORDINATE_TO_TISSUE !! INSULATION !! TISSUE_SHAPE&lt;br /&gt;
|-&lt;br /&gt;
| SKIN_TEMPLATE || skin:NP || LOCAL_CREATURE_MAT:SKIN || || 1 || 100 || 1 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| FAT_TEMPLATE || fat:NP || LOCAL_CREATURE_MAT:FAT || || 1 || 100 || 3 || 5 || || 100 || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| MUSCLE_TEMPLATE || muscle:muscles || LOCAL_CREATURE_MAT:MUSCLE || || 3 || 100 || 5 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| BONE_TEMPLATE || bone:NP || LOCAL_CREATURE_MAT:BONE || || 2 || 1000 || 3 || 50 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SHELL_TEMPLATE || shell:NP || LOCAL_CREATURE_MAT:SHELL || || 2 || 1000 || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HORN_TEMPLATE || horn:NP || LOCAL_CREATURE_MAT:HORN || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HOOF_TEMPLATE || hoof:NP || LOCAL_CREATURE_MAT:HOOF || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| CARTILAGE_TEMPLATE || cartilage:NP || LOCAL_CREATURE_MAT:CARTILAGE || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HAIR_TEMPLATE || hair:NP || LOCAL_CREATURE_MAT:HAIR || || 1 || || || || SKIN || 100 || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| CHEEK_WHISKERS_TEMPLATE || cheek whisker:STP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| CHIN_WHISKERS_TEMPLATE || chin whisker:STP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| MOUSTACHE_TEMPLATE || moustache:NP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| SIDEBURNS_TEMPLATE || sideburns:NP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| EYEBROW_TEMPLATE || eyebrow:NP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| EYELASH_TEMPLATE || eyelash:eyelashes || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| FEATHER_TEMPLATE || feather:STP || LOCAL_CREATURE_MAT:FEATHER || || 2 || || || || SKIN || 100 || FEATHERS&lt;br /&gt;
|-&lt;br /&gt;
| SCALE_TEMPLATE || scale:STP || LOCAL_CREATURE_MAT:SCALE || || 1 || 100 || 1 || 5 || || || SCALES&lt;br /&gt;
|-&lt;br /&gt;
| NAIL_TEMPLATE || nail:NP || LOCAL_CREATURE_MAT:NAIL || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| CLAW_TEMPLATE || claw:NP || LOCAL_CREATURE_MAT:CLAW || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| TALON_TEMPLATE || talon:NP || LOCAL_CREATURE_MAT:TALON || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| TOOTH_TEMPLATE || tooth:NP || LOCAL_CREATURE_MAT:TOOTH || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| IVORY_TEMPLATE || ivory:NP || LOCAL_CREATURE_MAT:IVORY || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| EYE_TEMPLATE || eye tissue:NP || LOCAL_CREATURE_MAT:EYE || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| NERVE_TEMPLATE || nervous tissue:NP || LOCAL_CREATURE_MAT:NERVE || || 1 || || 3 || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| BRAIN_TEMPLATE || brain tissue:NP || LOCAL_CREATURE_MAT:BRAIN || || 1 || || 3 || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| LUNG_TEMPLATE || lung tissue:NP || LOCAL_CREATURE_MAT:LUNG || || 1 || 100 || 8 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HEART_TEMPLATE || heart tissue:NP || LOCAL_CREATURE_MAT:HEART || || 1 || 100 || 10 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| LIVER_TEMPLATE || liver tissue:NP || LOCAL_CREATURE_MAT:LIVER || || 1 || 100 || 8 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| GUT_TEMPLATE || gut:NP || LOCAL_CREATURE_MAT:GUT || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| STOMACH_TEMPLATE || stomach tissue:NP || LOCAL_CREATURE_MAT:STOMACH || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| PANCREAS_TEMPLATE || pancreatic tissue:NP || LOCAL_CREATURE_MAT:PANCREAS || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SPLEEN_TEMPLATE || spleen tissue:NP || LOCAL_CREATURE_MAT:SPLEEN || || 1 || 100 || 5 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| KIDNEY_TEMPLATE || kidney tissue:NP || LOCAL_CREATURE_MAT:KIDNEY || || 1 || 100 || 8 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| FLAME_TEMPLATE || flames:NP || LOCAL_CREATURE_MAT:FLAME || GAS || 1 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| CHITIN_TEMPLATE || chitin:NP || LOCAL_CREATURE_MAT:CHITIN || || 1 || 100 || 1 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SPINE_TEMPLATE || spine:NP || LOCAL_CREATURE_MAT:SPINE || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SPONGE_TEMPLATE || sponge:NP || LOCAL_CREATURE_MAT:SPONGE || || 1 || 100 || 3 || 5 || || 100 || LAYER&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! TISSUE_NAME !! TISSUE_MATERIAL !! TISSUE_MAT_STATE !! RELATIVE_THICKNESS !! HEALING_RATE !! VASCULAR !! PAIN_RECEPTORS !! SUBORDINATE_TO_TISSUE !! INSULATION !! TISSUE_SHAPE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}  style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 70%;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;  style=&amp;quot;font-size: 70%;&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! THICKENS_ON_ENERGY_STORAGE !! THICKENS_ON_STRENGTH !! ARTERIES !! SCARS !! MUSCULAR !! FUNCTIONAL !!  STRUCTURAL !! CONNECTIVE_TISSUE_ANCHOR !! CONNECTS !! SETTABLE !! SPLINTABLE !! COSMETIC !! STYLEABLE &lt;br /&gt;
|-&lt;br /&gt;
| SKIN_TEMPLATE || || || || X || || || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| FAT_TEMPLATE || X || || || X || ||  || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| MUSCLE_TEMPLATE || || X || X || X || X || || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| BONE_TEMPLATE || || || || || || || X || X || X || X || X  || || &lt;br /&gt;
|-&lt;br /&gt;
| SHELL_TEMPLATE || || || || || || || X || || X || X || X || || &lt;br /&gt;
|-&lt;br /&gt;
| HORN_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| HOOF_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| CARTILAGE_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| HAIR_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| CHEEK_WHISKERS_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| CHIN_WHISKERS_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| MOUSTACHE_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| SIDEBURNS_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| EYEBROW_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| EYELASH_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| FEATHER_TEMPLATE || || || || || || || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| SCALE_TEMPLATE || || || || X || || || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| NAIL_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| CLAW_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| TALON_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| TOOTH_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| IVORY_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| EYE_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| NERVE_TEMPLATE || || || || X || || X || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| BRAIN_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| LUNG_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| HEART_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| LIVER_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| GUT_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| STOMACH_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| PANCREAS_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| SPLEEN_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| KIDNEY_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| FLAME_TEMPLATE || || || || || X || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| CHITIN_TEMPLATE || || || || X || || || X || X || X || X || X || || &lt;br /&gt;
|-&lt;br /&gt;
| SPINE_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| SPONGE_TEMPLATE || || || || X || || || || || X || || || || &lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;  style=&amp;quot;font-size: 70%;&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! THICKENS_ON_ENERGY_STORAGE !! THICKENS_ON_STRENGTH !! ARTERIES !! SCARS !! MUSCULAR !! FUNCTIONAL !!  STRUCTURAL !! CONNECTIVE_TISSUE_ANCHOR !! CONNECTS !! SETTABLE !! SPLINTABLE !! COSMETIC !! STYLEABLE &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
*[[Material definition token]]&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Tissue definition token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Tissue_definition_token&amp;diff=257876</id>
		<title>Tissue definition token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Tissue_definition_token&amp;diff=257876"/>
		<updated>2021-05-01T21:11:38Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|12:23, 18 May 2015 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_NAME}}&lt;br /&gt;
|&lt;br /&gt;
*name&lt;br /&gt;
*plural&lt;br /&gt;
|plural can alternatively be NP (No Plural) or STP (Standard Plural, adds an 's' on the end).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_MATERIAL}}&lt;br /&gt;
| &lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Defines the tissue material.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|RELATIVE_THICKNESS}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| The relative thickness of the tissue. A higher thickness is harder to penetrate, but raising a tissue's relative thickness decreases the thickness of all other tissues.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HEALING_RATE}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Lower is faster. Omitting the token will result in a tissue that never heals.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|VASCULAR}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Related to how much said tissue bleeds. Higher = More bleeding (Which is why the heart has the highest value.)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PAIN_RECEPTORS}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Related to how much pain your character will suffer when said tissue is damaged. Higher = More pain when damaged (Which is why the bone tissue has a much higher value than other tissues. A broken bone hurts a lot more than a flesh cut.)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|THICKENS_ON_STRENGTH}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The thickness of the tissue increases when character strength increases.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|THICKENS_ON_ENERGY_STORAGE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Thickness of said tissue increases when the character eats and doesn't exercise sufficiently.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ARTERIES}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue contains arteries. Edged attacks have the chance to break an artery, increasing blood loss.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SCARS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Simply, whether or not the tissue will be scarred once healed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|STRUCTURAL}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Holds the body part together. A cut or a fracture disables the body part it's in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONNECTIVE_TISSUE_ANCHOR}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Any ligaments or tendons are part of this tissue. Vulnerable to edged attacks, damage disables the limb.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SETTABLE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue will not heal, or heals slower, until it is set by a bone doctor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SPLINTABLE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The broken tissue can be fixed with a cast or a splint to restore function while it heals.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUNCTIONAL}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue performs some sort of special function (e.g. sight, hearing, breathing, etc.)  An organ with such a function will stop working if a sufficient amount of damage is sustained by its FUNCTIONAL tissues. If an organ has no FUNCTIONAL tissues, it will stop working only if it is severed or destroyed entirely by heat or cold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NERVOUS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Nervous function - not used. This token is used in [[Body_token#NERVOUS|[OBJECT:BODY]]] tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|THOUGHT}}&lt;br /&gt;
| N/A&lt;br /&gt;
| If a creature has no functioning parts with the THOUGHT token, it will be unable to move or breathe.  NO_THOUGHT_CENTER_FOR_MOVEMENT bypasses this limitation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MUSCULAR}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Seems to affect where sensory or motor nerves are located, and whether damage to this tissue will render a limb useless.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SMELL}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Unknown - not used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HEAR}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Unknown - not used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FLIGHT}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Unknown - not used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BREATHE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Unknown - not used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SIGHT}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Unknown - not used.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONNECTS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Holds body parts together.  A body part will not be severed unless all of its component tissues with the CONNECTS tag are severed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAJOR_ARTERIES}}&lt;br /&gt;
| N/A&lt;br /&gt;
| Causes tissue to sometimes severely bleed when damaged.  This is independent of its VASCULAR value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|INSULATION}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Tissue supplies the creature with heat insulation. Higher values result in more insulation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|COSMETIC}}&lt;br /&gt;
| N/A&lt;br /&gt;
| ?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|STYLEABLE}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The tissue can be styled as per a tissue style (defined in an [[Entity_token|entity]] entry)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_SHAPE}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Value can be one of the following:&lt;br /&gt;
;LAYER&lt;br /&gt;
:Regular layer tissue.&lt;br /&gt;
;STRANDS&lt;br /&gt;
:Can be spun into thread at a farmer's workshop. Edge attacks will pass right through the tissue.&lt;br /&gt;
;FEATHERS&lt;br /&gt;
:Edge attacks will pass right through the tissue.&lt;br /&gt;
;SCALES&lt;br /&gt;
:?&lt;br /&gt;
;CUSTOM&lt;br /&gt;
:?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SUBORDINATE_TO_TISSUE}}&lt;br /&gt;
| &lt;br /&gt;
*value&lt;br /&gt;
| Tissue is implicitly attached to another tissue and will fall off if that tissue layer is destroyed. Used for hair and feathers, which are subordinate to skin.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_MAT_STATE}}&lt;br /&gt;
|&lt;br /&gt;
*SOLID, SOLID_POWDER, LIQUID, or GAS&amp;lt;br&amp;gt;&lt;br /&gt;
(possibly others, as well. Needs testing.)&lt;br /&gt;
| Sets/forces a default material state for the selected tissue.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TISSUE_LEAKS}}&lt;br /&gt;
| N/A&lt;br /&gt;
| The selected tissue leaks out of the creature when the layers above it are pierced.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tissue layer tokens ==&lt;br /&gt;
&lt;br /&gt;
These are used in creature raws to override the above for whatever reason.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Token&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Arguments&lt;br /&gt;
! width=&amp;quot;60%&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SET_LAYER_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
* tissue&lt;br /&gt;
| Sets a tissue layer to be made of a different tissue.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_RELATIVE_THICKNESS}}&lt;br /&gt;
|&lt;br /&gt;
* value&lt;br /&gt;
| Sets a new relative thickness for selected tissue layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_CONNECTS}}&lt;br /&gt;
|&lt;br /&gt;
| Gives the CONNECTS attribute to selected layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_MAJOR_ARTERIES}}&lt;br /&gt;
|&lt;br /&gt;
| Gives Major Artery attribute to selected layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_HEALING_RATE}}&lt;br /&gt;
|&lt;br /&gt;
* value&lt;br /&gt;
| Sets a new HEALING_RATE of the selected tissue layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_VASCULAR}}&lt;br /&gt;
|&lt;br /&gt;
| Sets a new VASCULAR value (which modulates bleeding) for selected tissue layers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TL_PAIN_RECEPTORS}}&lt;br /&gt;
|&lt;br /&gt;
| Sets a new number of pain receptors for selected tissue layers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Default tissues ==&lt;br /&gt;
&lt;br /&gt;
=== Values ===&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}  style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 70%;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! TISSUE_NAME !! TISSUE_MATERIAL !! TISSUE_MAT_STATE !! RELATIVE_THICKNESS !! HEALING_RATE !! VASCULAR !! PAIN_RECEPTORS !! SUBORDINATE_TO_TISSUE !! INSULATION !! TISSUE_SHAPE&lt;br /&gt;
|-&lt;br /&gt;
| SKIN_TEMPLATE || skin:NP || LOCAL_CREATURE_MAT:SKIN || || 1 || 100 || 1 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| FAT_TEMPLATE || fat:NP || LOCAL_CREATURE_MAT:FAT || || 1 || 100 || 3 || 5 || || 100 || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| MUSCLE_TEMPLATE || muscle:muscles || LOCAL_CREATURE_MAT:MUSCLE || || 3 || 100 || 5 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| BONE_TEMPLATE || bone:NP || LOCAL_CREATURE_MAT:BONE || || 2 || 1000 || 3 || 50 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SHELL_TEMPLATE || shell:NP || LOCAL_CREATURE_MAT:SHELL || || 2 || 1000 || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HORN_TEMPLATE || horn:NP || LOCAL_CREATURE_MAT:HORN || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HOOF_TEMPLATE || hoof:NP || LOCAL_CREATURE_MAT:HOOF || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| CARTILAGE_TEMPLATE || cartilage:NP || LOCAL_CREATURE_MAT:CARTILAGE || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HAIR_TEMPLATE || hair:NP || LOCAL_CREATURE_MAT:HAIR || || 1 || || || || SKIN || 100 || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| CHEEK_WHISKERS_TEMPLATE || cheek whisker:STP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| CHIN_WHISKERS_TEMPLATE || chin whisker:STP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| MOUSTACHE_TEMPLATE || moustache:NP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| SIDEBURNS_TEMPLATE || sideburns:NP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| EYEBROW_TEMPLATE || eyebrow:NP || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| EYELASH_TEMPLATE || eyelash:eyelashes || LOCAL_CREATURE_MAT:HAIR || || 2 || || || || SKIN || || STRANDS&lt;br /&gt;
|-&lt;br /&gt;
| FEATHER_TEMPLATE || feather:STP || LOCAL_CREATURE_MAT:FEATHER || || 2 || || || || SKIN || 100 || FEATHERS&lt;br /&gt;
|-&lt;br /&gt;
| SCALE_TEMPLATE || scale:STP || LOCAL_CREATURE_MAT:SCALE || || 1 || 100 || 1 || 5 || || || SCALES&lt;br /&gt;
|-&lt;br /&gt;
| NAIL_TEMPLATE || nail:NP || LOCAL_CREATURE_MAT:NAIL || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| CLAW_TEMPLATE || claw:NP || LOCAL_CREATURE_MAT:CLAW || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| TALON_TEMPLATE || talon:NP || LOCAL_CREATURE_MAT:TALON || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| TOOTH_TEMPLATE || tooth:NP || LOCAL_CREATURE_MAT:TOOTH || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| IVORY_TEMPLATE || ivory:NP || LOCAL_CREATURE_MAT:IVORY || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| EYE_TEMPLATE || eye tissue:NP || LOCAL_CREATURE_MAT:EYE || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| NERVE_TEMPLATE || nervous tissue:NP || LOCAL_CREATURE_MAT:NERVE || || 1 || || 3 || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| BRAIN_TEMPLATE || brain tissue:NP || LOCAL_CREATURE_MAT:BRAIN || || 1 || || 3 || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| LUNG_TEMPLATE || lung tissue:NP || LOCAL_CREATURE_MAT:LUNG || || 1 || 100 || 8 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| HEART_TEMPLATE || heart tissue:NP || LOCAL_CREATURE_MAT:HEART || || 1 || 100 || 10 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| LIVER_TEMPLATE || liver tissue:NP || LOCAL_CREATURE_MAT:LIVER || || 1 || 100 || 8 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| GUT_TEMPLATE || gut:NP || LOCAL_CREATURE_MAT:GUT || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| STOMACH_TEMPLATE || stomach tissue:NP || LOCAL_CREATURE_MAT:STOMACH || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| PANCREAS_TEMPLATE || pancreatic tissue:NP || LOCAL_CREATURE_MAT:PANCREAS || || 1 || 100 || 3 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SPLEEN_TEMPLATE || spleen tissue:NP || LOCAL_CREATURE_MAT:SPLEEN || || 1 || 100 || 5 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| KIDNEY_TEMPLATE || kidney tissue:NP || LOCAL_CREATURE_MAT:KIDNEY || || 1 || 100 || 8 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| FLAME_TEMPLATE || flames:NP || LOCAL_CREATURE_MAT:FLAME || GAS || 1 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| CHITIN_TEMPLATE || chitin:NP || LOCAL_CREATURE_MAT:CHITIN || || 1 || 100 || 1 || 5 || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SPINE_TEMPLATE || spine:NP || LOCAL_CREATURE_MAT:SPINE || || 2 || || || || || || LAYER&lt;br /&gt;
|-&lt;br /&gt;
| SPONGE_TEMPLATE || sponge:NP || LOCAL_CREATURE_MAT:SPONGE || || 1 || 100 || 3 || 5 || || 100 || LAYER&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! TISSUE_NAME !! TISSUE_MATERIAL !! TISSUE_MAT_STATE !! RELATIVE_THICKNESS !! HEALING_RATE !! VASCULAR !! PAIN_RECEPTORS !! SUBORDINATE_TO_TISSUE !! INSULATION !! TISSUE_SHAPE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}  style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 70%;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;  style=&amp;quot;font-size: 70%;&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! THICKENS_ON_ENERGY_STORAGE !! THICKENS_ON_STRENGTH !! ARTERIES !! SCARS !! MUSCULAR !! FUNCTIONAL !!  STRUCTURAL !! CONNECTIVE_TISSUE_ANCHOR !! CONNECTS !! SETTABLE !! SPLINTABLE !! COSMETIC !! STYLEABLE &lt;br /&gt;
|-&lt;br /&gt;
| SKIN_TEMPLATE || || || || X || || || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| FAT_TEMPLATE || X || || || X || ||  || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| MUSCLE_TEMPLATE || || X || X || X || X || || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| BONE_TEMPLATE || || || || || || || X || X || X || X || X  || || &lt;br /&gt;
|-&lt;br /&gt;
| SHELL_TEMPLATE || || || || || || || X || || X || X || X || || &lt;br /&gt;
|-&lt;br /&gt;
| HORN_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| HOOF_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| CARTILAGE_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| HAIR_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| CHEEK_WHISKERS_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| CHIN_WHISKERS_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| MOUSTACHE_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| SIDEBURNS_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| EYEBROW_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| EYELASH_TEMPLATE || || || || || || || || || || || || X || X &lt;br /&gt;
|-&lt;br /&gt;
| FEATHER_TEMPLATE || || || || || || || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| SCALE_TEMPLATE || || || || X || || || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| NAIL_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| CLAW_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| TALON_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| TOOTH_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| IVORY_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| EYE_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| NERVE_TEMPLATE || || || || X || || X || || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| BRAIN_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| LUNG_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| HEART_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| LIVER_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| GUT_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| STOMACH_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| PANCREAS_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| SPLEEN_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| KIDNEY_TEMPLATE || || || || X || || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| FLAME_TEMPLATE || || || || || X || X || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| CHITIN_TEMPLATE || || || || X || || || X || X || X || X || X || || &lt;br /&gt;
|-&lt;br /&gt;
| SPINE_TEMPLATE || || || || || || || X || || X || || || || &lt;br /&gt;
|-&lt;br /&gt;
| SPONGE_TEMPLATE || || || || X || || || || || X || || || || &lt;br /&gt;
|- bgcolor=&amp;quot;#999999&amp;quot;  style=&amp;quot;font-size: 70%;&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-size: 150%;&amp;quot;| TISSUE_TEMPLATE !! THICKENS_ON_ENERGY_STORAGE !! THICKENS_ON_STRENGTH !! ARTERIES !! SCARS !! MUSCULAR !! FUNCTIONAL !!  STRUCTURAL !! CONNECTIVE_TISSUE_ANCHOR !! CONNECTS !! SETTABLE !! SPLINTABLE !! COSMETIC !! STYLEABLE &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
*[[Material definition token]]&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Tissue definition token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257850</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257850"/>
		<updated>2021-04-25T23:12:04Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added Description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. Similarly, the amount of time a reaction takes is correlated with experience gained; if a reaction has zero experience gain due to having no skill associated, the reaction will take minimal time.&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DESCRIPTION}}&lt;br /&gt;
| String&lt;br /&gt;
| Description of the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257849</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257849"/>
		<updated>2021-04-25T22:11:16Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Marked tag as Deprecated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. Similarly, the amount of time a reaction takes is correlated with experience gained; if a reaction has zero experience gain due to having no skill associated, the reaction will take minimal time.&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257848</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257848"/>
		<updated>2021-04-25T20:20:05Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Small corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. Similarly, the amount of time a reaction takes is correlated with experience gained; if a reaction has zero experience gain due to having no skill associated, the reaction will take minimal time.&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to HAS_MATERIAL_REACTION_PRODUCT, but requires the reagents material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagents material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagents item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}}&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257847</id>
		<title>Reaction</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Reaction&amp;diff=257847"/>
		<updated>2021-04-25T19:52:57Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: /* Full token list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|19:56, 28 August 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
Reactions are modular, editable formulas that take specific ingredients, or reagents, and use them to produce a desired item.  A lot of reactions are hardcoded—building beds or creating glass, for example—but a few are freely editable, and it's (sometimes) quite simple to add additional ones. There is a separate page with custom [[reaction examples]].&lt;br /&gt;
&lt;br /&gt;
== Reaction differences between modes ==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[entity token|entity file]] to be usable by that civilization. This has the useful effect of limiting new items and materials (such as special [[wood]] or [[metal]]) to civilizations that have the requisite reaction — so that if you give your custom civilization a reaction to produce &amp;quot;star metal&amp;quot; or some other custom material, only they will be able to use it.&lt;br /&gt;
&lt;br /&gt;
In [[adventure mode]], reactions are freely available in the {{k|x}} menu via the {{DFtext|create}} option, and any adventurer character can make free use of them. Reagents may be held in the hands or dropped on the ground, but cannot be used within a backpack or quiver. There are several bugs with adventure mode reactions, chief of which is the fact that you cannot select liquid reagents.{{verify}} &amp;lt;!-- reaction product tag works now, liquids and improvement quality don't --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anatomy of a reaction ==&lt;br /&gt;
&lt;br /&gt;
Reactions are found within reaction_x files (such as reaction_smelter or reaction_other).  Generally speaking they adhere to the following structure:&lt;br /&gt;
&lt;br /&gt;
   [REACTION:&amp;lt;identifier&amp;gt;]&lt;br /&gt;
      [NAME:&amp;lt;name&amp;gt;]&lt;br /&gt;
      [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
      [REAGENT:A:150:BAR:NONE:POTASH:NONE]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL] &lt;br /&gt;
      [SKILL:&amp;lt;SKILL TOKEN&amp;gt;]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
      [ADVENTURE_MODE_ENABLED]&lt;br /&gt;
* ''[[#Reaction identifier|identifier]]'': The internal ID of the reaction.&lt;br /&gt;
* ''[[#Reaction name|name]]'': The name of the reaction, visible to the player in the Fortress mode or Adventure mode menus.&lt;br /&gt;
* ''[[#Building|building]]'': The building ID that the reaction uses, and the relevant keyboard shortcut.&lt;br /&gt;
* ''[[#Reagents|...reagents...]]'': Zero or more reagents (ingredients) that are required to be in stock for the reaction to be possible.&lt;br /&gt;
* ''[[#Products|...products...]]'': Zero or more products that are created from the reaction.&lt;br /&gt;
* ''[[#fuel|fuel]]'': (optional) If present, the reaction requires charcoal, coke or a magma-powered workshop.&lt;br /&gt;
* ''[[#skill|skill]]'': (optional) The skill required and trained by the reaction.&lt;br /&gt;
* ''[[#automatic|automatic]]'': (optional) If present, the reaction will automatically be enqueued whenever it can possibly be performed.&lt;br /&gt;
* ''[[#adventure mode|adventure mode]]'': (optional) If present, the reaction is used by the player in Adventure mode instead.&lt;br /&gt;
&lt;br /&gt;
=== Reaction identifier ===&lt;br /&gt;
&lt;br /&gt;
The reaction identifier may be anything, so long as it is unique within the raw data files. A good habit to get into is to append a short prefix or suffix to each name related to the name of your mod, to ensure nobody else is going to make an identical reaction and thereby mess up the game if their mod is run alongside yours.&lt;br /&gt;
&lt;br /&gt;
=== Reaction name ===&lt;br /&gt;
&lt;br /&gt;
This can be anything at all, and is usually used to describe the reaction. '''Tan a hide''', for example, is the name of the default leather-producing reaction. Generally this should be written as a small descriptive verb phrase, with the first letter capitalized, for consistency with the existing reactions.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
&lt;br /&gt;
    [BUILDING:&amp;lt;BUILDING NAME&amp;gt;:&amp;lt;BUILDING KEY&amp;gt;]&lt;br /&gt;
* ''name'': The ID (that is the internal TOKEN each building can be referred to into reactions) of the building where this reaction will appear in the tasks menu.&lt;br /&gt;
* ''key'': The keyboard shortcut used to queue up the reaction.&lt;br /&gt;
&lt;br /&gt;
The BUILDING NAME is the name of the building that will house this reaction, and the building key is the keyboard shortcut that will queue up the reaction. If two reactions have the same key, then one of them will be assigned a different key, the first alphabetically available at the building.&lt;br /&gt;
&lt;br /&gt;
Valid buildings TOKENS are as follows:&lt;br /&gt;
* KILN - [[Kiln]] and [[Magma kiln]]&lt;br /&gt;
* SMELTER - [[Smelter]] and [[Magma smelter]]&lt;br /&gt;
* TANNER - [[Tanner's shop]]&lt;br /&gt;
* KITCHEN - [[Kitchen]]&lt;br /&gt;
* QUERN - [[Quern]]&lt;br /&gt;
* MILLSTONE - [[Millstone]]&lt;br /&gt;
* STILL - [[Still]]&lt;br /&gt;
* FARMER - [[Farmer's workshop]]&lt;br /&gt;
* CRAFTSMAN - [[Craftsdwarf's workshop]]&lt;br /&gt;
* GLASS{{version|0.42.01}} - [[Glass furnace]]&lt;br /&gt;
* WOOD{{version|0.42.01}} - [[Wood furnace]]&lt;br /&gt;
* MASON{{version|0.42.01}} - [[Mason's workshop]]&lt;br /&gt;
* ASHERY{{version|0.42.01}} - [[Ashery]] &lt;br /&gt;
* LEATHER{{version|0.42.01}} - [[Leather works]]&lt;br /&gt;
* BOWYER{{version|0.42.01}} - [[Bowyer's workshop]]&lt;br /&gt;
* SIEGE{{version|0.42.01}} - [[Siege workshop]]&lt;br /&gt;
* CLOTHES{{version|0.42.01}} - [[Clothier's shop]]&lt;br /&gt;
* METALSMITH{{version|0.42.01}} - [[Metalsmith's forge]]&lt;br /&gt;
* CARPENTER{{version|0.42.01}} - [[Carpenter's workshop]]&lt;br /&gt;
* Any custom (raw-defined) building type, such as:&lt;br /&gt;
** SOAP_MAKER - [[Soap maker's workshop]]&lt;br /&gt;
** SCREW_PRESS - [[Screw press]]&lt;br /&gt;
&lt;br /&gt;
Specifying multiple BUILDING tokens will cause the reaction to be available at all of the specified buildings.&lt;br /&gt;
&lt;br /&gt;
=== Category ===&lt;br /&gt;
&lt;br /&gt;
{{new in v0.42}}&lt;br /&gt;
&lt;br /&gt;
Categories are custom submenus for buildings' reaction menus. A reaction doesn't require a category, but if you have a lot of reactions, categories can be invaluable for organizing and presenting those reactions to players.&lt;br /&gt;
&lt;br /&gt;
Categories can be nested indefinitely—you can have a category within a category within a category within a category within a category within... but as a practical matter, nesting categories more than 2 deep is not recommended.&lt;br /&gt;
&lt;br /&gt;
Categories currently have no effect on adventure mode reactions.&lt;br /&gt;
&lt;br /&gt;
==== Defining a category ====&lt;br /&gt;
&lt;br /&gt;
Each category needs to be defined within a reaction, usually one which should appear within its menu. Categories only need to be defined once.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY || Category ID || The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_NAME || String || The name of the category as displayed in-game.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_DESCRIPTION || String || Optional. If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_PARENT || Category ID || Optional. If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
|-&lt;br /&gt;
| CATEGORY_KEY || [[interface.txt|Hotkey token]] || Optional. If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Adding reactions to an existing category ====&lt;br /&gt;
&lt;br /&gt;
Just include the tag [CATEGORY:&amp;lt;category_id&amp;gt;] within your reaction definition, and if the category exists, your reaction will be added to its menu. You can only add reactions to custom categories.&lt;br /&gt;
&lt;br /&gt;
Each reaction can belong to only one category.&lt;br /&gt;
&lt;br /&gt;
=== Reagents ===&lt;br /&gt;
&lt;br /&gt;
REAGENTs are a little bit complicated. They are the ingredients that the reaction will use.  You can define as many as you like within a reaction.&lt;br /&gt;
&lt;br /&gt;
    [REAGENT:&amp;lt;name&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
* ''[[#name|name]]'': The name of the reagent, local to the reaction.&lt;br /&gt;
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.&lt;br /&gt;
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.&lt;br /&gt;
* ''[[#material_token|material token]]'': The material the item should be made of.&lt;br /&gt;
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
The name field is a small string used to identify the reagent within the reaction. The name is not visible to the player. It is local to the reaction and does not need to be unique across all of the reactions, so you can reuse the same names over and over, although each reagent within the same individual reaction must have a different name.&lt;br /&gt;
&lt;br /&gt;
Most reagents are simply named '''A''', '''B''', and so forth in default reactions, although names such as '''TOOLSTONE''' or '''FLUX''' will also work equally well. The PRODUCT may make reference to this name &amp;amp;ndash; for instance, if a container '''B''' is specified as a reagent, PRODUCT_TO_CONTAINER:B specifies that container.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
The quantity differs between item types. Generally speaking, cloth, thread, powder, bars, liquids and globs use numbers representing the size of material within one item, and everything else uses a static quantity. While REAGENT:A:'''''10''''':'''''THREAD''''':NONE:NONE:NONE thread is an extremely tiny portion of a random spool of thread, REAGENT:A:'''''10''''':'''''TOY''''':NONE:NONE:NONE is ten unique, solid toy items.&lt;br /&gt;
&lt;br /&gt;
If one of the reagents is in a stack, the reaction will use the entire stack and multiply the product--for example, using only 1 BAR instead of 150 BAR will multiply the product quantity by 150. One can see which items have what quantities in the description of the [[Reaction#PRODUCT_DIMENSION]] token.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
[[Item token]]s are of the form ITEM_TYPE:ITEM_SUBTYPE.&lt;br /&gt;
&lt;br /&gt;
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available.&lt;br /&gt;
&lt;br /&gt;
For reagents, the item token can also be set to ANY_RAW_MATERIAL:NONE (to permit BAR, BOULDER, POWDER_MISC, or GLOB) or ANY_CRAFT:NONE (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). Internally, these special values are both converted to NONE:NONE and merely set special modifiers (similar to [BUILDMAT])—they cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
The item subtype is name of the exact item that you require. Examples are ITEM_WEAPON_SPEAR or ITEM_TOY_PUZZLEBOX. Some items, like quivers or backpacks, or chunks of stone or metal, only require the item token to be filled in, so if you're asking for those you should set the subtype to NONE. Subtypes are defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility, reagents can also accept &amp;quot;METAL_ORE:metal_id&amp;quot; in place of both the item and material tokens—this is equivalent to using the reagent BOULDER:NONE:NONE:NONE with the modifier [METAL_ORE:metal_id] (see below).&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
[[Material token]]s come in several forms. For most reagents, this will typically be INORGANIC:MATERIAL_ID or NONE:NONE (to allow multiple materials using other filters).&lt;br /&gt;
&lt;br /&gt;
==== Modifiers ====&lt;br /&gt;
&lt;br /&gt;
Reagents may also have extra tokens added on afterwards, placed just after the REAGENT tag.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, if you set a field in a reagent to NONE, the reaction won't discriminate when it comes to that particular field. For example, if you require a BOULDER reagent but leave the material as NONE:NONE, it will grab any available BOULDER-type item regardless of material.&lt;br /&gt;
&lt;br /&gt;
A list of them follows:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [REACTION_CLASS:X]&lt;br /&gt;
| Reagent material must have the specified reaction class - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_MATERIAL_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified material reaction product - see below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_ITEM_REACTION_PRODUCT:X]&lt;br /&gt;
| Reagent material must have the specified item reaction product - see below for more details. This can be used interchangeably with HAS_MATERIAL_REACTION_PRODUCT.&lt;br /&gt;
|-&lt;br /&gt;
| [CONTAINS:X]&lt;br /&gt;
| Reagent is a container that holds the specified reagent (where ''X'' is the [[#name|name]] of the reagent).&lt;br /&gt;
|-&lt;br /&gt;
| [UNROTTEN]&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top&amp;quot;| [CONTAINS_LYE]&lt;br /&gt;
| Reagent must be a BARREL or TOOL which contains at least one item of type LIQUID_MISC made of LYE. Use of this token is discouraged, as it does not work with buckets (instead, use [CONTAINS:lye] &amp;amp;mdash; note the colon &amp;amp;mdash; and a corresponding lye reagent [REAGENT:lye:150:LIQUID_MISC:NONE:LYE]).&lt;br /&gt;
|-&lt;br /&gt;
| [POTASHABLE]&lt;br /&gt;
| Alias for [CONTAINS_LYE].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_WEB]&lt;br /&gt;
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [WEB_ONLY]&lt;br /&gt;
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.&lt;br /&gt;
|-&lt;br /&gt;
| [EMPTY]&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_CONTAIN_BARREL_ITEM]&lt;br /&gt;
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].&lt;br /&gt;
|-&lt;br /&gt;
| [BAG]&lt;br /&gt;
| Reagent must be a bag - that is, a BOX made of plant fiber, silk, yarn, or leather.&lt;br /&gt;
|-&lt;br /&gt;
| [GLASS_MATERIAL] &lt;br /&gt;
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
| [BUILDMAT]&lt;br /&gt;
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.&lt;br /&gt;
|-&lt;br /&gt;
| [FIRE_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 11000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [MAGMA_BUILD_SAFE]&lt;br /&gt;
| Reagent material must be solid and stable at temperatures approaching 12000. Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.&lt;br /&gt;
|-&lt;br /&gt;
| [CAN_USE_ARTIFACT]&lt;br /&gt;
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
|-&lt;br /&gt;
| [WORTHLESS_STONE_ONLY]&lt;br /&gt;
| Reagent material must be non-[[economic]].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PLANT_MATERIAL] &lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SILK_MATERIAL] &lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_YARN_MATERIAL] &lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SOAP_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_LEATHER_MATERIAL]&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_BONE_MATERIAL]&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_STRAND_TISSUE]&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_SHELL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_TOOTH_MATERIAL]&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_HORN_MATERIAL]&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
|-&lt;br /&gt;
| [ANY_PEARL_MATERIAL]&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
|-&lt;br /&gt;
| [IS_SAND_MATERIAL]&lt;br /&gt;
| Reagent material must have the [SOIL_SAND] token.&lt;br /&gt;
|-&lt;br /&gt;
| [USE_BODY_COMPONENT]&lt;br /&gt;
| Reagent must be a body part (CORPSE or CORPSEPIECE). Must be used even if your reagent item type is CORPSE or CORPSEPIECE, otherwise it will match any item.&lt;br /&gt;
|-&lt;br /&gt;
| [NO_EDGE_ALLOWED]&lt;br /&gt;
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_EDGE]{{version|0.42.01}}&lt;br /&gt;
| Reagent must have an edge.&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_ENGRAVED]&lt;br /&gt;
| Reagent has not been engraved (excludes memorial slabs).&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_IMPROVED]&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_ABSORB]&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
|-&lt;br /&gt;
| [FOOD_STORAGE_CONTAINER]&lt;br /&gt;
| Reagent is either a BARREL or a TOOL with the FOOD_STORAGE use.&lt;br /&gt;
|-&lt;br /&gt;
| [HARD_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_HARD].&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ITEM_MATERIAL]&lt;br /&gt;
| Reagent material must have [ITEMS_METAL].&lt;br /&gt;
|-&lt;br /&gt;
| [NOT_PRESSED]&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [METAL_ORE:X]&lt;br /&gt;
| Reagent material must be an ore of the specified metal.&lt;br /&gt;
|-&lt;br /&gt;
| [MIN_DIMENSION:X]&lt;br /&gt;
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, or GLOB for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| [HAS_TOOL_USE:X]&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
|-&lt;br /&gt;
| [PRESERVE_REAGENT]&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
|-&lt;br /&gt;
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]&lt;br /&gt;
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that [[stack]]s of reagents will correctly produce additional outputs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Products ===&lt;br /&gt;
&lt;br /&gt;
Products are the end product of the reaction. A reaction can have as many products as it likes.&lt;br /&gt;
&lt;br /&gt;
Products are almost identical to reagents, except that they do not need to be named, can't have fields undefined, and don't use the quantity field to determine the product size. Instead, the token PRODUCT_DIMENSION:X is tacked on after the PRODUCT token, determining the size of the product.&lt;br /&gt;
&lt;br /&gt;
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:&amp;lt;IDENTIFIER&amp;gt;] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [PRODUCT:&amp;lt;probability&amp;gt;:&amp;lt;quantity&amp;gt;:&amp;lt;item token&amp;gt;:&amp;lt;material token&amp;gt;][...modifiers...]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the product will be produced when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== quantity ====&lt;br /&gt;
&lt;br /&gt;
Determines how many of the product will be produced. For the item types AMMO, REMAINS, MEAT, FISH, FISH_RAW, PLANT, PLANT_GROWTH, DRINK, CHEESE, LIQUID_MISC, COIN, and EGG, the resulting items will be created as a single [[stack]], while all other item types will produce multiple individual items.&lt;br /&gt;
&lt;br /&gt;
If a reaction can take stacks of input items, then it will attempt to perform the reaction enough times to consume as many full sets of reagents as it can—for example, if a reaction &amp;quot;1 piece of meat + 2 pieces of fish -&amp;gt; 3 pieces of cheese&amp;quot; is given a stack of 5 meat and 5 fish, it will produce 6 pieces of cheese and leave 3 meat and 1 fish behind. Using the token DOES_NOT_DETERMINE_PRODUCT_AMOUNT allows a reagent to be excluded from this calculation - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== item token ====&lt;br /&gt;
&lt;br /&gt;
The [[item token]] and subtype of the item you produce.&lt;br /&gt;
&lt;br /&gt;
If you want the item type and material to be derived from one of the reagents, you can use GET_ITEM_DATA_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of both the item token ''and'' the material token below. You can also specify GET_ITEM_DATA_FROM_REAGENT:reagent:NONE in order to make a direct copy of the source item, though this will not work for complex items such as corpses or prepared meals.&lt;br /&gt;
&lt;br /&gt;
For products, this can also be set to CRAFTS:NONE to produce up to three random [[craft]] items. This value cannot be used in any other context.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the product will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the product's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
==== Product modifiers ====&lt;br /&gt;
&lt;br /&gt;
Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| [FORCE_EDGE]&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PASTE]&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_PRESSED]&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_DIMENSION:&amp;lt;size&amp;gt;]&lt;br /&gt;
| Specifies the dimensions of the product. A product of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB. 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types. Note: this is not the actual volume of the product, which is hard-coded by the item token. &lt;br /&gt;
|-&lt;br /&gt;
| [PRODUCT_TO_CONTAINER:&amp;lt;id&amp;gt;]&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Improvements ===&lt;br /&gt;
&lt;br /&gt;
Improvements are applied to existing reagents. A reaction can have as many improvements as it likes.&lt;br /&gt;
&lt;br /&gt;
Restating this in the above style, we have:&lt;br /&gt;
   [IMPROVEMENT:&amp;lt;probability&amp;gt;:&amp;lt;reagent name&amp;gt;:&amp;lt;improvement type&amp;gt;:&amp;lt;material token&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==== probability ====&lt;br /&gt;
&lt;br /&gt;
The percentage chance the improvement will be applied to the reagent when the reaction is completed.&lt;br /&gt;
&lt;br /&gt;
==== reagent name ====&lt;br /&gt;
&lt;br /&gt;
The name of the reagent that will be improved. In order to be meaningful, this reagent must have [PRESERVE_REAGENT].&lt;br /&gt;
&lt;br /&gt;
==== improvement type ====&lt;br /&gt;
&lt;br /&gt;
The following improvement types can be used:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| COVERED&lt;br /&gt;
| Item is encrusted/studded/decorated with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GLAZED&lt;br /&gt;
| Item is glazed with &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| RINGS_HANGING&lt;br /&gt;
| Item is adorned with hanging rings of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| BANDS&lt;br /&gt;
| Item is encircled with bands of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SPIKES&lt;br /&gt;
| Item menaces with spikes of &amp;lt;material&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| PAGES&lt;br /&gt;
| Adds pages to a [[book]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All other item improvement tokens (ART_IMAGE, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE, and ILLUSTRATION) are ignored.&lt;br /&gt;
&lt;br /&gt;
==== material token ====&lt;br /&gt;
&lt;br /&gt;
A [[material token]] describing what the decoration will be made of.&lt;br /&gt;
&lt;br /&gt;
If you want the decoration's material to be derived from one of the reagents, you can use GET_MATERIAL_FROM_REAGENT:reagent:REACTION_PRODUCT_ID in place of the material token. You can also specify GET_MATERIAL_FROM_REAGENT:reagent:NONE in order to directly use the reagent's own material.&lt;br /&gt;
&lt;br /&gt;
=== Other tokens ===&lt;br /&gt;
&lt;br /&gt;
==== fuel ====&lt;br /&gt;
&lt;br /&gt;
The FUEL token means that the reaction requires coke or charcoal to be performed. Fuel is not needed when the reaction is performed at a magma workshop (a [[magma kiln]], [[magma smelter]], or any custom building having [NEEDS_MAGMA]).&lt;br /&gt;
&lt;br /&gt;
==== skill ====&lt;br /&gt;
&lt;br /&gt;
The [[Skill token|SKILL token]] determines what skill the reaction requires and what skill it trains. Only one skill may be specified. For custom reactions, the amount of experience gained is linearly correlated with the amount of product created; a reaction with no product will yield no experience for the performing dwarf. Similarly, the amount of time a reaction takes is correlated with experience gained; if a reaction has zero experience gain due to having no skill associated, the reaction will take minimal time.&lt;br /&gt;
&lt;br /&gt;
==== automatic ====&lt;br /&gt;
&lt;br /&gt;
The AUTOMATIC token means that the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
This token only works with jobs performed at a [[kiln]], [[smelter]], [[tanner's shop]], [[kitchen]], or custom workshop, and [[standing orders]] allow you to limit which ones trigger; custom reactions performed at a [[quern]], [[millstone]]{{verify}}, [[still]]{{verify}} or [[craftsdwarf's workshop]]{{verify}} cannot be made automatic.&lt;br /&gt;
&lt;br /&gt;
==== Adventure Mode enabled ====&lt;br /&gt;
&lt;br /&gt;
The ADVENTURE_MODE_ENABLED token means that this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing entity files.&lt;br /&gt;
&lt;br /&gt;
==== max multiplier ====&lt;br /&gt;
&lt;br /&gt;
The [MAX_MULTIPLIER:&amp;lt;#&amp;gt;] specifies how many times to do the reaction. This can be used to limit stacked reagent use to the specified quantity instead of the whole stack.{{version|0.42.01}}&lt;br /&gt;
&lt;br /&gt;
== Reaction classes and products ==&lt;br /&gt;
&lt;br /&gt;
When you're doing things like tanning hides or brewing alcohol, having separate reactions for every single possible raw material is unwieldy and terrible. However, you can let the reaction itself ask the material for details and process them all with the same reaction. There are three types of tags to dictate this behavior.&lt;br /&gt;
&lt;br /&gt;
=== Reaction classes ===&lt;br /&gt;
&lt;br /&gt;
The simplest token is the reaction class. If it is tacked on a material, a reaction can limit reagents to only those materials that have the specified arbitrary [REACTION_CLASS:whatever] identifier.&lt;br /&gt;
&lt;br /&gt;
We want a reaction that smelts iron and flux into pig iron. However, there's half-dozen different stones that count as flux. Instead of clogging up the smelter job menu with half-dozen nearly identical reactions that all take in either dolomite or limestone or marble for the same result, we use a reaction class.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:PIG_IRON_MAKING]&lt;br /&gt;
      [NAME:make pig iron bars]&lt;br /&gt;
      [BUILDING:SMELTER:NONE]&lt;br /&gt;
      [REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]&lt;br /&gt;
      [REAGENT:B:1:BOULDER:NO_SUBTYPE:NONE:NONE]'''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [REAGENT:C:150:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]&lt;br /&gt;
      [PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON][PRODUCT_DIMENSION:150]&lt;br /&gt;
      [FUEL]&lt;br /&gt;
      [SKILL:SMELT]&lt;br /&gt;
&lt;br /&gt;
Note how reagent B asks for &amp;quot;NONE:NONE&amp;quot; as its material. This means &amp;quot;boulders of any kind as long as they have the reaction class named FLUX&amp;quot;. Stuff like calcite, here:&lt;br /&gt;
&lt;br /&gt;
   [INORGANIC:CALCITE]&lt;br /&gt;
      [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]&lt;br /&gt;
      [STATE_NAME_ADJ:ALL_SOLID:calcite][DISPLAY_COLOR:7:7:1][TILE:'&amp;quot;']&lt;br /&gt;
      '''[REACTION_CLASS:FLUX]'''&lt;br /&gt;
      [ENVIRONMENT_SPEC:LIMESTONE:CLUSTER_SMALL:100]&lt;br /&gt;
      [ENVIRONMENT_SPEC:MARBLE:CLUSTER_SMALL:100]&lt;br /&gt;
      [MATERIAL_VALUE:2]&lt;br /&gt;
      [IS_STONE]&lt;br /&gt;
      [MELTING_POINT:12902]&lt;br /&gt;
      [SOLID_DENSITY:2930]&lt;br /&gt;
&lt;br /&gt;
The label itself can be absolutely anything. It's only used to find a match between the material and the reaction. Note that some reaction classes have special meanings to the game itself—notably, the [[site finder]] knows that &amp;quot;FLUX&amp;quot; should be connected to the &amp;quot;Flux stone&amp;quot; filter.&lt;br /&gt;
&lt;br /&gt;
=== Material reaction products ===&lt;br /&gt;
&lt;br /&gt;
But what if it's not all the same what materials the members of the reaction class put out? If a tanner starts working on a bear pelt, a horse hide, some dragon scales and a section of human skin, surely they all can't produce generic boot leather! No, the reaction must get the chance to ask the &amp;quot;reaction class&amp;quot; what the reagent should turn out as. We will declare a material reaction product.&lt;br /&gt;
&lt;br /&gt;
   [REACTION:TAN_A_HIDE]&lt;br /&gt;
      [NAME:tan a hide]&lt;br /&gt;
      [BUILDING:TANNER:CUSTOM_T]&lt;br /&gt;
         [REAGENT:flaps of skin:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]&lt;br /&gt;
            '''[HAS_MATERIAL_REACTION_PRODUCT:BOOT_FABRIC]'''&lt;br /&gt;
         [PRODUCT:100:1:SKIN_TANNED:NONE:'''GET_MATERIAL_FROM_REAGENT:flaps of skin:BOOT_FABRIC''']&lt;br /&gt;
      [SKILL:TANNER]&lt;br /&gt;
      [AUTOMATIC]&lt;br /&gt;
&lt;br /&gt;
Where you'd usually have some fresh bodypart with the BOOT_FABRIC reaction class produce some generic SKIN_TANNED, this goes further. Instead of declaring a material, the spool of pattern-ready tailoring leather (SKIN_TANNED) now comes out as whatever the skin flaps' material reaction product (named BOOT_FABRIC) says in the material's definition (GET_MATERIAL_FROM_REAGENT). And what does it say?&lt;br /&gt;
&lt;br /&gt;
   [MATERIAL_TEMPLATE:SKIN_TEMPLATE]&lt;br /&gt;
         [STATE_COLOR:ALL_SOLID:GRAY]&lt;br /&gt;
         [STATE_NAME:ALL_SOLID:skin]&lt;br /&gt;
         [STATE_ADJ:ALL_SOLID:skin]&lt;br /&gt;
         ...&lt;br /&gt;
         [ABSORPTION:100]&lt;br /&gt;
         '''[MATERIAL_REACTION_PRODUCT:BOOT_FABRIC:LOCAL_CREATURE_MAT:LEATHER]'''&lt;br /&gt;
         [IMPLIES_ANIMAL_KILL]&lt;br /&gt;
         [ROTS]&lt;br /&gt;
&lt;br /&gt;
It says that the caller of the BOOT_FABRIC hook always comes out as the LEATHER of whatever creature the skin has been peeled off of (LOCAL_CREATURE_MAT). Make it BOOT_FABRIC:INORGANIC:GOLD instead and your tanner turns into Midas. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
As with reaction classes, some MATERIAL_REACTION_PRODUCT identifiers have special meanings to the game itself - notably, the [[site finder]] knows that &amp;quot;FIRED_MAT&amp;quot; should be connected to the &amp;quot;Clay&amp;quot; filter, and &amp;quot;CHEESE_MAT&amp;quot; is used when making [[cheese]] from [[milk]].&lt;br /&gt;
&lt;br /&gt;
=== Item reaction products ===&lt;br /&gt;
&lt;br /&gt;
The version 0.40 added an even more powerful form of the above. Where material reaction products can only affect what type of stuff the predestined end product is made of, item reaction products can decide the entire end result ahead of time. Item AND material.&lt;br /&gt;
&lt;br /&gt;
Let's assume for a moment that we're completely tired of leather earrings and hair crowns. We want a crafting reaction that takes cloth and only produces things that make sense.&lt;br /&gt;
&lt;br /&gt;
      [REACTION:TAILOR_THE_BEST_THING]&lt;br /&gt;
            [NAME:weave something that makes sense]&lt;br /&gt;
            [BUILDING:CRAFTSMAN]&lt;br /&gt;
            [REAGENT:woven fabric:1:CLOTH:NONE:NONE:NONE]&lt;br /&gt;
               '''[HAS_ITEM_REACTION_PRODUCT:BEST_OPTION]'''&lt;br /&gt;
            [PRODUCT:100:1:'''GET_ITEM_DATA_FROM_REAGENT:woven fabric:BEST_OPTION''']&lt;br /&gt;
            [SKILL:CLOTHIER]&lt;br /&gt;
&lt;br /&gt;
Now we need to come up with the counterpart tags in the materials. Hmmm... cotton is thin and soft, so it makes pretty good undergarments. An undershirt, maybe?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:COTTON] Gossypium hirsutum / sp.&lt;br /&gt;
                  [NAME:cotton plant][NAME_PLURAL:cotton plants][ADJ:cotton plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:ARMOR:ITEM_ARMOR_TUNIC:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Then jute fabric. Isn't that burlap? And what's about the only thing they make from burlap?&lt;br /&gt;
&lt;br /&gt;
         [PLANT:JUTE] Corchorus capsularis / Corchorus olitorius&lt;br /&gt;
                  [NAME:jute plant][NAME_PLURAL:jute plants][ADJ:jute plant]&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]&lt;br /&gt;
                  [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]&lt;br /&gt;
                  [DRY][BIOME:ANY_TROPICAL]&lt;br /&gt;
                  [VALUE:2]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:THREAD:THREAD_PLANT_TEMPLATE]&lt;br /&gt;
                     [MATERIAL_VALUE:2]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:BOX:NONE:LOCAL_PLANT_MAT:THREAD]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
Sacks, of course! Wait, how about silk?&lt;br /&gt;
&lt;br /&gt;
         [CREATURE:SPIDER_CAVE]&lt;br /&gt;
                  [DESCRIPTION:A tiny underground bug, sought after for its thread.]&lt;br /&gt;
                  [NAME:cave spider:cave spiders:cave spider]&lt;br /&gt;
                  ...&lt;br /&gt;
                  [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]&lt;br /&gt;
                     '''[ITEM_REACTION_PRODUCT:BEST_OPTION:PANTS:ITEM_PANTS_THONG:LOCAL_CREATURE_MAT:SILK]'''&lt;br /&gt;
                  ...&lt;br /&gt;
&lt;br /&gt;
This goes on for as long as you let it. The ITEM_REACTION_PRODUCT declares the identifier and then the item and material with subtypes, just like a normal reaction's product line would.&lt;br /&gt;
&lt;br /&gt;
Do note that MATERIAL_REACTION_PRODUCT and ITEM_REACTION_PRODUCT use the same IDs, so you cannot have both a material and item reaction product of the same name. Also, though you cannot use GET_ITEM_DATA_FROM_REAGENT with a MATERIAL_REACTION_PRODUCT (there'd be no item type information), you ''can'' use GET_MATERIAL_FROM_REAGENT on an ITEM_REACTION_PRODUCT (in case you want to force your own item type).&lt;br /&gt;
&lt;br /&gt;
== Reactions and world generation ==&lt;br /&gt;
&lt;br /&gt;
There are several things to keep in mind when you're adding reactions to a game that already exists.&lt;br /&gt;
&lt;br /&gt;
* Most entity changes require a regen, but adding PERMITTED_REACTION tokens for reactions that existed at the time of world generation to the entity file in the save directory do not.&lt;br /&gt;
* Adding reactions to the raws in a save directory requires you to regen the world.&lt;br /&gt;
* You can alter an existing reaction in any way you like without regenning the world, so long as you don't alter the reaction identifier.&lt;br /&gt;
&lt;br /&gt;
== Full token list ==&lt;br /&gt;
&lt;br /&gt;
For the sake of convenience and readability, this is a complete compilation of the previously listed reaction tokens in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#dddddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ADVENTURE_MODE_ENABLED}}&lt;br /&gt;
|&lt;br /&gt;
| this version of the reaction is not used by dwarves at home in a fortress, but rather the wanderers of Adventure Mode.  When using this token, it will be allowed for adventurers of any race, without editing Entity files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_BONE_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [BONE] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_HORN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [HORN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_LEATHER_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [LEATHER] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PEARL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [PEARL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_PLANT_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must be subordinate to a PLANT object.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SHELL_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SHELL] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SILK_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SILK] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_SOAP_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [SOAP] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_STRAND_TISSUE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is made of a tissue having [TISSUE_SHAPE:STRANDS], intended for matching hair and wool. Must be used with [USE_BODY_COMPONENT].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_TOOTH_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [TOOTH] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|ANY_YARN_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have the [YARN] token.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|AUTOMATIC}}&lt;br /&gt;
|&lt;br /&gt;
| the reaction will be queued automatically if the reaction reagents are all present.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BAG}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has to be a bag. Intended to be used with an item type of BOX, to prevent chests, coffers, and other containers from being used instead.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDING}}&lt;br /&gt;
| &lt;br /&gt;
* Building name&lt;br /&gt;
* in-building reaction hotkey &lt;br /&gt;
| Sets the building that the reaction will be performed in, and the button used to queue the reaction once that building's menu is accessed in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|BUILDMAT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_ARTIFACT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent can be an Artifact.  Using [PRESERVE_REAGENT] with this is strongly advised.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_HOSPITAL_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[healthcare|hospital]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CAN_USE_LOCATION_RESERVED}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Allows the reagent to be an item that is otherwise reserved for use by a [[locations|location]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| Puts the reaction in a category. Categories are custom submenus for reaction menus. The category ID is a unique identifier for the category. It is only used in the raws, and will not appear in the game.&lt;br /&gt;
&lt;br /&gt;
If you're defining multiple categories within the same reaction - for example, if you intend the reaction to be nested two deep, and haven't yet defined the super-category - the ''last'' CATEGORY token within the reaction definition is the one that the reaction will appear in.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_NAME}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| The name of the category as displayed in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_DESCRIPTION}}{{version|0.42.01}}&lt;br /&gt;
| String &lt;br /&gt;
| If present, when the category is highlighted in a building menu, this string will be displayed in the Helpful Hint box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_PARENT}}{{version|0.42.01}}&lt;br /&gt;
| Category ID &lt;br /&gt;
| If present, this category will be a submenu of the indicated category, rather than a submenu of the reaction's building.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CATEGORY_KEY}}{{version|0.42.01}}&lt;br /&gt;
| [[interface.txt|Hotkey token]] &lt;br /&gt;
| If present, this category can be selected from its parent menu (whether a building or a parent category) using the given hotkey.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS}}&lt;br /&gt;
| required content&lt;br /&gt;
| Reagent is a container that holds the specified reagent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CONTAINS_LYE}} (Deprecated)&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must contain LYE. No longer used - instead, use one reagent for the LYE itself and another reagent with [CONTAINS:lye_reagent].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_ABSORB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must have [ABSORPTION:0]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|DOES_NOT_DETERMINE_PRODUCT_AMOUNT}}&lt;br /&gt;
|&lt;br /&gt;
| Performing a reaction with large [[stack]]s of inputs can allow multiple sets of outputs to be produced. Setting this flag causes the reagent to be ignored in this process - for example, with the reaction &amp;quot;1 plant + 1 barrel -&amp;gt; 5 alcohol (into barrel)&amp;quot;, using this on the barrel allows the reaction to be performed as &amp;quot;5 plant + 1 barrel -&amp;gt; 25 alcohol&amp;quot; instead of &amp;quot;5 plant + 5 barrel -&amp;gt; 25 alcohol&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|EMPTY}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a container, it must be empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FIRE_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be considered fire safe - i.e. not wood, and not coal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FORCE_EDGE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is given a sharp edge. Used for knapping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FOOD_STORAGE_CONTAINER}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be a barrel or any non-absorbing tool with [TOOL_USE:FOOD_STORAGE]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|FUEL}}&lt;br /&gt;
|&lt;br /&gt;
| Requires that the reaction either use up a unit of coal or charcoal or else be performed at a magma workshop&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|GLASS_MATERIAL}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material has [IS_GLASS].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_ITEM_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to MATERIAL_REACTION_PRODUCT, but requires the reagen'ts material to have a matching ITEM_REACTION_PRODUCT entry.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_MATERIAL_REACTION_PRODUCT}}&lt;br /&gt;
| PRODUCT_ID (custom)&lt;br /&gt;
| Similar to REACTION_CLASS, but requires the reagent's material to have a matching [[Material definition token|MATERIAL_REACTION_PRODUCT]] entry. Intended for reactions which transform one class of material into another, such as skin-&amp;gt;leather and fat-&amp;gt;tallow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_TOOL_USE}}&lt;br /&gt;
| Tool-use token&lt;br /&gt;
| Reagent must be a [[tool]] with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_WRITING_IMPROVEMENT}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Reagent must contain writing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|IMPROVEMENT}}&lt;br /&gt;
|&lt;br /&gt;
* Probability&lt;br /&gt;
* Reagent Name&lt;br /&gt;
* Improvement type&lt;br /&gt;
* Material Token&lt;br /&gt;
| Improvement types include BANDS, COVERED, GLAZED, RINGS_HANGING, and SPIKES&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAGMA_BUILD_SAFE}}&lt;br /&gt;
|&lt;br /&gt;
| Currently broken - behaves exactly the same as FIRE_BUILD_SAFE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MAX_MULTIPLIER}}{{version|0.42.01}}&lt;br /&gt;
| number&lt;br /&gt;
| Sets the maximum number of times a reaction is allowed to run when using stacked reagents. This can be used to ensure that the reaction doesn't repeat until the entire stack is depleted.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|METAL_ORE}}&lt;br /&gt;
|&lt;br /&gt;
* Inorganic material&lt;br /&gt;
| Reagent material must be an ore of the specified metal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|MIN_DIMENSION}}&lt;br /&gt;
|&lt;br /&gt;
* size&lt;br /&gt;
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, CLOTH, and GLOB items.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| name&lt;br /&gt;
| defines the name used by the reaction in-game&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NO_EDGE_ALLOWED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be sharpened (used for knapping).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HAS_EDGE}}{{version|0.42.01}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be sharpened (used for carving).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_CONTAIN_BARREL_ITEM}}&lt;br /&gt;
|&lt;br /&gt;
| If the reagent is a Barrel, it must not contain an item that has to reside in a barrel.  Barrel items appear to be lye and milk.  Alcohol appears to be covered as part of [EMPTY].  A reaction which places an item in a barrel should probably have both tags.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_ENGRAVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be an engraved memorial slab.&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_IMPROVED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent has not been decorated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NOT_WEB}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;collected&amp;quot; - used with THREAD:NONE to exclude webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|POTASHABLE}}&lt;br /&gt;
|&lt;br /&gt;
| Alias for CONTAINS_LYE.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRESERVE_REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT}}&lt;br /&gt;
|&lt;br /&gt;
*Probability of success (%)&lt;br /&gt;
*Quantity&lt;br /&gt;
*Item token:subtype&lt;br /&gt;
*Material token:subtype&lt;br /&gt;
| Defines a thing that comes out of the reaction. GET_MATERIAL_FROM_REAGENT and GET_ITEM_DATA_FROM_REAGENT can be used to defer the choice of material and/or item to the appropriate tag in a given reagent's material - the former comes in place of the material token, the latter replaces both the item and material tokens. See above for detailed information on how the hooks work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_DIMENSION}}&lt;br /&gt;
| size&lt;br /&gt;
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, DRINK, and GLOB.  A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PASTE}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PASTE state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_PRESSED}}&lt;br /&gt;
|&lt;br /&gt;
| Product is created in the SOLID_PRESSED state.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TO_CONTAINER}}&lt;br /&gt;
| Reagent ID&lt;br /&gt;
| Places the product in a container; &amp;lt;id&amp;gt; must be the name of a reagent with the PRESERVE_REAGENT token and a container item type.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|PRODUCT_TOKEN}}{{version|0.42.01}}&lt;br /&gt;
| name&lt;br /&gt;
| Allows the product to be referred to by the given name, for the purpose of being passed down as argument in other tokens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION}}&lt;br /&gt;
| Identifier&lt;br /&gt;
| defines a new reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REACTION_CLASS}}&lt;br /&gt;
| CLASS_ID (custom)&lt;br /&gt;
| Requires the reagent's material to have a matching [[Material definition token|REACTION_CLASS]] entry. Intended for reactions which accept a variety of materials but where the input material does not determine the output material, such as FLUX (for making pig iron and steel) and GYPSUM (for producing plaster powder).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|REAGENT}}&lt;br /&gt;
|&lt;br /&gt;
* name/id&lt;br /&gt;
* quantity&lt;br /&gt;
* [[item token]]&lt;br /&gt;
* [[material token]]&lt;br /&gt;
| Requires a given reagent as an input for a reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|SKILL}}&lt;br /&gt;
| Skill Token&lt;br /&gt;
| Skill used by the reaction&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|TRANSFER_ARTIFACT_STATUS}}{{version|0.42.01}}&lt;br /&gt;
| &lt;br /&gt;
| Transfers artifact status from the reagent to the product.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|UNROTTEN}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must not be rotten, mainly for organic materials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|USE_BODY_COMPONENT}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent material must come off a creature's body.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WEB_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent must be &amp;quot;undisturbed&amp;quot; - used with THREAD:NONE to gather webs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|WORTHLESS_STONE_ONLY}}&lt;br /&gt;
|&lt;br /&gt;
| Reagent is not made of an economic stone.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
[[ru:Reaction]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Item_definition_token&amp;diff=255289</id>
		<title>Item definition token</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Item_definition_token&amp;diff=255289"/>
		<updated>2020-10-11T17:15:10Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: ordered item types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Fine|07:17, 17 May 2015 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
'''Item definition tokens''' are used in item definitions in the raws.&lt;br /&gt;
&lt;br /&gt;
Item types:&lt;br /&gt;
* ITEM_AMMO - [[ammo token]]&lt;br /&gt;
* ITEM_ARMOR - [[Armor token|armor-type armor token]]&lt;br /&gt;
* ITEM_FOOD - see below&lt;br /&gt;
* ITEM_GLOVES - [[Armor token|gloves-type armor token]]&lt;br /&gt;
* ITEM_HELM - [[Armor token|helm-type armor token]]&lt;br /&gt;
* ITEM_INSTRUMENT - [[instrument token]]&lt;br /&gt;
* ITEM_PANTS - [[Armor token|pants-type armor token]]&lt;br /&gt;
* ITEM_SHIELD - [[Armor token|shield-type armor token]]&lt;br /&gt;
* ITEM_SHOES - [[Armor token|shoes-type armor token]]&lt;br /&gt;
* ITEM_SIEGEAMMO - see below&lt;br /&gt;
* ITEM_TOOL - [[tool token]]&lt;br /&gt;
* ITEM_TOY - see below&lt;br /&gt;
* ITEM_TRAPCOMP - [[trap component token]]&lt;br /&gt;
* ITEM_WEAPON - [[weapon token]]&lt;br /&gt;
&lt;br /&gt;
==Toy Tokens==&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| singular:plural&lt;br /&gt;
| What this item will be called in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|HARD_MAT}}&lt;br /&gt;
| &lt;br /&gt;
| Presumably prevents the item from being made from cloth, silk, or leather, present on everything but puzzleboxes and drums. Appears to work backwards for [[strange mood]]s.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Siege Ammo Tokens==&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| singular:plural&lt;br /&gt;
| What this item will be called in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|CLASS}}&lt;br /&gt;
| &lt;br /&gt;
| Specifies what type of siege engine uses this ammunition. Currently, only BALLISTA is permitted.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Food Tokens==&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
|- bgcolor=&amp;quot;#ddd&amp;quot;&lt;br /&gt;
! Token&lt;br /&gt;
! Arguments&lt;br /&gt;
! Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|NAME}}&lt;br /&gt;
| singular:plural&lt;br /&gt;
| What this item will be called in-game.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| {{text anchor|LEVEL}}&lt;br /&gt;
| &lt;br /&gt;
| Specifies the number of ingredients that are used in this type of prepared meal - 2 for Easy, 3 for Fine, 4 for Lavish. Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Tokens}}&lt;br /&gt;
&lt;br /&gt;
[[ru:Item definition token]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utilities&amp;diff=255116</id>
		<title>Utilities</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utilities&amp;diff=255116"/>
		<updated>2020-09-30T22:11:14Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added DF Storyteller&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Masterwork|13:28, 28 September 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Utilities''' are third-party applications useful for ''Dwarf Fortress'' players and modders, and this page serves as a list of them. ''Dwarf Fortress'' is a difficult game to play, and any help that can be had in the task is welcome help. This page lists utilities useful for modders and players alike. If you would like to add an article on a ''specific'' game utility to the wiki, please do so under the &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://dwarffortresswiki.org/index.php?title=Special%3AAllPages&amp;amp;from=&amp;amp;to=&amp;amp;namespace=102 Utility]&amp;lt;/span&amp;gt; namespace. Not included on this page: [[Main:Tileset repository|tileset repositories]] and [[Main:Graphics set repository|graphics set repositories]], due to having been given their own, separate pages. [[Modding|Mods]] have also been listed under their own &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://dwarffortresswiki.org/index.php?title=Special%3AAllPages&amp;amp;from=&amp;amp;to=&amp;amp;namespace=104 Modification] namespace. To avoid namespace clutter, websites ''are'' considered utilities, though they really aren't, and have been included.&lt;br /&gt;
&lt;br /&gt;
A [http://www.bay12forums.com/smf/index.php?board=29.0 subsection of the Bay12 forums] is devoted to such third-party programs, and contains development threads for most of them.&lt;br /&gt;
&lt;br /&gt;
The [[Utilities#Lazy Newb Pack|Lazy Newb Pack]] is an effort to make ''Dwarf Fortress'' more accessible for new players by bundling and configuring utilities, graphics and tilesets, and extras such as reference material or more intuitive controls.  &lt;br /&gt;
&lt;br /&gt;
==Launchers==&lt;br /&gt;
&lt;br /&gt;
=== [[Utility:Lazy_Newb_Pack|Lazy Newb Pack]] ===&lt;br /&gt;
&amp;lt;gallery widths=90px heights=150px&amp;gt;&lt;br /&gt;
File:Lnp-gui1.png|The original LNP launcher, options tab&lt;br /&gt;
File:Lnp-gui2.png|The graphics tab&lt;br /&gt;
File:Lnp-gui3.png|The utilities tab&lt;br /&gt;
File:Lnp-gui5.png|The advanced tab&lt;br /&gt;
File:lnp-dfhack.png|The DFHack tab&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
A commonly-used software bundle with a nice launcher. Allows you to start playing DF really quickly on a new machine - no need to download and integrate [[Graphics set repository|tilesets]] and tools like Dwarf Therapist, SoundSense, etc. - or even know what you need to get.  The newer packs also include many third-party fixes for common bugs, which work automatically, and a large number of significant user interface improvements.  The launcher makes changing settings or graphics options much easier (press button, instead of editing files) and can even remember to launch selected utilities whenever you open a game of ''Dwarf Fortress''.  See the [[Utility:Lazy_Newb_Pack|Lazy Newb Pack]] page for more information, or the forum thread for your platform. &lt;br /&gt;
&lt;br /&gt;
*[http://www.bay12forums.com/smf/index.php?topic=126076 PeridexisErrant's Starter Pack] (Windows)&lt;br /&gt;
*[http://www.bay12forums.com/smf/index.php?topic=128960 MacNewbie Pack] (OS X)&lt;br /&gt;
*[http://www.bay12forums.com/smf/index.php?topic=156011 Unofficial Linux LNP] (Linux)&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=140808 PyLNP] ===&lt;br /&gt;
A cross-platform LNP port, written in Python.  The launcher and configuration interface for all of the Lazy Newb Packs.  PyLNP is under active development for bugfixes, addition of features pioneered by other launchers, and creation of entirely new features - such as rebuilding the raws of modded saves to change graphics packs.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=102316 Manila Launcher] ===&lt;br /&gt;
A Java interface that allows easy option toggling, update and devlog checking, and tileset, mod and color scheme switching.  Designed for players who prefer vanilla DF to a bundle like the above.&lt;br /&gt;
&lt;br /&gt;
== 3D Visualizers ==&lt;br /&gt;
&lt;br /&gt;
=== [[Utility:Stonesense|Stonesense]] ===&lt;br /&gt;
Stonesense is a third party visualizer, implemented as a [[Utility:DFHack|DFHack]] plugin, that lets you view your fortress in a classic isometric perspective. It runs alongside ''Dwarf Fortress'', and can follow the main game's view, updating in real-time. It is included in DFHack, and can be opened by typing &amp;lt;code&amp;gt;stonesense&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ssense&amp;lt;/code&amp;gt; into the console window.&lt;br /&gt;
[[File:stonesense_prev.jpg|frameless|250px|none]]&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=63484 Fortress Overseer] ===&lt;br /&gt;
Fortress Overseer is the only 3D visualizer supporting v0.31. It has been completely rewritten and is currently updated to support v0.34.11 and v0.31.25. Overseer works indirectly, by using [[Utility:DFHack|DFHack]]'s &amp;lt;code&amp;gt;mapexport&amp;lt;/code&amp;gt; to export a file which can then be rendered in 3D.  DirectX 9 must be installed, though this requirement is not documented. Has not been tested for 0.40.13.&lt;br /&gt;
[[File:fortress_viewer.jpg|frameless|250px|none]]&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=146473.0 Armok Vision] ===&lt;br /&gt;
Armok Vision is a 3D real-time visualizer using Unity for version 0.40.24. It works as a separate program communicating with the game through fast network interfaces.&lt;br /&gt;
[[File:armok_vision.png|frameless|250px|none]]&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=70700.0 Isoworld] ===&lt;br /&gt;
Isoworld is an isometric world map viewer, which can display each of the detailed maps exported from [[Legends mode]]. It also has a pictographic view which makes finding waterfalls easy.  &lt;br /&gt;
&lt;br /&gt;
Isoworld can link with [[Utility:DFHack|DFHack]] to display a game view at full spatial resolution in wider context, including tracking the player's view.  This is particularly useful for adventure mode.&lt;br /&gt;
[[File:isoworld_prev.png|thumb|240px|none|Looks nostalgic.]]&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=159578.0 Voxel Fortress] ===&lt;br /&gt;
Voxel Fortress is a converter from DF worlds to a voxel format. It takes an export of one of the two elevation maps (for the voxels coordinates), and any other one (for the colors).&lt;br /&gt;
The map is saved in .xraw format. An additional utility (e.g. [https://ephtracy.github.io/index.html?page=mv_renderer MagicaVoxel Viewer]) is required to see the voxel representation of the map.&lt;br /&gt;
&lt;br /&gt;
[[File:voxel_prev.png|frameless|250px|none]]&lt;br /&gt;
&lt;br /&gt;
== Music and Sounds ==&lt;br /&gt;
&lt;br /&gt;
=== [[Utility:SoundSense|SoundSense]] ===&lt;br /&gt;
[[File:soundsense_prev.png|thumb|100px|right|Soundsense]]SoundSense is a tool that parses game logs and reacts to game events with sound effects, incidental music and dwarfy comments.  You can look it up on the [http://www.bay12forums.com/smf/index.php?topic=60287 forum thread], or directly download it at [http://df.zweistein.cz/soundsense/ the SoundSense homepage]. Due to it being written in Java, Soundsense is portable to all platforms.&lt;br /&gt;
&lt;br /&gt;
Due to development having slowed down, a [https://github.com/calmhorizons/soundsense fork] was released that most notably disables the broken auto-updater and adds the option to minimize Soundsense to the system tray.&lt;br /&gt;
&lt;br /&gt;
Note that older Soundsense users may have different default seasonal soundtracks, which were removed and replaced in early 2011. These are available [http://www.krauselabs.net/dump/music.zip here].&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=159567.0 SoundCenSe] ===&lt;br /&gt;
&lt;br /&gt;
[[File:soundCenSe_prev.png|thumb|100px|right|SoundCenSe]]A C# port of SoundSense, it uses the existing sound pack files and XML's present in SoundSense, but with some added enhancements. More information regarding what specific type of enhancements and how to install SoundCenSe can be gathered at the [http://www.bay12forums.com/smf/index.php?topic=159567.0 official forum thread]. If problems emerge while trying to get SoundSense to work with the latest versions of Java, this port may prove to be a useful alternative.&lt;br /&gt;
&lt;br /&gt;
Downloads for the windows and linux binaries are available [https://github.com/Algorithman/SoundCenSe/releases here], while code releases can be obtained from the [https://github.com/Algorithman/SoundCenSe GitHub site].&lt;br /&gt;
&lt;br /&gt;
== Game manipulation tools ==&lt;br /&gt;
&lt;br /&gt;
===[[Utility:DFHack|DFHack]]===&lt;br /&gt;
&lt;br /&gt;
[[Utility:DFHack|DFHack]] is an advanced ''Dwarf Fortress'' memory access library and a set of tools and scripts using this library, providing direct object-oriented access to Dwarf Fortress's internals as if it were compiled into the game itself. Runs on Windows, Linux, and OS X.  The standard configuration enables a variety of included bugfixes and interface upgrades, and provides many useful tools such as &amp;quot;clean all&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
DFHack has an [http://www.bay12forums.com/smf/index.php?topic=164123 official forum thread].  Code is available from the [https://github.com/DFHack/dfhack GitHub site], along with [https://github.com/DFHack/dfhack/releases releases].&lt;br /&gt;
&lt;br /&gt;
Falconne's UI plugins are included in DFHack, as are automation tools Autolabor, Workflow, Autobutcher, and many others.&lt;br /&gt;
&lt;br /&gt;
[[File:dfhack_cmd.png|thumb|240px|none|DFHack's console.]] &lt;br /&gt;
&lt;br /&gt;
==== User Interface Plugins ====&lt;br /&gt;
A collection of DFHack plugins by Falconne that improve the in-game interface with features such as:&lt;br /&gt;
* Search function in screens with big lists.&lt;br /&gt;
* Ability to place furniture before it's built and have it automatically allocated when available.&lt;br /&gt;
* Ability to place constructions with box select (like laying designations), including easier material selection and open space placement (without having to wait till adjacent constructions are built).&lt;br /&gt;
* Easier pasturing, live happiness monitor, mouse support, stocks dashboard.&lt;br /&gt;
&lt;br /&gt;
==== Binary patches ====&lt;br /&gt;
Binary patches are utilities made by users to fix known bugs that haven't been addressed by [[main:Toady One|Toady One]] yet. DF2014 is in active development, so there are no binary patches yet.&lt;br /&gt;
&lt;br /&gt;
==== Feature plugins ====&lt;br /&gt;
These plugins add features to the game.&lt;br /&gt;
* [http://www.bay12forums.com/smf/index.php?topic=127116 Digging invaders], a plugin that allows hostiles to dig and deconstruct walls to path to one's fortress.&lt;br /&gt;
* [http://www.bay12forums.com/smf/index.php?topic=128487 Rendermax], a plugin that implements a lighting system at the graphics level.&lt;br /&gt;
* [http://www.bay12forums.com/smf/index.php?topic=136155 Dwarven Emigration], a script that allows unhappy dwarves to emigrate with their families.&lt;br /&gt;
&lt;br /&gt;
==== Interaction plugins ====&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=135597 DFHack scripts designed for modders to use as &amp;quot;spells&amp;quot;] (not in standard package)&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous plugins ====&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=135506 DFHack script collection] (not in standard package)&lt;br /&gt;
&lt;br /&gt;
=== remotefortressreader ===&lt;br /&gt;
&lt;br /&gt;
A critical internal DFHack plugin, [https://github.com/DFHack/dfhack/tree/develop/plugins/remotefortressreader developed within the same repository].  It provides a protobuf-based (currently v2.4.1) RPC connection to the game, enabling remote clients like Armok Vision.  The service listens on &amp;lt;code&amp;gt;127.0.0.1:5000&amp;lt;/code&amp;gt; (configurable within &amp;lt;code&amp;gt;dfhack-config/remote-server.json&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Currently there are no change-based or change-driven notifications, so remote fortress clients must perform the expensive operation of polling the desired volume every frame (via e.g. &amp;lt;code&amp;gt;GetBlockList&amp;lt;/code&amp;gt;).  Additionally, the sidebar menu state is shared with the native view, to avoid reimplementing construction material dependencies.&lt;br /&gt;
&lt;br /&gt;
==Dwarf Therapist==&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=168411.0 Dwarf Therapist]===&lt;br /&gt;
Dwarf Therapist gives you an advanced GUI to manage and check dwarf job allocations, military assignments, statistics (such as attributes, personality traits and happiness), sort dwarves by various criteria (e.g. profession, migration wave, happiness, number of assigned jobs etc.) and generally manage the Dwarven Resources of your fortress in a very convenient way. This version contains the &amp;quot;labor optimizer&amp;quot; semi-automatic labor management system. &lt;br /&gt;
&lt;br /&gt;
Splinterz' fork of Dwarf Therapist is the currently updated version, and available for Windows, Mac and GNU + Linux.  Besides the Bay12 forum thread, there's more information on the [https://github.com/Dwarf-Therapist/Dwarf-Therapist GitHub project page].&lt;br /&gt;
&lt;br /&gt;
See the [http://www.bay12forums.com/smf/index.php?topic=168411.0 forum thread] for current downloads.&lt;br /&gt;
&lt;br /&gt;
[[File:dwarf_therapist.png|thumb|280px|none]]&lt;br /&gt;
&lt;br /&gt;
====[[Utility:Dwarf Therapist/Addons Repository|Dwarf Therapist Addons Repository]]====&lt;br /&gt;
&lt;br /&gt;
A collection of customizations for Dwarf Therapist submitted by the community.&lt;br /&gt;
&lt;br /&gt;
Addons include:&lt;br /&gt;
&lt;br /&gt;
* custom professions&lt;br /&gt;
* custom roles&lt;br /&gt;
* optimization plans&lt;br /&gt;
* filter scripts&lt;br /&gt;
* new grid views&lt;br /&gt;
&lt;br /&gt;
== Fortress layout tools ==&lt;br /&gt;
&amp;lt;strike&amp;gt;=== [http://www.bay12forums.com/smf/index.php?topic=87731 DF Designator] ===&lt;br /&gt;
DF Designator helps you build fortresses from either image files or Quickfort .CSV files. It also has a user interface that allows you to assign hotkeys to blueprints and to combine blueprints in multi z-level designs. Windows, Mac and Linux versions are available.  DF Designator uses 'typewriter style' playback, and is thus very slow for large projects.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/joelpt/quickfort Quickfort] ===&lt;br /&gt;
Quickfort is a utility for ''Dwarf Fortress'' that helps you build fortresses from &amp;quot;blueprint&amp;quot; .CSV files (comma separated values). These files are easily created and edited in an app like Excel. Most building-oriented DF commands are supported through the use of multiple .CSV files to describe the different phases of DF construction (designation, building, stockpiles, and making adjustments. Recent versions of Quickfort work by converting the blueprint into a native macro for ''Dwarf Fortress'', then executing the macro.  This allows for enormously faster playback compared to early versions or DF Designator.&lt;br /&gt;
&lt;br /&gt;
====[https://www.mediafire.com/folder/u38qsqr1bq6wu/Community_Quickfort_Blueprints_v2 Quickfort Community Blueprints]====&lt;br /&gt;
&lt;br /&gt;
A large collection of blueprints, published to remove the last hint of hassle in creating a fortress.  You can download the lot without a paid account [http://www.mediafire.com/download/n6im1ok6z02n8nc/Community_Quickfort_Blueprints_v2.zip here].&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=55025 ChromaFort]===&lt;br /&gt;
Chromafort is a tool designed to complement [[Utilities#Quickfort|Quickfort]], by converting images into quickfort-compatible .csv files.  It works with 24-bit bitmap (.bmp) files.  There are a number of known issues that can affect any image that is not square, and the size must be an exponent of two (8, 16, 32, 64...); other images may show nonexistent colours and/or come out highly distorted.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=138590 Picturefort]===&lt;br /&gt;
Picturefort is an attempt to make &amp;quot;Chromafort, but ''better''&amp;quot; - it performs the same function of converting an image to a [[Utilities#Quickfort|Quickfort]]-compatible .csv file.  Unlike Chromafort, Picturefort can handle a large number of image formats (though .bmp or .png are recommended); images can be of any shape and within reason size; and while as of May 2014 it is only available on Windows, there are plans for a Linux version.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=154849.0 Symmetricity]===&lt;br /&gt;
A fortress planner with a focus on multiple planes of symmetry. It can output csv for quickfort. It's early in development so it's probably not suitable for serious use cases.&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=140853.0 Rubble]===&lt;br /&gt;
&lt;br /&gt;
A useful plugin-based modding tool that generates raws and supports easy installation of reactions, tilesets, macros, modding fixes and DFHack scripts. It is a fork of the now abandoned [http://www.bay12forums.com/smf/index.php?topic=125997.0 Blast]. Binaries are available for Linux 32-bits, OS X 32-bits and Windows 64-bits, as well as the source (written in Go with building instructions). As of 4.0, a GUI is available for Windows.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=150857.0 PyDwarf] ===&lt;br /&gt;
&lt;br /&gt;
For players, PyDwarf is an easy way to manage and configure preferred mods in a way that avoids almost entirely the problems of outdated mods or incompatible groups of mods. For modders, PyDwarf's mod manager exposes a powerful Python API for interacting with raws and other data files.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=103360 Raw Explorer] ===&lt;br /&gt;
A tree-based raw files browser, editor and manager.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=174431.0 Dwarf_RAW] ===&lt;br /&gt;
A GUI for editing raw files, updated 2019.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=140645.0 Dwarf Fortress real-life material helper] ===&lt;br /&gt;
A Python script that generates raws based on custom real-life material values.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=140688.0 Roses' Random Creature Script] ===&lt;br /&gt;
A Python script that generates random creature raws.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=175695.0 DF duplisearch] ===&lt;br /&gt;
A Python script/.exe file that checks your raws folder for duplicated objects.&lt;br /&gt;
&lt;br /&gt;
== World Map / World Gen Tools ==&lt;br /&gt;
=== [http://dffd.wimbli.com/file.php?id=2354 Perfect World DF] ===&lt;br /&gt;
Requires an additional (tiny) download to be functional for current versions (40.#): [http://dffd.wimbli.com/file.php?id=8756 WorldGen.xml] .  Easy access to world settings for quick modification to allow highly customized world generation far easier and faster than DF's ingame advanced map maker.  [http://www.bay12forums.com/smf/index.php?topic=57428.0 forum thread]&lt;br /&gt;
&lt;br /&gt;
=== [http://pastebin.com/jdVKPzpt Fortress World Generator] ===&lt;br /&gt;
A bash script for automating world generation of large numbers of worlds on GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=73095 Dwarf Map Maker] ===&lt;br /&gt;
A Photoshop action script which turns legends mode exported maps into a much prettier fantasy map.  There is also a version available [http://www.bay12forums.com/smf/index.php?topic=73095.msg2261106#msg2261106 for GIMP].&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=137076.msg5085575#msg5085575 Satellite Map Maker] ===&lt;br /&gt;
A GIMP script based on the Dwarf Map Maker that creates a satellite image of ''Dwarf Fortress'' world maps.&lt;br /&gt;
&lt;br /&gt;
==Legends tools==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=72702 Legends Viewer] ===&lt;br /&gt;
&amp;lt;gallery widths=200px&amp;gt;&lt;br /&gt;
File:legends_prev.png|Historical Figures view&lt;br /&gt;
File:legends_prev2.png|Infrastructure view&lt;br /&gt;
File:legends_prev3.png|Other/Eras view&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=154617 Unofficial Branch for 0.47.XX version of DF]&lt;br /&gt;
&lt;br /&gt;
Legends Viewer loads up the legends you can export in a much more usable format than the [[Legends mode]] of DF itself.  Legends Viewer can open pages in new tabs, filter information on a wide range of criteria, and display information on the map as well. Binaries are only available for Windows, as well as the source (written in C#).&lt;br /&gt;
&lt;br /&gt;
It takes four files as input:  the legends XML file, the sites and pops text, world history text, and a map image.  It can load these separately, but it is recommended to load them as a single compressed archive (folder) - the XML can be multiple GB uncompressed for long histories, and reduce to less than 5% of its size.  &lt;br /&gt;
&lt;br /&gt;
If you have played a fortress and then exported legends, you may get an error about unreadable HEX characters.  This is caused by Workflow, which saves its settings as unreadable historical figures.  There are several ways to fix this: &lt;br /&gt;
* Clear the workflow settings in fortress mode before exporting legends&lt;br /&gt;
* Edit the XML by hand, [http://www.bay12forums.com/smf/index.php?topic=72702.msg4629392#msg4629392 as described here] (any platform)&lt;br /&gt;
* Use the [http://www.bay12forums.com/smf/index.php?topic=131307 Legends Processing script] (windows only), which fixes the XML and also creates a compressed folder as described above&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=128932.0 World Viewer] ===&lt;br /&gt;
[[File:world_viewer_prev.png|thumb|200px|none|&amp;quot;Race&amp;quot; tab view]]&lt;br /&gt;
An alternative to Legends Viewer that most specifically features a timeline of historical events. Binaries are only available for Windows, as well as the source (written in C#).&lt;br /&gt;
&lt;br /&gt;
=== [http://www.uristmaps.org Uristmaps] ===&lt;br /&gt;
[[File:uristmaps_prev.png|thumb|200px|none|Zoomed-in area of a map view.]]&lt;br /&gt;
A web-based interface that displays worlds in the way of an interactive map complete with features and structures.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=155307.0 LegendsBrowser] ===&lt;br /&gt;
[[File:legendsbrowser.png|thumb|200px|none|Civilizations view]]&lt;br /&gt;
A web-based multi-platform (Win, Linux, OSX) Viewer. It displays an interactive map and legends information (using legends_plus.xml generated via DFHack).&lt;br /&gt;
&lt;br /&gt;
=== [https://dfstoryteller.com/ DF Storyteller] ===&lt;br /&gt;
&amp;lt;gallery widths=200px&amp;gt;&lt;br /&gt;
File:DF_Storyteller_Logo.svg|DF Storyteller Logo&lt;br /&gt;
File:DF_Storyteller_explain_workings.png|Explains how DF Storyteller works&lt;br /&gt;
File:The_Bard_historical_figure_screenshot.png|Screenshot of Historical Figure in The Bard visualizer&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Dwarf Fortress Storyteller (DF Storyteller, DF ST) is an application that parses Dwarf Fortress legends files, stores them internally and makes them queryable using API's. (Cross platform: Windows, Linux, macOS)&lt;br /&gt;
This utility can be used to easily create new visualizers to view the legends data. A list of visualizers can be found [https://gitlab.com/df_storyteller/df-storyteller/-/blob/master/docs/paintings.md here].&lt;br /&gt;
An example of a visualizer is [https://gitlab.com/df_storyteller/the-bard The Bard] created in DF ST.&lt;br /&gt;
&lt;br /&gt;
== Remote playing tools ==&lt;br /&gt;
&lt;br /&gt;
=== [[Utility:Dfterm3|Dfterm3]]===&lt;br /&gt;
&lt;br /&gt;
[[Utility:Dfterm3|Dfterm3]] is a remote ''Dwarf Fortress''-playing software for multiple users through a web interface. DFterm3 enables play through a web interface, and games can also be viewed on mobile - or even played if a bluetooth keyboard is attached.  The web interface should work with Chrome or Firefox browsers, but there are known problems using Internet Explorer. DFTerm3 functions via a DFHack plugin, and is thus dependent on each version of DFHack.&lt;br /&gt;
&lt;br /&gt;
It is a successor to [[Utility:dfterm2|dfterm2]], which functions similarly using telnet instead of a web browser. This utility only works with version 0.34.11 or earlier.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=139167.0 Webfort] ===&lt;br /&gt;
[[File:webfortress.png|thumb|200px|none|Playable in Mac browser.]]&lt;br /&gt;
A newer alternative to dfterm3 that functions similarly, but players must wait in a queue before assuming control for a given period of time. It also functions via a DFHack plugin. Binaries are available for Windows, as well as the source (written in C++).  ''(Note: [https://github.com/mifki/df-webfort main repo] unmaintained.  [https://github.com/Ankoku/df-webfort New repo] last updated 5/22/2015.)''&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=140892.0 DorfServer] ===&lt;br /&gt;
[[File:dorfserver.png|thumb|200px|none|Like Twitch, without Twitch.]]&lt;br /&gt;
A remote SSH-based ''Dwarf Fortress'' host software.  ([http://www.bay12forums.com/smf/index.php?topic=140892.0 repo])&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=139975.0 DFEverywhere] ===&lt;br /&gt;
&lt;br /&gt;
A utility that connects a locally-run ''Dwarf Fortress'' instance to a proprietary remote website, allowing remote browser-based play. ''(Note: Main website no longer available.  [https://github.com/tpainter/df_everywhere Client source here.])''&lt;br /&gt;
&lt;br /&gt;
=== [http://mifki.com/df Dwarf Fortress Remote] ===&lt;br /&gt;
&lt;br /&gt;
iOS app (paid) that allows one to play ''Dwarf Fortress'' remotely with native UI. A server can be set up at home, or on DigitalOcean, AWS or other hosting service.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=176070.msg DFPlex ] ===&lt;br /&gt;
&lt;br /&gt;
DFPlex is a plugin for DFHack which introduces simultaneous, real-time online co-op to fortress mode: each player has their own independent view, cursor, menus, etc. so nobody has to wrestle for control. It's a fork of webfort, so players join just by connecting from their web browser.&lt;br /&gt;
&lt;br /&gt;
==Language tools==&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=47332.0 DFLang]===&lt;br /&gt;
A language creating tool.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=136098.0 Toadese Language Utility]===&lt;br /&gt;
A language editing and translating tool.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=140432.0 DFlangOpt]===&lt;br /&gt;
A little tool meant to prevent redundancy when importing or updating language files.&lt;br /&gt;
&lt;br /&gt;
===[http://dffd.wimbli.com/file.php?id=8288 Python language extraction and injection script]===&lt;br /&gt;
This simple script will extract words from language files and put them a word per line, for easy automatic translation or treatment. It can also read that list and put the translated words back in their place.&lt;br /&gt;
&lt;br /&gt;
==Announcement tools==&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=130590 DFMon] ===&lt;br /&gt;
&lt;br /&gt;
An announcement monitoring/filtering program, useful to hide some types of job cancellation spam or other more advanced filtering. Note that you can set the game to announce no job cancellations ''without'' any utilities or mods from the {{k|o}}rders menu, with {{k|x}}.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=130030 DF Announcement Filter]===&lt;br /&gt;
&lt;br /&gt;
An alternative to DFMon written in Java (and thus portable to Linux and OS X).&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=153777 Announcement Window+]===&lt;br /&gt;
&lt;br /&gt;
Announcement Window+ is a Python application that interfaces with ''Dwarf Fortress'' to print announcements and combat reports to a separate window. It was written to fix some annoying bugs that are present in DF Announcement Filter, which is no longer being updated.&lt;br /&gt;
&lt;br /&gt;
[[File:announce+_prev.png|thumb|300px|none|One less game-pausing hotkey.]]&lt;br /&gt;
&lt;br /&gt;
==Filesharing websites==&lt;br /&gt;
&lt;br /&gt;
=== [http://dffd.wimbli.com/ Dwarf Fortress File Depot] ===&lt;br /&gt;
The Dwarf Fortress File Upload Service - an excellent place to store mods, community games, tilesets and other files. Courtesy of [[User:Janus|Janus]]; for files related to Dwarf Fortress only.&lt;br /&gt;
&lt;br /&gt;
=== [http://mkv25.net/dfma/ Dwarf Fortress Map Archive] ===&lt;br /&gt;
{{main|Utility:Dwarf Fortress Map Archive}}&lt;br /&gt;
&lt;br /&gt;
The Dwarf Fortress Map Archive is a large collection of user-submitted maps and videos and a nice flash viewer for perusing them. Maps are uploaded, stored, and downloaded in a special compressed format created by the DF Map Compressor; videos are stored in a compressed version of Toady One's own video-recording format.&lt;br /&gt;
&lt;br /&gt;
Read more about the [[User:Markavian/DF_Map_Archive|DF Map Archive]] on Markavian's User page.&lt;br /&gt;
&lt;br /&gt;
== Other/miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== [http://shadowlord13.googlepages.com/dfmap-index.html DF Map Compressor] ===&lt;br /&gt;
[[File:dfmapcomp.png|thumb|200px|none|Main program window.]]&lt;br /&gt;
The DF Map Compressor encodes multiple bitmaps exported from ''Dwarf Fortress'' into a single, very compressed, .fdf-map file. The fdf-map file can then be shared with your friends by uploading to the DF Map Archive that features an online viewer (written in Flash).&lt;br /&gt;
&lt;br /&gt;
=== [http://www.mindwerks.net/projects/exita/ Exita] ===&lt;br /&gt;
Exita is a Python program that takes your DF world map exports and dump them into several different text outputs.&lt;br /&gt;
&lt;br /&gt;
===[http://www.bay12forums.com/smf/index.php?topic=132153.0 DwarfFamily]===&lt;br /&gt;
A tool that lets you import your legends XML file and converts all dwarf entries to a .GED file, which you can use in Family Tree programs like MyHeritage to display a family tree for the dwarves.&lt;br /&gt;
&lt;br /&gt;
===[https://www.dropbox.com/s/dea50wrs557w283/kobold.py Kobold name generator]===&lt;br /&gt;
A Python script that generates random names in the way of kobold utterances&lt;br /&gt;
&lt;br /&gt;
=== [http://www.bay12forums.com/smf/index.php?topic=717.0 CMVPlayer] === &lt;br /&gt;
&lt;br /&gt;
First released by Jifodus in April 2007. This application enables playback of the DF movies (.cmv) without starting DF. It also provides some more functionalities, such as:&lt;br /&gt;
* Rewind&lt;br /&gt;
* Pause&lt;br /&gt;
* Play frame per frame&lt;br /&gt;
&lt;br /&gt;
To use, simply unzip the file, and drop and drag the movie on CMVPlayer.exe. ''(Note: Main website is no longer available.)''&lt;br /&gt;
&lt;br /&gt;
===[https://play.google.com/store/apps/details?id=dae.dfnews Dwarf Fortress News - Android App]===&lt;br /&gt;
Watches the ''Dwarf Fortress'' devblog. Receives Push Notifications on new updates.&lt;br /&gt;
&lt;br /&gt;
{{Category|Modding}}&lt;br /&gt;
{{Category|Community}}&lt;br /&gt;
[[ru:Utilities]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=File:The_Bard_historical_figure_screenshot.png&amp;diff=255114</id>
		<title>File:The Bard historical figure screenshot.png</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=File:The_Bard_historical_figure_screenshot.png&amp;diff=255114"/>
		<updated>2020-09-30T22:05:32Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: A Screenshot of [https://gitlab.com/df_storyteller/the-bard The Bard], a visualizer created using DF Storyteller.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A Screenshot of [https://gitlab.com/df_storyteller/the-bard The Bard], a visualizer created using DF Storyteller.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|cc-by-sa-3.0}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=File:DF_Storyteller_Logo.svg&amp;diff=255113</id>
		<title>File:DF Storyteller Logo.svg</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=File:DF_Storyteller_Logo.svg&amp;diff=255113"/>
		<updated>2020-09-30T22:01:49Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Logo of DF Storyteller&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Logo of DF Storyteller&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|cc-by-sa-3.0}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=File:DF_Storyteller_explain_workings.png&amp;diff=255112</id>
		<title>File:DF Storyteller explain workings.png</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=File:DF_Storyteller_explain_workings.png&amp;diff=255112"/>
		<updated>2020-09-30T22:00:09Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Explains how DF Storyteller works&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Explains how DF Storyteller works&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{self|cc-by-sa-3.0}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Legends&amp;diff=253867</id>
		<title>Legends</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Legends&amp;diff=253867"/>
		<updated>2020-07-12T19:52:17Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added new map types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{Quality|Exceptional|06:48, 6 October 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Legends''' mode is one of the three main methods of interacting with an already-generated [[World generation|world]]. You cannot start Legends mode (or [[Dwarf fortress mode|Fortress]] or [[Adventurer mode|Adventurer]] mode) until you create a new world. &lt;br /&gt;
&lt;br /&gt;
Legends mode allows you to inspect the history of a world. Many players choose to design a world where the option '''Reveal all history''' is set to YES. However, if you set the option to NO, then the vast majority of the world's history will be hidden from Legends mode, and only uncovered by brave adventurers. In fact, there are many ways for an adventurer to uncover the past. Talk to people in civilized sites and they will tell you of their families, surroundings and local history. Past events can also be found by viewing [[coins]] or items with images, or by visiting abandoned [[fortress]]es and viewing the [[engraving|engraved]] tiles within.&lt;br /&gt;
&lt;br /&gt;
You don't ''have'' to have an adventure or fortress game active in order to use legends mode. Some players simply enjoy legends mode for the option of looking at the interactive historical map, or to read about the last time their favorite kingdom went to war, or for the ability to export lists of all the sites and governments active in the world.  &lt;br /&gt;
&lt;br /&gt;
==Legends information==&lt;br /&gt;
&lt;br /&gt;
=== Number of Events Undiscovered ===&lt;br /&gt;
A self-explanatory number indicating how many &amp;quot;legends&amp;quot; are still lost in the mists of time. If you chose to reveal all history during world generation, the number displayed should be 0. Otherwise, better get out there and adventure some more.&lt;br /&gt;
&lt;br /&gt;
=== Historical Figures ===&lt;br /&gt;
The number to the right indicates how many [[historical figure]]s exist in this world's history. Historical figures include entries on [[megabeast]]s, [[forgotten beast]]s, [[demon]]s, [[deity|gods]], [[Dwarf|dwarves]], [[human]]s, [[goblin]]s, [[kobold]]s, and named [[creature]]s.&lt;br /&gt;
&lt;br /&gt;
=== Sites ===&lt;br /&gt;
The number to the right indicates how many [[site]]s have existed throughout this world's history. [[Site]]s include things like [[town]]s, [[Tower (necromancy)|tower]]s, [[fortress]]es, [[forest retreat]]s, and [[cave]]s.&lt;br /&gt;
&lt;br /&gt;
=== Regions ===&lt;br /&gt;
A list of the various regions of the world, along with the various historical events that occurred within those regions.&lt;br /&gt;
&lt;br /&gt;
=== Civilizations and Entities ===&lt;br /&gt;
The number to the right indicates how many civilizations, local governments, and religions have existed throughout this world's history. The histories of these various groups can be viewed as well, detailing events like when a site was founded, when a person was kidnapped, or when a road was completed.&lt;br /&gt;
&lt;br /&gt;
=== Structures ===&lt;br /&gt;
Structures are buildings found throughout the world. Fortresses, towers, shops, taverns, temples and more can all be found in this list.  &lt;br /&gt;
Temples are the central location of [[religion]]s, and can be 'profaned' by historical figures, though it is not explained what this involves.&lt;br /&gt;
&lt;br /&gt;
=== Historical Map ===&lt;br /&gt;
The historical map is a relatively new and very cool feature of Legends mode. From here you can view the territorial disputes between different civilizations and entities, including those who were destroyed before your starting year. If you are new to ''Dwarf Fortress'', reading the map may be a little difficult, but play around with these buttons and you might get a better grasp of what you are seeing. Press {{k|Enter}} while looking at the map to change between the political and geographical view of the world. The geographic map is colored (blue seas, gray mountains, green forests etc.) while the political map's background is tan (think parchment) with colored fields corresponding to the territories of different civilizations. Civilizations can lay claim to the same area, causing the colored territory markers to overlap. You can also see how territories changes over time by moving 10 or 100 years forward and back through time. Pressing {{k|c}} while looking at the political map will show local government territories instead of civilizations, but that's generally a pretty messy scene.&lt;br /&gt;
&lt;br /&gt;
=== The Age of... ===&lt;br /&gt;
During world generation, the [[Calendar#Ages|Ages]] are named for the greatest powers extant in the world. Ages commonly advance during world generation (e.g. Age of Legends, Age of Heroes, Age of Humans) due to the death of megabeasts, and they sometimes even regress due to the creation of [[night creature]]s and the birth of new [[megabeast]]s. When you choose to look at the history of an [[Calendar#Ages|Age]], you will be given a list of all historical events in chronological order. Here you can read the battle reports from various wars, or the duels that took place between long dead champions, or the &amp;lt;s&amp;gt;burninations&amp;lt;/s&amp;gt; rampages of [[megabeast]]s amongst the [[peasant]]s.  See [[Calendar#Ages|here]] for a list of ages and their conditions.&lt;br /&gt;
&lt;br /&gt;
==Exporting information from Legends Mode==&lt;br /&gt;
&lt;br /&gt;
Legends mode has built-in tools to export lists of events, maps at various scales, and data such as locations of sites.  This is particularly useful as input data for the utilities described below; there are even tools to make this export process easier.  &lt;br /&gt;
&lt;br /&gt;
=== XML dump ===&lt;br /&gt;
&lt;br /&gt;
Once you've generated a world, you can dump much of the historical data into an XML file for external analysis. The XML dump currently doesn't include every detail of world history but it contains many of the important ones. Be warned that a large world with a thousand years of history can produce an XML dump up to a full gigabyte in size, which may prove unwieldy. Press {{k|x}} while in Legends mode to produce an XML dump (it will be placed in the root ''Dwarf Fortress'' directory and named the same as your game's save folder) See [[Main:XML dump|XML dump]] for information on the XML file's format.&lt;br /&gt;
&lt;br /&gt;
=== Export Map/Gen Information===&lt;br /&gt;
Another option is to export the map/gen information by pressing {{k|p}} in Legends mode. This produces three .txt files and one bitmap image that are placed in the root directory of ''Dwarf Fortress''.  The exported data files are named by the save file name, and the current world date:&lt;br /&gt;
# (save name)-world_gen_param.txt - contains the world generation settings. &lt;br /&gt;
# [[World History file|(save name)-(year)-(month)-(day)-world_history.txt]] - Includes some information about the deities, and rulers of the Human, Dwarven, Elven, and Goblin civilizations. &lt;br /&gt;
# [[World Sites file|(save name)-(year)-(month)-(day)-world_sites_and_pops.txt]]  - Lists the sites' population, owner, parent civilization and warlord. This one will also list all the animal populations above and below ground including demons.&lt;br /&gt;
# (save name)-(year)-(month)-(day)-world_map.bmp  - This is the full world map as it is shown on the embark screen, and unlike the detailed maps below will depend on the tileset and colour scheme you have installed.&lt;br /&gt;
&lt;br /&gt;
=== Export Detailed Maps ===&lt;br /&gt;
Pressing {{k|d}} in Legends mode reveals a list of the different kinds of map you can export. The images are exported to the game's root directory when you highlight the one you want and press {{k|Enter}}.&lt;br /&gt;
&lt;br /&gt;
*'''Standard biome+site map (detailed map)&lt;br /&gt;
*[[Advanced_world_generation#Elevation|Elevations]] incl. lake and ocean floors&lt;br /&gt;
*[[Advanced_world_generation#Elevation|Elevations]] respecting water level&lt;br /&gt;
*[[Advanced_world_generation#Temperature|Temperature]]&lt;br /&gt;
*[[Advanced_world_generation#Rainfall|Rainfall]]&lt;br /&gt;
*[[Advanced_world_generation#Drainage|Drainage]]&lt;br /&gt;
*[[Advanced_world_generation#Savagery|Savagery]]&lt;br /&gt;
*[[Advanced_world_generation#Volcanism|Volcanism]]&lt;br /&gt;
*[[Vegetation|Current vegetation]]&lt;br /&gt;
*[[Evil]]&lt;br /&gt;
*[[Water|Salinity]]&lt;br /&gt;
* Diplomacy&lt;br /&gt;
* Hydrological map (rivers, streams, lakes, oceans)&lt;br /&gt;
* [[Noble|Nobility]]&lt;br /&gt;
* Cadaster (Structures, roads, ...)&lt;br /&gt;
* [[Trading|Trade]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Standard biome and site map.png|Biome &amp;amp; site map&lt;br /&gt;
Image:World_graphic-el-region5-203-10075.PNG|Elevation incl. lake and ocean floors&lt;br /&gt;
Image:World_graphic-elw-region5-203-10075.PNG|Elevation respecting water level&lt;br /&gt;
Image:World graphic-tmp-region5-203-10075.PNG|Temperature&lt;br /&gt;
Image:World_graphic-rain-region5-203-10075.PNG|Rainfall&lt;br /&gt;
Image:World_graphic-drn-region5-203-10075.PNG|Drainage&lt;br /&gt;
Image:World_graphic-sav-region5-203-10075.PNG|Savagery&lt;br /&gt;
Image:World_graphic-vol-region5-203-10075.PNG|Volcanism&lt;br /&gt;
Image:World_graphic-veg-region5-203-10075.PNG|Current vegetation&lt;br /&gt;
Image:World_graphic-evil-region5-203-10075.PNG|Evil&lt;br /&gt;
Image:World_graphic-sal-region5-203-10075.PNG|Salinity&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Legends Utilities==&lt;br /&gt;
&lt;br /&gt;
There are many [[utilities]] that work with the data exported from Legends mode, or make exporting that info easier.  &lt;br /&gt;
&lt;br /&gt;
===Export tools===&lt;br /&gt;
&lt;br /&gt;
[http://dffd.wimbli.com/file.php?id=7696 The dfhack script 'exportmaps'] will export all detailed maps, saving a lot of time on large worlds compared to exporting them individually and waiting for each to finish.  [https://github.com/PeridexisErrant/dfhack/blob/master/scripts/exportlegends.lua exportlegends] likewise exports all detailed maps, as well as their worldgen info and legends XML.  &lt;br /&gt;
&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=131307 Export processing script] can automate processing of Legends information, and is included in the Windows [[Utility:Lazy_Newb_Pack|Lazy Newb Pack]]. If GIMP is installed, the script will use Dwarf Map Maker (see below); optipng can be used to compress the images from bitmaps to .png files. This tool also removes non-printing ASCII characters from the XML dump that can crash Legends Viewer (usually caused by DFHack's workflow), and creates a compressed folder for each region suitable for Legends Viewer (or simply compresses the XML if some parts have not been exported).&lt;br /&gt;
&lt;br /&gt;
===Legends viewing tools and visualisers===&lt;br /&gt;
&lt;br /&gt;
The most famous is likely [[Utilities#Legends_Viewer|Legends Viewer]], an alternative interface that recreates legends mode from exported data with many more features such as graphs, filtering, sorting, and hyperlinks.  There are alternative tools with similar functionality, including [[DF2014:Utilities#World_Viewer|World Viewer]].   &lt;br /&gt;
&lt;br /&gt;
[http://www.bay12forums.com/smf/index.php?topic=73095.msg2261106#msg2261106 The Dwarf Map Maker] is available as a GIMP script (free software) or a photoshop actionscript.  Both use the detailed maps to produce a pretty fantasy map that looks somewhat like a satellite image.  The GIMP script is called as part of PeridexisErrant's legends processing script, if the dependencies are present.  &lt;br /&gt;
&lt;br /&gt;
{{Translation| dwarven = gomath | elvish = liceva | goblin = olzul | human = en}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Guides}}&lt;br /&gt;
[[ru:Legends]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Ages&amp;diff=253288</id>
		<title>Ages</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Ages&amp;diff=253288"/>
		<updated>2020-06-16T01:25:37Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Adding link to Ages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[cv:Calendar#Ages]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Bay_12_Forums&amp;diff=252992</id>
		<title>Bay 12 Forums</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Bay_12_Forums&amp;diff=252992"/>
		<updated>2020-06-07T14:01:57Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''[http://www.bay12forums.com/smf/index.php Bay 12 Games Forums]''' are the main hub of fan-based activity and discussion surrounding the game.  Users can ask questions about game play, exchange stories of their exploits, advertise their own contributions (mods, tools, pregenerated worlds), make suggestions for improvements, or discuss the game in a more general fashion. [[Toady One]] is known to read the forums and occasionally respond to posts when he sees fit. In the past [[bugs]] were also reported here, but they have since been moved into the domain of the [http://www.bay12games.com/dwarves/mantisbt/my_view_page.php Bug Tracker], although workarounds and such are still discussed on the wiki.&lt;br /&gt;
&lt;br /&gt;
== Subforums ==&lt;br /&gt;
=== Bay 12 Games ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=8.0 Announcements]''': This is where Toady One posts general announcements, mostly the Bay 12 Games Report, a monthly report on the status of the game's development. It is read-only.&lt;br /&gt;
&lt;br /&gt;
=== Dwarf Fortress ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=10.0 DF Announcements]''': This is where announcements on Dwarf Fortress specifically are made, usually specifying new release. As a matter of procedure, the most recent announcement thread is open to fans, but the rest are locked.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=6.0 DF Bug Reports]''': This used to be where bugs were reported, before the [http://www.bay12games.com/dwarves/mantisbt/my_view_page.php Bug Tracker] was created. New threads cannot be created, but old ones are still live, and occasional necromancy is common.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=5.0 DF Suggestions]''': Where suggestions on the game are made, and players can freely discuss ways of how the game could be improved. Any suggestions are welcome, ranging from minor changes to the display up to major additions like magic systems. While [[Toady One]] is known to visit this forum, non-trivial suggestions are very rarely implemented into the game. Vote counting will not win him over either.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=7.0 DF Gameplay Questions]''': This is the place where you can go if you encounter something you do not understand, which neither looks like a [[bug]] nor is explained sufficiently in the wiki. Questions about specific game mechanisms are common, but people also often ask for advice about how to implement certain ideas or features here. Topics range in complexity from &amp;quot;how do I start a farm?&amp;quot; to &amp;quot;is it possible to use perpetual motion to your advantage outside of power generation?&amp;quot;&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=22.0 DF Wiki Discussion]''': A subforum of the above, this is where the wiki (you're looking at it) is discussed. Grounds for discussion is rather more niche than the other forums, so activity is low, but the wiki admins and contributors do watch it.&lt;br /&gt;
*'''[http://www.bay12forums.com/forum/index.php?board=11.0 DF Dwarf Mode Discussion]''' is especially dedicated to discussions about [[dwarf fortress mode]]. This forum usually contains discussions about either ideas for ways to play in [[fortress mode]] or experiences with [[fortress mode]]. The content therein ranges from anecdotal to inspirational - it is a place of humor, revelry, fun, and occasional !!SCIENCE!! alike.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=12.0 DF Adventure Mode Discussion]''' is the counterpart to the previously described forum. It is dedicated to discussions about [[adventurer mode]]. Like its [[fortress mode]] counterpart, this forum ranges from ideas to anecdotes as people describe both their experiences as well as their ideas for [[adventurer mode]] playing.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=14.0 DF Community Games &amp;amp; Stories]''',  dedicated to discussions about community games and stories. In this forum, fans can advertise their community games, succession games, and the like and also handle the actually post exchange that is required for organizing such events. And they also exchange the stories of what happens in the game. Please note that, like the other forums, this forum does not offer upload facilities.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=13.0 DF Modding]''' is dedicated to discussions about [[modding]]. Fans use it to advertise their mods, exchange experiences with the modding process, and also ask and answer questions about how to mod the game successfully. It has multiple subforums as well.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=2.0 DF General Discussion]''' is the catch for all forum for dwarf fortress. Any discussions that do not fit nicely in any of the other DF forums go here. Topics here range from random ranting only loosely related to the game, over dwarf fortress' public image, fanart exchanges, general thoughts on the game, [[Toady One]], and the developments surrounding both. A noteworthy special feature is the '''Future of the Fortress''' threads started by [[Toady One]] as a community Q&amp;amp;A meant to discuss future development. This is the main source of dev news, alongside the dev notes.&lt;br /&gt;
&lt;br /&gt;
=== Other Projects ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=1.0 Slaves to Armok: God of Blood]''' is the very first forum from the site and is dedicated to discussions concerning the predecessor of dwarf fortress. It was locked in 2010, but looking through it you can find some 2001-era Toady One commentary.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=3.0 Curses]''' is dedicated to discussions about other ASCII based games by Bay 12 Games.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=4.0 Other Games]''': Ever wish you could discuss your thoughts on games with probably the most eclectic gaming community of them all? Well, now you can!&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=21.0 Play With Your Buddies]''': Just what it sounds like, LPs and the like. Subforum of Other Games.&lt;br /&gt;
&lt;br /&gt;
=== Finally ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=16.0 Creative Projects]''': Visual arts, music, writing, and anything else you are working on that you'd like to share.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=17.0 General Discussion]''': Discussions, commentary, reviews, news, friendly debates. All thoughts welcome.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=18.0 Life Advice]''': Please do not solicit medical or legal advice from the Internet.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=15.0 Forum Games and Roleplaying]''': You can participate in the only multiplayer games B12 is likely to have anything to do with here. Feel free to start one of your own. Has Roll to Dodge and Mafia sub-boards.&lt;br /&gt;
&lt;br /&gt;
== Rules and suggestions ==&lt;br /&gt;
The forum rules have been more or less {{f|38443.msg642398#msg642398|laid out}} in this thread.&lt;br /&gt;
&lt;br /&gt;
Some suggestions:&lt;br /&gt;
&lt;br /&gt;
;Use the Search Function&lt;br /&gt;
The forums offer a search function (look in the upper right corner). The forums see a lot of activity day by day and thus chances are great that someone already asked the same question before or made a similar suggestion previously.&lt;br /&gt;
&lt;br /&gt;
Please note that the search function offers searching a single forum or all forums, defaulting to the forum  from where you visited the search function. There may be cases where people posted in an unexpected forum, so you might wish to search in all forums the issue you wish to discuss might fit in (for instance, questions about how to create certain structures in fortress mode could fit both in the ''DF Gameplay Questions''  or the ''DF Dwarf Mode Discussions'' subforums.&lt;br /&gt;
&lt;br /&gt;
;Support Existing Threads&lt;br /&gt;
Instead of starting new threads, consider participating in threads already dealing with the issue. This is especially an important issue for suggestions as some of the obvious ones tend to resurface regularly.&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
[[ru:Bay 12 Forums]]&lt;br /&gt;
{{unversioned}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Bay_12_Forums&amp;diff=252991</id>
		<title>Bay 12 Forums</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Bay_12_Forums&amp;diff=252991"/>
		<updated>2020-06-07T14:01:24Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''[http://www.bay12forums.com/smf/index.php Bay 12 Games Forums]''' are the main hub of fan-based activity and discussion surrounding the game.  Users can ask questions about game play, exchange stories of their exploits, advertise their own contributions (mods, tools, pregenerated worlds), make suggestions for improvements, or discuss the game in a more general fashion. [[Toady One]] is known to read the forums and occasionally respond to posts when he sees fit. In the past [[bugs]] were also reported here, but they have since been moved into the domain of the [http://www.bay12games.com/dwarves/mantisbt/my_view_page.php Bug Tracker], although workarounds and such are still discussed on the wiki.&lt;br /&gt;
&lt;br /&gt;
== Subforums ==&lt;br /&gt;
=== Bay 12 Games ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=8.0 Announcements]''': This is where Toady One posts general announcements, mostly the Bay 12 Games Report, a monthly report on the status of the game's development. It is read-only.&lt;br /&gt;
&lt;br /&gt;
=== Dwarf Fortress ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=10.0 DF Announcements]''': This is where announcements on Dwarf Fortress specifically are made, usually specifying new release. As a matter of procedure, the most recent announcement thread is open to fans, but the rest are locked.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=6.0 DF Bug Reports]''': This used to be where bugs were reported, before the [http://www.bay12games.com/dwarves/mantisbt/my_view_page.php Bug Tracker] was created. New threads cannot be created, but old ones are still live, and occasional necromancy is common.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=5.0 DF Suggestions]''': Where suggestions on the game are made, and players can freely discuss ways of how the game could be improved. Any suggestions are welcome, ranging from minor changes to the display up to major additions like magic systems. While [[Toady One]] is known to visit this forum, non-trivial suggestions are very rarely implemented into the game. Vote counting will not win him over either.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=7.0 DF Gameplay Questions]''': This is the place where you can go if you encounter something you do not understand, which neither looks like a [[bug]] nor is explained sufficiently in the wiki. Questions about specific game mechanisms are common, but people also often ask for advice about how to implement certain ideas or features here. Topics range in complexity from &amp;quot;how do I start a farm?&amp;quot; to &amp;quot;is it possible to use perpetual motion to your advantage outside of power generation?&amp;quot;&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=22.0 DF Wiki Discussion]''': A subforum of the above, this is where the wiki (you're looking at it) is discussed. Grounds for discussion is rather more niche than the other forums, so activity is low, but the wiki admins and contributors do watch it.&lt;br /&gt;
*'''[http://www.bay12forums.com/forum/index.php?board=11.0 DF Dwarf Mode Discussion]''' is especially dedicated to discussions about [[dwarf fortress mode]]. This forum usually contains discussions about either ideas for ways to play in [[fortress mode]] or experiences with [[fortress mode]]. The content therein ranges from anecdotal to inspirational - it is a place of humor, revelry, fun, and occasional !!SCIENCE!! alike.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=12.0 DF Adventure Mode Discussion]''' is the counterpart to the previously described forum. It is dedicated to discussions about [[adventurer mode]]. Like its [[fortress mode]] counterpart, this forum ranges from ideas to anecdotes as people describe both their experiences as well as their ideas for [[adventurer mode]] playing.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=14.0 DF Community Games &amp;amp; Stories]''',  dedicated to discussions about community games and stories. In this forum, fans can advertise their community games, succession games, and the like and also handle the actually post exchange that is required for organizing such events. And they also exchange the stories of what happens in the game. Please note that, like the other forums, this forum does not offer upload facilities.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=13.0 DF Modding]''' is dedicated to discussions about [[modding]]. Fans use it to advertise their mods, exchange experiences with the modding process, and also ask and answer questions about how to mod the game successfully. It has multiple subforums as well.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=2.0 DF General Discussion]''' is the catch for all forum for dwarf fortress. Any discussions that do not fit nicely in any of the other DF forums go here. Topics here range from random ranting only loosely related to the game, over dwarf fortress' public image, fanart exchanges, general thoughts on the game, [[Toady One]], and the developments surrounding both. A noteworthy special feature is the '''Future of the Fortress''' threads started by [[Toady One]] as a community Q&amp;amp;A meant to discuss future development. This is the main source of dev news, alongside the dev notes.&lt;br /&gt;
&lt;br /&gt;
=== Other Projects ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=1.0 Slaves to Armok: God of Blood]''' is the very first forum from the site and is dedicated to discussions concerning the predecessor of dwarf fortress. It was locked in 2010, but looking through it you can find some 2001-era Toady One commentary.&lt;br /&gt;
*'''[http://www.bay12games.com/forum/index.php?board=3.0 Curses]''' is dedicated to discussions about other ASCII based games by Bay 12 Games.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=4.0 Other Games]''': Ever wish you could discuss your thoughts on games with probably the most eclectic gaming community of them all? Well, now you can!&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=21.0 Play With Your Buddies]''': Just what it sounds like, LPs and the like. Subforum of Other Games.&lt;br /&gt;
&lt;br /&gt;
=== Finally ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=16.0 Creative Projects]''': Visual arts, music, writing, and anything else you are working on that you'd like to share.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=17.0 General Discussion]''': Discussions, commentary, reviews, news, friendly debates. All thoughts welcome.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=18.0 Life Advice]''': Please do not solicit medical or legal advice from the Internet.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=15.0 Forum Games and Roleplaying]''': You can participate in the only multiplayer games B12 is likely to have anything to do with here. Feel free to start one of your own. Has Roll to Dodge and Mafia sub-boards.&lt;br /&gt;
&lt;br /&gt;
== Rules and suggestions ==&lt;br /&gt;
The forum rules have been more or less {{f|38443.msg642398#msg642398|laid out}} in this thread.&lt;br /&gt;
&lt;br /&gt;
Some suggestions:&lt;br /&gt;
&lt;br /&gt;
;Use the Search Function&lt;br /&gt;
The forums offer a search function (look in the upper right corner). The forums see a lot of activity day by day and thus chances are great that someone already asked the same question before or made a similar suggestion previously.&lt;br /&gt;
&lt;br /&gt;
Please note that the search function offers searching a single forum or all forums, defaulting to the forum  from where you visited the search function. There may be cases where people posted in an unexpected forum, so you might wish to search in all forums the issue you wish to discuss might fit in (for instance, questions about how to create certain structures in fortress mode could fit both in the ''DF Gameplay Questions''  or the ''DF Dwarf Mode Discussions'' subforums.&lt;br /&gt;
&lt;br /&gt;
;Support Existing Threads&lt;br /&gt;
Instead of starting new threads, consider participating in threads already dealing with the issue. This is especially an important issue for suggestions as some of the obvious ones tend to resurface regularly.&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
[[ru:Bay 12 Forums]]&lt;br /&gt;
{{unversioned}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Bay_12_Forums&amp;diff=252990</id>
		<title>Bay 12 Forums</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Bay_12_Forums&amp;diff=252990"/>
		<updated>2020-06-07T14:00:46Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''[http://www.bay12forums.com/smf/index.php Bay 12 Games Forums]''' are the main hub of fan-based activity and discussion surrounding the game.  Users can ask questions about game play, exchange stories of their exploits, advertise their own contributions (mods, tools, pregenerated worlds), make suggestions for improvements, or discuss the game in a more general fashion. [[Toady One]] is known to read the forums and occasionally respond to posts when he sees fit. In the past [[bugs]] were also reported here, but they have since been moved into the domain of the [http://www.bay12games.com/dwarves/mantisbt/my_view_page.php Bug Tracker], although workarounds and such are still discussed on the wiki.&lt;br /&gt;
&lt;br /&gt;
== Subforums ==&lt;br /&gt;
=== Bay 12 Games ===&lt;br /&gt;
*'''[http://www.bay12games.com/forum/index.php?board=8.0 Announcements]''': This is where Toady One posts general announcements, mostly the Bay 12 Games Report, a monthly report on the status of the game's development. It is read-only.&lt;br /&gt;
&lt;br /&gt;
=== Dwarf Fortress ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=10.0 DF Announcements]''': This is where announcements on Dwarf Fortress specifically are made, usually specifying new release. As a matter of procedure, the most recent announcement thread is open to fans, but the rest are locked.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=6.0 DF Bug Reports]''': This used to be where bugs were reported, before the [http://www.bay12games.com/dwarves/mantisbt/my_view_page.php Bug Tracker] was created. New threads cannot be created, but old ones are still live, and occasional necromancy is common.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=5.0 DF Suggestions]''': Where suggestions on the game are made, and players can freely discuss ways of how the game could be improved. Any suggestions are welcome, ranging from minor changes to the display up to major additions like magic systems. While [[Toady One]] is known to visit this forum, non-trivial suggestions are very rarely implemented into the game. Vote counting will not win him over either.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=7.0 DF Gameplay Questions]''': This is the place where you can go if you encounter something you do not understand, which neither looks like a [[bug]] nor is explained sufficiently in the wiki. Questions about specific game mechanisms are common, but people also often ask for advice about how to implement certain ideas or features here. Topics range in complexity from &amp;quot;how do I start a farm?&amp;quot; to &amp;quot;is it possible to use perpetual motion to your advantage outside of power generation?&amp;quot;&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=22.0 DF Wiki Discussion]''': A subforum of the above, this is where the wiki (you're looking at it) is discussed. Grounds for discussion is rather more niche than the other forums, so activity is low, but the wiki admins and contributors do watch it.&lt;br /&gt;
*'''[http://www.bay12forums.com/forum/index.php?board=11.0 DF Dwarf Mode Discussion]''' is especially dedicated to discussions about [[dwarf fortress mode]]. This forum usually contains discussions about either ideas for ways to play in [[fortress mode]] or experiences with [[fortress mode]]. The content therein ranges from anecdotal to inspirational - it is a place of humor, revelry, fun, and occasional !!SCIENCE!! alike.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=12.0 DF Adventure Mode Discussion]''' is the counterpart to the previously described forum. It is dedicated to discussions about [[adventurer mode]]. Like its [[fortress mode]] counterpart, this forum ranges from ideas to anecdotes as people describe both their experiences as well as their ideas for [[adventurer mode]] playing.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=14.0 DF Community Games &amp;amp; Stories]''',  dedicated to discussions about community games and stories. In this forum, fans can advertise their community games, succession games, and the like and also handle the actually post exchange that is required for organizing such events. And they also exchange the stories of what happens in the game. Please note that, like the other forums, this forum does not offer upload facilities.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=13.0 DF Modding]''' is dedicated to discussions about [[modding]]. Fans use it to advertise their mods, exchange experiences with the modding process, and also ask and answer questions about how to mod the game successfully. It has multiple subforums as well.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=2.0 DF General Discussion]''' is the catch for all forum for dwarf fortress. Any discussions that do not fit nicely in any of the other DF forums go here. Topics here range from random ranting only loosely related to the game, over dwarf fortress' public image, fanart exchanges, general thoughts on the game, [[Toady One]], and the developments surrounding both. A noteworthy special feature is the '''Future of the Fortress''' threads started by [[Toady One]] as a community Q&amp;amp;A meant to discuss future development. This is the main source of dev news, alongside the dev notes.&lt;br /&gt;
&lt;br /&gt;
=== Other Projects ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=1.0 Slaves to Armok: God of Blood]''' is the very first forum from the site and is dedicated to discussions concerning the predecessor of dwarf fortress. It was locked in 2010, but looking through it you can find some 2001-era Toady One commentary.&lt;br /&gt;
*'''[http://www.bay12games.com/forum/index.php?board=3.0 Curses]''' is dedicated to discussions about other ASCII based games by Bay 12 Games.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=4.0 Other Games]''': Ever wish you could discuss your thoughts on games with probably the most eclectic gaming community of them all? Well, now you can!&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=21.0 Play With Your Buddies]''': Just what it sounds like, LPs and the like. Subforum of Other Games.&lt;br /&gt;
&lt;br /&gt;
=== Finally ===&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=16.0 Creative Projects]''': Visual arts, music, writing, and anything else you are working on that you'd like to share.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=17.0 General Discussion]''': Discussions, commentary, reviews, news, friendly debates. All thoughts welcome.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=18.0 Life Advice]''': Please do not solicit medical or legal advice from the Internet.&lt;br /&gt;
*'''[http://www.bay12forums.com/smf/index.php?board=15.0 Forum Games and Roleplaying]''': You can participate in the only multiplayer games B12 is likely to have anything to do with here. Feel free to start one of your own. Has Roll to Dodge and Mafia sub-boards.&lt;br /&gt;
&lt;br /&gt;
== Rules and suggestions ==&lt;br /&gt;
The forum rules have been more or less {{f|38443.msg642398#msg642398|laid out}} in this thread.&lt;br /&gt;
&lt;br /&gt;
Some suggestions:&lt;br /&gt;
&lt;br /&gt;
;Use the Search Function&lt;br /&gt;
The forums offer a search function (look in the upper right corner). The forums see a lot of activity day by day and thus chances are great that someone already asked the same question before or made a similar suggestion previously.&lt;br /&gt;
&lt;br /&gt;
Please note that the search function offers searching a single forum or all forums, defaulting to the forum  from where you visited the search function. There may be cases where people posted in an unexpected forum, so you might wish to search in all forums the issue you wish to discuss might fit in (for instance, questions about how to create certain structures in fortress mode could fit both in the ''DF Gameplay Questions''  or the ''DF Dwarf Mode Discussions'' subforums.&lt;br /&gt;
&lt;br /&gt;
;Support Existing Threads&lt;br /&gt;
Instead of starting new threads, consider participating in threads already dealing with the issue. This is especially an important issue for suggestions as some of the obvious ones tend to resurface regularly.&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
[[ru:Bay 12 Forums]]&lt;br /&gt;
{{unversioned}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Bow&amp;diff=251406</id>
		<title>Bow</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Bow&amp;diff=251406"/>
		<updated>2020-03-11T23:34:48Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added material clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Fine|18:25, 23 August 2014 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
:''For a comparison of different weapons, see [[Weapon]].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''bow''' (not to be confused with a dwarven [[crossbow]]) is a ranged [[weapon]] that fires projectiles called [[arrow]]s. Bows behave similarly to crossbows for the most part, though they seem to be preferred by [[elf|elves]] and [[goblin]]s. &lt;br /&gt;
&lt;br /&gt;
As ranged weapons, bows use and train the [[bowman]] (bowdwarf) skill; as melee weapons bows use and train the [[swordsman]] (swordsdwarf) skill instead. Dwarves cannot [[forge]] bows nor [[arrow]]s, limiting supply to artifacts, and whatever low-[[quality]] specimens can be traded from elven [[caravan]]s and scavenged from invaders. Due to their marked similarity to native weapons, your dwarves would likely be better served in battle with high-quality crossbows and bolts than inferior imported bows and arrows. All dwarves can equip bows.&lt;br /&gt;
&lt;br /&gt;
Bows do not have to be made out of [[wood]]. They can, [[Weapon#Material|like all other weapons]], also me made out of metal.&lt;br /&gt;
&lt;br /&gt;
==Bugs==&lt;br /&gt;
* If a [[squad]] is assigned multiple ammo types, dwarves with &amp;quot;individual choice ranged&amp;quot; may carry the wrong ammo{{bug|1374}}.&lt;br /&gt;
&lt;br /&gt;
{{Translation&lt;br /&gt;
| dwarven = egdoth&lt;br /&gt;
| elvish  = ramí&lt;br /&gt;
| goblin  = uneg&lt;br /&gt;
| human   = ethro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{gamedata|{{raw|DF2014:item_weapon.txt|ITEM_WEAPON|ITEM_WEAPON_BOW}}}}&lt;br /&gt;
{{Weapons}}&lt;br /&gt;
{{Category|Weapons}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Troll&amp;diff=251345</id>
		<title>Troll</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Troll&amp;diff=251345"/>
		<updated>2020-03-08T19:44:50Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Fixed category tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Exceptional|01:51, 28 April 2013 (UTC)}}&lt;br /&gt;
{{Creaturelookup/0&lt;br /&gt;
|wiki=yes&lt;br /&gt;
}}&lt;br /&gt;
{{av}}&lt;br /&gt;
{{creaturedesc}}&lt;br /&gt;
&lt;br /&gt;
'''Trolls''' are large, predatory, dangerous subterranean evil [[creature]]s who inhabit all layers of the [[caverns]] and often appear under the command of [[goblin]]s during [[siege]]s. Over four times larger than a [[dwarf]], they are [[building destroyer]]s, and will path to your [[building]]s simply for the joy of sheer destruction. During sieges, they act as battering rams, so [[trap design|design your defenses accordingly]]. They are not related to [[night troll]]s, despite the similar names. &lt;br /&gt;
&lt;br /&gt;
Wild trolls meander the underground and attack dwarves who approach or provoke them (or at least are supposed to, but currently don't {{bug|10031}}). Many of them are enslaved/absorbed by goblins during world generation and become their servants, inhabiting their [[dark pit]]s in truly huge numbers (sometimes enough to cause overwhelming lag {{bug|7526}}) and aiding their smaller masters in their battles against other races. Goblins shear trolls for their fur, making them the evil race's equivalent of [[sheep]]. As they are intelligent (although incapable of speech), civilized trolls may gain non-military professions among goblin society.&lt;br /&gt;
&lt;br /&gt;
Trolls will almost certainly appear accompanying goblins when they siege your fortress. They are quite tough and have a variety of different ways to cause injury to your dwarves due to their humanoid bodies and large tusks. Since they only rarely wear [[armor]] (when appearing as helpers of [[goblin christmas|Goblin Claus]]), they will be easy targets for a decently-skilled squad of axedwarves, though silk-wearing trolls can complicate things if [[copper]] and [[silver]] are the only available metals. Trolls can and will wrestle your dwarves, which can lead to some broken bones in your military. Unlike goblins, trolls are natural swimmers, which could be a problem for a fortress relying on a moat for defense, or using a drowning chamber or underground lake as a means of administering dwarven justice. Trolls can climb, so it is possible for them to get to level one of a cavern through [[deep pit]]s and access your fortress to &amp;lt;s&amp;gt;crush the heads of&amp;lt;/s&amp;gt; play with your dwarves. &lt;br /&gt;
&lt;br /&gt;
Trolls notably possess cyan-colored [[blood]] (possibly [[wikipedia:Hemocyanin|hemocyanin]]-based). Their behavior as a servant race of goblins is done via the combination of the {{token|EVIL}} and {{token|SLOW_LEARNER}} creature tokens and the fact they live underground; through modding, players can create their own subterranean goblin servants who will accompany trolls in battle by giving their race these two tokens.&lt;br /&gt;
&lt;br /&gt;
Some dwarves [[Preferences|like]] trolls for their ''terrifying features''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Troll Drawing.jpg|thumb|center|300px|A dwarf battling a troll, drawn in crayon by [[Main:Bay 12 Games|Bay 12 Games]].]]&lt;br /&gt;
&lt;br /&gt;
{{gamedata}}&lt;br /&gt;
{{creatures}}&lt;br /&gt;
[[Category:DF2014:Shearable]]&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=DF2014:Graphics_set_repository&amp;diff=250834</id>
		<title>DF2014:Graphics set repository</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=DF2014:Graphics_set_repository&amp;diff=250834"/>
		<updated>2020-02-25T16:09:12Z</updated>

		<summary type="html">&lt;p&gt;Ralpha: Added the Meph tileset&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|10:59, 18 May 2015 (UTC)}}&lt;br /&gt;
{{av}} &lt;br /&gt;
&lt;br /&gt;
{{For/see|user-created tilesets|[[Tileset repository]]}}&lt;br /&gt;
&lt;br /&gt;
{{Mod}}&lt;br /&gt;
&lt;br /&gt;
[[Graphics set]]s are used to change the appearance of [[Main:creature|creatures]] in the game. They usually come with certain [[DF2014:Tilesets|tilesets]] and are designed to work together. They can significantly change the appearance of the game and make it easier for players to tell what is happening onscreen. This page serves as a repository for custom graphic sets made by users.&lt;br /&gt;
&lt;br /&gt;
==32×32 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===Vettingr===&lt;br /&gt;
[[Image:vet_prev.png|thumb|right|Screenshot of game using the Vettlingr Graphics Pack]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:vet_intro.png|256px]]&lt;br /&gt;
| download link = [http://www.bay12forums.com/smf/index.php?topic=172078.0 Official Forum Thread] or [http://dffd.bay12games.com/file.php?id=14072]&lt;br /&gt;
| author          = vettlingr&lt;br /&gt;
| sprite          = 32&amp;amp;times;32&lt;br /&gt;
| resolution      = 1920&amp;amp;times;600&lt;br /&gt;
| current version = 1.3&lt;br /&gt;
| df compatible   = 0.44.12&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: October 08, 2019. This is a Dwarf Fortress Tileset for 32x32. Featuring over 1000 unique sprites for most creatures, professions and job titles, as well as environments, furniture, items and more.&lt;br /&gt;
&lt;br /&gt;
If you like your dwarves big-nosed and stunty, with a hint of Anglo-Saxon or Nordic design. Perhaps you like gothic horror or a darker style for your dwarven dungeon paired with a beautiful consistent design. Fret not, thy tileset pack is here!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Meph Tileset===&lt;br /&gt;
&amp;lt;!-- [[Image:meph_tileset_logo.png|thumb|right|Logo for Meph Tileset]] --&amp;gt;&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
&amp;lt;!-- | image           = [[Image:meph_tileset_screenshot.png|256px]] --&amp;gt;&lt;br /&gt;
| download link = [http://www.bay12forums.com/smf/index.php?topic=161047.0 Official Forum Thread], [http://dffd.bay12games.com/file.php?id=13407 for windows] or [http://dffd.bay12games.com/file.php?id=12516 for linux (Raws/Graphics only)]&lt;br /&gt;
| author          = Meph&lt;br /&gt;
| sprite          = 32&amp;amp;times;32&lt;br /&gt;
| resolution      = Variable&lt;br /&gt;
| current version = 5.3&lt;br /&gt;
| df compatible   = 0.44.12&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: September 10, 2019. The Meph tileset is the first graphical 32x32 tileset for Dwarf Fortress. It was born from my research about tilesets, finding old, abandoned 24x and 32x sprites by Dibujor and Obsidian Soul, both inactive since 2015. I thought that their sprites are too good to waste and started with them as a basis for a new tileset.&lt;br /&gt;
&lt;br /&gt;
The Meph tileset uses Dfhack and TWBT.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==24×24 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===GemSet===&lt;br /&gt;
[[Image:Gemsetgameplay.png|thumb|right|Screenshot of game using the Gemset Graphics Pack]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Gemset_Logo.png|256px]]&lt;br /&gt;
| download link = [http://www.bay12forums.com/smf/index.php?topic=150753.0] or [http://dffd.bay12games.com/file.php?id=10857]&lt;br /&gt;
| author          = DragonDePlatino&lt;br /&gt;
| sprite          = 24&amp;amp;times;24 / 48&amp;amp;times;48&lt;br /&gt;
| resolution      = 1920&amp;amp;times;600&lt;br /&gt;
| current version = 1.3 ɑ4&lt;br /&gt;
| df compatible   = 0.42.04&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: May 17, 2015. The DFgraphics github version is currently the only one actively maintained.&lt;br /&gt;
The first complete 24×24 graphics set for Dwarf Fortress, GemSet provides the aesthetics of ASCII and convenience of graphics.&lt;br /&gt;
&lt;br /&gt;
Drawn natively in a 24×24 resolution for 1080p and 4K displays, GemSet is the highest-resolution graphics set to-date. The entire graphics set uses a bright 32-color palette with the intention of keeping everything crystal-clear on even the highest-resolution displays. All profession graphics are color-coded according to their ASCII counterparts and black has been kept as the dominant color of the graphics set.&lt;br /&gt;
&lt;br /&gt;
All creature graphics are finished and TWBT support is currently in-development.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Dungeon Set===&lt;br /&gt;
[[Image:Dungeonsetgameplay.jpeg|thumb|right|Screenshot of game using the Dungeon Set Graphics Pack]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Dungeonsetlogo.png|256px]]&lt;br /&gt;
| download link = [http://www.bay12forums.com/smf/index.php?topic=152766.msg6467509 Official Forum Thread]&lt;br /&gt;
| author          = utkonos&lt;br /&gt;
| sprite          = 24&amp;amp;times;24&lt;br /&gt;
| resolution      = 1920&amp;amp;times;600&lt;br /&gt;
| current version = 1.03&lt;br /&gt;
| df compatible   = 0.43.03&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: June 28, 2016.&lt;br /&gt;
A TWBT compatible graphics set drawn in a realistic style.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==18×18 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===CLA's ASCII-like Graphics Set===&lt;br /&gt;
[[Image:Zscrn-cla.jpg|thumb|right|Screenshot of game using CLA's ASCII-like Graphics Set]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:ZwymD.png|256px]]&lt;br /&gt;
| download link   = [http://www.bay12forums.com/smf/index.php?topic=105376.0 Official Forum Thread], [https://github.com/DFgraphics/CLA/releases Github]&lt;br /&gt;
| author          = CLA&lt;br /&gt;
| sprite          = 18&amp;amp;times;18&lt;br /&gt;
| resolution      = 1440×450&lt;br /&gt;
| current version = 26&lt;br /&gt;
| df compatible   = 0.44.12&lt;br /&gt;
| installation    = Available pre-installed or as a patch&lt;br /&gt;
| comments        = Last updated: April 15, 2019&lt;br /&gt;
ASCII-Like, uses stylized letters to show what the creature is while still allowing it to look like the letter. Tileset based on [[DF2014:Tileset_repository#18.C3.9718|Haowan]] with opaque ground tiles&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Ironhand and Wormslayer's Graphics Pack===&lt;br /&gt;
[[Image:Zscrn-ironhand.jpg|thumb|right|Screenshot of game using Ironhand and Wormslayer's Graphics Pack]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Ironhandtileset.png|256px]]&amp;lt;!--[[Image:IronhandDwarves.png|270px]]--&amp;gt;&lt;br /&gt;
| download link   = [http://www.bay12forums.com/smf/index.php?topic=53180.0 Official Forum Thread] (and [http://dffd.bay12games.com/file.php?id=13283 DFFD for v0.44]), [https://github.com/DFgraphics/Ironhand/releases Github]&lt;br /&gt;
| author          = Ironhand and Wormslayer&lt;br /&gt;
| sprite          = 18&amp;amp;times;18 / [http://www.bay12forums.com/smf/index.php?topic=122400.0 unofficial 16&amp;amp;times;16 version (Ironhand16 for 0.40.09)]&lt;br /&gt;
| resolution      = 1440×450&lt;br /&gt;
| current version = 0.68&lt;br /&gt;
| df compatible   = 0.44.12&lt;br /&gt;
| installation    = Available pre-installed or as a patch&lt;br /&gt;
| comments        = Last updated:  June 24, 2018. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==16×16 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===Beefmo 2012===&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| download link   = [http://dffd.wimbli.com/file.php?id=2087 Beefmo 2012 page on DFFD]&lt;br /&gt;
| author          = Beefmo and Thirin&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1024&amp;amp;times;768 or higher&lt;br /&gt;
| current version = 0.54&lt;br /&gt;
| df compatible   = 0.34.11&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: Dec 26, 2012. No longer maintained.&lt;br /&gt;
Exhaustive collection of sprites for all civilized races (dwarves, elves, goblins, humans, and kobolds) including unique images for each profession within each race, as well as zombie, skeleton, and ghost forms. There is also a huge gallery of creatures including livestock, wildlife, and cavern fauna.  Many of the animals are collected from other sets and modified to fit, plus many unique to this tile set -- as such it is one of the most comprehensive collections of creature graphics available.  Most of the new 2012 animals and animal-men are present, though some are still TBD.  The art style is clear and consistent with clean lines and solid colors; classic pixel art. There is also a version available patched onto Obsidian and ready to be used with LNP. This version can be found [http://dffd.wimbli.com/file.php?id=8624 here].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Geoduck's 16×16 Graphics Set===&lt;br /&gt;
[[File:Zscr-geoduck.jpg|thumb|right|Screenshot of game using Geoduck's Graphics Set and Shizzle's ASCII tileset]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Geoduck logo.png|256px]]&lt;br /&gt;
| download link   = [http://www.geoduckthings.net/dwarf/dwarffortress16.html Geoduck's Dwarf Fortress 16x16 page]&lt;br /&gt;
| author          = Geoduck&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1024&amp;amp;times;768 or higher&lt;br /&gt;
| current version = 2.0&lt;br /&gt;
| df compatible   = 0.43.03&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: May 29, 2016&lt;br /&gt;
Set for Dwaves/Goblins/Humans/Elves/Kobolds which attempts to combine compactness with greater simplicity, clarity and ease of viewing. Designed for Fortress mode play, but includes Adventurer tiles. Created from scratch, but originally inspired in part by PTTG's graphics set for .40d.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Rally Ho! Graphics Set===&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Rallyhologo.png|256px]]&lt;br /&gt;
| download link   = [http://www.bay12forums.com/smf/index.php?topic=149172.0 Rydel's Forum Thread], [https://github.com/DFgraphics/Rally-Ho/releases Github]&lt;br /&gt;
| author          = Rydel&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1024&amp;amp;times;768 or higher&lt;br /&gt;
| current version = 2.0&lt;br /&gt;
| df compatible   = 0.43.05&lt;br /&gt;
| installation    = Instructions in readme&lt;br /&gt;
| comments        = Last updated: March 27, 2017. The DFgraphics github version is currently the only one actively maintained.&lt;br /&gt;
Rally Ho! is a 16×16 graphics set for Dwarf Fortress 2016 (43.04-43.05) based on graphics from the Final Fantasy series of video games, especially the NES, SNES, GB, and GBA games.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Mayday's Graphic Set===&lt;br /&gt;
[[Image:Zscrn-mayday.jpg|thumb|right|Screenshot of game using Mayday's Graphic Set]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:DFG13.png|256px]]&lt;br /&gt;
| download link   = [http://mayday.w.staszic.waw.pl/df.php Mayday's site] or [https://github.com/DFgraphics/Mayday/releases GitHub]&lt;br /&gt;
| author          = [[User:Mikemayday|Mikemayday]]&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1280 horizontal&lt;br /&gt;
| current version = 40_05&lt;br /&gt;
| df compatible   = 0.40.05&lt;br /&gt;
| installation    = [http://mayday.w.staszic.waw.pl/df.php Available as a pre-installed copy].&lt;br /&gt;
| comments        = Last updated: 28 July 2014. The DFgraphics github version is currently the only one actively maintained.&lt;br /&gt;
Combined with a customized main tileset. Credits go to Beefmo, Sphr, DR, Tocky, Herrbdog, Bane18, Dragon Warrior games and me (although I did much more organizing and editing than actually creating).&lt;br /&gt;
&lt;br /&gt;
There's an [https://github.com/rofl0r/df-mayday inofficial patch] that supports 0.43.05 (the non-graphic related parts of the original mayday (key bindings, embark profile) have been sacrified to make forward ports easier).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Obsidian Graphics Set===&lt;br /&gt;
[[Image:Zscrn-obsidian.jpg|thumb|right|Screenshot of game using the Obsidian Graphics Set]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Obsidian Graphics Set.png|256px]]&amp;lt;!--[[File:Obsidian Graphics Set Dwarves Sheet.png]]--&amp;gt;&lt;br /&gt;
| download link   = [http://www.bay12forums.com/smf/index.php?topic=126934.msg4302701#msg4302701 Official Forum Page] or [https://github.com/DFgraphics/Obsidian/releases GitHub]&lt;br /&gt;
| author          = [[User:Obsidian Soul|Obsidian Soul]]&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1024&amp;amp;times;768 or higher&lt;br /&gt;
| current version = 0.8&lt;br /&gt;
| df compatible   = 0.34.11 (unofficial DF2014 update available, see description)&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: July 24, 2013. The DFgraphics github version is currently the only one actively maintained. '''[https://dwarffortresswiki.org/index.php/File:Obsidian_spritesheet_v1.png Click here for a full sprite sheet!]'''&lt;br /&gt;
A graphics set that focuses on consistency and stylized realism to harmonize the different tiles and give a more &amp;quot;medieval&amp;quot; atmosphere to the game. Unlike other tilesets, this also specifically sets aside different tiles for grass with modifications to their graphics raws. This makes it easier to distinguish pasturable areas from bare rock and sand, tell apart different biomes, as well as letting you plan green (or blue, if you're going with cave moss) gardens along your entrance halls. Just make sure to forbid traffic on it to avoid trampling them to bare ground.&lt;br /&gt;
&lt;br /&gt;
Unofficial updates for DF2014 are bundled with PeridexisErrant's [http://www.bay12forums.com/smf/index.php?topic=126076 DF Starter Pack] for Windows, fricy's [http://www.bay12forums.com/smf/index.php?topic=128960 MacNewbie Pack] for Mac, and Beautato's [http://www.bay12forums.com/smf/index.php?topic=140966.0 Linux Lazy Newb Pack] for Linux.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Phoebus' Graphics Set===&lt;br /&gt;
[[Image:Zscrn-phoebus.jpg|thumb|right|Screenshot of game using Phoebus' Graphics Pack]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Phoebus_16x16.png|256px]]&amp;lt;!--[[Image:Phoebus_Dwarves.png]]--&amp;gt;&lt;br /&gt;
| forum thread   = [http://www.bay12forums.com/smf/index.php?topic=137096.0 Official Forum Thread] or [https://github.com/DFgraphics/Phoebus/releases GitHub]&lt;br /&gt;
| download link  = [https://github.com/DFgraphics/Phoebus GitHub repository]&lt;br /&gt;
| author          = Phoebus&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1280&amp;amp;times;400&lt;br /&gt;
| current version = 0.44.06&lt;br /&gt;
| installation    = Available pre-installed or as a patch&lt;br /&gt;
| comments        = Phoebus quit supporting it but community tries to keep it up to date, see github repo&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Spacefox Graphics Set===&lt;br /&gt;
[[Image:Spacefoxscr.png|thumb|right|Screenshot of game using the Spacefox Graphics Set]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Spacefox-preview.png|256px]]&lt;br /&gt;
| download link   = [https://github.com/DFgraphics/Spacefox GitHub repository]&lt;br /&gt;
| author          = Spacefox&lt;br /&gt;
| sprite          = 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1280&amp;amp;times;400&lt;br /&gt;
| current version = 43.05e&lt;br /&gt;
| df compatible   = 0.43.05&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
A tile and graphic set created with a simple, clean look as a goal. Inspired by Jolly Bastion and referenced from tile sets that have come before. This graphic and tileset is still very much a WIP. It should be completely playable as it is based off Phoebus' Tileset and comes with all of it's graphical assets.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Tergel Graphics Set===&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Tergellogo.png|256px]]&lt;br /&gt;
| download link   = [http://www.bay12forums.com/smf/index.php?topic=145802.0 Forum thread], [https://github.com/DFgraphics/Tergel Github]&lt;br /&gt;
| author          = CowThing&lt;br /&gt;
| sprite          = 12&amp;amp;times;12 or 16&amp;amp;times;16&lt;br /&gt;
| resolution      = 1024&amp;amp;times;768&lt;br /&gt;
| current version = 5.0&lt;br /&gt;
| df compatible   = 0.44.05&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: Dec 22, 2017. The DFgraphics github version is currently the only one actively maintained.&lt;br /&gt;
Tergel is an ASCII tileset combined with simple pixel art. CowThing wanted to enhance the ASCII feel, while keeping the game readable, and give the game a happier feel. This tileset was derived from Simple Mood by Rogue Yun. Also inspired by Taffer, Jolly Bastion, Quale's &amp;quot;scroll-o-sprites&amp;quot;, and many others.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==15×15 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===Duerer 15×15 Graphics Set===&lt;br /&gt;
[[File:Duererscreenshot.png|thumb|right|Screenshot of game using the Duerer graphics set.]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Duererlogo.png|256px]]&lt;br /&gt;
| download link   = [http://www.bay12forums.com/smf/?topic=142083.0 Forum thread]&lt;br /&gt;
| author          = HaterSkater&lt;br /&gt;
| sprite          = 15&amp;amp;times;15&lt;br /&gt;
| resolution      = 1280&amp;amp;times;400&lt;br /&gt;
| current version = 0.6.A&lt;br /&gt;
| df compatible   = 0.42.02&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: December 6, 2015. No longer maintained.&lt;br /&gt;
That's it. Engraved Dwarf Fortress.&lt;br /&gt;
The idea of this set arose after a series of experiments including noise application to other tilesets, and, in other hand, after 4 year study of art history. Resulting tileset looks like hand drawn graphics and engravings made in XV-XVI century or maps of same epoch.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==12×12 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===Geoduck's 12×12 Graphics Set===&lt;br /&gt;
[[File:Zscr-geoduck.jpg|thumb|right|Screenshot of game using Geoduck's Graphics Set and Shizzle's ASCII tileset]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Geoduck12x12dwarfsample2.png|256px]]&lt;br /&gt;
| download link   = [http://www.geoduckthings.net/dwarf/dwarffortress.html Geoduck's 12x12 Dwarf Fortress page]&lt;br /&gt;
| author          = Geoduck&lt;br /&gt;
| sprite          = 12&amp;amp;times;12&lt;br /&gt;
| resolution      = 1024&amp;amp;times;768&lt;br /&gt;
| current version = 3.0&lt;br /&gt;
| df compatible   = 0.34.11&lt;br /&gt;
| installation    = Instructions at download site&lt;br /&gt;
| comments        = Last updated: May 22, 2013&lt;br /&gt;
Set for Dwaves/Goblins/Humans/Elves/Kobolds which attempts to combine the compactness of 12×12 tiles with greater simplicity, clarity and ease of viewing. Designed for Fortress mode play, but includes Adventurer tiles. Created from scratch, but inspired in part by PTTG's graphics set for .40d. Goblin design taken from Dwarf Fortress Forum game-image.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==10×10 square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===Taffer's Tilesets &amp;amp; Graphics===&lt;br /&gt;
[[File:Zscr-taffer.jpg|thumb|right|Screenshot of game using Taffer's Tileset &amp;amp; Graphics]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Taffergraphics.png|250px]]&lt;br /&gt;
| download link   = [https://github.com/DFgraphics/Taffer/releases Github]&lt;br /&gt;
| author          = Taffer&lt;br /&gt;
| sprite          = 10&amp;amp;times;10, 20&amp;amp;times;20&lt;br /&gt;
| resolution      = Any&lt;br /&gt;
| current version = 4.8&lt;br /&gt;
| df compatible   = 0.43.05&lt;br /&gt;
| installation    = Unzip over DF install&lt;br /&gt;
| comments        = Last updated: January 10, 2017&lt;br /&gt;
Sharp looking, vanilla styled tilesets that strive to strike a good balance between nice, attractive graphics, while avoiding odd graphical oddities. I have positioned many tiles carefully and put a lot of thought into each one, often obsessively so. I find the cumulative differences from the ASCII add quite a bit to the game. I'm a bit of a perfectionist and the update log attests to that, but the result is pleasing and well-polished. Alternate walls are included, as is the color set and racial graphics for dwarves, humans, elves, goblins, and kobolds.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==16×24 non-square graphics sets==&lt;br /&gt;
&lt;br /&gt;
===Anon's Tileset and Creature Graphics===&lt;br /&gt;
[[Image:Anontileset_screen2.PNG|100px|thumb|right|Screenshot of a worldgen fortress, as seen using Anon's Tileset and Creature Graphics.]]&lt;br /&gt;
{{GraphicsSet&lt;br /&gt;
| image           = [[Image:Anontileset_screen1.PNG]]&lt;br /&gt;
| download link   = [http://dffd.bay12games.com/file.php?id=12544]&lt;br /&gt;
| author          = TilesetAnon&lt;br /&gt;
| sprite          = 16&amp;amp;times;24&lt;br /&gt;
| current version = 1.01&lt;br /&gt;
| df compatible   = 0.43.05&lt;br /&gt;
| installation    = Available as a patch&lt;br /&gt;
| comments        = Last updated: July 10, 2017&lt;br /&gt;
A clean and simple tileset with creature graphics, intended to give a comfy NES-era RPG feel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Mods}}&lt;br /&gt;
{{Category|Interface}}&lt;br /&gt;
{{Category|Graphics}}&lt;/div&gt;</summary>
		<author><name>Ralpha</name></author>
	</entry>
</feed>