Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Extracting dye from animals.  (Read 1009 times)

RandomNumberGenerator

  • Bay Watcher
  • Nope.
    • View Profile
Extracting dye from animals.
« on: April 22, 2010, 05:00:57 pm »

Is this possible? I've been poking through the raws trying to figure out how, but I'm not exactly sure how the raws work, only how to add/remove existing tags, so I don't know how to do this. I want to make a snail that had a purple dye as an extract, but I don't know how that would work. I've been comparing the raws for moghopper juice and dimple cup dye:

Code: [Select]
[USE_MATERIAL_TEMPLATE:MOG_JUICE:CREATURE_EXTRACT_TEMPLATE]
[STATE_NAME:ALL_SOLID:frozen mog juice]
[STATE_ADJ:ALL_SOLID:frozen mog juice]
[STATE_NAME:LIQUID:mog juice]
[STATE_ADJ:LIQUID:mog juice]
[STATE_NAME:GAS:boiling mog juice]
[STATE_ADJ:GAS:boiling mog juice]
[EDIBLE_COOKED]
[PREFIX:NONE]
[EXTRACT:LOCAL_CREATURE_MAT:MOG_JUICE]

Code: [Select]
[USE_MATERIAL_TEMPLATE:MILL:PLANT_POWDER_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:dimple dye]
[STATE_COLOR:ALL_SOLID:MIDNIGHT_BLUE]
[DISPLAY_COLOR:1:0:1]
[MATERIAL_VALUE:20]
[POWDER_DYE:MIDNIGHT_BLUE]
[PREFIX:NONE]
[MILL:LOCAL_PLANT_MAT:MILL]

So what would happen if say, I replaced [EDIBLE_COOKED] with [POWDER_DYE:PURPLE] and added [MATERIAL_VALUE:50] before it? Would I still end up with a workable dye, but one that is extracted like moghopper juice instead of crushed at a millstone?
Logged
The end of the world is more fun then I expected.

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Extracting dye from animals.
« Reply #1 on: April 22, 2010, 05:03:03 pm »

No, because as you'll notice, dye specifically must be powder, and what you've got there is a liquid.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Extracting dye from animals.
« Reply #2 on: April 22, 2010, 06:25:34 pm »

One could probably get an extract from the snail and make a reaction which generates plant powder for the appropriate dye - use a dummy plant with no native biome and you'll be golden.
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!

RandomNumberGenerator

  • Bay Watcher
  • Nope.
    • View Profile
Re: Extracting dye from animals.
« Reply #3 on: April 22, 2010, 06:52:58 pm »

Hmm... that's a possibility, I guess.

Would it be possible to mill the snail at a grindstone, even if it's not a plant?
Logged
The end of the world is more fun then I expected.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Extracting dye from animals.
« Reply #4 on: April 22, 2010, 07:34:52 pm »

You will probably want to apply those dimple dye material properties to some body part of your snail, milling a whole corpse probably will prove difficult.

You could for example add some customised dimple dye tags, and do [MILL:LIVER:MILL], butcher a snail, and see what it does.

Im not sure if the millers shop recognises bodyparts, if thats the case then you could possibly turn some or all of the creatures materials into plant material, plump helmet man style.

Now I want to make a dimple cup man...
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

RandomNumberGenerator

  • Bay Watcher
  • Nope.
    • View Profile
Re: Extracting dye from animals.
« Reply #5 on: April 22, 2010, 07:41:03 pm »

Well, it's a fish, not a corpse. Not sure if that makes a difference, but it seems like it would, if plants are different enough...

What about making the shell millable? Could that be done? If so, how? As I said, I don't understand how the raws work, just copy+pasting tags.
Logged
The end of the world is more fun then I expected.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Extracting dye from animals.
« Reply #6 on: April 22, 2010, 08:22:03 pm »

Ah, in that case its probabaly a lot simpler to add a custom reaction. You could add those dye tags to the snail file, along with
   [MATERIAL_REACTION_PRODUCT:SNAILDYE:LOCAL_CREATURE_MAT:SNAILDYE]

