Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How To Make Plants Brewable  (Read 1127 times)

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
How To Make Plants Brewable
« on: April 10, 2015, 12:04:46 am »

I've been using a large set of mods since 0.34 now, and have ported them from 0.34 to 0.40 without any errors left over. However I finally noticed now that there are several plants that are supposed to be brewable, but can't be brewed. I've tried looking at the raws and comparing them to plump helmets, but I can't find anything that's missing. Could somebody outline everything a plant needs to bre brewable so I can find what's missing?

EDIT: Upon further investigation I've found that the drinks still exist and can be bought on embark, but the plants can't be brewed in fortress mode. I suspect this might relate to the addition of the [PERMITTED_REACTION:BREW_DRINK_FROM_PLANT] and [PERMITTED_REACTION:BREW_DRINK_FROM_PLANT_GROWTH] that are now required for civs to be able to brew drinks. The civ I'm playing has those though, and did when the world was generated.
« Last Edit: April 10, 2015, 12:11:10 am by vjmdhzgr »
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

scamtank

  • Bay Watcher
    • View Profile
Re: How To Make Plants Brewable
« Reply #1 on: April 10, 2015, 11:28:56 am »

In the old days, your plant declared a material, like this:

Code: [Select]
[USE_MATERIAL_TEMPLATE:hooch:PLANT_ALCOHOL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:frozen dwarven wine]
[STATE_NAME_ADJ:LIQUID:dwarven wine]
[STATE_NAME_ADJ:GAS:boiling dwarven wine]
[MATERIAL_VALUE:2]
[DISPLAY_COLOR:5:0:0]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[PREFIX:NONE]

...and then used a simple DRINK token to tell the hardcoded brewing job in the still what happens:

Code: [Select]
[DRINK:LOCAL_PLANT_MAT:hooch]
Now the old reaction is gone for good and a modern reaction is used in its place. The material stuff is the same, but this time you need a material reaction product, attached to whatever %material% things you're throwing into the pot, structural or fruit or whatever:

Code: [Select]
[MATERIAL_REACTION_PRODUCT:DRINK_MAT:LOCAL_PLANT_MAT:hooch]
Now the new reaction in reaction_other.txt understands what's going on. I could swear that the old DRINK token is no longer used, but I see that thing all over the raws. Either I'm missing something or Toady was just sloppy cleaning those out.
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How To Make Plants Brewable
« Reply #2 on: April 10, 2015, 11:31:08 am »

What's the uncapitalized "hooch" at the end for? The drink seems to already be named, is it some kind of local material name?
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

scamtank

  • Bay Watcher
    • View Profile
Re: How To Make Plants Brewable
« Reply #3 on: April 10, 2015, 11:45:31 am »

Yeah, it's just an identifier, look at the header of the material template. The one for alcohol is "DRINK" by default, I just made it like that to make sure it stands out as something not set in stone.

DRINK_MAT is the same. It just connects to the brewing reaction.
« Last Edit: April 10, 2015, 11:47:13 am by scamtank »
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How To Make Plants Brewable
« Reply #4 on: April 10, 2015, 05:39:33 pm »

Alright then. Thanks for the help.

EDIT: I just realized I thanked you without even checking if it works, which it does. I also tried removing that [DRINK:LOCAL_PLANT_MAT:hooch] from one of them, and it's still brewable, so I don't know why Toady didn't remove them.
« Last Edit: April 10, 2015, 05:46:47 pm by vjmdhzgr »
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: How To Make Plants Brewable
« Reply #5 on: April 11, 2015, 12:23:06 pm »

Because the DRINK tag still specifies what to bring at embark, I think?
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How To Make Plants Brewable
« Reply #6 on: April 11, 2015, 02:24:32 pm »

Because the DRINK tag still specifies what to bring at embark, I think?
I"ve checked and that is indeed the case.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: How To Make Plants Brewable
« Reply #7 on: April 11, 2015, 02:37:25 pm »

I figured it was, but I never actually checked, good to know for sure :)
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

scamtank

  • Bay Watcher
    • View Profile
Re: How To Make Plants Brewable
« Reply #8 on: April 11, 2015, 02:53:41 pm »

That sounded so weird I had to try it for myself, and what do you know. You're right.

I can't think of any other instance of new and old systems overlapping like this. Usually the material reaction product is enough to put it in the civilization's "inventory".
Logged