Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Having trouble with custom body part.  (Read 1189 times)

Wiles

  • Bay Watcher
    • View Profile
Having trouble with custom body part.
« on: November 27, 2007, 04:24:00 pm »

I've been fiddling around trying to make a creature able to attack with a body part I modded in. When I go to test it out in adventure mode, the bodypart is attached but I can't attack with them.

I tried two different methods (I have no idea what I'm doing, just trial and error). I also had [ATTACKFLAG_WITH] at one point and various other things. I'm probably missing something simple

code:
[ATTACK:MAIN:BYTYPE:RWINGCLAW:stab:stabs:1:6:PIERCE]
   
[ATTACK:MAIN:BYTOKEN:RWINGCLAW:stab:stabs:1:6:PIERCE]  

Here's the body part in question

code:
[BODY:2CLAW_WINGS]
[BP:RWING:right wing][CONTYPE:UPPERBODY][LIMB]
[FLIER]
[BP:LWING:left wing][CONTYPE:UPPERBODY][LIMB]
[FLIER]
[BP:RWINGCLAW:right wing claw][CONTYPE:RWING]

[BP:LWINGCLAW:left wing claw][CONTYPE:LWING]

Logged

Wiles

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #1 on: November 27, 2007, 09:31:00 pm »

I'm stumped! I've been trying different things all night and to no avail. Here's what I have so far. Not sure what I'm doing wrong.

code:
 creature_custom

[OBJECT:CREATURE]

[CREATURE:SUCCUBUS]
   [NAME:Succubus:Succubi:Succubus]
   [TILE:'S'][COLOR:5:0:1]
   [MODVALUE:20]
   [FANCIFUL]
   [TRAPAVOID][CAN_LEARN][CAN_SPEAK][FIREIMMUNE]
   [LIKES_FIGHTING]
   [GENPOWER:5]
   [BLOODTYPE:0]
   [CANOPENDOORS]
   [BUTCHERABLE_NONSTANDARD][EVIL]
   [NOFEAR][NOEXERT]
   [PREFSTRING:bewitching beauty]
   

[BODY:HUMANOID:2CLAW_WINGS:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS:THROAT:NECK:SPINE:BRAIN:5FINGERS:5TOES:MOUTH]

   [SIZE:9]
   [ATTACK:MAIN:BYTOKEN:RWINGCLAW:stab:stabs:2:6:PIERCE][ATTACKFLAG_WITH]
   [ATTACK:MAIN:BYTOKEN:LWINGCLAW:stab:stabs:2:6:PIERCE][ATTACKFLAG_WITH]
   [NO_DRINK][NO_EAT][NO_SLEEP]
   [ALL_ACTIVE]
   [DAMBLOCK:3]
   [FEMALE]
   [STANDARD_FLESH]
   [HOMEOTHERM:10069]
   [SWIMS_INNATE][SWIM_SPEED:2500]
   [PERSONALITY:IMMODERATION:100:100:100]
   [PERSONALITY:FRIENDLINESS:0:0:0]
   [PERSONALITY:CHEERFULNESS:0:0:0]
   [PERSONALITY:TRUST:0:0:0]
   [PERSONALITY:STRAIGHTFORWARDNESS:0:0:0]
   [PERSONALITY:ALTRUISM:0:0:0]
   [PERSONALITY:COOPERATION:0:0:0]
   [PERSONALITY:SYMPATHY:0:0:0]


and

code:
  body_custom

[OBJECT:BODY]

[BODY:2CLAW_WINGS]
[BP:RWING:right wing][CONTYPE:UPPERBODY][LIMB]

[FLIER]
[BP:LWING:left wing][CONTYPE:UPPERBODY][LIMB]
[FLIER]
[BP:RWINGCLAW:right wing claw][CONTYPE:RWING]

[BP:LWINGCLAW:left wing claw][CONTYPE:LWING]

Logged

Karlito

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #2 on: November 28, 2007, 12:49:00 am »

not certain but from what I've seen the BYTYPE in creatures is always an added on flag from the body part.  e.g. GRASP,MOUTH,THOUGHT.  

If you added the [FLIER] tag to the claw instead and put BYTYPE:FLIER instead it might work.  Probably not exactly what you wanted, but it should work.

Logged
This sentence contains exactly threee erors.

Wiles

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #3 on: November 28, 2007, 08:45:00 am »

Thanks. I may end up doing that, since I have no idea how to get [bytoken] to work
Logged

Wiles

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #4 on: November 28, 2007, 03:36:00 pm »

Trying to understand why I can't use the wing claw to attack I decided to look at other creatures that have bodyparts other than hands and mouth that attack.

I made the minotaur playable, and did not modify it's bodypart or attacks at all to see if it would work. I could not get the minotaur to use it's horn attacks.

I have never played adventure mode much so I might be missing something simple. Is there a way to choose attacks in adventure mode? I know you can switch from attack to wrestle.

Has anyone else had luck with their custom creatures attacks?

Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Having trouble with custom body part.
« Reply #5 on: November 28, 2007, 04:16:00 pm »

My hornets sting whit a custom body part and also inject poison fine

bodypart;
[BODY:INSECT_STING]
[BP:STING:sting][CONTYPE:LOWERBODY]
[BP:PGLAND:venom gland][CONTYPE:LOWERBODY][INTERNAL][SMALL]
   
body;
[BODY:WASP:INSECT_STING:4WINGS:2EYES:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:MOUTH]
   
attack;
[ATTACK:MAIN:BYTOKEN:STING:sting:stings:5:25:PIERCE][ATTACKFLAG_WITH][SPECIALATTACK_INJECT_EXTRACT:500:1000]
[ATTACK:MAIN:BYTYPE:MOUTH:bite:bites:3:6:SLASH][ATTACKFLAG_CANLATCH]

[ November 28, 2007: Message edited by: Armok ]

Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Karlito

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #6 on: November 28, 2007, 07:12:00 pm »

quote:
Originally posted by Wiles:
<STRONG>Trying to understand why I can't use the wing claw to attack I decided to look at other creatures that have bodyparts other than hands and mouth that attack.

I made the minotaur playable, and did not modify it's bodypart or attacks at all to see if it would work. I could not get the minotaur to use it's horn attacks.

I have never played adventure mode much so I might be missing something simple. Is there a way to choose attacks in adventure mode? I know you can switch from attack to wrestle.

Has anyone else had luck with their custom creatures attacks?</STRONG>


Creatures will use their primary attack unless they are missing that body part or are using it to grab something else, in which case they will use their secondary attack.

Logged
This sentence contains exactly threee erors.

Wiles

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #7 on: November 28, 2007, 08:45:00 pm »

Yeah, I removed all other attacks and my adventurer would "push" people   :)

I'm going to try again from scratch, because I know it should work, I'm just not sure what I messed up on. If I can't figure it out I'll go with your earlier suggestion.

I'm enjoying learning to mod, even though I don't do too well yet.
I tried making a centaur civ earlier and they crashed DF on worldgen   :D

Logged

Wiles

  • Bay Watcher
    • View Profile
Re: Having trouble with custom body part.
« Reply #8 on: November 28, 2007, 10:38:00 pm »

I changed

code:
[BP:RWINGCLAW:right wing claw][CONTYPE:RWING]

[BP:LWINGCLAW:left wing claw][CONTYPE:LWING]
 

To

code:
 [BP:RWINGCLAW:right wing claw][CONTYPE:UPPERBODY]

[BP:LWINGCLAW:left wing claw][CONTYPE:UPPERBODY]

And it worked.

I can't figure out why it would work attached to the upperbody, but not to the wings.

EDIT: EUREKA! I found my problem. I was using [CONTYPE] to attach the claw to the wing when I should have been just using [CON]   :D

I knew it would be something simple!

[ November 29, 2007: Message edited by: Wiles ]

Logged
Pages: [1]