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
(→‎PRODUCT: Confirmed guess on "chance" term.)
Line 39: Line 39:
  
 
===PRODUCT===
 
===PRODUCT===
[PRODUCT:100:3:BAR:NO_SUBTYPE:COAL:COKE] <-- The end product(s) of the reaction. The first parameter might be probability of success. The rest is the same as in REAGENT.
+
[PRODUCT:100:3:BAR:NO_SUBTYPE:COAL:COKE] <-- The end product(s) of the reaction. The first parameter is the percent chance of producing that product. The rest is the same as in REAGENT.
 +
 
 
===FUEL===
 
===FUEL===
 
[FUEL] <-- Says the reaction uses fuel.
 
[FUEL] <-- Says the reaction uses fuel.

Revision as of 13:18, 1 April 2009

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

[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 two main types.

Type 1

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

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

REAGENT

This is always the string REAGENT

Quantity

The number of items this reaction produces. Does not seem to have a hard upper limit. High numbers will most likely crash the game out of sheer lag though.

ITEM_TOKEN

A value from the <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".

MATGLOSS_TOKEN

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

MATGLOSS_SUBTYPE

The specific type goes here. Like the ITEM_SUBTYPE, you can look up the possible values from the raws. The <Matgloss_tokens> page has information on where to find the subtype.

Type 2

[REAGENT:1:REACTION_CLASS:FLUX] <-- Reaction_class can be replaced with METAL_ORE and possibly STONE_NAME and THREAD_METAL though those aren't used in the basic reaction types. Those are special cases that identify items that use the tags like [STONE_NAME:platinum nuggets] or [THREAD_METAL:ADAMANTINE:100] [Verify]


PRODUCT

[PRODUCT:100:3:BAR:NO_SUBTYPE:COAL:COKE] <-- The end product(s) of the reaction. The first parameter is the percent chance of producing that product. The rest is the same as in REAGENT.

FUEL

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

Notes

The smelter cannot look inside containers for reagents; this means not only bins and barrels, but bags, coffers, et cetera. In practice this makes it 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.