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 "40d:Reactions"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
(pretty sure this was not true - melt jobs kept track of partial returns, but reactions did NOT do this)
 
(34 intermediate revisions by 18 users not shown)
Line 1: Line 1:
Reactions currently control the actions of the [[smelter]] building. They consist of at least one reagent and one product.
+
{{av}}{{Quality|Exceptional}}
 +
Reactions currently control the actions of the [[smelter]] building. They consist of at least one reagent and one product. Eventually the goal is to include all buildings and their actions within the raws.
  
----
+
You may have multiple reagents and products within a reaction. By including a product that replaces a consumed reagent, you could create things like tools and catalytic reactions.
  
[REACTION:PIG_IRON_MAKING] <-- The name of the reaction. Not referenced elsewhere yet, but must be unique.
+
Additions to reaction_standard.txt do not take effect until you generate a new world, but changes to existing reactions take effect next time you open the game.
  
[NAME:make pig iron bars] <-- What appears in the game when the necessary reagents are available.
+
==Anatomy of a Reaction==
  
[SMELTER] <-- Says the reaction is performed in the smelter. Are there other tokens yet?
 
  
[REAGENT:1:BAR:NO_SUBTYPE:METAL:IRON] <-- Says the reaction requires one item with the [[Item Token]] BAR and any subtype. The second part refers to the matgloss of iron, which is located within MATGLOSS_METAL.
+
[REACTION:BITUMINOUS_COAL_TO_COKE] <-- The name of the reaction. Not referenced elsewhere yet, but must be unique.
 +
===NAME===
 +
[NAME:make coke from bituminous coal] <-- What appears in the game when the necessary reagents are available.
 +
===SMELTER===
 +
[SMELTER] <-- Says the reaction is performed in the smelter. There are currently no other building tokens.
 +
===REAGENT===
 +
Reagents come in three main types.
  
[REAGENT:1:REACTION_CLASS:FLUX] <-- Any object with the token of [REACTION_CLASS:FLUX] may be used here. It might be possible to add reaction classes arbitrarily.
+
====Type 1====
 +
[REAGENT:<Quantity>:<[[Item token|ITEM_TOKEN]]>:<ITEM_SUBTYPE>:<[[Material token|MATERIAL_TOKEN]]>:<MATGLOSS>]
  
[REAGENT:1:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS] <-- This is confusing. Is coal handled specially, or am I wrong about the last two parameters?
+
As with all raw entries the values here are separated by colons. This style of reaction has five variables.
 +
=====Quantity=====
 +
The number of items this reaction requires.
  
[PRODUCT:100:1:BAR:NO_SUBTYPE:METAL:PIG_IRON] <-- The end product of the reaction. The first parameter might be probability, and the second is definitely the number of resulting objects. The last are the item token and material, as in reagents.
+
=====ITEM_TOKEN=====
 +
A value from the <[[Item token|ITEM_TOKEN]]> list for the item you want to make.
  
 +
=====ITEM_SUBTYPE=====
 +
An item identifier from the raw file for this item type. For instance if you want to make gloves you would look in the item_gloves.txt file and find the name of one of the items there like ITEM_GLOVES_GLOVES. You would also need to set the ITEM_TOKEN to GLOVES.
 +
If you don't have a subtype to use just put "NONE".
 +
 +
=====MATERIAL_TOKEN=====
 +
You put the general category of the material you want to use here.
 +
 +
=====MATGLOSS=====
 +
The specific type goes here. Like the ITEM_SUBTYPE, you can look up the possible values from the raws. The material COAL has two valid subtypes (COKE and CHARCOAL), and all other materials not defined in the raws should use NO_MATGLOSS.
 +
 +
====Type 2====
 +
[REAGENT:<Quantity>:REACTION_CLASS:<Class>]
 +
 +
This permits the usage of any stone which contains a matching [[Stone token|REACTION_CLASS]] token. Normally, the only class used is FLUX to permit any of several types of stone to be used for making pig iron and steel.
 +
 +
====Type 3====
 +
[REAGENT:<Quantity>:METAL_ORE:<Metal>]
 +
 +
This permits the usage of any stone which contains a matching [[Stone token|METAL_ORE]] token, useful for allowing one reaction to take any type of ore that yields a particular metal.
 +
 +
