Bay 12 Games Forum

Please login or register.

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

Author Topic: How to make a creature extract into a Dye?  (Read 911 times)

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
How to make a creature extract into a Dye?
« on: August 27, 2011, 08:54:44 pm »

Currently working on making Fluffy Wamblers give an extract that works as a valuable purple dye.. but I can't quite get it to work.  I've been able to get it extractable, but once I have the Wambler Dye, I am unable to use it as an actual dye.  Anyone know the specifics on how to do this?
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #1 on: August 27, 2011, 09:11:44 pm »

If you're doing it as a normal animal Extract (using the butcher's workshop), then it won't work - dyes must be powders, which means you'll need to use a custom reaction.
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.

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #2 on: August 27, 2011, 09:15:43 pm »

Doh, I haven't the first clue about custom reactions.. guess I should get working on it.  I must.. take advantage of a cute creature for monetary gain..

Edit: Actually, this doesn't look too hard...
« Last Edit: August 27, 2011, 09:28:27 pm by Crustypeanut »
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Pan

  • Bay Watcher
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #3 on: August 27, 2011, 09:34:32 pm »

Maybe a reaction that processes the unusable 'Fluffy Wambler Dye' into usable ones?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #4 on: August 27, 2011, 10:02:15 pm »

Maybe a reaction that processes the unusable 'Fluffy Wambler Dye' into usable ones?
What, like this?
Code: [Select]
[REACTION:BAKE_EXTRACT]
[NAME:bake extract into powder]
[BUILDING:KILN:CUSTOM_E]
[REAGENT:extract:1:LIQUID_MISC:NONE:NONE:NONE][REACTION_CLASS:DYE_EXTRACT]
[REAGENT:extract_container:1:NONE:NONE:NONE:NONE][CONTAINS:extract][PRESERVE_REAGENT]
[REAGENT:bag:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT]
[PRODUCT:100:1:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:extract:NONE][PRODUCT_TO_CONTAINER:bag][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]

Add [REACTION_CLASS:DYE_EXTRACT] to your fluffy wambler extract material, update your entity definitions to add the custom reaction, generate a new world, and you should be set. If you don't want to generate a new world, then you'll need to replace one of your existing reactions, ideally one you'd never use.
« Last Edit: August 27, 2011, 10:05:00 pm by Quietust »
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.

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #5 on: August 27, 2011, 10:11:08 pm »

Maybe a reaction that processes the unusable 'Fluffy Wambler Dye' into usable ones?
What, like this?
Code: [Select]
[REACTION:BAKE_EXTRACT]
[NAME:bake extract into powder]
[BUILDING:KILN:CUSTOM_E]
[REAGENT:extract:1:LIQUID_MISC:NONE:NONE:NONE][REACTION_CLASS:DYE_EXTRACT]
[REAGENT:extract_container:1:NONE:NONE:NONE:NONE][CONTAINS:extract][PRESERVE_REAGENT]
[REAGENT:bag:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT]
[PRODUCT:100:1:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:extract:NONE][PRODUCT_TO_CONTAINER:bag][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]

Add [REACTION_CLASS:DYE_EXTRACT] to your fluffy wambler extract material, update your entity definitions to add the custom reaction, generate a new world, and you should be set. If you don't want to generate a new world, then you'll need to replace one of your existing reactions, ideally one you'd never use.

Ok, how would I get the Wambler dye to be a certain 'mill value' as well as a specific color, once I do this?
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #6 on: August 27, 2011, 10:41:11 pm »

Ok, how would I get the Wambler dye to be a certain 'mill value' as well as a specific color, once I do this?

The same way it's done for plant-based dyes.

It would help if you copy/pasted your updated wambler raws.
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.

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #7 on: August 27, 2011, 10:52:08 pm »

Spoiler (click to show/hide)

This is the extract of the Wamblers, everything else is identical.  Would I put the following into this area?

Spoiler (click to show/hide)
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #8 on: August 28, 2011, 12:02:03 pm »

If you're going to call the extract "goo", then you should probably create a new material named DYE (based on the various plant dyes, though probably using a new material template that has [POWDER_MISC_CREATURE] instead of [POWDER_MISC_PLANT]) and add those new properties to it, change the extract material's [REACTION_CLASS:DYE_EXTRACT] to [MATERIAL_REACTION_PRODUCT:POWDER_MAT:LOCAL_CREATURE_MAT:DYE], and then change the reaction as follows:

