Bay 12 Games Forum

Please login or register.

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

Author Topic: Using plants in reactions?  (Read 1403 times)

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Using plants in reactions?
« on: September 28, 2010, 01:56:25 am »

I want to make a reaction that makes soap from plant oils (e.g. olive soap, coconut soap, sunflower soap). To simplify things, I'm intending to just have it use the whole plant. However, I don't know what to add to make a reaction with a plant. Help?
Logged
くコ:彡

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Using plants in reactions?
« Reply #1 on: September 28, 2010, 02:36:13 am »

Check Shaostoul's guide, my genesis mod (weaving thread from plants as adventurer) or Civforge (I think it uses plants too).

Also there's an "Anatomy of the Reaction" thread in this subforum which explains it extensively.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #2 on: September 28, 2010, 02:56:39 am »

Would this work?

Code: [Select]
[REACTION:MAKE_SOAP_OIL]
[NAME:make soap from plant oil]
[BUILDING:SOAP_MAKER:CUSTOM_S]
[REAGENT:A:1:BARREL:NONE:NONE:NONE][CONTAINS_LYE]
[REAGENT:B:2:PLANT:NO_SUBTYPE:PLANT_MAT:NONE:PLANT][REACTION_CLASS:OIL]
[PRODUCT:100:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:B:SOAP_MAT]
[SKILL:SOAP_MAKING]

The reaction class bit is a tag I attached to several plants in the raws.
Logged
くコ:彡

fivex

  • Bay Watcher
    • View Profile
Re: Using plants in reactions?
« Reply #3 on: September 28, 2010, 03:12:15 am »

Would this work?

Code: [Select]
[REACTION:MAKE_SOAP_OIL]
[NAME:make soap from plant oil]
[BUILDING:SOAP_MAKER:CUSTOM_S]
[REAGENT:A:1:BARREL:NONE:NONE:NONE][CONTAINS_LYE]
[REAGENT:B:2:PLANT:NO_SUBTYPE:PLANT_MAT:NONE:PLANT][REACTION_CLASS:OIL]
[PRODUCT:100:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:B:SOAP_MAT]
[SKILL:SOAP_MAKING]
The reaction class bit is a tag I attached to several plants in the raws.
Use [REAGENT:B:2:NONE:NONE:NONE:NONE][REACTION_CLASS:OIL]
I think that would work.
Logged

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #4 on: September 28, 2010, 04:04:40 am »

Could I just shorten it to [REAGENT:B:2:REACTION_CLASS:OIL]?
Logged
くコ:彡

fivex

  • Bay Watcher
    • View Profile
Re: Using plants in reactions?
« Reply #5 on: September 28, 2010, 05:01:05 am »

Could I just shorten it to [REAGENT:B:2:REACTION_CLASS:OIL]?
no
Logged

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #6 on: September 28, 2010, 05:20:00 am »

I'll try my version of the reaction first (if I haven't completely boned my computer). Hopefully the other stuff I added works, too. I want me some hellberries.

(The booze you get from hellberries is callet 'tortured spirits'. Derp, bad pun.)
« Last Edit: September 28, 2010, 05:23:39 am by Zaerosz »
Logged
くコ:彡

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #7 on: September 29, 2010, 06:08:06 am »

So your version of the reaction produces "bars", and mine does nothing at all. What are we missing here?
Logged
くコ:彡

InsanityPrelude

  • Bay Watcher
  • O SHI--
    • View Profile
Re: Using plants in reactions?
« Reply #8 on: September 29, 2010, 09:03:17 pm »

Sounds like it's not picking up the material from the reagent properly? I'm interested in how this turns out too, since I was planning to have elven soap from a root or something.
Logged
Forget down stairs, make an up stair
And then what?  Mine the sky? . . .  Actually, that'd be awesome.

Igfig

  • Bay Watcher
    • View Profile
Re: Using plants in reactions?
« Reply #9 on: September 29, 2010, 09:57:00 pm »

Did you actually assign a soap material to your plants?  It'll be some lines in the plant's raws looking like

[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
   [REACTION_CLASS:OIL]
   [MATERIAL_REACTION_PRODUCT:SOAP_MAT:LOCAL_PLANT_MAT:SOAP]

...

[USE_MATERIAL_TEMPLATE:SOAP:SOAP_TEMPLATE]
   [REACTION_CLASS:SOAP]
   [SOAP]

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #10 on: September 29, 2010, 10:39:03 pm »

Did you actually assign a soap material to your plants?  It'll be some lines in the plant's raws looking like

[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
   [REACTION_CLASS:OIL]
   [MATERIAL_REACTION_PRODUCT:SOAP_MAT:LOCAL_PLANT_MAT:SOAP]

...

[USE_MATERIAL_TEMPLATE:SOAP:SOAP_TEMPLATE]
   [REACTION_CLASS:SOAP]
   [SOAP]
I don't know where to put the second bit, but this is an example of what I have so far.

Code: [Select]
[PLANT:SUNFLOWER]
[NAME:sunflower][NAME_PLURAL:sunflowers][ADJ:sunflower]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[MATERIAL_VALUE:5]
[EDIBLE_VERMIN]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[REACTION_CLASS:OIL]
[MATERIAL_REACTION_PRODUCT:SOAP_MAT:LOCAL_PLANT_MAT:SOAP]
[PICKED_TILE:15][PICKED_COLOR:6:0:1]
[DRY][BIOME:ANY_TEMPERATE]
[VALUE:5]
[SPRING][SUMMER][AUTUMN][WINTER]
[USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
[MATERIAL_VALUE:5]
[EDIBLE_VERMIN]
[EDIBLE_COOKED]
[SEED:sunflower seed:sunflower seeds:6:0:0:LOCAL_PLANT_MAT:SEED]
[FREQUENCY:50]
[CLUSTERSIZE:1]
[PREFSTRING:size]
Logged
くコ:彡

Igfig

  • Bay Watcher
    • View Profile
Re: Using plants in reactions?
« Reply #11 on: September 30, 2010, 05:09:35 pm »

The second part goes anywhere in the sunflower's block.  It defines that specific plant's soap material.

If you're missing it, that's why you're having problems.  Your MATERIAL_REACTION_PRODUCT line is trying to make something out of the plant's soap material, but you haven't defined any such material.  It'd be like trying to work with plump helmet leaves or strawberry flour: they don't exist unless you define them.

Actually, in retrospect, you don't need the [REACTION_CLASS:SOAP] and [SOAP] lines; they're already declared in the template.  Just stick [USE_MATERIAL_TEMPLATE:SOAP:SOAP_TEMPLATE] somewhere in the plant and you'll be good.

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #12 on: September 30, 2010, 08:30:19 pm »

Thanks for the help, it be working! Now I can post the full mod!
Logged
くコ:彡

InsanityPrelude

  • Bay Watcher
  • O SHI--
    • View Profile
Re: Using plants in reactions?
« Reply #13 on: October 08, 2010, 08:09:46 am »

It's worth noting that using the default template it still has [IMPLIES_ANIMAL_KILL] whether it's from plants or animals. Could be a problem if elves start bitching about animal products again in the future.
Logged
Forget down stairs, make an up stair
And then what?  Mine the sky? . . .  Actually, that'd be awesome.

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Using plants in reactions?
« Reply #14 on: October 08, 2010, 05:33:49 pm »

...it's elves. Who cares?
Logged
くコ:彡
Pages: [1] 2