One thing I've been trying to mod in is the Lumber Mill. Basic idea is that, when you cut down a tree, you get timber, which must be taken to the mill for processing. This lets trees go further (I always seem to be running out of wood) and lets the dwarves do things like make syrup and use leaves for fertilizer. However, I can't seem to get it to work.
Here's the basics of what I have now:
[MATERIAL_REACTION_PRODUCT:WOOD_MAT:LOCAL_PLANT_MAT:WOOD]
[MATERIAL_REACTION_PRODUCT:LEAF_MAT:LOCAL_PLANT_MAT:LEAF]
[MATERIAL_REACTION_PRODUCT:SYRUP_MAT:LOCAL_PLANT_MAT:SYRUP]
First, I copied the WOOD_TEMPLATE to create the TIMBER_TEMPLATE. The latter had the [WOOD] tag removed, as it seems the intent was that you can use whatever has that tag as a log. Trees, rather than producing a WOOD log, would produce a TIMBER log, which needed to be processed. The mill would you give you three WOOD boards, a stack of leaves, and a stack of extract.
Here's an example of what got stuffed in the tree file:
[USE_MATERIAL_TEMPLATE:TIMBER:TIMBER_TEMPLATE]
[STATE_NAME:ALL_SOLID:bleeding hand timber]
[STATE_ADJ:ALL_SOLID:bleeding hand timber]
[PREFIX:NONE]
[STATE_COLOR:ALL_SOLID:MAROON]
[DISPLAY_COLOR:4:0:0]
[USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
[STATE_NAME:ALL_SOLID:bleeding hand]
[STATE_ADJ:ALL_SOLID:bleeding hand]
[PREFIX:NONE]
[STATE_COLOR:ALL_SOLID:MAROON]
[DISPLAY_COLOR:4:0:0]
[USE_MATERIAL_TEMPLATE:LEAF:LEAF_TEMPLATE]
[STATE_NAME:ALL_SOLID:bleeding hand leaves]
[STATE_ADJ:ALL_SOLID:bleeding hand leaf]
[PREFIX:NONE]
[STATE_COLOR:ALL_SOLID:SCARLET]
[DISPLAY_COLOR:4:0:1]
[EDIBLE_COOKED]
[ROTS]
[USE_MATERIAL_TEMPLATE:SYRUP:PLANT_EXTRACT_TEMPLATE]
[STATE_NAME:ALL_SOLID:clot syrup]
[STATE_ADJ:ALL_SOLID:clot syrup]
[PREFIX:NONE]
[STATE_COLOR:ALL_SOLID:MAROON]
[DISPLAY_COLOR:4:0:0]
[BOILING_POINT:12000]
[MELTING_POINT:11500]
[EDIBLE_COOKED]
While I figure out how to get the syrup to be a liquid in a barrel, but not with a log in the barrel, I just made the syrup stay solid at "regular" temperatures. This way, it can be hauled like globs.
[REACTION:PROCESS_TIMBER]
[NAME:process timber]
[BUILDING:LUMBER_MILL:CUSTOM_T]
[REAGENT:TIMBER:1:LOG:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:WOOD_MAT]
[PRODUCT:100:3:BAR:NONE:GET_MATERIAL_FROM_REAGENT:TIMBER:WOOD_MAT]
[PRODUCT:100:1:LEAF:NONE:GET_MATERIAL_FROM_REAGENT:TIMBER:LEAF_MAT]
[PRODUCT:100:1:EXTRACT:NONE:GET_MATERIAL_FROM_REAGENT:TIMBER:SYRUP_MAT]
[AUTOMATIC]
[SKILL:CARPENTER]
Now here's where I'm running into problems.
Having the reaction make a log crashes the game. The leaves come out with no names, but they exist. Syrup...I have no idea.
I can sort of get it to make bars, but they don't work quite right. Aside from that, removing the [WOOD] tag from the TIMBER_TEMPLATE entry doesn't prevent dwarves from using the unprocessed timber as a building material, nor does it stop them from building stuff in a carpenter's shop out of them. Apparently, they ignore the [WOOD] tag and just grab the nearest log, while cutting down a tree automatically produces a log no matter what you put in the raws.