Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Making a weapon accept ammo  (Read 931 times)

Wiles

  • Bay Watcher
    • View Profile
Making a weapon accept ammo
« on: November 22, 2007, 10:03:00 pm »

I'm having a hard time making my modded crossbow to accept the proper ammunition. I can make the ammunition, and the weapon, but my gnome just runs off trying to kill things in melee. I wanted to make it work like a crossbow with a blade affixed to the end so I changed the normal hammer to spear. Would that mess with things?

code:
[ITEM_WEAPON:ITEM_WEAPON_GNOMISH_CROSSBOW]
[NAME:gnomish crossbow:gnomish crossbows]
[DAMAGE:80:PIERCE]
[WEIGHT:35]
[SKILL:SPEAR]
[RANGED:CROSSBOW:GNOMISH_BOLT]
[TWO_HANDED:0]
[MINIMUM_SIZE:4]
[MATERIAL_SIZE:3]


[ITEM_AMMO:ITEM_AMMO_GNOMISH_BOLT]
[NAME:gnomish bolts:gnomish bolts]
[CLASS:BOLT]
[DAMAGE:150:PIERCE]


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

Logged

Zurai

  • Bay Watcher
    • View Profile
Re: Making a weapon accept ammo
« Reply #1 on: November 22, 2007, 10:34:00 pm »

You also have to add the ammo type to your civilized creature's raw file. Take a look at entity_default.txt for examples.
Logged

Wiles

  • Bay Watcher
    • View Profile
Re: Making a weapon accept ammo
« Reply #2 on: November 22, 2007, 10:43:00 pm »

I do have it in there. I can build the ammo. What  I can't figure out is why the gnome won't use it in his crossbow.
Logged

Karlito

  • Bay Watcher
    • View Profile
Re: Making a weapon accept ammo
« Reply #3 on: November 23, 2007, 12:43:00 am »

my theory is that the [RANGED:CROSSBOW:GNOMISH_BOLT] is the problem.  I suspect that where GNOMISH_BOLT is it should simply say BOLT.  Its probably a [CLASS] definition rather than a [NAME] definition.
Logged
This sentence contains exactly threee erors.

Wiles

  • Bay Watcher
    • View Profile
Re: Making a weapon accept ammo
« Reply #4 on: November 23, 2007, 12:57:00 am »

Brilliant! That worked great. Thanks  :)
Logged

Karlito

  • Bay Watcher
    • View Profile
Re: Making a weapon accept ammo
« Reply #5 on: November 23, 2007, 12:58:00 am »

You're welcome.   :)
Logged
This sentence contains exactly threee erors.