Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dying Soap  (Read 1486 times)

Porpoisepower

  • Bay Watcher
  • For Surely he is the Cuisinart Hat Rack
    • View Profile
Dying Soap
« on: June 12, 2014, 04:05:30 pm »

So I'm making a castle out of Skunk Soap.

I'd like to do some lovely mosaics. 

Has anyone have any success allowing soap to be dyeable? 
Logged
That's what DF needs, The gutbuster brigade.  Screw that elf and his cat. Thibbledorf Pwent is the real hero.

sackhead

  • Bay Watcher
    • View Profile
Re: Dying Soap
« Reply #1 on: June 12, 2014, 10:51:12 pm »

i font know if you can dye bars/blocks or if you could would it change the colour of constructions.
you could possibly use blood and other contaminants. its harder to direct but more dorfy.
just leave some babies lying about and release angry dingo's
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Dying Soap
« Reply #2 on: June 12, 2014, 11:04:49 pm »

Dyes can only be applied to constructed items (finished goods, including cloth) and thread - basic building materials (boulders, blocks, bars, and logs) cannot be dyed in any way.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dying Soap
« Reply #3 on: June 12, 2014, 11:19:52 pm »

Dyes can only be applied to constructed items (finished goods, including cloth) and thread - basic building materials (boulders, blocks, bars, and logs) cannot be dyed in any way.
I never figured out how to dye custom items... or armors. There is no way to simply do it with reactions, and I have never seen a script that allows this. It would be useful to be able to dye leather for example...
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Dying Soap
« Reply #4 on: June 13, 2014, 02:02:39 am »

This sounds interesting, fun, and possibly not that difficult, unless it is impossible.  I'll see what I can do.

EDIT: It works!  The description will always read 'The thread is *color*', even if the item is not actually made of thread, and only improvable items can be dyed (so no painted blocks or bars, unfortunately), but the item does show up with the appropriate color.  I'll make a lua hook reaction script for it.

EDIT2: Hm.  Turns out that figuring out which item used in a reaction corresponds to which item in the reaction's definition is more complicated than I expected, especially when one item is stored in another.  At least I know it's possible in theory.  Worst case scenario, I can just make a very inflexible version (i.e. it must be one dye in powder form held in a container and one item to be dyed).

GavJ

  • Bay Watcher
    • View Profile
Re: Dying Soap
« Reply #5 on: June 13, 2014, 03:31:07 pm »

You could instead make reactions that destroy a chunk of soap and replace it with a new item made out of a version of soap that has a given color. Thus not requiring any lua. And you should still be able to do this in a way that preserves the animal type description. Follow the example of tanning a hide (which destroys skin, makes leather, and still has it labeled as the correct type of leather).

So:

[REACTION:DYE_SOAP_G]
   [NAME:dye soap green]
   [BUILDING:SOAP_MAKER:CUSTOM_G]
   [REAGENT:A:1:NONE:NONE:NONE:NONE][REACTION_CLASS:SOAP]   **need to make a reaction class for soap, and also a DYE_SOAP_MAT line in the soap material definition, one for each color, specifying the new materials for each color, and then add all of those to the first two entries in b_detail_plan_default.txt. Repeat this for every variant of soap, if you want people to be able to re-dye them later. Or only include for original soap, if dyeing is a one-time-deal.
      [HAS_MATERIAL_REACTION_PRODUCT:DYE_SOAP_MAT]
        [REAGENT:B:1:BOULDER:NONE:INORGANIC:OLIVINE]
   [PRODUCT:100:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:soap:DYE_SOAP_MAT] <--not 100% sure that "soap" here is correct, would have to test it, but you get the idea.
      [PRODUCT_DIMENSION:150]
   [SKILL:DYEING] <--i don't remember the actual tag for this
« Last Edit: June 13, 2014, 03:33:32 pm by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Dying Soap
« Reply #6 on: June 13, 2014, 04:01:55 pm »

   [PRODUCT:100:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:soap:DYE_SOAP_MAT] <--not 100% sure that "soap" here is correct, would have to test it, but you get the idea.
That "soap" should be "A", since that's the name of the reagent.
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.

Porpoisepower

  • Bay Watcher
  • For Surely he is the Cuisinart Hat Rack
    • View Profile
Re: Dying Soap
« Reply #7 on: July 17, 2014, 06:08:38 am »

Cool thanks!
Logged
That's what DF needs, The gutbuster brigade.  Screw that elf and his cat. Thibbledorf Pwent is the real hero.