1. Replace [REACTION_CLASS:DYE_EXTRACT] with [HAS_MATERIAL_REACTION_PRODUCT:POWDER_MAT]
2. Replace GET_MATERIAL_FROM_REAGENT:extract:NONE with GET_MATERIAL_FROM_REAGENT:extract:POWDER_MAT.
« Last Edit: August 28, 2011, 12:08:10 pm by Quietust »
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.

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #9 on: August 28, 2011, 01:50:46 pm »

Ok, I'm still having some trouble with not getting the new reaction to even show at all in a newly-created world.. I'll copy/paste everything related to the Wambler.

The New Material, which I copied from the Plant_powder_template and changed the name + POWDER_MISC_CREATURE:
Code: [Select]
[MATERIAL_TEMPLATE:CREATURE_POWDER_TEMPLATE]
[STATE_COLOR:ALL_SOLID:WHITE]
[STATE_NAME:ALL_SOLID:plant powder]
[STATE_ADJ:ALL_SOLID:plant powder]
[STATE_COLOR:LIQUID:BLACK]
[STATE_NAME:LIQUID:none]
[STATE_ADJ:LIQUID:none]
[STATE_COLOR:GAS:BLACK]
[STATE_NAME:GAS:none]
[STATE_ADJ:GAS:none]
[DISPLAY_COLOR:7:0:1]
[MATERIAL_VALUE:1]
[SPEC_HEAT:800]
[IGNITE_POINT:10400]
[MELTING_POINT:NONE]
[BOILING_POINT:NONE]
[HEATDAM_POINT:10500]
[COLDDAM_POINT:9900]
[MAT_FIXED_TEMP:NONE]
[SOLID_DENSITY:600]
[LIQUID_DENSITY:NONE]
[MOLAR_MASS:NONE]
[IMPACT_YIELD:10000]
[IMPACT_FRACTURE:10000]
[IMPACT_STRAIN_AT_YIELD:1000]
[COMPRESSIVE_YIELD:10000]
[COMPRESSIVE_FRACTURE:10000]
[COMPRESSIVE_STRAIN_AT_YIELD:1000]
[TENSILE_YIELD:10000]
[TENSILE_FRACTURE:10000]
[TENSILE_STRAIN_AT_YIELD:1000]
[TORSION_YIELD:10000]
[TORSION_FRACTURE:10000]
[TORSION_STRAIN_AT_YIELD:1000]
[SHEAR_YIELD:10000] no data
[SHEAR_FRACTURE:10000]
[SHEAR_STRAIN_AT_YIELD:1000]
[BENDING_YIELD:10000]
[BENDING_FRACTURE:10000]
[BENDING_STRAIN_AT_YIELD:1000]
[MAX_EDGE:0]
[ABSORPTION:100]
[POWDER_MISC_CREATURE]

The Reaction:
Code: [Select]
[REACTION:GRIND_INTO_DYE]
[NAME:grind extract into dye]
[BUILDING:QUERN:CUSTOM_E]
[BUILDING:MILLSTONE:CUSTOM_E]
[REAGENT:extract:1:LIQUID_MISC:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:POWDER_MAT]
[REAGENT:extract_container:1:NONE:NONE:NONE:NONE][CONTAINS:extract][PRESERVE_REAGENT]
[REAGENT:bag:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT]
[PRODUCT:100:1:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:extract:POWDER_MAT][PRODUCT_TO_CONTAINER:bag][PRODUCT_DIMENSION:150]
[SKILL:MILLING]

And the entire Wambler Info:

