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
(Corrections. Still not formatted correctly.)
Line 1: Line 1:
Reactions currently control the actions of the [[smelter]] building. They consist of at least one reagent and one product.
+
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.
  
 
----
 
----
 +
Anatomy of a Reaction:
  
[REACTION:PIG_IRON_MAKING] <-- The name of the reaction. Not referenced elsewhere yet, but must be unique.
 
  
[NAME:make pig iron bars] <-- What appears in the game when the necessary reagents are available.
+
[REACTION:BITUMINOUS_COAL_TO_COKE] <-- The name of the reaction. Not referenced elsewhere yet, but must be unique.
 +
 
 +
[NAME:make coke from bituminous coal] <-- What appears in the game when the necessary reagents are available.
  
 
[SMELTER] <-- Says the reaction is performed in the smelter. Are there other tokens yet?
 
[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.
+
[REAGENT:1:STONE:NO_SUBTYPE:STONE:COAL_BITUMINOUS] <-- First parameter after REAGENT is the number of this item the reaction needs. The second is an [[Item Token]], for instance BAR for metal bars. The third is the subtype, if applicable. Fourth is the matgloss class - probably only PLANT, STONE, METAL, COAL, and WOOD, although there may be more lurking. The last is the name of the material in the matgloss files.
  
 
[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.
 
[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.
  
[REAGENT:1:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS] <-- This is confusing. Is coal handled specially, or am I wrong about the last two parameters?
+
[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.
 +
 
 +
[FUEL] <-- Says the reaction uses fuel.
  
[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.
+
----
  
[FUEL] <-- Says the reaction uses fuel.
 
  
 
[[Category:Modding]]
 
[[Category:Modding]]

Revision as of 05:02, 3 November 2007

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.


Anatomy of a Reaction:


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

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

[SMELTER] <-- Says the reaction is performed in the smelter. Are there other tokens yet?

[REAGENT:1:STONE:NO_SUBTYPE:STONE:COAL_BITUMINOUS] <-- First parameter after REAGENT is the number of this item the reaction needs. The second is an Item Token, for instance BAR for metal bars. The third is the subtype, if applicable. Fourth is the matgloss class - probably only PLANT, STONE, METAL, COAL, and WOOD, although there may be more lurking. The last is the name of the material in the matgloss files.

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

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

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