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.

v0.31:Reactions

From Dwarf Fortress Wiki
Revision as of 18:38, 6 April 2010 by Uprightpath (talk | contribs)
Jump to navigation Jump to search
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 can be assigned to specific Entities to allow only certain entities to have access to it.

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


Reaction Makeup

[REACTION:<REACTION_IDENTIFIER>]
[NAME:<REACTION_NAME>]
[BUILDING:<BUILDING_IDENTIFIER>:<BUILDING_KEY>]
<... #Reagents ...>
<... #Products ...>
<... #Reaction Modifiers ...>
<... #Skills ...>

<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.

<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 PLANT_MAT:MUSHROOM_HELMET_PLUMP.

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.

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

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

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

[WORTHLESS_STONE_ONLY] - Only a stone of value 1 can be used?

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

Products

Reaction Modifiers

Skills

Bars are entered in increments of 150, where 150 is a bar. Thread is accepted in increments of 15000, where 15000 is a full Thread item. (See: Adamantine) Cloth is unknown.

The new PRODUCT format is:

[PRODUCT:<Percent chance>:<Quantity>:<ITEM_TOKEN>:<ITEM_SUBTYPE>:<MATGLOSS_TOKEN>:<MATGLOSS_SUBTYPE>]

For Bars, [PRODUCT_DIMENSION:150] is added on the end; it is possible that this would also apply to cloth/thread. This multiplies each of the items produced, so that each bar will have the specified dimension.