Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Metal Shells  (Read 1027 times)

Magnut

  • Bay Watcher
    • View Profile
Metal Shells
« on: February 12, 2011, 02:01:26 am »

First, I know I've been asking a few very basic questions around here... I'm acclimating to the phase of raw editing where I'm actually DOING things instead of just swapping obvious values for other obvious values.  Baby steps, I know, but I appreciate the help the community has shown me.

Ohhhhkay.  Metal shells, like for turtles or oysters. 

I create a new creature, a carbon copy of a known working oyster that generates shells upon being processed at the Fishery.

I figured out that I can do this...

Code: [Select]
[USE_MATERIAL_TEMPLATE:SHELL:METAL_TEMPLATE]
Which should give the shell the properties of generic metal, but what if I want to make it a SPECIFIC metal?  For argument's sake, let's say I want to make an iron-shelled oyster.  The specific metals (iron, lead, gold) aren't defined as MATERIAL_TEMPLATES, so I can't call them in a USE_MATERIAL_TEMPLATE token, correct?

But now I'm thinking I'm barking up the wrong tree, and I should be working with tissues instead of materials.  I'm a little lost, and the wiki helps me get started but doesn't always paint a clear picture of the syntax and structure of these things.

Thanks in advance.
Logged

Iados

  • Bay Watcher
  • Back from the Dead
    • View Profile
    • deviantArt
Re: Metal Shells
« Reply #1 on: February 12, 2011, 02:56:18 am »

you can simply copy the material definition of the metal you want from inorganic_metals to material_template_default.

then you can use [USE_MATERIAL_TEMPLATE:SHELL:IRON_TEMPLATE] (i used IRON_TEMPLATE as a name you can change it to what you want)
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Metal Shells
« Reply #2 on: February 12, 2011, 07:38:26 am »

That would create the problem that you cant melt those shells into usable bars of iron. The forge doesnt take orders for organic materials. Best way to do this would be to put [TISSUE_MATERIAL:INORGANIC:IRON] or another metal of your choice below [USE_TISSUE_TEMPLATE:SHELL:SHELL_TEMPLATE].
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Magnut

  • Bay Watcher
    • View Profile
Re: Metal Shells
« Reply #3 on: February 12, 2011, 01:49:08 pm »

Okay, so first, thanks - but there's accomplishing the task at hand and then there's understanding WHY it's working.

Here are my understandings:

1. By using [USE_TISSUE_TEMPLATE], I've referenced a pre-fabbed set of tissue declarations established in another file.  It's like calling a subroutine to save time.

2. By placing [TISSUE_MATERIAL] under the tissue template call, I've... overruled the preceding TISSUE_TEMPLATE's TISSUE_MATERIAL?

Here are my questions:

1. Does the [TISSUE_MATERIAL] token - meant to overwrite the declared [TISS_MAT] in the template - only apply to the [USE_TISSUE_TEMPLATE] that it follows?  Declaring another tissue template after it would start the process fresh, correct?

2. Will the resultant shell (inorganic:iron, in this case) be butchered/processed as an "iron turtle shell" or as "iron turtle's iron"?  Can I use a gloss of some sort to control what the resultant lump or iron is called?

Thanks again, everyone - trying to gain skill here, not just get stuff made.
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Metal Shells
« Reply #4 on: February 12, 2011, 05:21:20 pm »

The first three are all correct. [USE_TISSUE_TEMPLATE:SHELL:SHELL_TEMPLATE] makes a tissue called SHELL with template SHELL_TEMPLATE, and selects SHELL. Any tissue tokens you call after that apply to SHELL. Calling a creature token deselects SHELL.

Same goes for materials and for tissue layers (not the same as a tissue, its a tissue layer applied to a bodypart). For these two you can use PLUS_MATERIAL or PLUS_TISSUE_LAYER to add another material or tissue layer to the selection, for some reason you cant do this for tissues.

As for butchered bodypart naming, it uses the materials name. I have seen it use the bodyparts name if said bodypart is made of a single material, leaving little butchering to be done. Since that is not the case for oysters (they just have BODY their only bodypart) it ends up seperating it into 'oyster meat' and in this case 'oyster iron'.

Best here would be to add another bodypart for the oyster and call it 'iron oyster shell'. Havnt tried this on vermin though.

Another way is to make it have a bodypart that has the TOTEMABLE tag (skulls use these). Those are not butchered, hence skulls dont yield 'bone' but 'skull'. It has the obvious sideffect of +iron oyster shell totem+. There might also be problems melting it, with other tissue materials being on it.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

nshapter

  • Bay Watcher
    • View Profile
Re: Metal Shells
« Reply #5 on: February 18, 2011, 03:32:44 pm »

The first three are all correct. [USE_TISSUE_TEMPLATE:SHELL:SHELL_TEMPLATE] makes a tissue called SHELL with template SHELL_TEMPLATE, and selects SHELL. Any tissue tokens you call after that apply to SHELL. Calling a creature token deselects SHELL.

Same goes for materials and for tissue layers (not the same as a tissue, its a tissue layer applied to a bodypart). For these two you can use PLUS_MATERIAL or PLUS_TISSUE_LAYER to add another material or tissue layer to the selection, for some reason you cant do this for tissues.

As for butchered bodypart naming, it uses the materials name. I have seen it use the bodyparts name if said bodypart is made of a single material, leaving little butchering to be done. Since that is not the case for oysters (they just have BODY their only bodypart) it ends up seperating it into 'oyster meat' and in this case 'oyster iron'.

Best here would be to add another bodypart for the oyster and call it 'iron oyster shell'. Havnt tried this on vermin though.

Another way is to make it have a bodypart that has the TOTEMABLE tag (skulls use these). Those are not butchered, hence skulls dont yield 'bone' but 'skull'. It has the obvious sideffect of +iron oyster shell totem+. There might also be problems melting it, with other tissue materials being on it.


Would this solve the problem for my current pet reaction?
Code: [Select]
[REACTION:BONEBURN]
[NAME:Burn Bones for Calcite flux]
[BUILDING:SMELTER:NONE]
[REAGENT:bones:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][ANY_BONE_MATERIAL]
[PRODUCT:100:1:BOULDER:NO_SUBTYPE:INORGANIC:CALBONE]
[SKILL:SMELT]
requires a second reaction to use skulls?
Code: [Select]
[REACTION:SKULLBURN]
[NAME:Burn Skulls for Calcite flux]
[BUILDING:SMELTER:NONE]
[REAGENT:bones:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][TOTEMABLE]
[PRODUCT:100:1:BOULDER:NO_SUBTYPE:INORGANIC:CALBONE]
[SKILL:SMELT]

where the product CALBONE is
Code: [Select]
calcined bones are a usable flux
[INORGANIC:CALBONE]
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:calcined bones][DISPLAY_COLOR:7:7:1][TILE:'177']
[REACTION_CLASS:FLUX]
[MATERIAL_VALUE:3]
[IS_STONE]
[MELTING_POINT:12902]
Logged
<---  This child was trapped and unharmed behind a bridge when the lever shown was pulled.  How did he manage it?  Nobody will ever know.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Metal Shells
« Reply #6 on: February 18, 2011, 03:40:13 pm »

Skulls are basically unbutcherable bodyparts, and strangely those are counted out by the [USE_BODY_COMPONENT] tag. Like making bone bolts and such it requires butchered parts.

Removing the use bodypart tag solves this, but adds the problem that it takes absolutely any bone thing for reagent.

Havnt found any other way around this than changing the material skulls use, or removing the totemable tag from skulls.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!