Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How do I use extracts in a reaction?  (Read 627 times)

ShinyandKittens

  • Bay Watcher
  • Armok can’t really be much different from Arceus..
    • View Profile
How do I use extracts in a reaction?
« on: October 14, 2017, 09:29:53 pm »

Stuff like liquid fire or gnomeblight. I am new to reactions and I want to make an alchemy lab.
Logged
No amount of mods is too much

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: How do I use extracts in a reaction?
« Reply #1 on: October 16, 2017, 10:34:13 am »

So there is nothing currently in the game that lets you do this. If this is a modding question there is a modding forum here.

However while I'm here I'll take a whack at answering your question.

I am going to assume that you have some understanding how Reactions work and some basic modding knowledge so I'll get right to the point of it. Secondly, I'm doing this off the top of my head, so if this doesn't work let me know.

You need two things, you need a reagent with the container, and a reagent with the liquid. Here is the reagent of a container

   [REAGENT:container:1:NONE:NONE:NONE:NONE]
      [CONTAINS:extract]
      [PRESERVE_REAGENT]
      [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]

Spoiler: how did I get this? (click to show/hide)

Now that we have that you need to define the extract. I think the easiest way to do this would be through a REACTION_CLASS. With this tag you can group materials into REACTION_CLASS and then have the reaction call any material with that class. Make sense?

   [REAGENT:extract:1:LIQUID_MISC:NONE:NONE:NONE][REACTION_CLASS:GNOMEBLIGHT]

This reagent will take 1 of any LIQUID_MISC with the reaction class GNOMEBLIGHT. All you have to do is open up your plant raws, find the block of code that talks about gnomeblight, and then paste [REACTION_CLASS:GNOMEBLIGHT] at the end of it.

You can name reaction classes whatever you want, they are quite versatile as far as modding goes. So if you wanted to use a different extract, just duplicate the reaction and change GNOMEBLIGHT to LIQUID_FIRE and paste a reaction class into liquid fire.
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

ShinyandKittens

  • Bay Watcher
  • Armok can’t really be much different from Arceus..
    • View Profile
Re: How do I use extracts in a reaction?
« Reply #2 on: October 16, 2017, 03:34:51 pm »

Thanks! Now I can mod alchemy! :)
Logged
No amount of mods is too much

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How do I use extracts in a reaction?
« Reply #3 on: October 16, 2017, 10:31:59 pm »

Now that we have that you need to define the extract. I think the easiest way to do this would be through a REACTION_CLASS. With this tag you can group materials into REACTION_CLASS and then have the reaction call any material with that class. Make sense?

   [REAGENT:extract:1:LIQUID_MISC:NONE:NONE:NONE][REACTION_CLASS:GNOMEBLIGHT]
If there's only one material (which is the case with Gnomeblight and Liquid Fire), then you can just reference it directly, as follows:
Code: [Select]
Gnomeblight: [REAGENT:extract:150:LIQUID_MISC:NONE:PLANT_MAT:BULB_KOBOLD:EXTRACT]
Liquid Fire: [REAGENT:extract:150:LIQUID_MISC:NONE:CREATURE_MAT:SNAKE_FIRE:VENOM]
Also, any LIQUID_MISC reagent should have a stack size of 150, otherwise you might get a lot more products than expected.
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.