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.

Difference between revisions of "v0.31:Reactions"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{av}}
 
{{av}}
  
'''Reactions''' are moddable crafting formulas. They can be tweaked and added onto to allow smelting of new metals, alloys, and many other products. They can be assigned to specific [[Entities]] to allow only certain entities to have access to it. Some examples of various forms of reactions, go here [[Reaction Examples|examples]].
+
'''Reactions''' are moddable crafting formulas. They can be tweaked and added onto to allow smelting of new metals, alloys, and many other products. They must be assigned to specific [[Entities]]; if not explicitly added to an entity's definition, they will not be able to produce that reaction. Some examples of various forms of reactions, go here [[Reaction Examples|examples]].
  
 
Currently, a reaction can only result in an object of base quality.
 
Currently, a reaction can only result in an object of base quality.

Revision as of 02:06, 7 April 2010

This article is about an older version of DF.

Reactions are moddable crafting formulas. They can be tweaked and added onto to allow smelting of new metals, alloys, and many other products. They must be assigned to specific Entities; if not explicitly added to an entity's definition, they will not be able to produce that reaction. Some examples of various forms of reactions, go here examples.

Currently, a reaction can only result in an object of base quality.

Reaction Makeup

[REACTION:<REACTION_IDENTIFIER>]
[NAME:<REACTION_NAME>]
<... #Buildings One or more reagent declarations ...>
<... #Reagents Zero or more reagent declarations...>
<... #Products Zero or more reagent declarations ...>
<... #Reaction Modifiers Zero or more reagent declarations ...>
<... #Skills Zero or more skill declarations ...>

