v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing v0.31:Reactions

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "v0.31"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 40: Line 40:
 
=== Reaction name ===
 
=== Reaction name ===
  
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.
+
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 not capitalized, for consistency with the existing reactions.
  
 
=== Building ===
 
=== Building ===
Line 60: Line 60:
 
* ''[[#name|name]]'': The name of the reagent, local to the reaction.
 
* ''[[#name|name]]'': The name of the reagent, local to the reaction.
 
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.
 
* ''[[#quantity|quantity]]'': The amount of the item that will be used in the reaction.
* ''[[#item_token|item token]]'': The type (and subtype) of the item you require.
+
* ''[[#item_token|item token]]'': The type of the item you require.
 
* ''[[#material_token|material token]]'': The material the item should be made of.
 
* ''[[#material_token|material token]]'': The material the item should be made of.
 
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.
 
* ''[[#Modifiers|...modifiers...]]'': Zero or more tokens which further clarify the acceptable types when the item type and material types are insufficient to distinguish them.
Line 77: Line 77:
 
Item tokens are of the form ITEM_TYPE:ITEM_SUBTYPE.
 
Item tokens are of the form ITEM_TYPE:ITEM_SUBTYPE.
  
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example.  A [[item token|full list]] is available.
+
The item type is the sort of item you require; WEAPON, TOY or SKIN_TANNED, for example.  A {{L|item token|full list}} is available.
  
 
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.
 
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.
  
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.
+
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 the entities defined within the local raw data files and their exact names can be referenced by looking at the corresponding file.
  
 
For backwards compatibility, reagents can also accept "METAL_ORE:metal_id" 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).
 
For backwards compatibility, reagents can also accept "METAL_ORE:metal_id" 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).
  
 
==== material token ====
 
==== material token ====
Material tokens come in several forms - see [[material token|here]] for a full list. For reagents, this will typically be INORGANIC:MATERIAL_ID, whereas products will typically use GET_MATERIAL_FROM_REAGENT:REAGENT_ID:REACTION_PRODUCT_ID.
+
Material tokens come in several forms - see {{L|material token|here}} for a full list. For reagents, this will typically be INORGANIC:MATERIAL_ID, whereas products will typically use GET_MATERIAL_FROM_REAGENT:REAGENT_ID:REACTION_PRODUCT_ID.
  
 
==== Modifiers ====
 
==== Modifiers ====
Line 117: Line 117:
 
|-
 
|-
 
| [NOT_WEB]
 
| [NOT_WEB]
| Reagent must be collected (to distinguish silk thread from webs). Only makes sense for items of type THREAD.
+
| States that the reagent must have been collected (to distinguish silk thread from webs).
 
|-
 
|-
 
| [WEB_ONLY]
 
| [WEB_ONLY]
| Reagent must be undisturbed (to distinguish silk thread from webs). Only makes sense for items of type THREAD.
+
| States that the reagent must be undisturbed (to distinguish silk thread from webs).
 
|-
 
|-
 
| [EMPTY]
 
| [EMPTY]
Line 126: Line 126:
 
|-
 
|-
 
| [NOT_CONTAIN_BARREL_ITEM]
 
| [NOT_CONTAIN_BARREL_ITEM]
| If the reagent is a container, it must not contain [[lye]] or [[milk]]. Not necessary if specifying [EMPTY].
+
| If the reagent is a container, it must not contain lye or milk.
 
|-
 
|-
 
| [BAG]
 
| [BAG]
Line 132: Line 132:
 
|-
 
|-
 
| [GLASS_MATERIAL]  
 
| [GLASS_MATERIAL]  
| Reagent material must have the [IS_GLASS] token. All 3 types of [[glass]] have this token hardcoded.
+
| Reagent material must have the [IS_GLASS] token. All 3 types of glass have this token hardcoded.
 
|-
 
|-
 
| [BUILDMAT]
 
| [BUILDMAT]
| Reagent must be a general [[building material]] - BAR, BLOCKS, BOULDER, or WOOD.
+
| Reagent must be a general building component - BAR, BLOCKS, BOULDER, or WOOD.
 
|-
 
|-
 
| [FIRE_BUILD_SAFE]
 
| [FIRE_BUILD_SAFE]
| Reagent material must be stable at temperatures below 11000. Currently broken - requires material's IGNITE_POINT to be set to "NONE". Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.
+
| Reagent material must be stable at temperatures below 11000. Currently broken - requires material's IGNITE_POINT to be set to "NONE". Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are rejected.
 
|-
 
|-
 
| [MAGMA_BUILD_SAFE]
 
| [MAGMA_BUILD_SAFE]
| Reagent material must be stable at temperatures below 12000. Currently broken - requires material's IGNITE_POINT to be set to "NONE". Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are considered unsafe.
+
| Reagent material must be stable at temperatures below 12000. Currently broken - requires material's IGNITE_POINT to be set to "NONE". Only works with items of type BAR, BLOCKS, BOULDER, WOOD, and ANVIL - all others are rejected.
 
|-
 
|-
 
| [CAN_USE_ARTIFACT]
 
| [CAN_USE_ARTIFACT]
Line 147: Line 147:
 
|-
 
|-
 
| [WORTHLESS_STONE_ONLY]
 
| [WORTHLESS_STONE_ONLY]
| Reagent material must be non-[[economic]].
+
| Reagent material must be non-economic.
 
|-
 
|-
 
| [ANY_PLANT_MATERIAL]  
 
| [ANY_PLANT_MATERIAL]  
Line 183: Line 183:
 
|-
 
|-
 
| [USE_BODY_COMPONENT]
 
| [USE_BODY_COMPONENT]
| Reagent must be a body part (CORPSE or CORPSEPIECE).
+
| Reagent must be a body part.
 
|-
 
|-
 
| [NO_EDGE_ALLOWED]
 
| [NO_EDGE_ALLOWED]
| Reagent must not have an edge - excludes sharp stones (produced using knapping) and most types of weapon/ammo.
+
| Reagent must not be sharpened (used for knapping).
 
|-
 
|-
 
| [NOT_ENGRAVED]
 
| [NOT_ENGRAVED]
Line 210: Line 210:
 
|-
 
|-
 
| [MIN_DIMENSION:X]
 
| [MIN_DIMENSION:X]
| Reagent's item dimension must be at least this large. The reagent's item type must be BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, or CLOTH for this to work.
+
| ?
 
|-
 
|-
 
| [HAS_TOOL_USE:X]
 
| [HAS_TOOL_USE:X]
| 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.
+
| Reagent must be a {{L|tool}} with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.
 
|-
 
|-
 
| [PRESERVE_REAGENT]
 
| [PRESERVE_REAGENT]
Line 219: Line 219:
 
|-
 
|-
 
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
 
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
| 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.
+
| Reagent quantity is ignored for the purposes of producing extra outputs. Typically used for containers so that {{L|stack}}s of reagents will correctly produce additional outputs.
 
|}
 
|}
  
Line 241: Line 241:
  
 
====item token====
 
====item token====
The [[item token]] and subtype of the item you produce.
+
The {{L|item token}} and subtype of the item you produce.
  
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.
+
For products, this can also be set to CRAFTS:NONE to produce up to three random {{L|craft}} items. This value cannot be used in any other context.
  
 
====material token====
 
====material token====
A [[material token]] describing what the product will be made of.
+
A {{L|material token}} describing what the product will be made of.
  
 
====Product modifiers====
 
====Product modifiers====
Line 266: Line 266:
 
|-
 
|-
 
| [PRODUCT_DIMENSION:<size>]
 
| [PRODUCT_DIMENSION:<size>]
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, and DRINK. A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH. Has no effect on any other item types.
+
| Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, and DRINK. A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.
 
|-
 
|-
 
| [PRODUCT_TO_CONTAINER:<id>]
 
| [PRODUCT_TO_CONTAINER:<id>]
Line 311: Line 311:
  
 
====material token====
 
====material token====
A [[material token]] describing what the decoration will be made of.
+
A {{L|material token}} describing what the decoration will be made of.
  
 
===Other tokens===
 
===Other tokens===
  
 
==== fuel ====
 
==== fuel ====
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]).
+
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 {{L|magma kiln}}, {{L|magma smelter}}, or any custom building having [NEEDS_MAGMA]).
  
 
==== skill ====
 
==== skill ====
The SKILL token determines what [[Skill token|skill]] the reaction requires and what skill it trains.  Only one skill may be specified.
+
The SKILL token determines what [[Skill tokens|skill]] the reaction requires and what skill it trains.  Multiple skills can be listed but only one will be used.
  
 
==== automatic ====
 
==== automatic ====
Line 340: Line 340:
 
In short, they require the material to have a token such as  
 
In short, they require the material to have a token such as  
 
   [MATERIAL_REACTION_PRODUCT:X:Y]
 
   [MATERIAL_REACTION_PRODUCT:X:Y]
...where X is the name of the reaction product that will be referred to in the reaction (RENDER_MAT, in the reaction class example, or TAN_MAT for leather) and Y is a [[material token]] indicating the material of the desired product (such as LOCAL_CREATURE_MAT:LEATHER]).
+
...where X is the name of the reaction product that will be referred to in the reaction (RENDER_MAT, in the reaction class example, or TAN_MAT for leather) and Y is a {{L|material token}} indicating the material of the desired product (such as LOCAL_CREATURE_MAT:LEATHER]).
  
 
==Reactions and world generation==
 
==Reactions and world generation==
Line 464: Line 464:
 
| DOES_NOT_DETERMINE_PRODUCT_AMOUNT
 
| DOES_NOT_DETERMINE_PRODUCT_AMOUNT
 
|
 
|
| 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 "1 plant + 1 barrel -> 5 alcohol (into barrel)", using this on the barrel allows the reaction to be performed as "5 plant + 1 barrel -> 25 alcohol" instead of "5 plant + 5 barrel -> 25 alcohol".
+
| Setting this dis-allows the quantity of a reagent (probably first in the list) to determine the output quantity. Used where the input is a stack, e.g. liquids in a barrel.
  
 
|-
 
|-
Line 499: Line 499:
 
| HAS_TOOL_USE
 
| HAS_TOOL_USE
 
| Tool-use token
 
| Tool-use token
| 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.
+
| Reagent must be a {{L|tool}} with the specific TOOL_USE value. The reagent's item type must be TOOL:NONE for this to make any sense.
  
 
|-
 
|-
Line 524: Line 524:
 
| MIN_DIMENSION
 
| MIN_DIMENSION
 
|
 
|
* size
+
| ?
| Requires that the reagent have a dimension of at least this value. Only effective with BAR, POWDER_MISC, LIQUID_MISC, DRINK, THREAD, and CLOTH items.
 
  
 
|-
 
|-
Line 616: Line 615:
 
* name/id
 
* name/id
 
* quantity
 
* quantity
* [[item token]]
+
* item token (and subtoken)
* [[material token]]
+
* material token (and subtoken)
 
| Requires a given reagent as an input for a reaction
 
| Requires a given reagent as an input for a reaction
  
Line 647: Line 646:
 
|}
 
|}
  
{{Category|Modding}}
+
[[Category:DF2010:Modding]]

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)