Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: ADD_TISSUE vs ADD_MATERIAL  (Read 1556 times)

D_E

  • Bay Watcher
    • View Profile
Re: ADD_TISSUE vs ADD_MATERIAL
« Reply #15 on: March 21, 2011, 08:57:26 pm »

I'd like to define what materials to use where, and I sorta figured out that the vertebrate body plan has some arguments that allow you to customize what order things appear in, but it's clearly not all.  Like, few, if any, of the entries under that plan include skin, yet creatures still have skin, and organs...  So, it bust be part of the ADD_TISSUE/MATERIAL where organs and skin are defined, but I cannot figure out HOW they do this...

Help?

Body detail plans can do two things (well three things, really).

1)  Add materials or tissue definitions.
     a) STANDARD_MATERIALS and similar adds a mess of materials to the creature when it is used, including the skin material, muscle material, bone material, and all the organ materials.  This type of definition uses ADD_MATERIAL, which works by referencing material_templates.

     b) STANDARD_TISSUES and similar adds a mess of tissues to the creature when it is used, including the skin tissue, muscle tissue, bone tissue.  It works by using ADD_TISSUE to reference tissue_templates.

2)  Add tissue layers.  These add tissue layers to the creature, using BP_LAYERS.  They can use explicit references to a tissue (like the various organs in VERTEBRATE_TISSUE_LAYERS) or by numbered variables (like the various body parts in VERTEBRATE_TISSUE_LAYERS that use ARG1, ARG2, etc to find out the skin tissue, muscle tissue, etc).


This way of doing things works well for handling complex things that remain the same between creatures, like the skin, organs, etc.  In the first body_plan file, information flows from the material_templates to the materials using add_material.  In the second body_plan file, information flows from the materials and tissue_templates to the tissues using add_tissue.  In the final body_plan file, information flows from the tissues to the tissue layers, using bp_layer.

Any step of that process can be modified, Tomi's TOUGHMATERIALS template works by creating stronger materials with the same names as the default materials, which are then picked up by the rest of the process, based on their names.

For handling things that are unique to a single creature (like poisons), or simple setups (like the metal tissue of the bronze colossus), you can handle the whole process in the creature definition itself.  You can add materials using MATERIAL, USE_MATERIAL, and USE_MATERIAL_TEMPLATE.  You can add new tissues using TISSUE, USE_TISSUE, and USE_TISSUE_TEMPLATE.  You can add tissues to body parts using TISSUE_LAYER, TISSUE_LAYER_UNDER, and TISSUE_LAYER_OVER.

The bronze colossus is an example of creating a tissue and applying it to a creature without going through the template files, and the various poisons in the game are examples of using a material_template to add a non-standard material to a creature and modifying the new material to fit the creature (mostly by adding syndromes, changing the name/adjectives, and setting if the material enters the blood stream).
Logged
Mods I've done:
Zelda mod-mod, Beta in the Wild DF 47.04
Illithid Empire mod DF 31.25 (update canceled)
Spotter's Guide to Illithids (Genesis mod-mod) genesis 3.19a4 (update canceled)
Pages: 1 [2]