Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Using/making plants and plant products via reactions?  (Read 1704 times)

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Using/making plants and plant products via reactions?
« on: July 04, 2014, 01:25:37 am »

How would I go about using the following as reagents or products of reactions:
  • Plants
  • Milled plants
  • Plant extracts (barrel or vial)
  • Plant drinks (alcohols)
  • Seeds

Also, how do reactions handle stack size? Can I tell the game to, say, take 10 strawberries and a barrel of dwarven syrup, and produce 10 glazed strawberries? Would it create a stack of 10 glazed strawberries or ten stacks of one? Would it require a stack of ten strawberries, would it make the dwarf collect strawberries until they had exactly ten, or would it just take ten stacks of strawberries? What if the reaction called for one strawberry and produced one glazed, what would happen in regards to stacking then?
Logged
くコ:彡

scamtank

  • Bay Watcher
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #1 on: July 04, 2014, 01:38:27 am »

Look at this thing first.

Reactions do stack up their products if they can. Yeah, you could make food items like that and they'd pile up into a single stack just fine. I'm a bit fuzzy now on the details, but I'm fairly sure that dwarves treat stacks as single items, so they'd pile in 10 stacks of strawberries on those orders.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #2 on: July 04, 2014, 02:27:25 am »

[REACTION:SUMMON_MUSHROOM]
   [NAME:summon a mushroom by the will of Armok]
   [BUILDING:KITCHEN:CUSTOM_S]
   [PRODUCT:100:1:PLANT:NONE:PLANT_MAT:MUSHROOM_HELMET_PLUMP:STRUCTURAL]

(or [PRODUCT:100:1:SEEDS:NONE:PLANT_MAT:MUSHROOM_HELMET_PLUMP:SEED] or WOOD:etc. etc. for wood, and so on)

For reagents, do the same format if you want to require one specific species. Or if you just want ANY plant, do PLANT:NONE:NONE:NONE. Or any seeds SEEDS:NONE:NONE:NONE. Or if you want a certain subset of plants, then do [REAGENT:A:1:PLANT:NONE:NONE:NONE] [REACTION_CLASS:My_special_plants] and then add [REACTION_CLASS:My_special_plants] to the structural material declarations in plants_standard.txt for every plant you want included in that subset.


Stacks: you can make a reaction take 27 reagents and produce 15 products or whatever, in which case it will do exactly that. Or you can have it take 1 and produce 1, which by default will automatically have the dwarf process whole stacks and then produce whole stacks of equal size, if the reagent is already in the form of a stack when the dwarf begins. And if you want 1 reagent to only be used once while another one uses a whole stack, in the same reaction, you can add the tag [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] after the reagent that you only want used once.
« Last Edit: July 04, 2014, 02:32:28 am by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #3 on: July 04, 2014, 05:36:20 am »

So, would this work? Taking a bag of cave wheat flour, a barrel of water extracted from a custom plant, and a bag of any kind of yeast to produce a stack of dwarven bread?

Code: [Select]
[REACTION:MAKE_BREAD_DWARVEN]
[NAME:make dwarven bread]
[BUILDING:GOURMET:CUSTOM_D]
[REAGENT:flour:1:PLANT:NONE:PLANT_MAT:GRASS_WHEAT_CAVE:MILL]
[REAGENT:flour container:1:NONE:NONE:NONE:NONE]
[CONTAINS:flour]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:water:1:PLANT:NONE:PLANT_MAT:BAUBLE_AQUERA:EXTRACT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:water container:1:NONE:NONE:NONE:NONE]
[CONTAINS:water]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:yeast:1:NONE:NONE:NONE:NONE]
[REACTION_CLASS:YEAST]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:yeast container:1:NONE:NONE:NONE:NONE]
[CONTAINS:yeast]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:PLANT:NONE:PLANT_MAT:BREAD_DWARVEN:STRUCTURAL]
[SKILL:COOK]
Logged
くコ:彡

scamtank

  • Bay Watcher
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #4 on: July 04, 2014, 06:09:25 am »

It would, but your REAGENT stuff is a bit off. Surely, flour and water aren't PLANTs that grow on trees! I've only used creature materials myself, but I think they should look like this:

Code: [Select]
[REAGENT:flour:1:POWDER_MISC:NONE:PLANT_MAT:GRASS_WHEAT_CAVE:MILL]

[REAGENT:water:1:LIQUID_MISC:NONE:PLANT_MAT:BAUBLE_AQUERA:EXTRACT]

Are you also using some imaginary seedless ungrowable "dwarven bread" plant to hold the definition for the end result? I'd imagine there's a simpler way, but I guess that'll work.
Logged

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #5 on: July 04, 2014, 06:30:15 am »

I am, yeah. Breads, chocolates, candied fruits, steamed vegetables etc. are all defined as seedless plants that can be eaten raw or cooked. The purpose of this mod is partially to make cooking a little more interesting, partially to make it less of a nightmare to use liquid ingredients. For example, a high-end ingredient is lembas bread, made with longland flour, golden salve and whip wine - since longland flour is worth 20 per unit, golden salve is worth 100 per and whip wine is 15 per, I figured a rough value of 50 or 60 would be appropriate, especially considering the inherent difficulty in acquiring golden salve at all. Stuff like bread just shares the same value as the flour, since it's just the flour with water and yeast added so as to make it edible.

Also, the flour and water are in fact PLANT components - cave wheat flour is the MILL PLANT_MAT of the cave wheat PLANT, and aquera water is the EXTRACT PLANT_MAT of the aquera bauble PLANT. I'm not 100% sure this is correct, but you're not sure it's wrong either, so I'll wait for someone else to confirm.
Logged
くコ:彡

scamtank

  • Bay Watcher
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #6 on: July 04, 2014, 06:45:20 am »

Well yeah of course they are, but the item PLANT is a specific thing. LEAVES, DRINK and SEEDS are all from plants too, but they're all distinct items.

Flour comes out from the mill as a powder and the water is extracted as a liquid, but that original reaction of yours is looking for fruit made of water and flour vegetables. Catch my drift?
Logged

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #7 on: July 04, 2014, 06:54:43 am »

Wait, derp, yes, you're right. Sorry.
Logged
くコ:彡

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #8 on: July 04, 2014, 07:38:35 am »

Milk would also be LIQUID_MISC, right? LIQUID_MISC:NONE:CREATURE_MAT:NONE:MILK should work for that?
« Last Edit: July 04, 2014, 07:41:31 am by Zaerosz »
Logged
くコ:彡

scamtank

  • Bay Watcher
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #9 on: July 04, 2014, 08:51:20 am »

The thing about stuff like milk, wool and honey is that every instance is connected to some sort of creature. There is no platonic ideal of milk floating around.

Cow milk would be LIQUID_MISC:NONE:CREATURE_MAT:COW:MILK.

Item type, little-used subtype, this material is connected to a creature!, name of the critter, name of the stuff. The same deal as with plants, really.
Logged

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #10 on: July 04, 2014, 08:57:42 am »

So I guess I should just make a [REACTION_CLASS:MILK] and use that, then?

Also, what other kinds of things would people like to see from a mod like this? I've got chocolate, candied berries, glazed berries, chocolate dipped berries, candied or glazed or chocolate dipped sun berries, dwarven bread, Longland bread, plains bread (made with whip vine flour), spiced flatbread (made with any flour and any spice, like quarry bush leaves) and lembas bread (LOTR reference, made with longland flour, whip wine, golden salve and yeast). Planning a yeast-like surface plant so humans and elves can have their breads, and considering potatoes, for vodka, mash and fries. Do you think I'd be able to make sausages out of meat and intestines?
Logged
くコ:彡

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #11 on: July 04, 2014, 12:35:38 pm »

It's a shame the brewing recipes can't be modified to provide a source of yeast.

As for sausages from meat and intestines: here's a working example.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #12 on: July 04, 2014, 02:04:57 pm »

What, so just add [HAS_MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT] to meat, make a SAUSAGE_MAT, add [REACTION_CLASS:INTESTINES] and boom? That's enough for a working reaction? Really? I feel like I'm missing a few steps here, since when is anything this simple?
Logged
くコ:彡

GavJ

  • Bay Watcher
    • View Profile
Re: Using/making plants and plant products via reactions?
« Reply #13 on: July 04, 2014, 02:06:56 pm »

It's a shame the brewing recipes can't be modified to provide a source of yeast.

As for sausages from meat and intestines: here's a working example.
Sure they can
1) Remove the [DRINK:  tags from every plant
2) Add a REACTION_CLASS of your own to all the same plants
3) Make a custom reaction at the still that takes that reaction class as a reagent and makes a drink item, getting material from reagent.
4) Add in your yeast as another product.

Quote
What, so just add [HAS_MATERIAL_REACTION_PRODUCT:SAUSAGE_MAT] to meat, make a SAUSAGE_MAT, add [REACTION_CLASS:INTESTINES] and boom? That's enough for a working reaction? Really? I feel like I'm missing a few steps here, since when is anything this simple?
No, you need to add stuff to the tissue files for the tissues the animal uses and stuff do. Just look at the leather tanning example in the raws and search your whole folder for all the keywords you find there and follow their example. There will be some tags in reactions, some in material templates, and some in body plan or something like that.
« Last Edit: July 04, 2014, 02:08:59 pm by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Using/making plants and plant products via reactions?
« Reply #14 on: July 04, 2014, 02:07:30 pm »

So I guess I should just make a [REACTION_CLASS:MILK] and use that, then?
You don't need to, since that particular one is already present in the vanilla raws - any material built from MILK_TEMPLATE has [MATERIAL_REACTION_PRODUCT:CHEESE_MAT:LOCAL_CREATURE_MAT:CHEESE], so you just need to use [HAS_MATERIAL_REACTION_PRODUCT:CHEESE_MAT].
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.
Pages: [1] 2