Episode 1 - making dough and bread from flour. I'm going into this blind with little idea how to do things, which is kinda fun, lots of dead-ends and mistakes ahead.
The very first thing i tried was making a tool or toy which inherited the material from the flour. The pros were that this required very minimal modifications to each crop (added reaction class "IS_FLOUR" to each flour) and gave dough and bread with the name of the type and quality modifiers, e.g. "*dwarven wheat flour dough*" , which was really nice. The cons were that the game won't stockpile this stuff anywhere and the dwarves won't eat it since it's a toy. We need an edible ITEM type with it's own food stockpile section, which would allow cakes, etc which remember their key ingredient and have quality ratings.
D'oh - scratch approach #1, it won't work without Toady adding to the engine, but this approach would have been nice as it minimizes the need to directly edit plants. Implement edible items Toady!
----
Testing an approach #2 gave concrete results - borrowing from quarry bushes I added these lines to cave wheat MILL section :-
[STATE_NAME_ADJ:SOLID_PASTE:dwarven wheat dough]
[STATE_NAME_ADJ:SOLID_PRESSED:dwarven wheat bread]
[REACTION_CLASS:IS_FLOUR]
[STOCKPILE_GLOB_PASTE]
[STOCKPILE_GLOB_PRESSED]
After updating the reactions, dwarves will make dough and bake bread as GLOB type, and stockpile them (under paste and press sections of food stockpile settings). Pros are it stockpiles nicely, but cons are it's not stackable and has no quality settings and as I just stuck it in the "MILL" section I can't make the dough or bread directly edible without making the flour edible too.
Now on to version #3 which should be properly edible. I have two options it seems - #1 = edit in an edible dough and bread for every plant with flour (which would make the bread remember its type), #2 - edit in a "dummy" plant with a single dough / bread type. On the principle of conserving information, I'm going with #1. Also, I'd like the products to be stackable. For this reason I looked over the edible product types which are stackable and chose "cheese", as plant cheeses are stackable, and have a stockpile section which is empty.