Bay 12 Games Forum

Please login or register.

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

Author Topic: ~Tyrian Purple, The Dye Of Emperors~  (Read 3793 times)

Ladygolem

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #15 on: November 26, 2014, 10:26:04 pm »

Apologies for the double post but I think I've managed to cook up the reactions required:

Code: [Select]
reaction_murex

[OBJECT_REACTION]

  [REACTION:EXTRACT_GLAND_ESSENCE]
[NAME:extract dye from gland]
    [BUILDING:STILL:E]
[REAGENT:A:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:EXTRACT_DYE_MAT]
[REAGENT:B:1:FLASK:NONE:NONE:NONE][CONTAINS:A][GLASS_MATERIAL]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT][PRESERVE_REAGENT]
[REAGENT:C:150:BAR:NONE:POTASH:NONE]
[PRODUCT:100:1:GET_ITEM_DATA_FROM_REAGENT:A:REACTION_PRODUCT_ID:EXTRACT_DYE_MAT]

[PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:B]
[SKILL:DYER]


  [REACTION:REFINE_GLAND_ESSENCE]
[NAME:refine animal dye]
    [BUILDING:STILL:R]
[REAGENT:A:5:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:REFINE_DYE_MAT]
[REAGENT:B:1:FLASK:NONE:NONE:NONE][CONTAINS:A][GLASS_MATERIAL]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT][PRESERVE_REAGENT]
[PRODUCT:100:1:GET_ITEM_DATA_FROM_REAGENT:A:REACTION_PRODUCT_ID:REFINE_DYE_MAT]

[PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:B]
[FUEL]
[SKILL:DYER]

I don't have much experience with reactions so I don't know if I fucked up - there's an awful lot of :NONE: 's involved which I have no idea what their purpose is.

And yes, it's one gland per red dye, 5 units of red dye per purple dye, to simulate the expense involved; to compensate, I've adjusted the values for the dyes to be 20 for red and 300 for purple. COnsidering the scarcity of the snails, and the effort required to make it (remember the process uses 5 units of potash and another unit of coal) I believe it's justified. You will really want to keep this for your monarch's robes!

I'm assuming there's no way make a reaction produce miasma in the process, right? If that's the case, I'd say this mod is done, once someone's looked over the raws to check if I've fucked the reaction up somehow.
« Last Edit: November 26, 2014, 10:55:40 pm by Ladygolem »
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #16 on: November 27, 2014, 01:33:02 am »

The reagent and product syntax goes as: ITEM:ITEM_SUBTYPE:MATERIAL:MATERIAL_SUBTYPE. NONE in a reactions is just 'do not filter', a reagent with 4 NONEs and no other tokens will take anything (Except dwarf corpses. Sadly)

A reagent like WEAPON:ITEM_WEAPON_SWORD:NONE:NONE will take a sword of any material, NONE:NONE:INORGANIC:NONE will take anything made from an inorganic mat, etc.

The first reaction's product is not going to work, since it will try to copy the item type from a bodypart, which is not possible. You can only use bodyparts are reagents.

You will want that to be [PRODUCT:100:1:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:A:EXTRACT_DYE_MAT]    POWDER_MISC is item the other dyes are and what the dye workshop will be looking for, NONE because this item has no subtype, GET_MATERIAL_FROM_REAGENT:A:EXTRACT_DYE_MAT tells the game to use the material referenced with EXTRACT_DYE_MAT in reagent A.

You may also want to make sure the flask is actually empty, oddness might happen like the silly dwarves grabbing a flask of royal dye to make some red dye in. Use [EMPTY] behind the reagent.

EDIT: Wait, the first reaction is trying to find a bodypart which is in a flask. Weird... something tells me that needs to look for a flask of extract. LIQUID_MISC is the item type that should use, and the USE_BODY_COMPONENT needs to be removed. UNROTTEN could stay, but im not sure of extract can rot in the first place.
« Last Edit: November 27, 2014, 01:35:27 am by Grimlocke »
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Wannabehero

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #17 on: November 27, 2014, 11:04:22 am »

Exactly as Grimlocke directed.

If you want to use an extract from small animal dissection, you may want to make sure that your extract material is a liquid.  This is easily achieved by changing the material template used for the Dye Gland.  In the original code I posted, I used the cartilage template because it was (1) solid, (2) implied animal kill, (3) had no specific usage or stockpile tokens, and (4) seemed most reasonably similar to a snail gland/organ tissue.

If you will not be butchering the glands, but instead extracting the dye-juices, I suggest changing the material definition in the creature raw to this:

Spoiler (click to show/hide)

That should keep the extract liquid, and also have it stockpile properlike.  Used the sponge template instead of cartilage, to keep your dye from rotting.


Assuming a liquid extract for the dye source, here is how I would set up the reactions:


Spoiler (click to show/hide)
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #18 on: November 27, 2014, 11:10:03 am »

Exactly as Grimlocke directed.

If you want to use an extract from small animal dissection, you may want to make sure that your extract material is a liquid.  This is easily achieved by changing the material template used for the Dye Gland.  In the original code I posted, I used the cartilage template because it was (1) solid, (2) implied animal kill, (3) had no specific usage or stockpile tokens, and (4) seemed most reasonably similar to a snail gland/organ tissue.

If you will not be butchering the glands, but instead extracting the dye-juices, I suggest changing the material definition in the creature raw to this:

Spoiler (click to show/hide)

That should keep the extract liquid, and also have it stockpile properlike.  Used the sponge template instead of cartilage, to keep your dye from rotting.


Assuming a liquid extract for the dye source, here is how I would set up the reactions:


Spoiler (click to show/hide)

