Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Understanding Body Parts and Butchery?  (Read 1537 times)

Patchouli

  • Bay Watcher
  • Where very delicious cake shop?
    • View Profile
Understanding Body Parts and Butchery?
« on: June 26, 2010, 05:49:46 am »

I honestly cannot make heads or tails of it. I'm at wit's end, and I would definitely appreciate some help.

Can someone explain exactly why butchering an elephant yields two tusks, and why it yields a heart? I'm following it through the material_template files, the b_detail_plan, the body_default, the tissue_template, but I still don't get it. It would be great if someone could walk me through this.

Spoiler (click to show/hide)

In the end, I want to create a custom organ that comes from butchery, but I don't understand what exactly is required for that organ to come from butchery.

EDIT: Thanks much, guys, I've finally got it working alright.
« Last Edit: June 26, 2010, 09:37:38 pm by Patchouli »
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Understanding Body Parts and Butchery?
« Reply #1 on: June 26, 2010, 05:56:19 am »

It yields tusks because it has tusks. It yields a heart because it has a heart.

See: "2TUSKS" in the body definition there. Then note "BODY:2TUSKS" in body_default, and check for tusks under "BODY_DETAIL_PLAN:VERTEBRATE_TISSUE_LAYERS" in b_detail_plan_default; it specifies the material.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Understanding Body Parts and Butchery?
« Reply #2 on: June 26, 2010, 06:11:22 am »

You need to add a bodypart, material, tissue and tissue layer. All but the first are done with the body detail plans, but you can also define them in the creature file itself (in case its a bodypart that isnt in the body detail plan).

Butchering a corpse (or part of one) yields whatever tissue layers were still present of whatever bodyparts were still on it. Some materials yield a specific item (like meat) while other just yield a generic item (like skin). The amouth of butchery items depends on the size of the creature, the bodyparts relative thickness, and the tissues relative thickness.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Patchouli

  • Bay Watcher
  • Where very delicious cake shop?
    • View Profile
Re: Understanding Body Parts and Butchery?
« Reply #3 on: June 26, 2010, 06:27:08 am »

Okay, let's say I want to make a custom body part made from a custom tissue, made from a custom material, much like how organs seem to be.

I overwrite the appropriate section of the elephant raws to have this - note the CUSTOM_ORGAN:
Code: [Select]
[BODY:QUADRUPED:TAIL:2EYES:2EARS:TRUNK:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:SKULL:MOUTH:2TUSKS:GENERIC_TEETH:RIBCAGE:CUSTOM_ORGAN]

I add this to body_default:
Code: [Select]
[BODY:CUSTOM_ORGAN]
[BP:CUSTOM_ORGAN:custom organ:STP][CONTYPE:UPPERBODY][INTERNAL][CATEGORY:TEST]
[DEFAULT_RELSIZE:5]

My b_detail_plan_default now should look like this:
Spoiler (click to show/hide)
I think the layer construction is incorrect, but I don't know what's really going on.

My tissue_template includes this:
Code: [Select]
[TISSUE_TEMPLATE:CUSTOM_ORGAN_TEMPLATE]
[TISSUE_NAME:material:NP]
[STRUCTURAL]
[TISSUE_MATERIAL:LOCAL_CREATURE_MAT:CUSTOM_ORGAN_MAT_TEMPLATE]
[RELATIVE_THICKNESS:2]

My material_template includes this:
Code: [Select]
[MATERIAL_TEMPLATE:CUSTOM_ORGAN_MAT_TEMPLATE]
[STATE_COLOR:ALL_SOLID:MAUVE]
[STATE_NAME:ALL_SOLID:muscle]
[STATE_ADJ:ALL_SOLID:muscle]
[STATE_COLOR:LIQUID:MAUVE]
[STATE_NAME:LIQUID:n/a]
[STATE_ADJ:LIQUID:n/a]
[STATE_COLOR:GAS:MAUVE]
[STATE_NAME:GAS:n/a]
[STATE_ADJ:GAS:n/a]
[DISPLAY_COLOR:4:0:0]
[MATERIAL_VALUE:1]
[SPEC_HEAT:7500]
[MELTING_POINT:25000]
[BOILING_POINT:50000]
[SOLID_DENSITY:200]
[LIQUID_DENSITY:2600]
[MOLAR_MASS:55845]
[IMPACT_YIELD:5000000]
[IMPACT_FRACTURE:5000000]
[IMPACT_ELASTICITY:0]
[COMPRESSIVE_YIELD:5000000]
[COMPRESSIVE_FRACTURE:5000000]
[COMPRESSIVE_ELASTICITY:0]
[TENSILE_YIELD:5000000]
[TENSILE_FRACTURE:5000000]
[TENSILE_ELASTICITY:0]
[TORSION_YIELD:5000000]
[TORSION_FRACTURE:5000000]
[TORSION_ELASTICITY:0]
[SHEAR_YIELD:5000000]
[SHEAR_FRACTURE:5000000]
[SHEAR_ELASTICITY:0]
[BENDING_YIELD:5000000]
[BENDING_FRACTURE:5000000]
[BENDING_ELASTICITY:0]
[MAX_EDGE:1000]
[IMPLIES_ANIMAL_KILL]
[ROTS]
[GENERATES_MIASMA]
[MEAT]
[BUTCHER_SPECIAL:MEAT:NONE]
[MEAT_NAME:NONE:organ:organ]
[EDIBLE_VERMIN]
[EDIBLE_COOKED]

I am now getting some errors.
Code: [Select]
ELEPHANT:FEMALE:custom organ: No tissue thickness
ELEPHANT:MALE:custom organ: No tissue thickness

I'm really getting confused on which argument is talking about what. I need to get some sleep, I've been trying to wrestle this for a while now. Any help is appreciated.
« Last Edit: June 26, 2010, 06:39:23 am by Patchouli »
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Understanding Body Parts and Butchery?
« Reply #4 on: June 26, 2010, 08:58:30 am »

You should refrain for making templates for material you only use once. Just define a completely new tissue/material in the creature file itself. All tokens workt he same. That way you wont be editing 5 seperate files, but just 2. It also makes compatibility with other mods easier.

For materials you can use:
[MATERIAL:CUSTOM]
to define a completely new material. Place tokens below to define properties, they all work the same as material template tokens.

[USE_MATERIAL_TEMPLATE:CUSTOM:SOME_TEMPLATE]
to load a material from template. Note that you can still modify the same way as above.

[USE_MATERIAL:CUSTOM:SOME_MATERIAL]
to load a material from the creature itself, the rest is the same as above. Not sure if this works with inorganics or materials from other creatures.


Tissue are pretty much the same with:
[TISSUE:CUSTOM]
[USE_TISSUE_TEMPLATE:CUSTOM:SOME_TEMPLATE]
[USE_TISSUE:CUSTOM:SOME_TISSUE]
The tissue tag [TISSUE_MATERIAL: can use any material, from any creatures and even inorganic. Look for ironmen for examples.


Tissue layer definition is as follows:
[TISSUE_LAYER:BY_TOKEN:CUSTOM_BODYPART:CUSTOM_TISSUE:LOCATION]
LOCATION is optional, can be TOP, BOTTOM, FRONT, SIDES and BACK.
BY_TOKEN can also be BY_TYPE or BY_CATEGORY. The tag  after it should then point to a bodypart type or category.
Add multiple of these to make multiple layers.

Add tissue layers at the bottom of the file, or at least below the other stuff I mentioned.


It takes a few to get this down, but once you do its easier then making templates and body plans for each new creature part. You can also make some pretty crazy stuff with it, like immortal balls of feathers or annimated suits of armor which yield usable weapons and (unusabl ::)) armor when butchered.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Lofn

  • Bay Watcher
  • There was a hole.
    • View Profile
    • Tumblr
Re: Understanding Body Parts and Butchery?
« Reply #5 on: June 26, 2010, 11:24:35 am »

This isn't terribly relevant but it took me a rather long time to work it out - if you want a tissue layer like skin or feathers or hair or whatnot to drop when small creatures (like cats and dogs) are butchered, the tissue requires the [CONNECTS] token. 

My theory is that without that token, total tissue materal is measured for each single bodypart rather than for the creature as a whole, meaning that small creatures won't have enough in one place to yield a unit of the material when butchered.
Logged
Also known as Zuhayr.