Bay 12 Games Forum

Please login or register.

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

Author Topic: Help with some simple reactions  (Read 3477 times)

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help with some simple reactions
« Reply #15 on: July 21, 2012, 08:13:23 pm »

Actually, the "ratio trick" has nothing to do with REACTION_CLASS or HAS_MATERIAL_REACTION_PRODUCT - the only tag involved with that is DOES_NOT_DETERMINE_PRODUCT_AMOUNT, which makes it so that the GCD of all reagents without DOES_NOT_DETERMINE_PRODUCT_AMOUNT is used to multiply the quantity of all reaction products.
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.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Help with some simple reactions
« Reply #16 on: July 21, 2012, 08:18:11 pm »

Idk, I trust your judgement Quietust, but I think DNDPA only affects products that use GET_MATERIAL_FROM_REAGENT

I'm sorry but I will have to argue against that, because several of my reactions should be getting multiplied like crazy. Perhaps once Toady gets more work into Custom Reactions this will be true.

Other then that prove me wrong with a set of Reactions

1 that lacks DNDPA and 1 that has.
and the cheat reactions to make the reagents.
And I will personally test them out, to be proven wrong/right.
As I'd like to have this cleared up so I can stop spreading mis-information.
Logged

Jtedwards670

  • Bay Watcher
    • View Profile
Re: Help with some simple reactions
« Reply #17 on: July 23, 2012, 12:44:40 am »

So I made generic animal products by creating a generic creature and all that good stuff. I can easily make generic cheese by changing [MATERIAL_REACTION_PRODUCT:CHEESE_MAT:LOCAL_CREATURE_MAT:CHEESE] to the generic animal. How can I make generic milk? I can accomplish it by changing each animal by removing its name from the milk. Is there an easier way?

I decided to leave in the different animal milk and cheese but I still would like to know just for my knowledge.


EDIT: After some of my feeble further testing I was unable to get a generic nervous tissue, cartilage, skin, hoof and horns. I'm probably missing a few but it show me that Materials other then meat are fighting me. Any tips? I created a false creature with all the materials but didn't work, I created inorganic materials for them and that didn't work either. I noticed in the Masterwork mod they were not generic which leads me to believe its impossible. Not a game breaker.

EDIT AGAIN: Corpsepieces are hardcoded?
« Last Edit: July 23, 2012, 05:22:23 pm by Jtedwards670 »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help with some simple reactions
« Reply #18 on: July 24, 2012, 04:03:38 pm »

Idk, I trust your judgement Quietust, but I think DNDPA only affects products that use GET_MATERIAL_FROM_REAGENT

I'm sorry but I will have to argue against that, because several of my reactions should be getting multiplied like crazy. Perhaps once Toady gets more work into Custom Reactions this will be true.

Other then that prove me wrong with a set of Reactions

1 that lacks DNDPA and 1 that has.
and the cheat reactions to make the reagents.
And I will personally test them out, to be proven wrong/right.
As I'd like to have this cleared up so I can stop spreading mis-information.

Your wish is my command:
Code: [Select]
reaction_other

[OBJECT:REACTION]

[REACTION:TEST1]
[NAME:make test stuff]
[ADVENTURE_MODE_ENABLED]
[PRODUCT:100:5:AMMO:ITEM_AMMO_BOLTS:INORGANIC:COPPER]
[PRODUCT:100:5:AMMO:ITEM_AMMO_BOLTS:INORGANIC:STEEL]
[PRODUCT:100:5:MEAT:NONE:CREATURE_MAT:COW:MILK]
[PRODUCT:100:5:MEAT:NONE:CREATURE_MAT:DONKEY:MILK]
[SKILL:KNAPPING]

[REACTION:TEST2]
[NAME:convert bolts to iron arrows]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:AMMO:ITEM_AMMO_BOLTS:NONE:NONE]
[PRODUCT:100:2:AMMO:ITEM_AMMO_ARROWS:INORGANIC:IRON]
[SKILL:KNAPPING]

[REACTION:TEST3]
[NAME:convert bolts to iron arrows, no-amount]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:AMMO:ITEM_AMMO_BOLTS:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:2:AMMO:ITEM_AMMO_ARROWS:INORGANIC:IRON]
[SKILL:KNAPPING]

[REACTION:TEST4]
[NAME:convert bolts to arrows]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:AMMO:ITEM_AMMO_BOLTS:NONE:NONE]
[PRODUCT:100:2:AMMO:ITEM_AMMO_ARROWS:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:KNAPPING]

[REACTION:TEST5]
[NAME:convert bolts to arrows, no-amount]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:AMMO:ITEM_AMMO_BOLTS:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:2:AMMO:ITEM_AMMO_ARROWS:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:KNAPPING]

[REACTION:TEST6]
[NAME:convert meat to horse milk]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:MEAT:NONE:NONE:NONE]
[PRODUCT:100:2:LIQUID_MISC:NONE:CREATURE_MAT:HORSE:MILK]
[SKILL:KNAPPING]

[REACTION:TEST7]
[NAME:convert meat to horse milk, no-amount]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:MEAT:NONE:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:2:LIQUID_MISC:NONE:CREATURE_MAT:HORSE:MILK]
[SKILL:KNAPPING]

[REACTION:TEST8]
[NAME:make cheese]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:MEAT:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:CHEESE_MAT]
[PRODUCT:100:2:CHEESE:NONE:GET_MATERIAL_FROM_REAGENT:A:CHEESE_MAT]
[SKILL:KNAPPING]

[REACTION:TEST9]
[NAME:make cheese, no-amount]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:1:MEAT:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:CHEESE_MAT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:2:CHEESE:NONE:GET_MATERIAL_FROM_REAGENT:A:CHEESE_MAT]
[SKILL:KNAPPING]

Steps, to be performed in Adventurer mode or Arena mode:
1. Perform reaction TEST1 four times to create the necessary reagents.
2. Perform reaction TEST2 (specific product material) and observe that it converts a stack of 5 copper/steel bolts to a stack of 10 iron arrows.
3. Perform reaction TEST3 (specific product material, ignore amount) and observe that it converts a stack of 5 copper/steel bolts to a stack of 2 iron arrows.
4. Perform reaction TEST4 (use reagent material) and observe that it converts a stack of 5 copper/steel bolts to a stack of 10 copper/steel arrows.
5. Perform reaction TEST5 (use reagent material, ignore amount) and observe that it converts a stack of 5 copper/steel bolts to a stack of 2 copper/steel arrows.
6. Perform reaction TEST6 (specific product material) and observe that it converts a stack of 5 frozen cow/donkey milk chops into a stack of 10 horse milk.
7. Perform reaction TEST7 (specific product material, ignore amount) and observe that it converts a stack of 5 frozen cow/donkey milk chops to a stack of 2 horse milk.
8. Perform reaction TEST8 (material reaction product) and observe that it converts a stack of 5 frozen cow/donkey milk chops to a stack of 10 cow/donkey cheese.
9. Perform reaction TEST9 (material reaction product, ignore amount) and observe that it converts a stack of 5 frozen cow/donkey milk chops to a stack of 2 cow/donkey cheese.

I have not personally tested these in Fortress mode due to the additional setup required. Tests 2-5 should be enough to perform in Fortress mode, but 6-9 would require some modifications to material properties (namely, to make milk solid at room temperature); when using reactions to produce multiple items, only certain types (e.g. ammo, meat, liquid_misc, meat, cheese) will be produced in stacks, while others (e.g. seeds, globs, crafts) just spit out a bunch of individual items.
« Last Edit: July 24, 2012, 04:07:41 pm by Quietust »
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.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Help with some simple reactions
« Reply #19 on: July 24, 2012, 05:37:14 pm »

Just from doing Tests 1-3 (in a sense 2 and 3 because 1 is just getting stuff the needed stuff.)

It is strange, as should this not be affected by the ratio as well?

Spoiler (click to show/hide)

Now then again I haven't looked closer, But it may be cause the Reagents value trumps the Products value.

But I don't use this reaction very much, But I guess it don't hurt to get more booze right?

EDIT:
Maybe there is a difference between Adv. Mode reactions and Fortress Mode reactions? Or Multi-Reagent reactions, and singles
« Last Edit: July 24, 2012, 05:46:22 pm by Hugo_The_Dwarf »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help with some simple reactions
« Reply #20 on: July 24, 2012, 05:53:02 pm »

Since you guys are at it...

Vanilla brewing reaction stacks 25 drinks in 1 barrel.
Custom brewing reaction stacks 15 drinks in 1 barrel, but 20 or 25 stacks get placed outside of barrel.

If I have 1, 2 or 3 plants in my stack, the reaction works, drinks are in barrel, dwarves are happy.
If I have 4 or 5 plants in my stack, the reaction does not work, the drinks hover around in the workshop, dwarves die of thrist.

What is up with that, I could swear that it worked several versions ago.
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 :::

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Help with some simple reactions
« Reply #21 on: July 24, 2012, 05:59:48 pm »

Since you guys are at it...

Vanilla brewing reaction stacks 25 drinks in 1 barrel.
Custom brewing reaction stacks 15 drinks in 1 barrel, but 20 or 25 stacks get placed outside of barrel.

If I have 1, 2 or 3 plants in my stack, the reaction works, drinks are in barrel, dwarves are happy.
If I have 4 or 5 plants in my stack, the reaction does not work, the drinks hover around in the workshop, dwarves die of thrist.

What is up with that, I could swear that it worked several versions ago.
I guess Quietust can better explain that, I'm just going to go with "Toady Lowered Barrel compacity"

But since Quietust has more insight on how DF works, Why does trying to use a Item that is embedded 2 deep result in nothing happening?

such as this:
   [REAGENT:sweetener:1:NONE:NONE:NONE:NONE][REACTION_CLASS:SWEET]
   [REAGENT:sweet container1:1:NONE:NONE:NONE:NONE]
      [CONTAINS:sweetener]
      [PRESERVE_REAGENT]
      [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
   [REAGENT:sweet container2:1:NONE:NONE:NONE:NONE]
      [CONTAINS:sweet container1]
      [PRESERVE_REAGENT]
      [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]

Say it's bagged suger i'm after, but the bag of suger is in a barrel (embedded 2 deep)

Using this will allow dwarves to grab the barrelled and bagged suger, but the suger is not used up. And the reaction produces the Product anyways like nothing happened.

Why?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help with some simple reactions
« Reply #22 on: July 24, 2012, 06:35:16 pm »

1. Regarding your "brew aged dwarven wine" reaction, exactly what items were being fed into the reaction, how many products were produced, and how many products did you expect it to produce?
2. In all likelihood, Toady did not implement recursive container checks, since there's no reason why you'd ever need to do so.
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.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Help with some simple reactions
« Reply #23 on: July 24, 2012, 07:57:02 pm »

1.
about 10 plump helmets
5-25 Dwarven Syrup *depends on how much Sweet Pods were processed* + the container (barrel)
1 hunk of tallow
5 barrels (should matter as they have DNDPA)

Hope
5 drink in each 5 barrels (total of 25)
But I believe I've never acaully bothered to look at the output too closely (Speed testing tends to do that :-\)
I will have to get back to you on what it *acually* makes.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help with some simple reactions
« Reply #24 on: July 24, 2012, 08:43:56 pm »

1.
about 10 plump helmets
5-25 Dwarven Syrup *depends on how much Sweet Pods were processed* + the container (barrel)
1 hunk of tallow
5 barrels (should matter as they have DNDPA)

Hope
5 drink in each 5 barrels (total of 25)
But I believe I've never acaully bothered to look at the output too closely (Speed testing tends to do that :-\)
I will have to get back to you on what it *acually* makes.

The reaction requires 10 plump helmets, 1 sweetener, and 1 tallow. Thus, in order to get 10 units of booze into each barrel, your brewer would have had to use at least 20 plump helmets, 2 sweeteners, and 2 tallow. To get 15 units of booze would require 30 plump helmets, 3 sweeteners, and 3 tallow. And so on. If you had not added [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] to the containers, then the reaction would have also required 2-3 of those as well.

When a custom reaction is performed, it attempts to collect the minimum number of ingredients necessary, but if it ends up collecting large enough stacks of items that it ends up with multiple complete sets of reagents, then it will multiply the outputs accordingly. DOES_NOT_DETERMINE_PRODUCT_AMOUNT just tells it that that specific reagent doesn't need to be collected multiple times.
« Last Edit: July 24, 2012, 08:48:23 pm by Quietust »
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 with some simple reactions
« Reply #25 on: July 26, 2012, 08:12:42 pm »

I do understand this. I just dont understand the fact that 25 units of drinks in the vanilla reactions are succesfully put into a barrel, while they are put outside it (barrel overflow) with a custom reaction. Both create 25 units of the same material, but the outcome is different.
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 with some simple reactions
« Reply #26 on: July 26, 2012, 10:17:27 pm »

In one of the more recent 0.34 releases (possibly the one that introduced minecarts), item weight and volume got merged together, being derived from the same value. As it is, all standard containers effectively have [CONTAINER_CAPACITY:30000], and that capacity is only enough to hold 15 DRINK items. The fact that the builtin "Brew Drink" job can fit more than that in a single barrel is technically a bug - it doesn't check the destination container's capacity the way custom reactions do. There's even a bug on the tracker for it.

Compare the wiki page for item weight to the ones from 0.31 and earlier.
« Last Edit: July 26, 2012, 10:29:06 pm by Quietust »
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]