<REACTION_IDENTIFER> - Refers to a unique identifier for the reaction (Used in Entity Raws to allow an Enitity to make use of the reaction.

<REACTION_NAME> - String displayed in the building for the reaction.

Buildings

Each reaction requires a building to be declared for it to be used at.

[BUILDING:<BUILDING_IDENTIFIER>:<BUILDING_KEY>]

<BUILDING_IDENTIFIER - The building at which this reaction can be used. NOTE: SMELTER, KILN, KITCHEN and TANNER seem to be the only non-custom buildings allowed to be specified at this point.[Verify]

<BUILDING_KEY> - The key that is pressed at the building (Such as 'b' for bed at a Carpenter or a block at a Mason's). 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

A reagent is some object that is required to produce whatever the intended object is. This is typically something like needing the ore of a metal to smelt bars of it.

Reagent Types

[REAGENT:<Identifier>:<Quantity>:<ITEM_TOKEN>:<ITEM_SUBTYPE>:<MATGLOSS_TOKEN>:<MATGLOSS_SUBTYPE>]
or
[REAGENT:<Identifier>:<Quantity>:<MATGLOSS_TOKEN>:<MATGLOSS_SUBTYPE>]

Type 1: Is used for reactions where a specific type of object is required, such as a BUCKET, SWORD, etc.

Type 2: Is used for when only a material type is needed, such as METAL_ORE for smelter reactions.

<Identifier> - Used to refer to this reagent in the reaction Product.

<Quantity> - Used to refer to the number of individual units of the reagent needed for the reaction. NOTE: If a bar, thread, or cloth is used as the <ITEM_TOKEN>, then this value refers to the PRODUCT_DENSITY of the object (150, 15000, 10000 respectively).

<ITEM_TOKEN> - Refers to the hard coded ITEM_TOKEN that the reagent must be.

<ITEM_SUBTYPE> - Refers to a specific item subtype, defined in the raws, of a specific ITEM_TOKEN, such as TOY:ITEM_TOY_MINIFORGE.

<MATGLOSS_TOKEN> - Refers to the hardcoded material type of the reagent, such as PLANT_MAT, METAL_ORE, etc.

<MATGLOSS_SUBTYPE> - Refers to a specific item subtype, defined in the raws, of a specific MATGLOSS_TOKEN, such as INORGANIC:MICA. In the case of a plant type the syntax is slightly different, the MATGLOSS_SUBTYPE is actually <PLANT_NAME>:<PLANT_PART>.

<PLANT_NAME> - Refers to the actual plant's name in the raw files.

<PLANT_PART> - Refers to the plant 'part' you want, whether it's the PLANT, WOOD, LEAVES, SEED, etc.

Reagent Modifier

A reagent can be modified by attaching one, or more, of the following. The modification is used to narrow the available items that can be used for the reaction.

[PRESERVE_REAGENT] - Reagent is not destroyed, which is the normal effect, at the completion of the reaction. Typically used for containers.

[REACTION_CLASS:X] - Reagent's MATGLOSS_SUBTYPE must have a REACTION_CLASS of type X attached to it. Such as the various forms of Gypsum having [REACTION_CLASS:GYPSUM] in them. Reaction classes are not hard-coded and you may freely insert REACTION_CLASS tags with custom "X" types into object definitions that will be used as reagents.

[HAS_MATERIAL_REACTION_PRODUCT:X] - Reagent's MATGLOSS_SUBTYPE must have a MATERIAL_REACTION_PRODUCT tag. This is used primarily on items that come from a dead, or butchered, animal such as skins or fat for tanning and rendering.

[UNROTTEN] - Reagent must not be rotten, mainly for organic MATGLOSS types.

[BUILDMAT] - Reagent is able to be used to build structures (Stone, Wood, Blocks, Bars?).

[GLASS_MATERIAL] - Reagent has a one of the glass MATGLOSS types.

[WORTHLESS_STONE_ONLY] - Only use objects allowed in the Stone Menu.

[FIRE_BUILD_SAFE] - Reagent must be considered fire safe (INORGANIC, excluding COAL types).

[MAGMA_BUILD_SAFE] - Reagent must be considered magma safe (INORGANIC, with a melting point greater than the temperature of Magma.

[CAN_USE_ARTIFACT] - Reagent can be an Artifact.

[ANY_PLANT_MATERIAL] - Reagent MATGLOSS must be of a plant subtype.

[ANY_SILK_MATERIAL] - Reagent MATGLOSS must be of a silk type.

[ANY_SOAP_MATERIAL] - Reagent MATGLOSS must be of a soap type.

[ANY_LEATHER_MATERIAL] - Reagent MATGLOSS must be of a leather type.

[ANY_BONE_MATERIAL] - Reagent MATGLOSS must be of a bone type.

[ANY_SHELL_MATERIAL] - Reagent MATGLOSS must be of a shell type.

[ANY_TOOTH_MATERIAL] - Reagent MATGLOSS must be of a tooth type.

[ANY_HORN_MATERIAL] - Reagent MATGLOSS must be of a horn type.

[ANY_PEARL_MATERIAL] - Reagent MATGLOSS must be of a pearl type (Excretion from sea creatures?)

[USE_BODY_COMPONENT] - Reagent MATGLOSS must come off a creature's body.

[METAL_ORE] - 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 (Such as alcohol?).

[BAG] - 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.

Products

These are the results of a given reaction. There may be any number of such results.

Product Format

[PRODUCT:<CHANCE>:<QUANTITY>:<ITEM_TOKEN>:<ITEM_SUBTYPE>:<MATGLOSS>:<MATGLOSS_SUBTYPE>]

<CHANCE> - This is the chance (As a percent) that the <QUANTITY> number of items will be created after this reaction completes.

<QUANTITY> - This is the number of the item to be created.

<ITEM_TOKEN> - This is the ITEM_TOKEN of the result.

<ITEM_SUBTYPE> - This is a ITEM_SUBTYPE listed in an actual Raw File.

<MATGLOSS> - This is the MATGLOSS of the item. If you want to use the MATGLOSS information of a Reagent, then this is GET_MATERIAL_FROM_REAGENT:IDENTIFIER, where IDENTIFIER is the reagent's identifier in the reaction.

<MATGLOSS_SUBTYPE> - Refers to a specific item subtype, defined in the raws, of a specific MATGLOSS_TOKEN, such as PLANT_MAT:MUSHROOM_HELMET_PLUMP. If GET_MATERIAL_FROM_REAGENT was used in the MATGLOSS, you can specify a type, or you can state NONE, to recieve the MATGLOSS_SUBTYPE of the reagent.

Product Modifiers

Each product may have a zero, or more, modifiers following its declaration.

[PRODUCT_TO_CONTAINER:<IDENTIFIER>] - This states that the product should be put into a specific container listed in as a reagent.

<IDENTIFIER> - Refers back to a reagent identifier.

[PRODUCT_DIMENSIONS:<DIMENSION>] - Used to specify the dimensions of the object, primarily for use with bars, threads, and cloth.

<DIMENSION> - The 'size' of the object, for use in reactions that require a certain amount of bars, threads and cloth. 'Normal' size is bars = 150, threads = 15000 and cloth = 10000.[Verify]

Reaction Modifiers

Reactions can be further modified by the adding zero or more of the following.

[FUEL] - Which states that it must take some form of COAL (COKE or CHARCOAL) to fuel it. If the building requires magma, it's assumed that this tag is ignored.

[AUTOMATIC] - Meaning that if the reagents are present, this reaction is automatically added to the work list of the building, such as 'Butcher Animal' at a Butcher's or 'Gather Web' at a Loom.

Skills

Skills have to be associated with a reaction. This dictates what skill receives the experience and who can do the job. More than one skill can be associated with the reaction, but only the last SKILL on the list, that a dwarf can perform, receives experience.

[SKILL:<SKILL_TOKEN>]

<IDENTIFIER> - This is SKILL_TOKEN for the reaction.