I do wonder if keeping the glass flasks would still work for the dyers workshop. With that you could at least pretend its liquid.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Wannabehero

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #19 on: November 27, 2014, 11:38:04 am »

Thats a good question.  Probably would work fine, just need to test it.  The reaction would put the powder into the flask, and as long as the dyers shop reaction calls on the flask container properly, it should work.
Logged

pisskop

  • Bay Watcher
  • Too old and stubborn to get a new avatar
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #20 on: November 27, 2014, 11:43:46 am »

this is neato
Logged
Pisskop's Reblancing Mod - A C:DDA Mod to make life a little (lot) more brutal!
drealmerz7 - pk was supreme pick for traitor too I think, and because of how it all is and pk is he is just feeding into the trollfucking so well.
PKs DF Mod!

smeeprocket

  • Bay Watcher
  • Collectivist Socialist Feminist Freeloader
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #21 on: November 27, 2014, 02:19:00 pm »

Maybe you should use moon snails instead of adding another creature, they are already there.

Though are they good area only?
Logged
Steam Name: Ratpocalypse
Transpersons and intersex persons mod for Fortress mode of DF: http://dffd.wimbli.com/file.php?id=10204

Twitch: http://www.twitch.tv/princessslaughter/

"I can't wait to throw your corpse on to a jump pad and watch it take to the air like a child's imagination."

Ladygolem

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #22 on: November 27, 2014, 02:27:25 pm »

Adding another creature is honestly the least difficult part. Once this system is figured, you could easily add a different dye to moon snails, if you wish. Thing is, moon snail are real animals, and also are the wrong colour.

And it's not like DF shies away from adding multiple redundant varieties of similar creatures, just ask anyone who's embarked in a tropical rainforest and has dealt with the approx. 20 different species of gibbon.

smeeprocket

  • Bay Watcher
  • Collectivist Socialist Feminist Freeloader
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #23 on: November 27, 2014, 02:32:51 pm »

I like all this modding stuff to add more complexity as opposed to OP advantages. I have a question tho.

What happens when I update DF? Do I have to go in and hand edit all these raws and such all over again?

Eventually that would become a very laborious process, depending on how much vanilla content I modify. I realize I can make separate files for the stuff that is completely new.
Logged
Steam Name: Ratpocalypse
Transpersons and intersex persons mod for Fortress mode of DF: http://dffd.wimbli.com/file.php?id=10204

Twitch: http://www.twitch.tv/princessslaughter/

"I can't wait to throw your corpse on to a jump pad and watch it take to the air like a child's imagination."

Ladygolem

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #24 on: November 27, 2014, 02:36:25 pm »

I like all this modding stuff to add more complexity as opposed to OP advantages. I have a question tho.

What happens when I update DF? Do I have to go in and hand edit all these raws and such all over again?

Eventually that would become a very laborious process, depending on how much vanilla content I modify. I realize I can make separate files for the stuff that is completely new.

Most of these will be written into their own individual raw file, so as long as we're talking simple additions like this you could just have a folder with all the textfiles, and simply drag them into your objects folder whenever the game updates! ctrl+a, ctrl+c, ctrl+v. boom you're done.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #25 on: November 27, 2014, 02:57:17 pm »

Once you have your reactions and everything all it takes to add this to another creature is a single copy-paste and some color and name changes if you want them (blue snail dye, black snail dye, rainbow snail dye... sky is the limit).

You can just give the reactions a generic name like 'process dye extract' and 'refine dye extract'.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

smeeprocket

  • Bay Watcher
  • Collectivist Socialist Feminist Freeloader
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #26 on: November 27, 2014, 03:01:05 pm »

I haven't played with dye much. My extent of knowledge is that the command just vaguely let's you dye cloth, without any specification to color or which cloth. The only time I've seen variations in actual dyes (not dimple dye basically, and which color is that anyway?) is from humans bringing exotic dyes that I am not sure how they made.

This would be fun. I am thinking about downloading the newest version and embarking in a haunted or terrifying biome with some various additions for complexity and trying to become the mountainhome.

Would this animal be considered a vermin and what biomes would it show up in? Would I use small animal cages and the kennels to catch it?
Logged
Steam Name: Ratpocalypse
Transpersons and intersex persons mod for Fortress mode of DF: http://dffd.wimbli.com/file.php?id=10204

Twitch: http://www.twitch.tv/princessslaughter/

"I can't wait to throw your corpse on to a jump pad and watch it take to the air like a child's imagination."

Ladygolem

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #27 on: November 27, 2014, 03:03:36 pm »

Once you have your reactions and everything all it takes to add this to another creature is a single copy-paste and some color and name changes if you want them (blue snail dye, black snail dye, rainbow snail dye... sky is the limit).

You can just give the reactions a generic name like 'process dye extract' and 'refine dye extract'.

You're not even limited to snails, for that matter. Any vermin that can be captured alive (ie. trapped) are valid sources.

Aseaheru

  • Bay Watcher
  • Cursed by the Elves with a title.
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #28 on: November 27, 2014, 03:04:08 pm »

All dye curently in the game is just processing plants, which are (I think) dimple, bladeweed, something evil, and something else.
Logged
Highly Opinionated Fool
Warning, nearly incapable of expressing tone in text

Ladygolem

  • Bay Watcher
    • View Profile
Re: ~Tyrian Purple, The Dye Of Emperors~
« Reply #29 on: November 27, 2014, 03:09:49 pm »

Yes, but here we developed a way to create dye from vermin extract - what we're saying is that one could, if they so wished, copy and paste the creature raws  into some other creature, change the names, and have their own animal-derived dye, which would be processed by the same reaction as the murex.
Pages: 1 [2] 3