Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Bread, candy, and other plant products. How?  (Read 1305 times)

Kazymir

  • Bay Watcher
    • View Profile
Bread, candy, and other plant products. How?
« on: May 01, 2015, 01:50:47 am »

Long story short, I'm tired of having bag upon bag of flour and sugars, but nothing interesting to do with them, as well as no jams, jellies, or preserves from all the fruit I've picked. How would I go about adding reactions to the kitchen or farmer's workshop to make these things? What tags do I need?
Logged
We must not look at Goblin Men
We must not buy their fruits
Who knows upon what soil they've fed
Their hungry, thirsty roots?

Kazymir

  • Bay Watcher
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #1 on: May 01, 2015, 02:19:14 am »

Now that I think on it, what about making smoked, salted, or otherwise preserved meats? Or even pickles?
Logged
We must not look at Goblin Men
We must not buy their fruits
Who knows upon what soil they've fed
Their hungry, thirsty roots?

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #2 on: May 01, 2015, 12:34:01 pm »

You can already cook flour into prepared meals, but I understand your desire and have added bread to my own modded raws.

First you want a new material template to material_template_default.txt.
Spoiler (click to show/hide)
It is a plant cheese to make stockpiling it simple.

A new reaction to allow your dwarves to turn flour into bread (remember to give their entity the ability to use this reaction).
Spoiler (click to show/hide)