Then add a reaction, looking something like this:

[REACTION:MILL_SNAIL]
   [NAME:mill some snails!]
   [BUILDING:QUERN:CUSTOM_S]
   [REAGENT:A:1:FISH_RAW:NONE:NONE:NONE][UNROTTEN][HAS_MATERIAL_REACTION_PRODUCT:SNAILDYE] need a snaildye raw fish
   [REAGENT:B:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT] and a bag
   [PRODUCT:100:1:POWDER_DYE:NONE:GET_MATERIAL_FROM_REAGENT:A:SNAILDYE][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:B]
   [SKILL:MILLER]

Well, took most of that from the tanner and gypsum reaction, but the basics should work. However, I havnt tested this, and things I have never tested rarely work exactely the way they are. So you will probabaly have to do some tesing and modifying.

But it wouldnt hurt to learn some basic modding if you allready have enough interest in it to make this topic. Its not even that hard to do.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

RandomNumberGenerator

  • Bay Watcher
  • Nope.
    • View Profile
Re: Extracting dye from animals.
« Reply #7 on: April 23, 2010, 03:49:12 pm »

Hmm... well I can't seem to even get the snail to appear, let alone test the reaction. I had my dwarves fishing on the third cavern level before a hungry head ate them all while my axedwarf was off chasing elephants, but I kept getting "There is nothing to catch in the central cavern" "there is nothing to catch in the easter cavern" etc. messages. This is what I have so far(including the reaction code, just in case anything looks wrong with it):

Not a real plant. Dummy plant to make due from tyrian snails.
Code: (creature_subterranean) [Select]
[CREATURE:SNAIL_TYRIAN]
[DESCRIPTION:A small gastropod that lives deep underground. They are prised for the rich, purple dye that can be extracted from them.]
[NAME:tyrian snail:tyrian snails:tyrian snail]
[CASTE_NAME:tyrian snail:tyrian snails:tyrian snail]
[CREATURE_TILE:s][COLOR:5:0:1]
[VERMIN_FISH][FISHITEM]
[AQUATIC][SMALL_REMAINS][NOBONES][UNDERSWIM][COOKABLE_LIVE]
[NATURAL]
[BIOME:SUBTERRANEAN_WATER]
[UNDERGROUND_DEPTH:2:3]
[POPULATION_NUMBER:250:500]
[SPEED:2900]
[PREFSTRING:beauty]
[ALL_ACTIVE]
[NO_DRINK][NO_SLEEP]
[SWIMS_INNATE][SWIM_SPEED:2500]
[NOT_BUTCHERABLE][COOKABLE_LIVE]
[NOPAIN][EXTRAVISION][NOSTUN][NOFEAR]
[NOBONES]
[BODY:BASIC_1PARTBODY:SHELL]
[USE_MATERIAL_TEMPLATE:SKIN:SKIN_TEMPLATE]
[USE_MATERIAL_TEMPLATE:FAT:FAT_TEMPLATE]
[USE_MATERIAL_TEMPLATE:MUSCLE:MUSCLE_TEMPLATE]
[USE_MATERIAL_TEMPLATE:SHELL:SHELL_TEMPLATE]
[USE_TISSUE_TEMPLATE:SKIN:SKIN_TEMPLATE]
[USE_TISSUE_TEMPLATE:FAT:FAT_TEMPLATE]
[USE_TISSUE_TEMPLATE:MUSCLE:MUSCLE_TEMPLATE]
[USE_TISSUE_TEMPLATE:SHELL:SHELL_TEMPLATE]
[TISSUE_LAYER:BY_CATEGORY:BODY:MUSCLE:NORMAL]
[TISSUE_LAYER_OVER:BY_CATEGORY:BODY:FAT:NORMAL]
[TISSUE_LAYER_OVER:BY_CATEGORY:BODY:SKIN:NORMAL]
[TISSUE_LAYER:BY_CATEGORY:SHELL:SHELL:NORMAL]
[BODY_DETAIL_PLAN:SHELL_POSITIONS]
[HAS_NERVES]
[USE_MATERIAL_TEMPLATE:ICHOR:ICHOR_TEMPLATE]
[BLOOD:LOCAL_CREATURE_MAT:ICHOR:LIQUID]
[CREATURE_CLASS:GENERAL_POISON]
[GETS_WOUND_INFECTIONS]
[GETS_INFECTIONS_FROM_ROT]
[USE_MATERIAL_TEMPLATE:PUS:PUS_TEMPLATE]
[PUS:LOCAL_CREATURE_MAT:PUS:LIQUID]
[BODY_SIZE:0:0:200]
[MAXAGE:10:20]
[HOMEOTHERM:10040]
[SET_TL_GROUP:BY_CATEGORY:ALL:SKIN]
[TL_COLOR_MODIFIER:GRAY:1]
[TLCM_NOUN:skin:SINGULAR]

Code: (plant_standard) [Select]
[PLANT:TYRIAN_DYE]
[NAME:tyrian dye][NAME_PLURAL:tyrian dyes][ADJ:tyrian dye]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[MATERIAL_VALUE:3]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[PICKED_TILE:42][PICKED_COLOR:3:0:0]
[GROWDUR:600][VALUE:3]
[USE_MATERIAL_TEMPLATE:MILL:PLANT_POWDER_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:tyrian dye]
[STATE_COLOR:ALL_SOLID:PURPLE]
[DISPLAY_COLOR:5:0:0]
[MATERIAL_VALUE:50]
[POWDER_DYE:PURPLE]
[PREFIX:NONE]
[MILL:LOCAL_PLANT_MAT:MILL]
[FREQUENCY:100]
[CLUSTERSIZE:5]
[PREFSTRING:soothing color]
[WET][DRY]
[SHRUB_TILE:58]
[DEAD_SHRUB_TILE:58]
[SHRUB_COLOR:3:0:0]
[DEAD_SHRUB_COLOR:0:0:1]
Code: (reaction_other) [Select]
[REACTION:MAKE_TYRIAN_DYE]
[NAME:make tyrian dye]
[BUILDING:QUERN:CUSTOM_S]
[REAGENT:A:1:FISH_RAW:NONE:NONE:NONE][UNROTTEN][HAS_MATERIAL_REACTION_PRODUCT:SNAIL_TYRIAN]
[REAGENT:B:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT]
  [PRODUCT:100:1:POWDER_DYE:NONE:GET_MATERIAL_FROM_REAGENT:A:TYRIAN_DYE][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:B]
    [SKILL:MILLER]


Logged
The end of the world is more fun then I expected.

beorn080

  • Bay Watcher
    • View Profile
Re: Extracting dye from animals.
« Reply #8 on: April 23, 2010, 04:23:09 pm »

If your trying this, I recommend adding the pet and common domestic tags to the snail to test initially. That will make it have a decent chance to spawn in your dwarf civ and let you purchase them.
Logged
Ustxu Iceraped the Frigid Crystal of Slaughter was a glacier titan. It was the only one of its kind. A gigantic feathered carp composed of crystal glass. It has five mouths full of treacherous teeth, enormous clear wings, and ferocious blue eyes. Beware its icy breath! Ustxu was associated with oceans, glaciers, boats, and murder.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Extracting dye from animals.
« Reply #9 on: April 23, 2010, 05:31:57 pm »

hmmm, maybe they didnt reprocude due to lack of genders? Not sure how that works for vermin.

Did you regen your world?

Also, add [HAS_MATERIAL_REACTION_PRODUCT:SNAIL_TYRIAN] under [USE_MATERIAL_TEMPLATE:MUSCLE:MUSCLE_TEMPLATE].

And using the plant means the reactions product should have PLANT_MAT:TYRIAN_DYE as material instead of GET_MATERIAL_FROM_REAGENT:A:TYRIAN_DYE

Also, querns refuse to have custom reactions for some reason. You could use the kitchen, or fashion some some custom workshop.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!