Bay 12 Games Forum

Please login or register.

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

Author Topic: Trying to learn to make creatures from scratch  (Read 1527 times)

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Trying to learn to make creatures from scratch
« on: March 06, 2014, 12:12:24 am »

Original Post
Spoiler (click to show/hide)

Now I'm trying something a little different; I'm trying to make a fairly simple jellyfish type creature. It's not going well. First off, the creature:

Actual creature:
Spoiler (click to show/hide)

Then the body parts:
Spoiler (click to show/hide)

Then the pertinent part of the errorlog:
Spoiler (click to show/hide)

Now the problems I'm having. First, the Rutans are white one a grey background when I specified them as green on a black background. Second, they don't have tentacles, which causes problems with the whole attacking thing. Third they don't bleed, and fourth they don't seem to have brains. They do melt properly, so that's good, but other than that they don't work in most of the ways I've tested them. And I haven't even started on the electrocution interaction...
« Last Edit: July 20, 2014, 09:46:36 pm by Nathail »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Trying to learn to make creatures from scratch
« Reply #1 on: March 06, 2014, 09:53:13 am »

I would say if you want to make a creature right from scratch the best example would be vanilla iron men EL EMENTMAN_IRON in creature_subterranean.txt

Spoiler (click to show/hide)

Going about how you want to make your new creature all you will need is pretty much what this creature has (a gas material) and two tissues (one using the GAS, and the other directly using an INORGANIC material defined outside of it)

all in all you don't need a BDP you just need to know how thick you want your tissues to be (as BDPs actually overwrite those values) so your GAS tissue might be 25 thick and the metal tissue would be 75 thick.

So it would go:

material
-AURA:CREATURE_EXTRACT_TEMPLATE
tissues
-[TISSUE:METAL]
-[TISSUE:AURA]
body
-[BODY:SWORD]
layer the tissues
-[TISSUE_LAYER:BY_CATEGORY:ALL:METAL]
-[TISSUE_LAYER:BY_CATEGORY:ALL:AURA]
attacks
-These are easy enough to do, so easy if you know the CATEGORY, TOKEN, or TYPE of bodypart you want to use. Look at elephants or other creatures that use a GORE attack, as those normally use CATEGORY to use the TUSK/HORN

everything before and after are all up to you (descriptions, interactions (or can just have an attack apply an interaction much like how warebeast bites work, making it so you don't need another material) Behaviour, tissue coloration etc.)
Logged

Wannabehero

  • Bay Watcher
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #2 on: March 06, 2014, 10:37:04 am »

Hugo covered most of it there.

Also, there is an animated weapons mod floating around somewhere (see what I did there), and it should provide a decent example of how someone did this before (though it is a bit different than your concept in basic structure).


Edit:
It was Blackflyme's Living Weapons mod.
« Last Edit: March 06, 2014, 10:39:10 am by Wannabehero »
Logged

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #3 on: March 06, 2014, 08:37:55 pm »

Alright, I tried using some of his code, and this is what I've got now:

The creature:
Code: [Select]
[CREATURE:CURSED_SWORD]
[NAME:cursed sword:cursed swords:cursed sword]
[PREFSTRING:legendary sharpness]
[PREFSTRING:shimmering auras]

[CREATURE_TILE:'/'][COLOR:7:0:0]

[BODY:BLADE:AURA]

[DESCRIPTION:An ancient and powerful sword animated by a shimmering aura.]

[BODY_SIZE:0:0:3500]

[NO_DIZZINESS][NO_DRINK][NO_EAT]
[NO_FEVERS][NO_SLEEP]
[NO_PHYS_ATT_RUST][NO_PHYS_ATT_GAIN]
[NOBREATHE][NOEMOTION]
[NOEXERT][NOSTUCKINS][NOSTUN]
[NOT_LIVING][PARALYZEIMMUNE]
[SWIMS_INNATE][EXTRAVISION]

[TISSUE:ADAMANTINE]
[TISSUE_NAME:adamantine:adamantine]
[CONNECTS]
[TISSUE_MATERIAL:INORGANIC:ADAMANTINE]

[TISSUE:AURA]
[TISSUE_NAME:aura:auras]
[CONNECTS]
[FUNCTIONAL]
[USE_MATERIAL_TEMPLATE:ENERGY_TEMPLATE]
[TISSUE_LAYER:BY_CATEGORY:AURA:AURA]

[NATURAL_SKILL:SWORD:8]
[NATURAL_SKILL:DODGING:8]

[PETVALUE:100]

[ATTACK:SLASH:BODYPART:BY_CATEGORY:BLADE]
   [ATTACK_SKILL:SWORD]
   [ATTACK_VERB:slash:slashes]
   [ATTACK_CONTACT_PERC:60000]
   [ATTACK_PENETRATION_PERC:6000]
   [ATTACK_VELOCITY_MODIFIER:1250]
   [ATTACK_FLAG_EDGE]
   [ATTACK_PRIORITY:MAIN]

[ATTACK:STAB:BODYPART:BY_CATEGORY:BLADE]
   [ATTACK_SKILL:SWORD]
   [ATTACK_VERB:stab:stabs]
   [ATTACK_CONTACT_PERC:50]
   [ATTACK_PENETRATION_PERC:3000]
   [ATTACK_FLAG_EDGE]
   [ATTACK_PRIORITY:MAIN]

[ATTACK:SLAP:BODYPART:BY_CATEGORY:BLADE]
   [ATTACK_SKILL:SWORD]
   [ATTACK_VERB:slap:slaps]
   [ATTACK_CONTACT_PERC:60000]
   [ATTACK_PENETRATION_PERC:6000]
   [ATTACK_VELOCITY_MODIFIER:1250]
   [ATTACK_PRIORITY:SECOND]

The body parts:
Code: [Select]
[OBJECT:BODY]

=====Aura=====

[BODY:Aura]
[BP:AU:aura:auras][EMBEDDED][FLIER][THOUGHT][CONTYPE:LOWERBODY][CATEGORY:AURA]
[DEFAULT_RELSIZE:50]

=====Blade=====

[BODY:BLADE]
[BP:BL:blade:blades][UPPERBODY][CONTYPE:UPPERBODY][CATEGORY:BLADE]
[DEFAULT_RELSIZE:1000]

The results:
Code: [Select]
*** Error(s) found in the file "raw/objects/creature_zed.txt"
CURSED_SWORD:Body Token Recognized But Could Not Connect: BLADE
CURSED_SWORD:Unrecognized Creature Caste Body Token: AURA
CURSED_SWORD:Tissue layer not added because no BP found: BY_CATEGORY:AURA:AURA
CURSED_SWORD:Attack SLASH seems to have correct format but could not find proper BPs in any caste, so not added
CURSED_SWORD:Attack STAB seems to have correct format but could not find proper BPs in any caste, so not added
CURSED_SWORD:Attack SLAP seems to have correct format but could not find proper BPs in any caste, so not added
*** Error(s) finalizing the creature CURSED_SWORD
CURSED_SWORD:AURA:Unrecognized Material Token:
CURSED_SWORD:Creature Tissue Material Failure: AURA:(no mat1):(no mat3):(no mat3)

I'm not entirely sure why it won't recognize the body parts, and I'm still unsure of how to specify that one body part should be made up of one tissue and one body part of the other.
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #4 on: March 06, 2014, 08:52:30 pm »

Your blade is the upper body, so it does not need a contype token. Your aura is trying to connect to a lower body, but there is no lower body for it to connect to.

Your aura tissue does not have a material token connected to it, and your energy material is not fully defined. The aura could not be connected because the raws are sensitive to upper and lower case letters, and the creature's AURA was different from the body's Aura.

This doesn't give me any errors:

Code: [Select]
[CREATURE:CURSED_SWORD]
[NAME:cursed sword:cursed swords:cursed sword]
[PREFSTRING:legendary sharpness]
[PREFSTRING:shimmering auras]

[CREATURE_TILE:'/'][COLOR:7:0:0]

[BODY:BLADE:AURA]

[DESCRIPTION:An ancient and powerful sword animated by a shimmering aura.]

[BODY_SIZE:0:0:3500]

[NO_DIZZINESS][NO_DRINK][NO_EAT]
[NO_FEVERS][NO_SLEEP]
[NO_PHYS_ATT_RUST][NO_PHYS_ATT_GAIN]
[NOBREATHE][NOEMOTION]
[NOEXERT][NOSTUCKINS][NOSTUN]
[NOT_LIVING][PARALYZEIMMUNE]
[SWIMS_INNATE][EXTRAVISION]

[TISSUE:ADAMANTINE]
[TISSUE_NAME:adamantine:adamantine]
[CONNECTS]
[TISSUE_MATERIAL:INORGANIC:ADAMANTINE]
[TISSUE_LAYER:BY_CATEGORY:BLADE:ADAMANTINE]***

[USE_MATERIAL_TEMPLATE:ENERGY:ENERGY_TEMPLATE]***

[TISSUE:AURA]
[TISSUE_NAME:aura:auras]
[CONNECTS]
[FUNCTIONAL]
[TISSUE_MATERIAL:LOCAL_CREATURE_MAT:ENERGY]***
[TISSUE_LAYER:BY_CATEGORY:AURA:AURA]

[NATURAL_SKILL:SWORD:8]
[NATURAL_SKILL:DODGING:8]

[PETVALUE:100]

[ATTACK:SLASH:BODYPART:BY_CATEGORY:BLADE]
   [ATTACK_SKILL:SWORD]
   [ATTACK_VERB:slash:slashes]
   [ATTACK_CONTACT_PERC:60000]
   [ATTACK_PENETRATION_PERC:6000]
   [ATTACK_VELOCITY_MODIFIER:1250]
   [ATTACK_FLAG_EDGE]
   [ATTACK_PRIORITY:MAIN]

[ATTACK:STAB:BODYPART:BY_CATEGORY:BLADE]
   [ATTACK_SKILL:SWORD]
   [ATTACK_VERB:stab:stabs]
   [ATTACK_CONTACT_PERC:50]
   [ATTACK_PENETRATION_PERC:3000]
   [ATTACK_FLAG_EDGE]
   [ATTACK_PRIORITY:MAIN]

[ATTACK:SLAP:BODYPART:BY_CATEGORY:BLADE]
   [ATTACK_SKILL:SWORD]
   [ATTACK_VERB:slap:slaps]
   [ATTACK_CONTACT_PERC:60000]
   [ATTACK_PENETRATION_PERC:6000]
   [ATTACK_VELOCITY_MODIFIER:1250]
   [ATTACK_PRIORITY:SECOND]

Code: [Select]
[OBJECT:BODY]

=====Aura=====

[BODY:AURA]
[BP:AU:aura:auras][EMBEDDED][FLIER][THOUGHT][CONTYPE:LOWERBODY][CATEGORY:AURA]
[DEFAULT_RELSIZE:50]

=====Blade=====

[BODY:BLADE]
[BP:BL:blade:blades][UPPERBODY][LOWERBODY][CATEGORY:BLADE]
[DEFAULT_RELSIZE:1000]

Edit: I've left stars next to the changes I've made in the creature raws. In the body raws, I've removed the contype from the blade, made it a lower body so that the aura could attach to it, and fixed the aura's ID.

To connect certain tissues to body parts you use the tag [TISSUE_LAYER:BY_X: X :TISSUE]

BY_X can be BY_CATEGORY, which will make the tissue cover every body part with the correct category type, BY_TYPE, which attached itself to tokens such as STANCE, GRASP, UPPERBODY/LOWERBODY, etc., and BY_TOKEN, which connects the tissue to a body part by the body part's ID. The final argument is the ID of the tissue that you want to be used.

Below are all examples of how to connect the adamantine tissue to the blade.
Code: [Select]
[TISSUE_LAYER:BY_CATEGORY:BLADE:ADAMANTINE]

[TISSUE_LAYER:BY_TYPE:UPPERBODY:ADAMANTINE]

[TISSUE_LAYER:BY_TOKEN:BL:ADAMANTINE]
« Last Edit: March 06, 2014, 09:12:34 pm by BlackFlyme »
Logged

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #5 on: March 06, 2014, 09:40:02 pm »

Ah, I see...

I've incorporated your changes and polished the creature to be how I want it a bit more, and what I've got now isn't raising any flags in the error log. It also won't show up in the arena menu.

Code: [Select]
creature_zed

[OBJECT:CREATURE]

[CREATURE:CURSED_SWORD]
[NAME:cursed sword:cursed swords:cursed sword]
[PREFSTRING:legendary sharpness]
[PREFSTRING:shimmering auras]

[CREATURE_TILE:'/'][COLOR:3:3:1]
[MEGABEAST][DIFFICULTY:15]
[ATTACK_TRIGGER:80:10000:100000]

[BODY:BLADE:AURA]

[DESCRIPTION:An ancient and powerful sword animated by a shimmering aura.]

[BODY_SIZE:0:0:7000]

[NO_DIZZINESS][NO_DRINK][NO_EAT]
[NO_FEVERS][NO_SLEEP]
[NO_PHYS_ATT_RUST][NO_PHYS_ATT_GAIN]
[NOBREATHE][NOEMOTION]
[NOEXERT][NOSTUCKINS][NOSTUN]
[NOT_LIVING][PARALYZEIMMUNE]
[SWIMS_INNATE][EXTRAVISION]

[TISSUE:ADAMANTINE]
[TISSUE_NAME:adamantine:adamantine]
[CONNECTS]
[TISSUE_MATERIAL:INORGANIC:ADAMANTINE]
[TISSUE_LAYER:BY_CATEGORY:BLADE:ADAMANTINE]

[USE_MATERIAL_TEMPLATE:ENERGY:ENERGY_TEMPLATE]

[TISSUE:AURA]
[TISSUE_NAME:aura:auras]
[CONNECTS]
[FUNCTIONAL]
[TISSUE_MATERIAL:LOCAL_CREATURE_MAT:ENERGY]
[TISSUE_LAYER:BY_CATEGORY:AURA:AURA]

[NATURAL_SKILL:SWORD:9]
[NATURAL_SKILL:DODGING:9]

[ATTACK:SLASH:BODYPART:BY_CATEGORY:BLADE]
[ATTACK_SKILL:SWORD]
[ATTACK_VERB:slash:slashes]
[ATTACK_CONTACT_PERC:1000]
[ATTACK_VELOCITY_MODIFIER:15]
[ATTACK_FLAG_EDGE]
[ATTACK_PRIORITY:MAIN]

[ATTACK:STAB:BODYPART:BY_CATEGORY:BLADE]
[ATTACK_SKILL:SWORD]
[ATTACK_VERB:stab:stabs]
[ATTACK_CONTACT_PERC:70]
[ATTACK_VELOCITY_MODIFIER:12]
[ATTACK_FLAG_EDGE]
[ATTACK_PRIORITY:MAIN]

[ATTACK:SLAP:BODYPART:BY_CATEGORY:BLADE]
[ATTACK_SKILL:SWORD]
[ATTACK_VERB:slap:slaps]
[ATTACK_CONTACT_PERC:1000]
[ATTACK_VELOCITY_MODIFIER:15]
[ATTACK_PRIORITY:SECOND]

[ITEMCORPSE:WEAPON:ITEM_WEAPON_SWORD_LONG:INORGANIC:ADAMANTINE]
[ITEMCORPSE_QUALITY:5]

[LAIR:SHRINE:100]

I also genned a world with 100 megabeasts. Not one was a cursed sword.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #6 on: March 06, 2014, 10:00:36 pm »

It's missing a CASTE_NAME.

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #7 on: March 06, 2014, 10:06:26 pm »

It also needs a biome token.

The reason it did not appear in the world you generated as a megabeast was because it does not have a biome token.

Edited for clarification.
« Last Edit: March 08, 2014, 04:19:01 pm by BlackFlyme »
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #8 on: March 08, 2014, 03:57:35 am »

It does not if you want to see it in arena.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #9 on: July 20, 2014, 09:47:28 pm »

I've updated the main post with a new issue. It was inevitable.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #10 on: July 20, 2014, 09:53:43 pm »

You want [COLOR:2:0:1], not just [2:0:1].

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #11 on: July 20, 2014, 10:01:44 pm »

[CANOPENDOOR] should be [CANOPENDOORS]

[2:0:1] should be [COLOR:2:0:1]

[STATE_COLOR_ALL:2:0:0] in both the skin and the ichor material definitions should be [DISPLAY_COLOR:2:0:0] if you want to use those arguments. If you want an actual colour, then you must use a colour ID instead of a number ID, such as [STATE_COLOR:ALL:GREEN]

[SCAR] in the brain tissue definition should be [SCARS]

Your body size at year 7 has an extra colon

You don't have tentacles because they are looking for a part with the ID of BP but the body has the ID of BD
« Last Edit: July 20, 2014, 10:05:29 pm by BlackFlyme »
Logged

dirkdragonslayer

  • Bay Watcher
  • Dabbling Modder, Proficient Failure
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #12 on: July 20, 2014, 10:12:56 pm »

I am trying to get back into modding, and my first test is making dragon people. Is it possible to have a certain body parts(I.e. tail, arms, legs) covered in scales, but not the rest? Thanks.
Logged
"Games come and go, and we all get tired of some games after time, but Dwarf Fortress seems to grab me by the leg every couple months and drags me back with it's bloody, ASCII claw. I think this game has given me Stockholm syndrome, but I love it so, and it's simplistic style yet extremely complex mechanics are like fine art, like a beautifully crafted ☼Cave Spider Silk Sock☼" - Dirk 3/31/2014
TAIL SHOOOOES!

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #13 on: July 20, 2014, 10:22:58 pm »

I am trying to get back into modding, and my first test is making dragon people. Is it possible to have a certain body parts(I.e. tail, arms, legs) covered in scales, but not the rest? Thanks.

Add the scale material and tissues, but do not apply them using a body detail plan. Then add tissue layer tags like this:
Code: [Select]
[USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE]
[USE_TISSUE_TEMPLATE:SCALE:SCALE_TEMPLATE]

[TISSUE_LAYER:BY_CATEGORY:LEG_UPPER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:LEG_LOWER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:ARM_UPPER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:ARM_LOWER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:TAIL:SCALE]
Though the scales would be above the skin, covering it instead of replacing it.

Or you could make a new body detail plan that adds skin and scales to different parts.
Logged

dirkdragonslayer

  • Bay Watcher
  • Dabbling Modder, Proficient Failure
    • View Profile
Re: Trying to learn to make creatures from scratch
« Reply #14 on: July 20, 2014, 10:26:38 pm »

I am trying to get back into modding, and my first test is making dragon people. Is it possible to have a certain body parts(I.e. tail, arms, legs) covered in scales, but not the rest? Thanks.

Add the scale material and tissues, but do not apply them using a body detail plan. Then add tissue layer tags like this:
Code: [Select]
[USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE]
[USE_TISSUE_TEMPLATE:SCALE:SCALE_TEMPLATE]

[TISSUE_LAYER:BY_CATEGORY:LEG_UPPER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:LEG_LOWER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:ARM_UPPER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:ARM_LOWER:SCALE]
[TISSUE_LAYER:BY_CATEGORY:TAIL:SCALE]
Though the scales would be above the skin, covering it instead of replacing it.

Or you could make a new body detail plan that adds skin and scales to different parts.
You sir, are fantastic, thanks! Now, back to making creatures!
Logged
"Games come and go, and we all get tired of some games after time, but Dwarf Fortress seems to grab me by the leg every couple months and drags me back with it's bloody, ASCII claw. I think this game has given me Stockholm syndrome, but I love it so, and it's simplistic style yet extremely complex mechanics are like fine art, like a beautifully crafted ☼Cave Spider Silk Sock☼" - Dirk 3/31/2014
TAIL SHOOOOES!
Pages: [1] 2