Notice above how the reaction uses a powder with a material reaction product called BREAD_MAT? Well none of the flour has that by default so you'll need to add a few tokens to each flour producing plant. I'll give you an example for longland grass (I've marked the additional lines with asterisks).
Spoiler (click to show/hide)

Probably best to compare the above to the default longland grass raws.

The same kind of thing can be used for making other foods. For previous versions I've also seen mods for sausages (intestines and meat) and I had different fruit jams, but haven't migrated them to the newer versions yet.
« Last Edit: May 01, 2015, 12:45:16 pm by Vattic »
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Kazymir

  • Bay Watcher
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #3 on: May 01, 2015, 04:19:15 pm »

Well, I just spent an hour editing the wrong section. I think I need more practice.
Logged
We must not look at Goblin Men
We must not buy their fruits
Who knows upon what soil they've fed
Their hungry, thirsty roots?

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #4 on: May 19, 2015, 11:22:21 am »

PTW
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Bread, candy, and other plant products. How?
« Reply #5 on: May 19, 2015, 11:28:30 am »

Milo just made the base work for that: http://www.bay12forums.com/smf/index.php?topic=150520.0

You make candy, bread etc a ITEM_FOOD and use a custom reaction using the reagents you want to create that specific type of prepared meal. TADA!
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Kazymir

  • Bay Watcher
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #6 on: May 19, 2015, 06:46:29 pm »

Hell, at this point I'll end up making a "Confectionery Kitchen" Workshop and assigning different candies and sweets to it. I suppose that means I'll need a "Smokehouse" to make preserved meats and sausages, as well.
Logged
We must not look at Goblin Men
We must not buy their fruits
Who knows upon what soil they've fed
Their hungry, thirsty roots?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #7 on: May 19, 2015, 09:10:06 pm »

Milo just made the base work for that: http://www.bay12forums.com/smf/index.php?topic=150520.0

You make candy, bread etc a ITEM_FOOD and use a custom reaction using the reagents you want to create that specific type of prepared meal. TADA!

Seems a bit late for that, since recipes are likely in the next year or so.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Bread, candy, and other plant products. How?
« Reply #8 on: May 21, 2015, 01:40:26 am »

Milo just made the base work for that: http://www.bay12forums.com/smf/index.php?topic=150520.0

You make candy, bread etc a ITEM_FOOD and use a custom reaction using the reagents you want to create that specific type of prepared meal. TADA!

Seems a bit late for that, since recipes are likely in the next year or so.
And we both know that either of us could write a large-ish kitchen mod in a day, allowing players to use it before Toady maybe makes a release "next year or so". :P
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #9 on: May 21, 2015, 10:08:03 am »

You can also make plant-specific BREAD or CANDY material for each flour and then make reactions which turn flour into bread.

I've done it in my Genesis mod, let me see if I can quickly look up the code from work.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #10 on: May 21, 2015, 10:14:59 am »

Here's the barley plant:

Code: [Select]
[PLANT:barley]
[NAME:barley][NAME_PLURAL:barley][ADJ:barley]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[MATERIAL_VALUE:2]
[EDIBLE_VERMIN]
[EDIBLE_COOKED]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[PICKED_TILE:159][PICKED_COLOR:2:2:0]
[DRY][BIOME:NOT_FREEZING]
[VALUE:2]
[USE_MATERIAL_TEMPLATE:BREAD:BREAD_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:barley bread]
[MATERIAL_VALUE:12]
[PREFIX:NONE]
[USE_MATERIAL_TEMPLATE:DRINK:PLANT_ALCOHOL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:frozen barley beer]
[STATE_NAME_ADJ:LIQUID:barley beer]
[STATE_NAME_ADJ:GAS:boiling barley beer]
[MATERIAL_VALUE:2]
[DISPLAY_COLOR:6:0:0]
[EDIBLE_RAW][EDIBLE_COOKED]
[PREFIX:NONE]
[DRINK:LOCAL_PLANT_MAT:DRINK]
[USE_MATERIAL_TEMPLATE:MILL:PLANT_POWDER_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:barley flour]
[STATE_COLOR:ALL_SOLID:WHITE]
[DISPLAY_COLOR:7:0:1]
[MATERIAL_VALUE:10]
[MATERIAL_REACTION_PRODUCT:BREAD_MAT:LOCAL_PLANT_MAT:BREAD]
[EDIBLE_VERMIN]
[PREFIX:NONE]
[MILL:LOCAL_PLANT_MAT:MILL]
[USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
[SEED:barley seed:barley seeds:6:0:0:LOCAL_PLANT_MAT:SEED]
[SPRING][SUMMER][AUTUMN]
[FREQUENCY:50][CLUSTERSIZE:5]
[PREFSTRING:sweeping stalks]
[SHRUB_TILE:13]
[DEAD_SHRUB_TILE:13]
[SHRUB_COLOR:2:2:0]
[DEAD_SHRUB_COLOR:0:0:1]
Please note the BREAD material and [MATERIAL_REACTION_PRODUCT:BREAD_MAT:LOCAL_PLANT_MAT:BREAD] for the MILL material.

Now here's the template for BREAD (which is a copy of cheese template):
Spoiler (click to show/hide)

And finally, here's the reaction to bake bread:
Code: [Select]
[REACTION:BAKE_BREAD]
[NAME:bake bread]
[BUILDING:KITCHEN:CUSTOM_SHIFT_B]
[REAGENT:flour:150:POWDER_MISC:NONE:NONE:NONE]
[UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:BREAD_MAT]
[REAGENT:flour container:1:BOX:NONE:NONE:NONE]
[BAG]
[CONTAINS:flour]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:2:CHEESE:NONE:GET_MATERIAL_FROM_REAGENT:flour:BREAD_MAT]
[SKILL:COOK]

I've done the same for candy, just made different candy types (for flavor) for different plants and CANDY_TEMPLATE for candy material with appropriate name and color.
« Last Edit: May 21, 2015, 10:16:38 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Bread, candy, and other plant products. How?
« Reply #11 on: May 21, 2015, 11:51:13 am »

But deon, your bread is CHEESE, not a prepared meal. Players notice that, once they start looking for bread in the wrong stockpiles.

There was another bug about it, I dont know if Toady has fixed that in the latest releases: The reaction asks for flour inside a countainer (bag). But the bags themselves are stored inside a container (barrel). DF will look for stockpiles with flour in bags, and use them. But if they find flour bags in barrels, they dont find them, because they only look for 1: container (barrel) and 2: conent (bag), and not 3: content of container in container.

People that want to make bread from flour need to make special stockpiles for it, which have barrels set to 0.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Bread, candy, and other plant products. How?
« Reply #12 on: May 22, 2015, 02:28:43 am »

Oh yeah, I remember that bug. It's easy to test if it's fixed :). I just offered an alternate way which will work without memoty hacking.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository