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 17:28, 6 April 2010 by Uprightpath (talk | contribs)
Jump to navigation Jump to search
This article is about an older version of DF.

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

<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

Type 1: [REAGENT:<Identifier>:<Quantity>:<ITEM_TOKEN>:<ITEM_SUBTYPE>:<MATGLOSS_TOKEN>:<MATGLOSS_SUBTYPE>]
Type 2: [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.

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.