Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Removing Leather Subtypes?  (Read 1900 times)

Sorcerer

  • Bay Watcher
  • [magical]
    • View Profile
Removing Leather Subtypes?
« on: June 25, 2011, 05:44:29 am »

Having hundreds of different leather types does get somewhat annoying, is there any way to make tanning a hide just make generic "leather" instead of "whatever leather"?
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Removing Leather Subtypes?
« Reply #1 on: June 25, 2011, 09:51:41 am »

Untested, but the following procedure should probably work (you need to generate a new world):

In b_detail_plan_default.txt, remove the following line:
   [ADD_MATERIAL:LEATHER:LEATHER_TEMPLATE]

In inorganic_other.txt, add the following lines

[INORGANIC:LEATHER]
   [USE_MATERIAL_TEMPLATE:LEATHER_TEMPLATE]

In material_template_default.txt, find the string TAN_MAT, and replace the line it appears in with

[REACTION_CLASS:TANNABLE]

In reaction_other.txt, replace the first reaction as follows:
[REACTION:TAN_A_HIDE]
   [NAME:tan a hide]
   [BUILDING:TANNER:CUSTOM_T]
   [REAGENT:A:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
      [REACTION_CLASS:TANNABLE]
   [PRODUCT:100:1:SKIN_TANNED:NONE:INORGANIC:LEATHER]
   [SKILL:TANNER]
   [AUTOMATIC]

Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Geb

  • Bay Watcher
  • I have lost my spoon.
    • View Profile
Re: Removing Leather Subtypes?
« Reply #2 on: June 25, 2011, 05:07:52 pm »

Is there any simpler way to do this if you only have a single animal species?

I've been doing a bit of modding to make a world with only one type of stone, called "stone", one type of gem, called "gem", one type of tree, which gives "wood" and so on...

I've been trying and failing for a while to rename the single type of leather to be just "leather"
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Removing Leather Subtypes?
« Reply #3 on: June 25, 2011, 05:19:55 pm »

If there's a single animal species, then there's just that animal's leather, plus any procedural and any civilized creatures' leather. If you don't care much about the latter and just want to rename the animal leather, you should be able to go into the raws and add

      [SELECT_MATERIAL:LEATHER]
         [PREFIX:NONE]

to the animal's raws.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Removing Leather Subtypes?
« Reply #4 on: June 26, 2011, 12:57:57 pm »

I bet you will get tons of problems with such attempts. There should be evil, good and benign animals, and even if you make one for all cases, there are other problems.

I.e. there should be different types of stones (igneous intrusive/extrusive, metamorphic etc.) for proper world gen; there should also be plants with leaves (like quarry bushes) etc.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Geb

  • Bay Watcher
  • I have lost my spoon.
    • View Profile
Re: Removing Leather Subtypes?
« Reply #5 on: June 26, 2011, 01:41:11 pm »

I had already done plants, stones and animals, and they work fine.

The game code will happily leave environments empty if it can find no suitable plants or animals. You can also set a stone to be multiple layer types all at once. My "stone" layer type is igneous intrusive and extrusive, sedimentary, sedimentary oceanic, metamorphic...

I did have to leave a few things in, like obsidian, which I assumed was referred to by hardcoded bits when you cast magma, but you'd be surprised how little you actually need in the raws to make a playable world.
Logged

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile
Re: Removing Leather Subtypes?
« Reply #6 on: June 26, 2011, 02:25:21 pm »

I had already done plants, stones and animals, and they work fine.

The game code will happily leave environments empty if it can find no suitable plants or animals. You can also set a stone to be multiple layer types all at once. My "stone" layer type is igneous intrusive and extrusive, sedimentary, sedimentary oceanic, metamorphic...

I did have to leave a few things in, like obsidian, which I assumed was referred to by hardcoded bits when you cast magma, but you'd be surprised how little you actually need in the raws to make a playable world.

Did you added [LAVA] to it? Obsidian have it. And as far as I can tell, it's the only stone that have that tag.
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Removing Leather Subtypes?
« Reply #7 on: June 27, 2011, 01:54:54 pm »

After testing this out, here's a superior procedure:

In b_detail_plan_default.txt, remove the following line:
   [ADD_MATERIAL:LEATHER:LEATHER_TEMPLATE]

In creature_domestic.txt, add the following lines

[CREATURE:ANIMAL]
   [NAME:animal:animals:animal]
   [USE_MATERIAL_TEMPLATE:LEATHER:LEATHER_TEMPLATE]

In material_template_default.txt, find the string TAN_MAT, and replace the line it appears in with

   [MATERIAL_REACTION_PRODUCT:TAN_MAT:CREATURE_MAT:ANIMAL:LEATHER]

In reaction_other.txt, replace the first reaction as follows:

[REACTION:TAN_A_HIDE]
   [NAME:tan a hide]
   [BUILDING:TANNER:CUSTOM_T]
   [REAGENT:A:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
      [HAS_MATERIAL_REACTION_PRODUCT:TAN_MAT]
   [PRODUCT:100:1:SKIN_TANNED:NONE:GET_MATERIAL_FROM_REAGENT:A:TAN_MAT]
   [SKILL:TANNER]
   [AUTOMATIC]

Why is it superior? Because this way, you can purchase leather objects in both modes. The leather will be called animal leather. If you don't want that, you should be able to add
      [PREFIX:NONE]
after the USE_MATERIAL_TEMPLATE token.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Sorcerer

  • Bay Watcher
  • [magical]
    • View Profile
Re: Removing Leather Subtypes?
« Reply #8 on: July 02, 2011, 10:19:52 am »

whoops, kinda forgot i posted this :P
thanks for the help! works like a charm!
Logged