Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Drinkable Milk Mod ([SOLVED] Question about a custom reaction)  (Read 1947 times)

Vorox

  • Bay Watcher
    • View Profile
Drinkable Milk Mod ([SOLVED] Question about a custom reaction)
« on: December 30, 2015, 03:05:51 pm »

I've been looking for a way to make milk drinkable, and the best I could find was this

Quote
[REACTION:COW_PROS_MILK]
      [NAME:process cows milk]
      [BUILDING:FARMER:CUSTOM_N]
      [REAGENT:A:1:LIQUID_MISC:NONE:CREATURE_MAT:COW:MILK][UNROTTEN]
      [REAGENT:B:1:NONE:NONE:NONE:NONE][CONTAINS:A][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [REAGENT:C:1:NONE:NONE:NONE:NONE][EMPTY][FOOD_STORAGE_CONTAINER][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:A:DRINK_MAT][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:C]
      [SKILL:MILK]
[/s]

It seems good aside from one thing - it must be made from cow milk. Is it possible to just make the reaction use any milk?

EDIT:
Thanks again to everyone for their help. With some tweaking I managed to finalize the reaction. Since I think it's a question that keeps getting asked I'll just leave it here

this reaction takes 1 bucket full of milk and an empty barrel
returns 1 empty bucket and a barrel with 5 "drinks" (they work fine)

add this to the bottom of reaction_other.txt

[REACTION:PROCESS_MILK]
      [NAME:process milk]
      [BUILDING:FARMER:CUSTOM_N]
      [REAGENT:A:30:LIQUID_MISC:NONE:NONE:NONE]
         [REACTION_CLASS:MILK]
         [UNROTTEN]
      [REAGENT:B:1:NONE:NONE:NONE:NONE][CONTAINS:A][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [REAGENT:C:1:NONE:NONE:NONE:NONE][EMPTY][FOOD_STORAGE_CONTAINER][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [PRODUCT:100:1:DRINK:GET_MATERIAL_FROM_REAGENT:A:DRINK_MAT][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:C]
      [SKILL:MILK]

Add this to whatever entities you wish in entity_default.txt

   [PERMITTED_REACTION:PROCESS_MILK]
« Last Edit: December 30, 2015, 06:38:05 pm by Vorox »
Logged
Vorox likes gremlins for their tears.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Question about a custom reaction
« Reply #1 on: December 30, 2015, 03:10:28 pm »

Put a reaction class in the milk material template, then target any liquid that has that class.
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

Vorox

  • Bay Watcher
    • View Profile
Re: Question about a custom reaction
« Reply #2 on: December 30, 2015, 03:42:39 pm »

Thanks
Now the reaction looks like this
Quote
[REACTION:PROCESS_MILK]
      [NAME:process milk]
      [BUILDING:FARMER:CUSTOM_N]
      [REAGENT:A:1:LIQUID_MISC:NONE:NONE:NONE]
         [REACTION_CLASS:MILK]
         [UNROTTEN]
      [REAGENT:B:1:NONE:NONE:NONE:NONE][CONTAINS:A][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [REAGENT:C:1:NONE:NONE:NONE:NONE][EMPTY][FOOD_STORAGE_CONTAINER][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:A:DRINK_MAT][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:C]
      [SKILL:MILK]

But for some reason I can't see it in the game. I put it at the bottom of reaction_other.txt and generated a new world.
Logged
Vorox likes gremlins for their tears.

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Question about a custom reaction
« Reply #3 on: December 30, 2015, 03:46:29 pm »

Thanks
Now the reaction looks like this
Quote
[REACTION:PROCESS_MILK]
      [NAME:process milk]
      [BUILDING:FARMER:CUSTOM_N]
      [REAGENT:A:1:LIQUID_MISC:NONE:NONE:NONE]
         [REACTION_CLASS:MILK]
         [UNROTTEN]
      [REAGENT:B:1:NONE:NONE:NONE:NONE][CONTAINS:A][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [REAGENT:C:1:NONE:NONE:NONE:NONE][EMPTY][FOOD_STORAGE_CONTAINER][PRESERVE_REAGENT][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
      [PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:A:DRINK_MAT][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:C]
      [SKILL:MILK]

But for some reason I can't see it in the game. I put it at the bottom of reaction_other.txt and generated a new world.
You need to make the entity that will have it be able to use it. For instance, lets assume you are playing dwarfs: go to entity_default and anywhere in the first entity (MOUNTAIN) add: PERMITTED_REACTION:PROCESS_MILK (with the proper brackets, of course).
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Vorox

  • Bay Watcher
    • View Profile
Re: Question about a custom reaction
« Reply #4 on: December 30, 2015, 06:04:42 pm »

You need to make the entity that will have it be able to use it. For instance, lets assume you are playing dwarfs: go to entity_default and anywhere in the first entity (MOUNTAIN) add: PERMITTED_REACTION:PROCESS_MILK (with the proper brackets, of course).
Oh right, I can't believe I forgot that.
The reaction doesn't seem to work though. I ordered my milker to do it, and he did it but it seems that either nothing happened or the milk turned into itself.


EDIT: Fixed it. There was one NONE too much in the product section
« Last Edit: December 30, 2015, 06:16:53 pm by Vorox »
Logged
Vorox likes gremlins for their tears.

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Drinkable Milk Mod ([SOLVED] Question about a custom reaction)
« Reply #5 on: January 09, 2016, 07:15:04 pm »

A question; does drinkable milk made with this reaction show up in the "drinks" tab, and/or does it qualify as alcohol? If you force your dwarves to have nothing but milk and cookies, will they go insane from lack of alcohol?
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

JediaKyrol

  • Bay Watcher
  • I have no idea what I am doing...
    • View Profile
Re: Drinkable Milk Mod ([SOLVED] Question about a custom reaction)
« Reply #6 on: January 12, 2016, 12:20:57 pm »

A question; does drinkable milk made with this reaction show up in the "drinks" tab, and/or does it qualify as alcohol? If you force your dwarves to have nothing but milk and cookies, will they go insane from lack of alcohol?

forcing them to only have milk and cookies makes their hair and beards go white then they start wearing blood-drenched clothes...and begin enslaving elves and making them carve wooden toys.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Drinkable Milk Mod ([SOLVED] Question about a custom reaction)
« Reply #7 on: January 13, 2016, 10:46:04 am »

A question; does drinkable milk made with this reaction show up in the "drinks" tab, and/or does it qualify as alcohol? If you force your dwarves to have nothing but milk and cookies, will they go insane from lack of alcohol?

forcing them to only have milk and cookies makes their hair and beards go white then they start wearing blood-drenched clothes...and begin enslaving elves and making them carve wooden toys.
That's... perfectly natural DF behavior.  So, in short, there are no side-effects.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map