Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How do I: Replace skin on a specific bodypart?  (Read 650 times)

darkevilme

  • Bay Watcher
    • View Profile
How do I: Replace skin on a specific bodypart?
« on: June 12, 2010, 12:47:42 pm »

I want to make nagas as a custom race to play in DF.

For this i need to have scales instead of skin on their tail and lower body parts.

How do i go about this in the raws?
« Last Edit: June 12, 2010, 03:10:46 pm by darkevilme »
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: How do I: Replace skin on a specific bodypart?
« Reply #1 on: June 12, 2010, 03:27:42 pm »

I've made all nagas to have full scales.

If you want to cover a part of the body with scales, you could change body detail plan to:

[BODY_DETAIL_PLAN:NAGA_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE:SCALE]

and make

Code: [Select]
[BODY_DETAIL_PLAN:NAGA_TISSUE_LAYERS]
[BP_LAYERS:BY_CATEGORY:BODY_UPPER:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BODY_LOWER:ARG3:50:ARG2:5:ARG6:1]
[BP_LAYERS:BY_CATEGORY:ARM:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM_UPPER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM_LOWER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HAND:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HEAD:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:NECK:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TAIL:ARG4:25:ARG3:25:ARG2:5:ARG6:1]
[BP_LAYERS:BY_CATEGORY:EYE:EYE:100]
[BP_LAYERS:BY_CATEGORY:TOOTH:TOOTH:100]
[BP_LAYERS:BY_CATEGORY:NOSE:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:EAR:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LUNG:LUNG:100]
[BP_LAYERS:BY_CATEGORY:MOUTH:ARG3:10:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BEAK:ARG4:100]
[BP_LAYERS:BY_CATEGORY:RIB_TRUE:ARG4:100]
[BP_LAYERS:BY_CATEGORY:RIB_FALSE:ARG4:100]
[BP_LAYERS:BY_CATEGORY:RIB_FLOATING:ARG4:100]
[BP_LAYERS:BY_CATEGORY:HEART:HEART:100]
[BP_LAYERS:BY_CATEGORY:GUTS:GUT:100]
[BP_LAYERS:BY_CATEGORY:LIVER:LIVER:100]
[BP_LAYERS:BY_CATEGORY:STOMACH:STOMACH:100]
[BP_LAYERS:BY_CATEGORY:PANCREAS:PANCREAS:100]
[BP_LAYERS:BY_CATEGORY:SPLEEN:SPLEEN:100]
[BP_LAYERS:BY_CATEGORY:KIDNEY:KIDNEY:100]
[BP_LAYERS:BY_CATEGORY:JOINT:ARG4:4:ARG3:1]
[BP_LAYERS:BY_CATEGORY:SPINE:NERVE:2:ARG4:2]
[BP_LAYERS:BY_CATEGORY:BRAIN:BRAIN:100]
[BP_LAYERS:BY_CATEGORY:FINGER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LIP:ARG3:10:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:CHEEK:ARG1:100]
[BP_LAYERS:BY_CATEGORY:EYELID:ARG1:100]
[BP_LAYERS:BY_CATEGORY:THROAT:ARG1:100]
[BP_LAYERS:BY_CATEGORY:SKULL:ARG4:100]

Don't forget to add [USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE] to the creature.

I dumped most unneeded stuff from the body detail plan because I doubt that your nagas will have tusks or humps, but if you need them, copy them back from VERTEBRATE_TISSUE_LAYERS.

P.S. If you are unsure what I did, body detail plans tell which tissues do bodyparts contain. They take a bodypart and assign arguments and thickness to them. Arguments are further passed within the creature file. So:

[BODY_DETAIL_PLAN:NAGA_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE:SCALE]

means that:
- arg1 = skin
- arg2 = fat
- arg3 = muscle
- arg4 = bone
- arg5 = cartilage
- arg6 = scale

Then let's look at 2 main parts of the body:
   [BP_LAYERS:BY_CATEGORY:BODY_UPPER:ARG3:50:ARG2:5:ARG1:1]
   [BP_LAYERS:BY_CATEGORY:BODY_LOWER:ARG3:50:ARG2:5:ARG6:1]

As you see, upperbody has arg3 (muscle) with thickness 50 covered with arg2 (fat) with thickness 5 covered with arg1 (skin) with thickness 1.

I changed arg1 to arg6 for lower body, replacing skin with scale. You can also make scale's thickness 2 to make scales thicker than skin:

   [BP_LAYERS:BY_CATEGORY:BODY_LOWER:ARG3:50:ARG2:5:ARG6:2]

Note that I've added scales to the lowerbody and the tail only, so the remaining body is still covered with arg1 (skin).
« Last Edit: June 12, 2010, 03:32:40 pm by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

darkevilme

  • Bay Watcher
    • View Profile
Re: How do I: Replace skin on a specific bodypart?
« Reply #2 on: June 12, 2010, 03:46:24 pm »

Thanks Deon, though for some reason i'm getting an error now that goes

Code: [Select]

*** Error(s) found in the file "raw/objects/creature_standard.txt"
NAGA Color Mod Ending With (GOLDENROD,1) Was Not Used
*** Error(s) finalizing the creature NAGA
NAGA:FEMALE:lower body, layer 1: Tissue ARG6 was not found, using first tissue instead
NAGA:FEMALE:tail, layer 1: Tissue ARG6 was not found, using first tissue instead
NAGA:MALE:lower body, layer 1: Tissue ARG6 was not found, using first tissue instead
NAGA:MALE:tail, layer 1: Tissue ARG6 was not found, using first tissue instead
I copied the body detail plan exactly and added the template as seen here.
Code: [Select]

[BODY_DETAIL_PLAN:STANDARD_MATERIALS]


[BODY_DETAIL_PLAN:STANDARD_TISSUES]
[USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE]
[USE_TISSUE_TEMPLATE:SCALE:SCALE_TEMPLATE]
[BODY_DETAIL_PLAN:NAGA_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE:SCALE]
[BODY_DETAIL_PLAN:HEAD_HAIR_TISSUE_LAYERS]


But it still doesnt work, what gives?
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: How do I: Replace skin on a specific bodypart?
« Reply #3 on: June 12, 2010, 03:52:15 pm »

Okay, I will try to look into it. All I typed here was from my head so I could do some stupid mistake.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: How do I: Replace skin on a specific bodypart?
« Reply #4 on: June 12, 2010, 03:54:18 pm »

The problem is that the body detail plans can only take up to five arguments. You'll have to apply the scale directly rather  than as an argument, like this:

Code: [Select]
[BODY_DETAIL_PLAN:NAGA_TISSUE_LAYERS]
[BP_LAYERS:BY_CATEGORY:BODY_UPPER:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BODY_LOWER:ARG3:50:ARG2:5:SCALE:1]
[BP_LAYERS:BY_CATEGORY:ARM:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM_UPPER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM_LOWER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HAND:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HEAD:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:NECK:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TAIL:ARG4:25:ARG3:25:ARG2:5:SCALE:1]
[BP_LAYERS:BY_CATEGORY:EYE:EYE:100]
[BP_LAYERS:BY_CATEGORY:TOOTH:TOOTH:100]
[BP_LAYERS:BY_CATEGORY:NOSE:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:EAR:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LUNG:LUNG:100]
[BP_LAYERS:BY_CATEGORY:MOUTH:ARG3:10:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BEAK:ARG4:100]
[BP_LAYERS:BY_CATEGORY:RIB_TRUE:ARG4:100]
[BP_LAYERS:BY_CATEGORY:RIB_FALSE:ARG4:100]
[BP_LAYERS:BY_CATEGORY:RIB_FLOATING:ARG4:100]
[BP_LAYERS:BY_CATEGORY:HEART:HEART:100]
[BP_LAYERS:BY_CATEGORY:GUTS:GUT:100]
[BP_LAYERS:BY_CATEGORY:LIVER:LIVER:100]
[BP_LAYERS:BY_CATEGORY:STOMACH:STOMACH:100]
[BP_LAYERS:BY_CATEGORY:PANCREAS:PANCREAS:100]
[BP_LAYERS:BY_CATEGORY:SPLEEN:SPLEEN:100]
[BP_LAYERS:BY_CATEGORY:KIDNEY:KIDNEY:100]
[BP_LAYERS:BY_CATEGORY:JOINT:ARG4:4:ARG3:1]
[BP_LAYERS:BY_CATEGORY:SPINE:NERVE:2:ARG4:2]
[BP_LAYERS:BY_CATEGORY:BRAIN:BRAIN:100]
[BP_LAYERS:BY_CATEGORY:FINGER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LIP:ARG3:10:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:CHEEK:ARG1:100]
[BP_LAYERS:BY_CATEGORY:EYELID:ARG1:100]
[BP_LAYERS:BY_CATEGORY:THROAT:ARG1:100]
[BP_LAYERS:BY_CATEGORY:SKULL:ARG4:100]
That should work.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: How do I: Replace skin on a specific bodypart?
« Reply #5 on: June 12, 2010, 03:55:24 pm »

Thank you, Knight Otu, I've never tried to make more than 5 arguments before and didn't know about this limitation. Good to know for future.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: How do I: Replace skin on a specific bodypart?
« Reply #6 on: June 12, 2010, 03:59:01 pm »

Yeah, I don't think it's said anywhere explicitly. It's kind of hidden away in the string dump.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu