Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [50.xx] Cloth Recycling  (Read 2377 times)

Qev

  • Bay Watcher
    • View Profile
[50.xx] Cloth Recycling
« on: January 22, 2023, 10:50:56 pm »

Allows your dwarves to recycle fabric clothing and bags at a Clothier's workshop into lower-value "reclaimed thread" for re-use.

DFFD: https://dffd.bay12games.com/file.php?id=16384
Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2922301541

Every two items recycled produces one full spool of thread, but the wear-and-tear of the process, and the mixing of different fibers, results in a lower-valued material. However, newly produced plant, silk, and yarn fabrics are now more valuable than in vanilla.

Additionally, your dwarves can also start with items made of reclaimed cloth, and you can select it during embark.

-- Important Notes --

Due to the increased value of freshly produced cloth, items made of such cloth are also more valuable; this may require changes to your embark profile!

Make sure to use stockpile links to control which items get recycled!

-- Compatibility --

This mod increases the value of animal-based fabrics, making changes to cave spiders/giant cave spiders, brown recluse spiders/spider men/giant spiders, phantom spiders, trolls, sheep, llamas, and alpacas; and adds reactions to the MOUNTAIN entity.

-- Changelog --

v1.4 Corrected error in mod creature definition; removed wool pots appearing at embark; removed animal kill implication from shearing, allowing wool trade with elves.
v1.3 Stopped weird creatures from showing up as pets at embark.
v1.2 Reworked things to send little blue man home. Update may break old saves.
v1.1 Small change to allow reclaimed cloth items at embark.
« Last Edit: September 24, 2023, 10:46:27 pm by Qev »
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [50.xx] Cloth Recycling
« Reply #1 on: January 24, 2023, 01:39:25 pm »

Nice add-on!
This is how I added recycling of some clothes types to OldGenesis:

Code: [Select]
- worn clothes into thread, reactions:

wasnt CLOTHIER, wasnt CLOTHIER_WORKSHOP. LOOM didn't work. building name is CLOTHES. Was hard to find, not in wiki.
-how to enforce worn ones? Via stockpile proximity... and stockpile set to worn ones.
- what happens when leather item is made into thread? banned leather unravel now.
ANY_PLANT_MATERIAL] ANY_SILK_MATERIAL] ANY_YARN_MATERIAL] cant combine em so.. new class: REACTION_CLASS:UNRAVEL_THREAD and the two hair types, yarnable and unyarnable, are mislabled maybe.

--PRODUCT:100:1:xxthread:xxx:GET_MATERIAL_FROM_REAGENT:A:NONE]
--PRODUCT:100:1:CLOTH:NONE:PLANT_MAT:GRASS_TAIL_PIG:THREAD]

could add --NOT_IMPROVED] to source item but nah.

   
[REACTION:THREAD_FROM_SOCKS] 2019-02, low 40% chance
[NAME:unravel sock into thread]
[BUILDING:CLOTHES:NONE]
[REAGENT:A:1:SHOES:ITEM_SHOES_SOCKS:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:40:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]   --THREAD:NONE Standard dimension = 15000.
  yay "sheep wool yarn" came out. Success.
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_SHOES] 2019-02
[NAME:unravel shoe into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:SHOES:ITEM_SHOES_SHOES:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:60:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]

[REACTION:THREAD_FROM_TROUSERS] 2019-02
[NAME:unravel trousers into thread]
[BUILDING:CLOTHES:NONE]
[REAGENT:A:1:PANTS:ITEM_PANTS_PANTS:NONE:NONE]  [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_BRAIES] 2019-02
[NAME:unravel braies into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:PANTS:ITEM_PANTS_BRAIES:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_SKIRT] 2019-02
[NAME:unravel skirt into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:PANTS:ITEM_PANTS_SKIRT:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_SKIRT_LONG] 2019-02
[NAME:unravel long skirt into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:PANTS:ITEM_PANTS_SKIRT_LONG:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]

[REACTION:THREAD_FROM_HOOD] 2019-02
[NAME:unravel hood into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:HELM:ITEM_HELM_HOOD:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:80:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_TURBAN] 2019-02
[NAME:unravel turban into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:HELM:ITEM_HELM_TURBAN:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]

[REACTION:THREAD_FROM_GLOVES] 2019-02, low chance like sock.
[NAME:unravel glove into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:GLOVES:ITEM_GLOVES_GLOVES:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:40:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]

--ARMOR (upperbody wear category):
[REACTION:THREAD_FROM_COAT] 2019-02
[NAME:unravel coat into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_COAT:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_SHIRT] 2019-02
[NAME:unravel shirt into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_SHIRT:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_CLOAK] 2019-02
[NAME:unravel cloak into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_CLOAK:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_CAPE] 2019-02
[NAME:unravel cape into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_CAPE:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_TUNIC] 2019-02
[NAME:unravel tunic into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_TUNIC:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_TOGA] 2019-02
[NAME:unravel toga into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_TOGA:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_VEST] 2019-02
[NAME:unravel vest into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_VEST:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_DRESS] 2019-02
[NAME:unravel dress into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_DRESS:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_ROBE] 2019-02
[NAME:unravel robe into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_ROBE:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]
[REACTION:THREAD_FROM_KIMONO] 2019-02, exotic, dwarves can't make.
[NAME:unravel orc-robe into thread]  [BUILDING:CLOTHES:NONE]
[REAGENT:A:1:ARMOR:ITEM_ARMOR_KIMONO:NONE:NONE]    [REACTION_CLASS:UNRAVEL_THREAD]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  [PRODUCT_DIMENSION:15000]
[SKILL:CLOTHESMAKING]

=======================================================================================================================
"there are 3 types of corpses: CORPSE, CORPSEPIECE, and REMAINS. REMAINS are vermin remains, CORPSE is w/upperbody, CORPSEPIECE is w/o upperbody."
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Qev

  • Bay Watcher
    • View Profile
Re: [50.xx] Cloth Recycling
« Reply #2 on: January 24, 2023, 05:54:32 pm »

I'm not sure when it was added but the WOVEN_ITEM tag made it possible to streamline the heck out of things.  :D

I made a lot of work for myself in this one for silly reasons.  Two items -> one thread meant turning it into the reagent mat would be weird if the two items were of different thread mats, so then I invented a new, cheaper "used" thread to turn it into, then I wanted that to appear in the embark menu... ugh. XD
Logged