Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question about animal products made out of inorganic materials  (Read 732 times)

gopp

  • Bay Watcher
    • View Profile

Greetings, i'm trying to mod a new animal into the game, and i need some direction on what to do.

The animal in question has it's bones made out of iron or a material with similar properties and specific "shearable" gems that grow on it's back, is there a way to make these things into the game? I want the animal's bones to be able to be used as some sort of weapon/trap/armor material since i want them to have similar properties to iron, and also to add the shearable gemstones on it's back, giving them a proper gem value and making them fully usable in a jeweler's shop.

I suppose i'll need to make a separate material_template.txt/inorganic_material.txt for the mod in question, but how would i specifically tell the engine to look into those .txt files on the shearable and bone products?

Thanks in advance.
Logged

Agent_Irons

  • Bay Watcher
    • View Profile
Re: Question about animal products made out of inorganic materials
« Reply #1 on: June 10, 2015, 08:55:13 am »

The DF raw engine looks into *all* text files for raws, but only processes ones with their filename on the first line, iirc.

So lots of mods write an inorganic_material_gemcow.txt or what have you, which makes multiple installation a snap.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Question about animal products made out of inorganic materials
« Reply #2 on: June 10, 2015, 09:02:57 am »

I don't think you can shear gems directly off of the animal, but you can add a reaction that turns the sheared material into rough gems (hardcoded item ROUGH).  Maybe ten different reaction products of different gem materials, each with a 20% chance of being produced.  If you want to get fancy-shmancy, you can make the materials different for different castes of the creature by using MATERIAL_REACTION_PRODUCTs.  The examples on the wiki have one MATERIAL_REACTION_PRODUCT, but you can define several so long as they have distinct names.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

scamtank

  • Bay Watcher
    • View Profile
Re: Question about animal products made out of inorganic materials
« Reply #3 on: June 10, 2015, 09:03:03 am »

I suppose i'll need to make a separate material_template.txt/inorganic_material.txt for the mod in question, but how would i specifically tell the engine to look into those .txt files on the shearable and bone products?

Toady's showing you the way, look at the first lines of any raw file. Those headers say what goes.

Oh, and make sure the names are right, too. Examine this list of stuff mined from the executable:

Code: [Select]
|objects/language_*.txt|
|objects/descriptor_shape_*.txt|
|objects/descriptor_color_*.txt|
|objects/descriptor_pattern_*.txt|
|objects/material_template_*.txt|
|objects/inorganic_*.txt|
|objects/plant_*.txt|
|objects/tissue_template_*.txt|
|objects/item_*.txt|
|objects/building_*.txt|
|objects/b_detail_plan_*.txt|
|objects/body_*.txt|
|objects/c_variation_*.txt|
|objects/creature_*.txt|
|objects/entity_*.txt|
|objects/reaction_*.txt|
|objects/interaction_*.txt|

That's what it's looking for. Nothing else will do.
Logged