Code: [Select]
[CREATURE:WAMBLER_FLUFFY]
[DESCRIPTION:A fluffy, pudge-filled being, known for its warm heart and stumble bumblings.]
[NAME:fluffy wambler:fluffy wamblers:fluffy wambler]
[CASTE_NAME:fluffy wambler:fluffy wamblers:fluffy wambler]
[CREATURE_TILE:249][COLOR:7:0:1]
[PETVALUE:20]
[VERMIN_EATER][PENETRATEPOWER:1][FREQUENCY:100][VERMIN_GROUNDER]
[SMALL_REMAINS][GOOD]![PET]![NATURAL]
[NOT_BUTCHERABLE]
[BIOME:ANY_LAND]
[POPULATION_NUMBER:250:500]
[TRIGGERABLE_GROUP:5:50]
[PREFSTRING:warm heart]
[PREFSTRING:gentle nature]
[PREFSTRING:stumble bumbling]
[BODY:HUMANOID_SIMPLE:2EYES:NOSE]
[USE_MATERIAL_TEMPLATE:FLUFF:HAIR_TEMPLATE]
[STATE_NAME:ALL_SOLID:fluff]
[STATE_ADJ:ALL_SOLID:fluff]
[USE_TISSUE_TEMPLATE:FLUFF:HAIR_TEMPLATE]
[TISSUE_NAME:fluff:NP]
[RELATIVE_THICKNESS:3]
[INSULATION:200]
[USE_MATERIAL_TEMPLATE:SKIN:SKIN_TEMPLATE]
[USE_TISSUE_TEMPLATE:SKIN:SKIN_TEMPLATE]
[USE_MATERIAL_TEMPLATE:PUDGE:FAT_TEMPLATE]
[STATE_NAME:ALL_SOLID:pudge]
[STATE_ADJ:ALL_SOLID:pudge]
[STATE_COLOR:ALL:PURPLE]
[USE_TISSUE_TEMPLATE:PUDGE:FAT_TEMPLATE]
[TISSUE_NAME:pudge:NP]
[MUSCULAR]
[FUNCTIONAL]
[STRUCTURAL]

[USE_MATERIAL_TEMPLATE:WAMBLER_GOO:CREATURE_EXTRACT_TEMPLATE]
[STATE_NAME:ALL_SOLID:frozen wambler goo]
[STATE_ADJ:ALL_SOLID:frozen wambler goo]
[STATE_NAME:LIQUID:wambler goo]
[STATE_ADJ:LIQUID:wambler goo]
[STATE_NAME:GAS:boiling wambler goo]
[STATE_ADJ:GAS:boiling wambler goo]
[PREFIX:NONE]
[MATERIAL_REACTION_PRODUCT:POWDER_MAT:LOCAL_CREATURE_MAT:DYE]
[EXTRACT:LOCAL_CREATURE_MAT:WAMBLER_GOO]

[USE_MATERIAL_TEMPLATE:DYE:CREATURE_POWDER_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:wambler dye]
[STATE_COLOR:ALL_SOLID:BROWN]
[DISPLAY_COLOR:5:0:0]
[MATERIAL_VALUE:10]
[POWDER_DYE:INDIGO]
[PREFIX:NONE]

[USE_MATERIAL_TEMPLATE:EYE:EYE_TEMPLATE]
[USE_TISSUE_TEMPLATE:EYE:EYE_TEMPLATE]
[NOBONES]
[BODY_DETAIL_PLAN:EXOSKELETON_TISSUE_LAYERS:SKIN:PUDGE:NONE]
[BODY_DETAIL_PLAN:BODY_HAIR_TISSUE_LAYERS:FLUFF]
[BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS]
[SPEED:2900]
[BODY_SIZE:0:0:2000]
[BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]
[BODY_APPEARANCE_MODIFIER:HEIGHT:90:95:98:100:102:105:110]
[BODY_APPEARANCE_MODIFIER:BROADNESS:90:95:98:100:102:105:110]
[DIURNAL]
[NO_FEVERS]
[NO_THOUGHT_CENTER_FOR_MOVEMENT]
[HOMEOTHERM:10070]
[CASTE:FEMALE]
[FEMALE]
[CASTE:MALE]
[MALE]
[SELECT_CASTE:ALL]
[SET_TL_GROUP:BY_CATEGORY:ALL:FLUFF]
[TL_COLOR_MODIFIER:WHITE:1]
[TLCM_NOUN:fluff:SINGULAR]
[SET_TL_GROUP:BY_CATEGORY:ALL:SKIN]
[TL_COLOR_MODIFIER:PINK:1]
[TLCM_NOUN:skin:SINGULAR]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

I can extract the goo, but it will not let me use the Quern or Millstone to use the new reaction to turn said goo into powder.  The reaction doesn't even show up at all.  Also, when I extract the goo from the wamblers, it gives me 5 at a time.. can I make the reaction (once it's working) to take all five of that and turn it into one dye-unit each? Therefore each wambler would be enough to dye 5 articles of clothing.
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #10 on: August 28, 2011, 02:06:05 pm »