===PRODUCT===
 +
[PRODUCT:100:3:BAR:NO_SUBTYPE:COAL:COKE] <-- The end product(s) of the reaction. The first parameter is the percentage chance of producing that product - with a value less than 100, the product will sometimes simply not be produced. The second parameter is the amount of objects that will be created.  The rest is the same as in REAGENT.
 +
 +
===FUEL===
 
[FUEL] <-- Says the reaction uses fuel.
 
[FUEL] <-- Says the reaction uses fuel.
  
[[Category:Modding]]
+
==Notes==
 +
 
 +
It is seemingly impossible to use extracts of any sort (liquid, powder, and so on) in smelter reactions. It likely won't show up on the job list at all and, if it does, will result in immediate cancellation when a dwarf tries to select it from the job queue. Extracts can be the product of a reaction but since they must be stored, they will immediately be "spilled" upon creation and be impossible to store and use.
 +
 
 +
{{Category|Modding}}

Latest revision as of 21:54, 24 July 2012

This article is about an older version of DF.

Reactions currently control the actions of the smelter building. They consist of at least one reagent and one product. Eventually the goal is to include all buildings and their actions within the raws.

You may have multiple reagents and products within a reaction. By including a product that replaces a consumed reagent, you could create things like tools and catalytic reactions.

Additions to reaction_standard.txt do not take effect until you generate a new world, but changes to existing reactions take effect next time you open the game.

Anatomy of a Reaction[edit]

[REACTION:BITUMINOUS_COAL_TO_COKE] <-- The name of the reaction. Not referenced elsewhere yet, but must be unique.

NAME[edit]

[NAME:make coke from bituminous coal] <-- What appears in the game when the necessary reagents are available.

SMELTER[edit]

[SMELTER] <-- Says the reaction is performed in the smelter. There are currently no other building tokens.

REAGENT[edit]

Reagents come in three main types.

Type 1[edit]

[REAGENT:<Quantity>:<ITEM_TOKEN>:<ITEM_SUBTYPE>:<MATERIAL_TOKEN>:<MATGLOSS>]

As with all raw entries the values here are separated by colons. This style of reaction has five variables.

Quantity[edit]

The number of items this reaction requires.

ITEM_TOKEN[edit]

A value from the <ITEM_TOKEN> list for the item you want to make.

ITEM_SUBTYPE[edit]

An item identifier from the raw file for this item type. For instance if you want to make gloves you would look in the item_gloves.txt file and find the name of one of the items there like ITEM_GLOVES_GLOVES. You would also need to set the ITEM_TOKEN to GLOVES. If you don't have a subtype to use just put "NONE".

MATERIAL_TOKEN[edit]

You put the general category of the material you want to use here.

MATGLOSS[edit]

The specific type goes here. Like the ITEM_SUBTYPE, you can look up the possible values from the raws. The material COAL has two valid subtypes (COKE and CHARCOAL), and all other materials not defined in the raws should use NO_MATGLOSS.

Type 2[edit]

[REAGENT:<Quantity>:REACTION_CLASS:<Class>]

This permits the usage of any stone which contains a matching REACTION_CLASS token. Normally, the only class used is FLUX to permit any of several types of stone to be used for making pig iron and steel.

Type 3[edit]

[REAGENT:<Quantity>:METAL_ORE:<Metal>]

This permits the usage of any stone which contains a matching METAL_ORE token, useful for allowing one reaction to take any type of ore that yields a particular metal.

PRODUCT[edit]

[PRODUCT:100:3:BAR:NO_SUBTYPE:COAL:COKE] <-- The end product(s) of the reaction. The first parameter is the percentage chance of producing that product - with a value less than 100, the product will sometimes simply not be produced. The second parameter is the amount of objects that will be created. The rest is the same as in REAGENT.

FUEL[edit]

[FUEL] <-- Says the reaction uses fuel.

Notes[edit]

It is seemingly impossible to use extracts of any sort (liquid, powder, and so on) in smelter reactions. It likely won't show up on the job list at all and, if it does, will result in immediate cancellation when a dwarf tries to select it from the job queue. Extracts can be the product of a reaction but since they must be stored, they will immediately be "spilled" upon creation and be impossible to store and use.