Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Auto-Process Plants  (Read 2266 times)

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Auto-Process Plants
« on: March 24, 2011, 11:55:31 am »

So, I want to make a reaction that automatically turns rope reed/pig tails into thread.  Is there a way to do this and keep the stack production style?  Like, take rope reed[4] and produce 4 threads?  I know I can automate it easily enough with the auto token.

Andux

  • Bay Watcher
  • [PREFSTRING:semicolons]
    • View Profile
    • Andux's DFWiki page
Re: Auto-Process Plants
« Reply #1 on: March 24, 2011, 01:26:15 pm »

Code: (should produce a stack of 4 thread) [Select]
[PRODUCT:100:4:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:plant:THREAD][PRODUCT_DIMENSION:15000]
Or possibly:

Code: (produces 1 thread of 4x length) [Select]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:plant:THREAD][PRODUCT_DIMENSION:60000]
I also have an idea for how you could get one reaction to work for all thread-producing plant types, but I still need to confirm that HAS_MATERIAL_REACTION_PRODUCT uses the same material-selection logic as GET_MATERIAL_FROM_REAGENT:
Code: (not tested) [Select]
[REAGENT:plant:4:PLANT:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:THREAD]If not, you'll need to add [MATERIAL_REACTION_PRODUCT:THREAD_MAT:LOCAL_PLANT_MAT:THREAD] to the plant's STRUCTURAL mat and update everything else accordingly.
Logged
(Do not sign anything.) -- Fell, Planescape: Torment

MADMAN · Save Tools · WTF Tools · Generated Raws Extractor · Tweak for 0.31–34.xx

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Auto-Process Plants
« Reply #2 on: March 24, 2011, 01:28:35 pm »

Or, could add a reaction class, but I think the has product will work.

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: Auto-Process Plants
« Reply #3 on: March 24, 2011, 02:06:26 pm »

After tou test the reaction product version be sure to post the results.
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Auto-Process Plants
« Reply #4 on: March 24, 2011, 03:43:16 pm »

Code: (should produce a stack of 4 thread) [Select]
[PRODUCT:100:4:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:plant:THREAD][PRODUCT_DIMENSION:15000] This will produce 4 threads, individually stacked, as the actual farmshop does.

produces 1 thread of 4x length
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:plant:THREAD][PRODUCT_DIMENSION:60000]

Definitely not the way to go.  It probably works identically, but easier to work with the other one.
Anyway, stacks in general and reactions still don't go together very well as far as I know.  In that regard, your reaction will probably take four stacks of plants and make four threads out of them.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Auto-Process Plants
« Reply #5 on: March 24, 2011, 03:49:42 pm »

I know this reaction takes one stack of plants and turns it into a same size stack of cheese items. Not sure if you can get it to yield multiple items.
Spoiler (click to show/hide)
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!