You need to edit entity_default.txt and allow your civilization to perform the reaction.

Once it's working, the reaction should automatically handle stacks of extract and produce appropriate amounts of dye. Also, the extract is technically a liquid, so it doesn't make much sense to grind it at a quern/millstone - this is why my sample reaction had it using a kiln (to boil away the water and just leave the powder behind).
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.

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #11 on: August 28, 2011, 02:15:45 pm »

Ooh yea.. haha I forgot that.  I'll do that right now XD Ty


As for the grinding it, I'm thinking of it more as a thick viscious substance than liquid.. more like paste.  I know technically it isn't due to the extraction method, but thats how I'm considering it.  And thus, grinding the goo at a millstone/quern will dry it out and turn it into a powder.  :P


Edit: Ok, it works well except for one minor problem - the reaction takes one full vial of Wambler Goo (5) and only gives one unit of Wambler Dye. 

To fix this, would I change the

Code: [Select]
[PRODUCT:100:1:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:extract:POWDER_MAT]
to

Code: [Select]
[PRODUCT:100:5:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:extract:POWDER_MAT]
? Or would I also need to change that '100' in there to something else as well.

Though, I suppose for the expensive value of this dye, having one wambler = one unit of dye makes sense..
« Last Edit: August 28, 2011, 02:30:27 pm by Crustypeanut »
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #12 on: August 28, 2011, 02:34:34 pm »

Edit the reaction and add [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] to both the extract container and the bag.
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.

Crustypeanut

  • Bay Watcher
  • Ph.Dwarf & Practitioner of ‼MEDICINE‼
    • View Profile
Re: How to make a creature extract into a Dye?
« Reply #13 on: August 28, 2011, 02:44:28 pm »

Edit the reaction and add [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] to both the extract container and the bag.

Alrighty, thanks a ton! :D Though, with testing it on a high-speed map (900 fps woo), I've found one minor, easily ignorable problem - the dyed cloth doesn't count as dyed cloth when using the "Use only Dyed Cloth" workshop order.  The workshop order "Auto-loom Dyed Thread Only" works fine with the  wambler-dyed thread however.  This isn't a problem that'll really bug me too much as long as I only weave dyed thread into cloth, though being the perfectionist I am, it might be best to fix it.. if possible XD

Btw, thanks a ton for the help you've given me, with this info I shouldn't have much of a problem making many different vermin profitable in a variety of ways >:) Pixies are next on my list.. I'm thinking Pixie Dust extract = gold-colored thread.

Edit: Ok, serious bug.. i added the things to the reaction as you said.. and it just gave me ~800 units of wambler dye from a single vial of Wambler Goo (5).  O.o  Also, the Wambler Dye is listed under "Bonemeal" instead of "Milled Powder" in the food stockpile, any way to change that?

Edit 2: Lol just noticed, from milling that one time, my miller went from 0 to legendary +2 Milling..

Edit 3: Figured it out.  The extract was taking 1/150th's unit of the extract (since each extract is considered to be 150 units) and making 150 units of the dye.. thus, for every extract in the vial (5) it would make 150 dye.. which.. is alot of dye.. DURP.  :D

Now to fix the other problems and a new one I've encountered.  It considers the silk/plant cloth dyed with the Wambler Dye to be completely unusable in the clothier's shop, even if the workshop order is "Use Any Cloth".  I'm thinking this is because the Dye is considered to be a Bonemeal instead of a milled powder.. even though it'll still let me dye with it.

Could it be because of the "Powder_Misc_Creature" in the template? I'm betting it is..
« Last Edit: August 28, 2011, 03:19:18 pm by Crustypeanut »
Logged
Specialsurprise - a Tale of ‼Medicine‼ and ‼Science‼ !

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make a creature extract into a Dye?
« Reply #14 on: August 28, 2011, 03:26:44 pm »

If [POWDER_MISC_CREATURE] is causing the cloth to be unusable (it is what caused it to show up in the Bone Meal category), then change it back to [POWDER_MISC_PLANT]. It's also possible that the dye logic is hardcoded to expect PLANT materials, which would be quite annoying...
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.
Pages: [1] 2