The current reaction raws provide tags to specify [REAGENT:?] and [PRODUCT:?]. This suggestion would also require tags for [TOOL:?] and [CONSTRUCTION:?].
Well, I suppose so, yes. Ultimately that's what the goal is. Perhaps some tasks could require no tool(such as making something out of a lump of clay. You don't really need tools).
As far as I understand(I have only some experience with modding DF) the current reaction raw is :
[REACTION:<identifier>]
[NAME:<name>]
[BUILDING:<BUILDING NAME>:<BUILDING KEY>]
[REAGENT:A:150:BAR:NONE:POTASH:NONE]
[PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:<SKILL TOKEN>]
[AUTOMATIC]
[ADVENTURE_MODE_ENABLED]
Whereas this would perhaps look something more like this (this is all pseudo code. Not really that familiar with reaction raws. I know its missing things like automatic and fuel.)
[REACTION ID]
[NAME]
[NECESSARY INGREDIENT]
[NECESSARY TOOL]
[NECESSARY SKILL]
[ZONE WHERE TASK CAN BE PREFORMED]
[OUTPUT]
Bur perhaps there should be options to produce macros. So you have reactions that utilize reactions in and of themselves. For instance, making a clay pot or something may utilize a lower reaction to first get clay out of a clay boulder. I suppose, anyway. It's technically all within possibility.
The wiki has
an article on reactions with the information you would need for this.
I've been thinking about this a bit more, and spotted a few things I missed the first time through. I see the following necessary tags:
New Reaction Template:[REACTION:<identifier>] The same tag that the current game uses. The <identifier> is a string that serves as a unique identifier for the reaction.
[NAME:<display>] The same tag that the current game uses. The <display> is a string that is displayed in-game on workshop menus, representing the reaction when you order it.
[BUILDING:<building name>:<building key>] The same tag that the current game uses. I believe that it is not necessary to re-name this tag to reflect the fact that we are now working from some variant of "activity zone" in which workshop types can be enabled. The <building name> is the kind of workshop zone permission required for the reaction, and the <building key> is a shortcut or hotkey to make frequently used reactions more convenient.
[BUILDING:<building name>:<building menu>:<building key>] A potential alias for the above. For example, the glass furnace starts with a menu to select green, clear, or crystal glass; then you select an item from the resulting menu. The clothier's workshop has something similar with plant cloth, yarn, and silk. This starting menu would probably need to be declared somehow in the raws for the building. A complete token might read something like this:
BUILDING:CLOTHIER:MENU_PLANT:CUSTOM_B. ("Make plant fiber cloth bag.")
BUILDING:GLASS:MENU_GREEN:CUSTOM_D. ("Make green glass portal.")
[CONSTRUCTION:<name>] Many reactions will require some sort of prepared work site within the workshop zone. Each construction can support only one reaction at a time, but there can be several such sites within a workshop zone. These "constructions" will require their own set of tags, which would be specified on a separate page of the raws. I will get to those later.
[TOOL:<name>] Each workshop zone can have "tools" assigned to it. Each TOOL can be used in only one reaction at a time, but the zone could have several tools of the same type assigned to it. Unused tools would probably be left at the work site; stockpiles would be for tools that are not assigned to a work zone.
[CONTAINER:<name>] Containers would have a list of "modifiers" that can be specified within the reaction, just like reagents and products do now. I will get to those later.
[REAGENT:?] The same tag that the current game uses. Most of this uses the current set of tags, caveats covered below.
[PRODUCT:?] The same tag that the current game uses. Most of this uses the current set of tags, caveats covered in various locations below (particularly the container section).
[IMPROVEMENT:?] The same tag that the current game uses. Used in place of PRODUCT, with a slightly different set of permitted arguments and tokens.
[COMBINATION:?] Tentative name for another alternative to PRODUCT. The current game feature I have in mind is prepared meals. Modders could also use it for things like
pickling. Combinations incorporate multiple stacks of reagents into a single stack of products. The product acknowledges the exact list of ingredients, and the product stack size is equal to the sum of input stack sizes. Combinations would not be messed up by reagent stacks of different sizes (I understand that PRODUCT would take the smallest stack size among them, though I have not properly tested this). Combinations might necessitate a review of the list of REAGENT modifiers, but I think I need to simply leave that open to be debated.
[SKILL:<name>] The same tag that the current game uses.
Miscellaneous tags:
[AUTOMATIC] The same tag that the current game uses.
[INTERCHANGEABLE] Covered in
my earlier post.
[ADVENTURE_MODE_ENABLED] The same tag that the current game uses.
Note that (FUEL) is not in this reaction template. It is a Construction tag.
Container Modifiers:[CONTAINER_SUBSTITUTE:<name>] For example, brewing would have (CONTAINER:BARREL) and (CONTAINER_SUBSTITUTE:POT). Barrels would be preferred when available, but the substitute tag allows large pots to be used in their place. I assume that the current stockpile give and take orders will have some successor in the new system, and these would be able to force all brewing to be into large pots, just like they can now.
[CONTAINS_REAGENT:<name>] A replacement for the current reagent modifier (CONTAINS:?), which is necessary because containers are currently listed as reagents, rather than their own distinct category.
[CONTAINS_PRODUCT:<name>] A replacement for the current product modifier (PRODUCT_TO_CONTAINER:?), which is necessary because containers are currently listed as reagents, rather than their own distinct category. It would be possible to specify CONTAINS_REAGENT and CONTAINS_PRODUCT for the same container.
[EMPTY] The same tag that the current game uses.
[EMPTY_OR_CONTAINS_PRODUCT:?] For example, a dwarf could make more lye using a bucket that already contains some.
[POUR:?] Only makes sense with CONTAINS_PRODUCT. The hauler carrying this container and product to a stockpile will attempt to empty the hauled container into a container of this type so the original container can be returned to the workshop zone. Used for buckets of milk and lye, which are supposed to be emptied into barrels. Can be specified more than once, making each container type acceptable.
Construction Template:1. The current raws ("building_custom," which describes the screw press and soap maker) contain what appear to be display instructions, and I don't understand enough about those to comment on them.
2. Since most "buildings" other than workshops are 1x1 (as are the quern and millstone) I will assume that most of these "constructions" will also be 1x1 unless somehow specified otherwise.
3. It might also be relevant to bring up
GavJ's thread on long term unattended reactions. I like the idea (among other things, it might be the best way to fire or glaze several pottery items at a time), but I'm not sure exactly how to integrate it.
[BUILDING:<name>] The current raws both say BUILDING_WORKSHOP, which I believe places them in the "workshops" sub-menu (in which case I also recommend BUILDING_FURNITURE, to keep that menu slightly more organized). I envision tables and chairs being commonly used, and BUILDING_WORKSHOP seems slightly inappropriate for them. As noted above in REACTION, this would need to be unique.
[NAME:<name>] The same tag that the current game uses. This is the displayed name for the building.
[NAME_COLOR:<foreground>:<background>:<brightness>] Specified for both "custom" workshops, though I have not investigated enough to know what situations acknowledge this tag.
[BUILD_LABOR:?] The same tag that the current game uses.
[BUILD_KEY:?] The same tag that the current game uses.
[BUILD_ITEM:?] The same tag that the current game uses. Can be specified multiple times.
[WORK_LOCATION] The current raws use this tag to specify that the worker is in the center of the building. I envision this being redundant with most such constructions being 1x1. Here, it simply specifies that the worker will stand or sit at this location while performing reactions.
[WORK_ADJACENT] The worker will stand or sit next to this construction while performing reactions; direction is left up to the individual worker (unless the reaction also specifies a WORK_LOCATION). Cannot be combined with WORK_LOCATION.
[FUEL] Reactions that use this construction also need one bar of REACTION_CLASS:FUEL. Used for conventional furnaces. Replaces the current FUEL reaction token.
[ADD_REAGENT:?] A generalization from FUEL above that can be used to specify other materials. Works like any other REAGENT, and accepts all the same arguments and modifiers.[SIDE_REACTION] Begins declaring a reaction that occurs each time this construction is used (separate from, and in addition to, the ordered reaction that is using the construction). The side reaction is elaborated using tags "nested" under this one. At a minimum, it will need to accept REAGENT and PRODUCT, along with all of their arguments and modifiers. It probably won't need to accept a SKILL token most of the time (that's what the main reaction is for). For example, I would put something like the following under a conventional (non-magma) forge:
(REAGENT:fuel:150:BAR:NONE:NONE:NONE)(REACTION_CLASS:FUEL)
(PRODUCT:12:1:BAR:NONE:ASH:NONE)(PRODUCT_DIMENSION:150)
This will cause the forge to demand one unit of "fuel" (either charcoal or coke) each time it is used. It also has a 12% chance (1/8 is 12.5%) to produce ash from the burnt charcoal. This "cleanup" will be somewhat irregular, but that's probably realistic. It also means I can avoid the somewhat trickier proposition of figuring out how to tell the reaction to produce 1/8 (or 1/10) of a bar of ash every time. A separate issue with partial bars is covered on the wiki under
"melt item": the interface does not actually display partial bars, so I would rather avoid producing any if possible.
[POWER:<number>] This building cannot be used for reactions unless it is supplied with at least this many units of mechanical power. Used for the millstone (POWER:10).
[FLUID:<material>:<distance>:<minimum depth>] The construction can only perform reactions if it has access to the specified fluid within the specified distance. Magma furnaces would replicate current behavior with FLUID:MAGMA:1:4. Wells would have FLUID:WATER:NONE:3.
[SUBSTITUTE:?] Reactions that call for the current construction can use this other construction instead. Can be specified multiple times. Also accepts NONE and NOTHING, both of which indicate that reactions which benefit from this piece of infrastructure can be performed without it (such as a
potter's wheel).
[PENALTY_SPEED:<number>] Reactions using the substitute will take longer than normal, to a degree specified by the number (I don't know enough about the current math to say exactly how). For example,
the wiki specifies that "millstones process plants much faster than querns." Milling reactions would call for a millstone, and the millstone would have SUBSTITUTE:QUERN and a PENALTY_SPEED tag.
[PENALTY_QUALITY:<number>] Reactions using this substitute produce goods of lower quality than normal. How much lower is specified by the number (again, I don't know enough about the current math to say exactly how it should work). I remember reading somewhere on the forum about stone blocks being a potential substitute for a proper anvil, which might involve this tag.
[CAP_QUALITY:<number>] Reactions using this substitute cannot produce products above the specified quality level.
[PREFERRED:?] Alias for SUBSTITUTE, with the distinction that workers will seek out this construction in preference to the original one. Used for magma versions of furnaces.