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 === | ||
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. | 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. | ||
− | [REAGENT:<name>:<quantity>:<item token>:<material token>][...modifiers...] | + | [REAGENT:<name>:<quantity>:<item token>:<item subtype>:<material token>:<material subtype>][...modifiers...] |
* ''[[#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_.2F_item_subtype|item token]]'': The type of the item you require. [TODO Link to full list? Should just be based on OBJECT tokens in every raw file.] |
− | * ''[[# | + | * ''[[#item_token_.2F_item_subtype|item subtype]]'': The unique identifier of the item you require, as it appears in the corresponding raw data file, or NONE for no specific type. |
+ | * ''[[#material_token_.2F_material_subtype|material token]]'': The category of the material needed that the item should be made of, or NONE if only the ''item token'' matters. | ||
+ | * ''[[#material_token_.2F_material_subtype|material subtype]]'': The unique identifier of a specific material required within the ''material token'' category, or NONE if any type will do. | ||
* ''[[#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 72: | Line 70: | ||
The quantity differs between item types. Generally speaking, cloth, thread, powder 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. | The quantity differs between item types. Generally speaking, cloth, thread, powder 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. | ||
− | Sometimes the quantity of product is directly connected with the quantity of reagent; it seems to be | + | Sometimes the quantity of product is directly connected with the quantity of reagent; it seems to be REAGENT <quantity> / 150 (rounding down) so that Reagent <quantity> of 3 gives 50 product and a <quantity> of 4 gives 37. (150/4=37.5) [List of item types this applies to? Bars, for instance.] |
− | |||
− | |||
− | |||
− | The item | + | ==== item token / item subtype ==== |
+ | The item token is the type of item you require; WEAPON, TOY or SKIN_TANNED, for example. A [[item token|full list]] is available. | ||
− | + | 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 can leave this blank. Subtypes are the entities defined within the local raw data files and their exact names can be referenced by looking at the corresponding file. | |
− | The | + | ==== material token / material subtype ==== |
− | + | The material token and material subtype are frequently related. The first indicates the category of material you want, such as INORGANIC, though it can also specify one of the hardcoded materials (see {{L|material token}} for a list). The second indicates the specific subtype of material you want, such as OBSIDIAN or STEEL. | |
− | |||
− | |||
− | |||
− | |||
==== Modifiers ==== | ==== Modifiers ==== | ||
Line 97: | Line 89: | ||
! 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 103: | Line 98: | ||
| [HAS_MATERIAL_REACTION_PRODUCT:X] | | [HAS_MATERIAL_REACTION_PRODUCT:X] | ||
| Detailed below the reaction anatomy section. | | Detailed below the reaction anatomy section. | ||
− | |||
− | |||
− | |||
|- | |- | ||
| [UNROTTEN] | | [UNROTTEN] | ||
− | | Reagent must not be rotten, mainly for organic | + | | Reagent must not be rotten, mainly for organic MATGLOSS types. |
|- | |- | ||
− | | [ | + | | [BUILDMAT] |
− | | Reagent | + | | Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?). |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| [GLASS_MATERIAL] | | [GLASS_MATERIAL] | ||
− | | Reagent | + | | Reagent has a one of the glass MATGLOSS types. |
|- | |- | ||
− | | [ | + | | [WORTHLESS_STONE_ONLY] |
− | | | + | | The reagent respects allowed and forbidden economic stones from the Stone menu. |
|- | |- | ||
| [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 | + | | Reagent MATGLOSS must be of a plant subtype. |
|- | |- | ||
| [ANY_SILK_MATERIAL] | | [ANY_SILK_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a silk type. |
− | |||
− | |||
− | |||
|- | |- | ||
| [ANY_SOAP_MATERIAL] | | [ANY_SOAP_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a soap type. |
|- | |- | ||
| [ANY_LEATHER_MATERIAL] | | [ANY_LEATHER_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a leather type. |
|- | |- | ||
| [ANY_BONE_MATERIAL] | | [ANY_BONE_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a bone type. |
− | |||
− | |||
− | |||
|- | |- | ||
| [ANY_SHELL_MATERIAL] | | [ANY_SHELL_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a shell type. |
|- | |- | ||
| [ANY_TOOTH_MATERIAL] | | [ANY_TOOTH_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a tooth type. |
|- | |- | ||
| [ANY_HORN_MATERIAL] | | [ANY_HORN_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a horn type. |
|- | |- | ||
| [ANY_PEARL_MATERIAL] | | [ANY_PEARL_MATERIAL] | ||
− | | Reagent | + | | Reagent MATGLOSS must be of a pearl type (Excretion from sea creatures?) |
|- | |- | ||
| [USE_BODY_COMPONENT] | | [USE_BODY_COMPONENT] | ||
− | | Reagent must | + | | Reagent MATGLOSS must come off a creature's body. |
|- | |- | ||
− | | [ | + | | [METAL_ORE] |
− | | Reagent must | + | | Reagent MATGLOSS must be a metal ore. |
|- | |- | ||
− | | [ | + | | [NOT_WEB] |
− | | | + | | States that the material cannot be web (For making only plant/adamantine thread?). |
|- | |- | ||
− | | [ | + | | [WEB_ONLY] |
− | | | + | | States that the material has to be web (For making only silk thread?). |
|- | |- | ||
− | | [ | + | | [POTASHABLE] |
− | | | + | | The reagent must be able to be turned into pot ash. |
|- | |- | ||
− | | [ | + | | [EMPTY] |
− | | | + | | If the reagent is a container, it must be empty. |
|- | |- | ||
− | | [ | + | | [CONTAINS_LYE] |
− | | | + | | If the reagent is a container, it must contain LYE. |
|- | |- | ||
− | | [ | + | | [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. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | 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 | + | 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 matgloss fields as NONE:NONE, it will grab any available BOULDER-type item irrespective of matgloss. |
===Products=== | ===Products=== | ||
Products are the end product of the reaction. A reaction can have as many products as it likes. | Products are the end product of the reaction. A reaction can have as many products as it likes. | ||
− | 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. | + | 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. Products also don't use tokens like USE_ANY_BONE_MATERIAL. |
Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:<IDENTIFIER>] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token. | Products can be produced directly to a container using the [PRODUCT_TO_CONTAINER:<IDENTIFIER>] token, where the IDENTIFIER is the name of a reagent. This requires the reagent to have the PRESERVE_REAGENT token. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===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 334: | Line 205: | ||
[HAS_MATERIAL_REACTION_PRODUCT:RENDER_MAT] | [HAS_MATERIAL_REACTION_PRODUCT:RENDER_MAT] | ||
− | Reaction classes represent different classes of material - basically, the | + | Reaction classes represent different classes of material - basically, the matgloss subtype of the reagent must have a REACTION_CLASS the same as the one in the reaction. |
Material reaction products are similar, but are generally used more for things like different kinds of creature materials than universal materials like stone. This token is how skin can be tanned into leather, which are two separate materials - the skin material has leather as a MATERIAL_REACTION_PRODUCT. | Material reaction products are similar, but are generally used more for things like different kinds of creature materials than universal materials like stone. This token is how skin can be tanned into leather, which are two separate materials - the skin material has leather as a MATERIAL_REACTION_PRODUCT. | ||
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:Z] |
− | ...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) | + | ...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), Y is the matgloss type of the desired product (such as INORGANIC or LOCAL_CREATURE_MAT) and Z is the specific material, like LEATHER or OBSIDIAN. |
==Reactions and world generation== | ==Reactions and world generation== | ||
Line 350: | Line 221: | ||
* 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]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |