Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help fixing a curious issue with "liquid into barrel reaction"  (Read 2056 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Hey guys,

For the longest time I had a couple of reactions in my mod that allow to brew drinks from specific plants. They stopped working with one of the vanilla updates. With 1-3 plants, 5-15 drinks are created and everything works fine. with 4-5 plants in the stack, 20-25 drinks are created and stored outside the barrel. I do not know where this behavior comes from, and I cannot see a fault in the reactions. Here an example reaction:

Code: [Select]
[REACTION:BREW_HELMET_PLUMP]
[NAME:make plump helmet wine]
[BUILDING:STILL:CUSTOM_W]
[REAGENT:A:1:PLANT:NONE:PLANT_MAT:MUSHROOM_HELMET_PLUMP:STRUCTURAL]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
          [FOOD_STORAGE_CONTAINER]
          [PRESERVE_REAGENT]
          [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:A:DRINK]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[PRODUCT:100:1:SEEDS:NONE:PLANT_MAT:MUSHROOM_HELMET_PLUMP:SEED]
[SKILL:BREWING]

If anyone could be so kind to confirm this behavoir/bug and maybe find a solution, I would be most grateful. The only thing that I can think of is to raise the container capacity of the vanilla barrels. But of course these are not in the raws. The other way would be to only create 15 alcohol with a fixed amount, using "does not determine product amount". This would lead to wasted plants from big stacks, and free alcohol from single plants.

I guess I could also add a custom barrel with enough capacity and only use this, but it would be an enourmos hassle for the player, because only vanilla barrels are in the stockpile menu under barrel.

Help is most appreciated.
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 :::

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #1 on: August 26, 2012, 11:55:12 pm »

My understanding of this is was that normal vanilla barrels have insufficient quantity to store more than 15 drinks, but that Toady cludged his version of the brew drink reaction so that they get crammed in regardless.  Of course we don't have access to that cludge.   I bet that if you make a bigger 'cask' or whatever it will work, modulo the stockpile hassle.

ed.

0006057: barrels contain less than should
« Last Edit: August 29, 2012, 07:10:08 pm by smakemupagus »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #2 on: August 29, 2012, 07:06:30 pm »

-help-
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 :::

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #3 on: August 29, 2012, 07:13:53 pm »

try making the reaction only accept large pots.  According to Quietust they have twice the capacity of barrels.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #4 on: August 29, 2012, 07:25:06 pm »

But how does this work then? Will there ever only be 150 honey in one stack?

[REACTION:MAKE_MEAD]
   [NAME:make mead]
   [BUILDING:STILL:CUSTOM_M]
   [REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY]
      [UNROTTEN]
   [REAGENT:honey container:1:NONE:NONE:NONE:NONE]
      [CONTAINS:honey]
      [PRESERVE_REAGENT]
      [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
   [REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
      [EMPTY]
      [FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
      [PRESERVE_REAGENT]
      [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
   [PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:honey:DRINK_MAT]
      [PRODUCT_TO_CONTAINER:barrel/pot]
      [PRODUCT_DIMENSION:150]
   [SKILL:BREWING]

On the other hand I figured out how to fix the sugar in bag in barrel bug. Same for flour. I just use tools, called "bag of sugar" and "bag of flour" and use those. Yeah, I delete the vanilla sugar/flour and make my own one, with blackjack and hookers.
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 :::

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #5 on: August 29, 2012, 07:32:59 pm »

Will there ever only be 150 honey in one stack?
Unless your jugs ever contain more than a single unit of honey, it'll only ever produce 5 units of drink.

Drinks have a "size" of 200 (while Misc. Liquids only have a size of 60), and barrels have a capacity of 3000, meaning they can only hold 15 units of alcohol (or 50 units of lye). Large pots have a capacity of 6000 (the value in the raws is divided by 10), which means they can hold up to 30 units of alcohol.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #6 on: August 30, 2012, 08:39:26 am »

Well, I think I have to use pots then... or make my stonecutter make "barrels", custom made barrel tools that are bigger. Although that might get confusing.

Really, toady can put 25 drinks in a barrel, but we cant? ^^
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 :::

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #7 on: August 30, 2012, 10:19:36 pm »

Really, toady can put 25 drinks in a barrel, but we cant? ^^
Yep - the builtin "Brew Drink" job just stuffs the drinks into the target container without checking its capacity, while custom reactions actually follow the rules.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #8 on: August 30, 2012, 11:27:20 pm »

A better way would be to restrict stacks of plants to 3max, or make the reaction only use 1 plant from a stack, and make 5 drinks... but so far as I know, both of this is impossible. I tried a lower clustersize on plants a long time ago, but my farmers still pulled out stacks of 1-5, even if the clusternumber said 1-2. -.-

This is such a simple concept, and gives more headache then most complicated stuff. ^^
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 :::

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #9 on: August 30, 2012, 11:30:22 pm »

A better way would be to restrict stacks of plants to 3max, or make the reaction only use 1 plant from a stack, and make 5 drinks... but so far as I know, both of this is impossible. I tried a lower clustersize on plants a long time ago, but my farmers still pulled out stacks of 1-5, even if the clusternumber said 1-2. -.-

This is such a simple concept, and gives more headache then most complicated stuff. ^^
I believe that CLUSTERSIZE:X determines the maximum amount of plants gathered by herbalism, not the amount that can be grown by farmers.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #10 on: August 31, 2012, 08:32:06 am »

A better way would be to restrict stacks of plants to 3max, or make the reaction only use 1 plant from a stack, and make 5 drinks... but so far as I know, both of this is impossible. I tried a lower clustersize on plants a long time ago, but my farmers still pulled out stacks of 1-5, even if the clusternumber said 1-2. -.-

This is such a simple concept, and gives more headache then most complicated stuff. ^^
I believe that CLUSTERSIZE:X determines the maximum amount of plants gathered by herbalism, not the amount that can be grown by farmers.
That is correct - the amount gathered by farmers is simply 1-6 based on the planter's skill level (as I recall, it uses the old formula for skill -> item quality but inserts a 50% chance before each "increment stack size") plus another 0-4 if you added fertilizer (50% chance of +1 for each 25% level of fertilization present when the seed sprouted).
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help fixing a curious issue with "liquid into barrel reaction"
« Reply #11 on: September 01, 2012, 02:38:08 pm »

Ok, is fixed now. I use pots. Too bad for the player and the added micromanagement, but not much I can do.
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 :::