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 7: | Line 7: | ||
In [[Fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[Entities|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 star metal or some other custom material, only they will be able to use it. | In [[Fortress mode]], reactions are linked to specific buildings, and must be added to a civilization's [[Entities|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 star metal or some other custom material, only they will be able to use it. | ||
− | In [[Adventure mode]], reactions are freely available via x > create, 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. As of .10, there are several bugs with Adventure mode reactions, chief of which is the fact that | + | In [[Adventure mode]], reactions are freely available via x > create, 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. As of .10, there are several bugs with Adventure mode reactions, chief of which is the fact that the [HAS_MATERIAL_REACTION_PRODUCT] token is completely ignored, leading to dragon eye tissue tanned hides, among other things. |
− | Prior to version 31.10, a reaction could only result in an object of base [[quality]]. However, in .10 items produced via reactions have been observed to have quality modifiers. The way skill factors into them has yet | + | Prior to version 31.10, a reaction could only result in an object of base [[quality]]. However, in .10 items produced via reactions have been observed to have quality modifiers. The way skill factors into them has yet to be determined. |
==Anatomy of a reaction== | ==Anatomy of a reaction== | ||
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 | + | 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 capitalised, for consistency with the existing reactions. |
=== Building === | === Building === | ||
Line 49: | Line 49: | ||
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. | 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. | ||
− | |||
− | |||
− | |||
− | |||
=== Reagents === | === Reagents === | ||
Line 60: | Line 56: | ||
* ''[[#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 | + | * ''[[#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 73: | ||
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 | + | 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 type can also be set to ANY_RAW_MATERIAL (to permit POWDER_MISC, BAR, BOULDER, or GLOB{{verify}}) or ANY_CRAFT (to permit FIGURINE, AMULET, SCEPTER, CROWN, RING, EARRING, or BRACELET). | |
+ | *For products, the item type can also be set to CRAFTS to randomly pick a type of {{L|craft}} (and possibly produce more than one{{verify}}). | ||
− | + | 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. | |
==== material token ==== | ==== material token ==== | ||
− | Material tokens come in several forms - see | + | 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 97: | Line 92: | ||
! Token | ! Token | ||
! Meaning | ! Meaning | ||
+ | |- | ||
+ | | [PRESERVE_REAGENT] | ||
+ | | Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers. | ||
|- | |- | ||
| [REACTION_CLASS:X] | | [REACTION_CLASS:X] | ||
Line 110: | Line 108: | ||
| Reagent must not be rotten, mainly for organic materials. | | Reagent must not be rotten, mainly for organic materials. | ||
|- | |- | ||
− | | [ | + | | [BUILDMAT] |
− | | Reagent | + | | Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?). |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| [GLASS_MATERIAL] | | [GLASS_MATERIAL] | ||
− | | Reagent | + | | Reagent is made of one of the 3 types of glass. |
|- | |- | ||
− | | [ | + | | [WORTHLESS_STONE_ONLY] |
− | | Reagent | + | | Reagent is not made of an economic stone. |
|- | |- | ||
| [FIRE_BUILD_SAFE] | | [FIRE_BUILD_SAFE] | ||
− | | Reagent | + | | Reagent must be considered fire safe - ie. not wood, and not coal. |
|- | |- | ||
| [MAGMA_BUILD_SAFE] | | [MAGMA_BUILD_SAFE] | ||
− | | Reagent | + | | Reagent must have a melting point greater than the temperature of Magma. |
|- | |- | ||
| [CAN_USE_ARTIFACT] | | [CAN_USE_ARTIFACT] | ||
| Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised. | | Reagent can be an Artifact. Using [PRESERVE_REAGENT] with this is strongly advised. | ||
− | |||
− | |||
− | |||
|- | |- | ||
| [ANY_PLANT_MATERIAL] | | [ANY_PLANT_MATERIAL] | ||
− | | Reagent material must | + | | Reagent material must have any of the [STRUCTURAL_PLANT_MAT], [SEED_MAT], or [LEAF_MAT] tokens.{{verify}} |
|- | |- | ||
| [ANY_SILK_MATERIAL] | | [ANY_SILK_MATERIAL] | ||
Line 168: | Line 145: | ||
|- | |- | ||
| [ANY_STRAND_TISSUE] | | [ANY_STRAND_TISSUE] | ||
− | | | + | | Unknown |
|- | |- | ||
| [ANY_SHELL_MATERIAL] | | [ANY_SHELL_MATERIAL] | ||
Line 183: | Line 160: | ||
|- | |- | ||
| [USE_BODY_COMPONENT] | | [USE_BODY_COMPONENT] | ||
− | | Reagent must | + | | Reagent material must come off a creature's body. |
|- | |- | ||
| [NO_EDGE_ALLOWED] | | [NO_EDGE_ALLOWED] | ||
− | | Reagent must not | + | | Reagent must not be sharpened (used for knapping). |
|- | |- | ||
| [NOT_ENGRAVED] | | [NOT_ENGRAVED] | ||
− | | | + | | ? |
|- | |- | ||
| [NOT_IMPROVED] | | [NOT_IMPROVED] | ||
Line 197: | Line 174: | ||
| Reagent material must have [ABSORPTION:0] | | Reagent material must have [ABSORPTION:0] | ||
|- | |- | ||
− | | [ | + | | [NOT_PRESSED] |
− | | Reagent | + | | Reagent must not be in the SOLID_PRESSED state. |
|- | |- | ||
− | | [ | + | | [METAL_ORE] |
− | | | + | | Reagent material must be a metal ore. |
|- | |- | ||
− | | [ | + | | [NOT_WEB] |
− | | | + | | States that the material cannot be a web (For making only plant/adamantine thread?). |
+ | |- | ||
+ | | [WEB_ONLY] | ||
+ | | States that the material has to be a web (For making only silk thread?). | ||
+ | |- | ||
+ | | [POTASHABLE] | ||
+ | | The reagent must be able to be turned into potash - thus, it must be either ASH or LYE. | ||
+ | |- | ||
+ | | [EMPTY] | ||
+ | | If the reagent is a container, it must be empty. | ||
+ | |- | ||
+ | | [CONTAINS_LYE] | ||
+ | | 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]. | ||
+ | |- | ||
+ | | [NOT_CONTAIN_BARREL_ITEM] | ||
+ | | 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. | ||
|- | |- | ||
− | | [ | + | | [BAG] |
− | | Reagent | + | | 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. |
|- | |- | ||
− | | [MIN_DIMENSION | + | | [MIN_DIMENSION] |
− | | | + | | ? |
|- | |- | ||
| [HAS_TOOL_USE:X] | | [HAS_TOOL_USE:X] | ||
− | | Reagent must be a | + | | 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. |
− | |||
− | |||
− | |||
|- | |- | ||
| [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] | | [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] | ||
− | | | + | | ? |
|} | |} | ||
Line 241: | Line 230: | ||
====item token==== | ====item token==== | ||
− | The | + | The {{L|item token}} and subtype of the item you produce. |
− | |||
− | |||
====material token==== | ====material token==== | ||
− | A | + | A {{L|material token}} describing what the product will be made of. |
====Product modifiers==== | ====Product modifiers==== | ||
Line 266: | Line 253: | ||
|- | |- | ||
| [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 | + | | 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 293: | Line 280: | ||
|- | |- | ||
| COVERED | | COVERED | ||
− | | Item is encrusted/studded/decorated with <material>. | + | | Item is encrusted/studded/decorated with <material>.<br />Currently buggy - most materials (stone, metal, cloth, leather, bone, and shell, but '''not''' gemstones) seem to be applied as glaze.{{bug|4090}} |
|- | |- | ||
| GLAZED | | GLAZED | ||
Line 311: | Line 298: | ||
====material token==== | ====material token==== | ||
− | A | + | 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 | + | The FUEL token means that the reaction requires coke or charcoal to be performed, or magma in magma workshops. |
==== skill ==== | ==== skill ==== | ||
− | The SKILL token determines what [[Skill | + | 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 327: | ||
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 | + | ...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 350: | Line 337: | ||
* 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. | * 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. | ||
− | + | [[Category:DF2010:Modding]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |