Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help, my custom bodytype doesn't work  (Read 787 times)

GoombaGeek

  • Bay Watcher
  • Horrors! Crundles in the caverns!
    • View Profile
Help, my custom bodytype doesn't work
« on: June 29, 2012, 07:04:56 pm »

Well, I was trying to start modding and project one was to make a creeper bodytype. EDIT: Just in case you didn't know, a creeper is that green Minecraft guy with four legs and a frowny face that explodes. I counted the eyeballs as "apertures" because I always thought they were empty holes, but that doesn't really explain why it doesn't load >:I

Code: [Select]
[BODY:CREEPER]
[BP:HEAD:head:heads][HEAD]
[DEFAULT_RELSIZE:700]
[BP:BRAIN:brain:brains][THOUGHT][CONTYPE:HEAD][CON:EYE1][CON:EYE2][EMBEDDED][INTERNAL][SMALL]
[DEFAULT_RELSIZE:400]
[BP:HIGHMIDDLE:neck:necks][THROAT][CONTYPE:HEAD][CONTYPE:UPPERBODY][BREATHE]
[DEFAULT_RELSIZE:800]
[BP:MIDDLE:upper body:upper bodies][UPPERBODY][CON_CAT:HEART]
[DEFAULT_RELSIZE:800]
[BP:LOWMIDDLE:lower body:lower bodies][LOWERBODY][CONTYPE:UPPERBODY][CON:LEG1][CON:LEG2][CON:LEG3][CON:LEG4]
[DEFAULT_RELSIZE:900]
[BP:LEG1:front left leg:front left legs][GRASP][LIMB][LEFT][JOINT][STANCE]
[DEFAULT_RELSIZE:250]
[BP:LEG2:front right leg:front right legs][GRASP][LIMB][RIGHT][JOINT][STANCE]
[DEFAULT_RELSIZE:250]
[BP:LEG3:back left leg:back left legs][LIMB][LEFT][JOINT][STANCE]
[DEFAULT_RELSIZE:250]
[BP:LEG4:back right leg:back right legs][LIMB][RIGHT][JOINT][STANCE]
[DEFAULT_RELSIZE:250]
[BP:MOUTH:mouth:mouths][MOUTH][GRASP][APERTURE][CONTYPE:HEAD][BREATHE][EMBEDDED]
[DEFAULT_RELSIZE:80]
[BP:EYE1:left eyeball:left eyeballs][LEFT][NERVOUS][SIGHT][APERTURE][EMBEDDED]
[DEFAULT_RELSIZE:30]
[BP:EYE2:right eyeball:right eyeballs][RIGHT][NERVOUS][SIGHT][APERTURE][EMBEDDED]
[DEFAULT_RELSIZE:30]
[BP:GUTS:guts:guts][GUTS][CONTYPE:LOWERBODY][INTERNAL][SMALL]
[DEFAULT_RELSIZE:500]
[BP:HEART1:left heart:left hearts][CIRCULATION][EMBEDDED][INTERNAL][SMALL][CATEGORY:HEART]
[DEFAULT_RELSIZE:60]
[BP:HEART2:right heart:right hearts][CIRCULATION][EMBEDDED][INTERNAL][SMALL][CATEGORY:HEART]
[DEFAULT_RELSIZE:60]

It can survive without suffocating or falling over, BUT it's currently immobile and every attack on it "passes right through" instead of, well, hitting. So it's basically an intangible cloud bound to a single tile that can't do anything. So where's the obvious mistake? (At least, I assume it's obvious.)
« Last Edit: June 29, 2012, 07:07:09 pm by GoombaGeek »
Logged
My wooden badge was delicious.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #1 on: June 29, 2012, 07:19:53 pm »

You need to declare body parts that other parts connect to before the parts that are connected to them. For example, BRAIN needs to go after EYE1 and EYE2. Also, parts can only be connected to one part at a time--start with the upper body and go out from there.

GoombaGeek

  • Bay Watcher
  • Horrors! Crundles in the caverns!
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #2 on: June 29, 2012, 07:39:25 pm »

You need to declare body parts that other parts connect to before the parts that are connected to them. For example, BRAIN needs to go after EYE1 and EYE2. Also, parts can only be connected to one part at a time--start with the upper body and go out from there.
Ahhhh!

I forgot about the order completely...

I'm glad it was an obvious solution :)
Logged
My wooden badge was delicious.

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #3 on: June 29, 2012, 08:26:33 pm »

Connections work like a tree. For fluffy wamblers (simble humanoids), the upper body is the first part; the arms, head and lower body connect with that; and the legs connect with the lower body.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help, my custom bodytype doesn't work
« Reply #4 on: June 29, 2012, 08:34:06 pm »

When I run my body parser on these raws, I get the following problems:
Code: [Select]
Creature CREEPER body part 'head' is unconnected!
WARNING - Body part BRAIN has multiple connections?
Creature CREEPER body part 'brain' is unconnected!
WARNING - Body part LOWMIDDLE has multiple connections?
Creature CREEPER body part 'front left leg' is unconnected!
Creature CREEPER body part 'front right leg' is unconnected!
Creature CREEPER body part 'back left leg' is unconnected!
Creature CREEPER body part 'back right leg' is unconnected!
Creature CREEPER body part 'mouth' is unconnected!
Creature CREEPER body part 'left eyeball' is unconnected!
Creature CREEPER body part 'right eyeball' is unconnected!
WARNING - Body part LOWMIDDLE has multiple connections?
Creature CREEPER body part 'left heart' is unconnected!
Creature CREEPER body part 'right heart' is unconnected!

As GreatWyrmGold stated, the Upper Body needs to be the "root" body part to which everything else connects (either directly or indirectly).
« Last Edit: June 29, 2012, 08:55:27 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

GoombaGeek

  • Bay Watcher
  • Horrors! Crundles in the caverns!
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #5 on: June 29, 2012, 09:52:44 pm »

I'm still having trouble although this should be in the proper order - but it can move now and when I put it in the arena, there was some blood! Then every attack phased through it again. Darn. At least now it can move.
Code: [Select]
[BODY:CREEPER]
[BP:MIDDLE:upper body:upper bodies][UPPERBODY]
[DEFAULT_RELSIZE:800]
[BP:LOWMIDDLE:lower body:lower bodies][LOWERBODY][CONTYPE:UPPERBODY]
[DEFAULT_RELSIZE:900]
[BP:HEART1:left heart:left hearts][CIRCULATION][EMBEDDED][INTERNAL][SMALL][CON:MIDDLE]
[DEFAULT_RELSIZE:60]
[BP:HEART2:right heart:right hearts][CIRCULATION][EMBEDDED][INTERNAL][SMALL][CON:MIDDLE]
[DEFAULT_RELSIZE:60]
[BP:HIGHMIDDLE:neck:necks][THROAT][CONTYPE:UPPERBODY][BREATHE]
[DEFAULT_RELSIZE:800]
[BP:HEAD:head:heads][HEAD][CON:HIGHMIDDLE]
[DEFAULT_RELSIZE:700]
[BP:MOUTH:mouth:mouths][MOUTH][GRASP][APERTURE][CONTYPE:HEAD][BREATHE][EMBEDDED][SMALL]
[DEFAULT_RELSIZE:80]
[BP:BRAIN:brain:brains][THOUGHT][CONTYPE:HEAD][EMBEDDED][INTERNAL][SMALL]
[DEFAULT_RELSIZE:400]
[BP:EYE1:left eyeball:left eyeballs][LEFT][NERVOUS][SIGHT][APERTURE][EMBEDDED][CON:BRAIN]
[DEFAULT_RELSIZE:30]
[BP:EYE2:right eyeball:right eyeballs][RIGHT][NERVOUS][SIGHT][APERTURE][EMBEDDED][CON:BRAIN]
[DEFAULT_RELSIZE:30]
[BP:LEG1:front left leg:front left legs][GRASP][LIMB][LEFT][STANCE][CON:LOWMIDDLE]
[DEFAULT_RELSIZE:200]
[BP:LEG2:front right leg:front right legs][GRASP][LIMB][RIGHT][STANCE][CON:LOWMIDDLE]
[DEFAULT_RELSIZE:200]
[BP:LEG3:back left leg:back left legs][LIMB][LEFT][STANCE][CON:LOWMIDDLE]
[DEFAULT_RELSIZE:200]
[BP:LEG4:back right leg:back right legs][LIMB][RIGHT][STANCE][CON:LOWMIDDLE]
[DEFAULT_RELSIZE:200]
[BP:GUTS:guts:guts][GUTS][CONTYPE:LOWERBODY][INTERNAL][SMALL]
[DEFAULT_RELSIZE:500]
Are they in the right order yet?
Logged
My wooden badge was delicious.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #6 on: June 29, 2012, 10:09:59 pm »

All looks right.

You should have your left and right hearts have LEFT and RIGHT tags,  and make sure all your parts have the correct categories (E.G CATEGORY:HEART for your hearts) or else you'll get pass-through attacks due to having no tissue thickness (as your errorlog should say).

GoombaGeek

  • Bay Watcher
  • Horrors! Crundles in the caverns!
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #7 on: June 29, 2012, 10:11:38 pm »

All looks right.

You should have your left and right hearts have LEFT and RIGHT tags,  and make sure all your parts have the correct categories (E.G CATEGORY:HEART for your hearts) or else you'll get pass-through attacks.
Okay. Maybe my arena testing was made before I made those modifications and I left it open. (In Dwarf Fortress mode, they successfully do tasks and mine now that I've implemented them as a playable race. Their fragility is unknown as of yet.)

EDIT: The tissue thickness does make sense, that's it! (further testing showed more intangibility) So what categories are there? The wiki says they're user-defined, but is that correct? (e.g. is there a list of premade body part categories that I can find?)

EDIT EDIT: Found a bunch of stuff in b_detail_plan_default, put in the stuff from there. Great news - it works! They are also about as weak as a wet paper bag that is also on fire but at least it works :D
« Last Edit: June 29, 2012, 10:24:50 pm by GoombaGeek »
Logged
My wooden badge was delicious.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #8 on: June 29, 2012, 10:25:43 pm »

They're ALL user-defined, but take a look at the default humanoid body parts and copy the categories you see there. See this here body detail plan file:

Code: [Select]
[BP_LAYERS:BY_CATEGORY:BODY:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BODY_UPPER:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BODY_LOWER:ARG3:50:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:GROWTH:ARG2:5:ARG1: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:LEG:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_UPPER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_LOWER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_FRONT:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_REAR:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FOOT:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FOOT_FRONT:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FOOT_REAR: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:WING:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TENTACLE:ARG3:50:ARG1:1]
[BP_LAYERS:BY_CATEGORY:CLAW:NAIL:100]
[BP_LAYERS:BY_CATEGORY:PINCER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TAIL:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:STINGER:ARG4:100]
[BP_LAYERS:BY_CATEGORY:SHELL:SHELL:100]
[BP_LAYERS:BY_CATEGORY:EYE:EYE:100]
[BP_LAYERS:BY_CATEGORY:TOOTH:TOOTH:100]
[BP_LAYERS:BY_CATEGORY:TUSK:IVORY:100]
[BP_LAYERS:BY_CATEGORY:NOSE:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:PROBOSCIS:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ANTENNA:ARG5:4:ARG1:1]
[BP_LAYERS:BY_CATEGORY:MANDIBLE:ARG4:25:ARG3:25:ARG2:5: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:GIZZARD:GIZZARD: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:HORN:ARG4:2:HORN:2]
[BP_LAYERS:BY_CATEGORY:FINGER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TOE:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FIN:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FLIPPER:ARG4:25:ARG3:25:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HUMP:ARG2:50:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LIP:ARG3:10:ARG2:5:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TONGUE:ARG3:10: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:HOOF:HOOF:100]
[BP_LAYERS:BY_CATEGORY:HOOF_FRONT:HOOF:100]
[BP_LAYERS:BY_CATEGORY:HOOF_REAR:HOOF:100]
[BP_LAYERS:BY_CATEGORY:SKULL:ARG4:100]

The part right after BY_CATEGORY is what you want for your categoryless bodyparts of that type.

GoombaGeek

  • Bay Watcher
  • Horrors! Crundles in the caverns!
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #9 on: June 29, 2012, 11:16:27 pm »

Finally, they work!

Now I need them to explode on death, which has been easy - I made a new metal called "creepite" whose boiling point is 10000 degrees (works out to 0 Celsius, right?) that creepers drop as an [ITEMCORPSE]. But it's not as lethal as I thought, only barely wounding weak test subjects like cows. Would a molten rock/something be more murderous?
Logged
My wooden badge was delicious.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help, my custom bodytype doesn't work
« Reply #10 on: June 30, 2012, 11:07:46 am »

Finally, they work!

Now I need them to explode on death, which has been easy - I made a new metal called "creepite" whose boiling point is 10000 degrees (works out to 0 Celsius, right?) that creepers drop as an [ITEMCORPSE]. But it's not as lethal as I thought, only barely wounding weak test subjects like cows. Would a molten rock/something be more murderous?

[MAT_FIXED_TEMP:15000]