Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Overabundant Reaction Problem  (Read 745 times)

Malecus

  • Bay Watcher
    • View Profile
Overabundant Reaction Problem
« on: June 30, 2010, 11:16:38 pm »

So I'm working on my own set of mods and everything is going great.  The Workshop workshop means I've got stylish buildings, and all the reactions are firing off wonderfully.  Except one.  This one.

Spoiler (click to show/hide)

I'm no legendary modcrafter, but I believe I've got everything in the right place.  But every time I perform the reaction, I'm creating 150 of the product, not 1 as is intended.  I've tried this under a few conditions, and it's always overproduced in this exact amount.  I've rewritten the reaction a few times over from scratch, just in case I did something stupid like misspelled or typed in an extra number, but I keep getting the same result.

What am I doing wrong?
Logged

Patchouli

  • Bay Watcher
  • Where very delicious cake shop?
    • View Profile
Re: Overabundant Reaction Problem
« Reply #1 on: July 01, 2010, 12:01:27 am »

Try adding [PRODUCT_DIMENSION:150] to the product. I'm not absolutely sure, but I'm betting it has something to do with the fact that a bar of metal has 150 units to it. I'm guessing that the game will default the product dimension to 1. Since you're making 1 "set" of sheets with each sheet only taking 1 unit, from a bar that has 150 units, it probably spits out 150.

Code: [Select]
[REACTION:PREPARE_METAL_SHEETS]
   [NAME:Prepare Metal Sheets]
   [BUILDING:SHEETWORKS:NONE]
   [REAGENT:A:1:BAR:NONE:NONE:NONE]
   [PRODUCT:100:1:INSTRUMENT:ITEM_SHEETS:GET_MATERIAL_FROM_REAGENT:A:NONE][PRODUCT_DIMENSION:150]
   [SKILL:METALCRAFT]
« Last Edit: July 01, 2010, 12:03:47 am by Patchouli »
Logged

Malecus

  • Bay Watcher
    • View Profile
Re: Overabundant Reaction Problem
« Reply #2 on: July 03, 2010, 12:54:03 am »

Ah-ha!  You were close (the extra tag didn't work), but you were right with the 1 bar = 150 bar units part.  Seems I was asking for 1/150th of a bar, and the game quickly ran the reaction 150 times.  I had to ask for 150 units for it to work ([REAGENT:A:150:BAR...)

Seems a bit odd though, those 150 stacks I kept creating were resulting in a 300 times increase in mass over the original bar.
Logged

Patchouli

  • Bay Watcher
  • Where very delicious cake shop?
    • View Profile
Re: Overabundant Reaction Problem
« Reply #3 on: July 03, 2010, 01:04:53 am »

Ah-ha!  You were close (the extra tag didn't work), but you were right with the 1 bar = 150 bar units part.  Seems I was asking for 1/150th of a bar, and the game quickly ran the reaction 150 times.  I had to ask for 150 units for it to work ([REAGENT:A:150:BAR...)

Seems a bit odd though, those 150 stacks I kept creating were resulting in a 300 times increase in mass over the original bar.
Ah, I see now.

Because 1 bar = 150 units, you need to use 150 units to spit out a single product from a single bar. Before, it was signifying the 1/150 as equaling a single product.

I'm guessing PRODUCT_REAGENT would be if you're making a bar or cloth or something.

Ah, I should have looked at the reaction_smelter file before saying anything, it makes it very clear how bar reactions work.
Logged

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Overabundant Reaction Problem
« Reply #4 on: July 03, 2010, 02:26:19 pm »

Just so you know, the reason it was required like that is cause typically the vanilla reactions have the "product_dimension" dealio. So you have to call on the "stack" for it to work. If you were to remove all of the product_dimension things, you shouldn't run into that problem. It's the same for cloth.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: Overabundant Reaction Problem
« Reply #5 on: July 04, 2010, 06:22:01 pm »

Just so you know, the reason it was required like that is cause typically the vanilla reactions have the "product_dimension" dealio. So you have to call on the "stack" for it to work. If you were to remove all of the product_dimension things, you shouldn't run into that problem. It's the same for cloth.
why would you mod the rest of DF to make up for a simple mistake?

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Overabundant Reaction Problem
« Reply #6 on: July 04, 2010, 06:30:48 pm »

Was just stating, it's all a matter of opinion.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!