Bay 12 Games Forum

Please login or register.

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

Author Topic: Modding throwing knives  (Read 1420 times)

durt101

  • Bay Watcher
    • View Profile
Modding throwing knives
« on: October 25, 2009, 02:39:00 am »

This is my second thread on modding in throwing knives, a new weapon. The last thread fell off the first page since I left it, so I'm starting this one.
Long story short - these are the current relevant raws:

Spoiler (click to show/hide)

And when I start adventure mode as humans, no option for knife-throwing skill is available. Why not?
And can anyone check mah work? Thanks dudes.
Logged

Sheb

  • Bay Watcher
  • You Are An Avatar
    • View Profile
Re: Modding throwing knives
« Reply #1 on: October 25, 2009, 03:31:25 am »

You cannot create new skills. Beside, your belt work with the HAMMER skill. And finally, as adventurer, you don't need the belt. You can just buy/steal a stack of throwing knives and [t]hrow them.

Finally, I suggest modding a throwing glove rather than a belt. At least if you don't want your thrower to be holding a belt in their hand all the time.
Logged

Quote from: Paul-Henry Spaak
Europe consists only of small countries, some of which know it and some of which don’t yet.

BlazingDav

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #2 on: October 25, 2009, 04:03:06 am »

You could just add the [RANGED:THROWING:KNIFE] to every other appropiate weapon, then melee fighters would throw any knives they have on them before they enter into combat, which actually seems kind of cool, though throwing axes may be more appropiate for dwarves XP
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #3 on: October 25, 2009, 04:38:18 am »

You cannot create new skills. Beside, your belt work with the HAMMER skill. And finally, as adventurer, you don't need the belt. You can just buy/steal a stack of throwing knives and [t]hrow them.

Finally, I suggest modding a throwing glove rather than a belt. At least if you don't want your thrower to be holding a belt in their hand all the time.
Actually [SKILL:HAMMER] is for when the belt is used as a melee weapon, crossbows have this in vanilla. [RANGED:THROWING:KNIFE] determines the skill used when using it to fire the ammo.
And when I start adventure mode as humans, no option for knife-throwing skill is available. Why not?
And can anyone check mah work? Thanks dudes.
I don't think CAN_STONE is a valid AMMO token. Using THROWING would prevent your creatures from using them in fortress mode. You have to use CROSSBOW as the RANGED skill for that.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Modding throwing knives
« Reply #4 on: October 25, 2009, 05:23:28 am »

The correct skill name is DAGGER, not KNIFE, as you can see from the list of weapon skills from the String Dump:

UNARMED
AXE
SWORD
DAGGER
MACE
HAMMER
SPEAR
CROSSBOW
PIKE
WHIP
BOW
BLOWGUN
Logged

Chronas

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #5 on: October 25, 2009, 06:56:47 am »

and might i add that the only ranged weapon (skill tag) supported by the fort mode UI is CROSSBOW, not to mention that firing a knife from your belt in adv mode will have the exact same outcome as just plain throwing it.
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...
It should be pretty fun though.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Modding throwing knives
« Reply #6 on: October 25, 2009, 11:01:08 am »

I think that throwing is a bit faster than firing a crossbow, but I am not sure.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Modding throwing knives
« Reply #7 on: October 25, 2009, 11:59:47 am »

not to mention that firing a knife from your belt in adv mode will have the exact same outcome as just plain throwing it.

Except it'll train a different skill, which is kind of appealing.
Logged

Chronas

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #8 on: October 25, 2009, 06:10:18 pm »

to work in fort it will just be a fancy way of saying 'crossbow', the appealing different skill defies the original purpose, which was... wait....
what was your intention in making a throwing knife belt?
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...
It should be pretty fun though.

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Modding throwing knives
« Reply #9 on: October 26, 2009, 11:12:29 am »

and might i add that the only ranged weapon (skill tag) supported by the fort mode UI is CROSSBOW, not to mention that firing a knife from your belt in adv mode will have the exact same outcome as just plain throwing it.
Not quite correct; any skill can be put under [RANGED].  But to use the weapon in fortress mode, it needs to be one of the six default skills (being set to unarmed means they do not seek a weapn; weapons with unarmed skill won't be picked up).  You could mod crossbows to use the hammer skill at range, and then you hammer dwarves will be able to get legendary by sparring and then fight at range.

And the weapon skill is THROW, not THROWING, according to the string dump.

not to mention that firing a knife from your belt in adv mode will have the exact same outcome as just plain throwing it.

Except it'll train a different skill, which is kind of appealing.
No, it'll train throwing when fired, because that is the skill used for ranged combat.  In melee, it will train something else, but not when throwing the knives.

The [RANGED:THROWING:KNIFE] (was intended to) define it as a weapon that uses the throwing skill and use ammo belonging to the KNIFE class that is defined under the ammo entry.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Modding throwing knives
« Reply #10 on: October 26, 2009, 12:13:30 pm »

Whoops, yeah, I was thinking about the way I'd do it rather than how the OP did.  So yeah, I guess it will have pretty much the same outcome.
Logged

durt101

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #11 on: October 26, 2009, 08:23:48 pm »

Wow, a crapton of posts.
First, I modded in the belt to be a "weapon holder" for the throwing knives (I realize that there are large daggers in the game, these are different). I thought that, following the format of crossbows, you have a weapon, then to you need a corresponding ammo. Thus, I made a knife belt (not they'd be holding the belt).
Thanks for telling me the skill is [THROW], I'll bookmark that string dump.

So, my first question is: do I need a weapon from which to fire the ammo? If I modded in a hand-thrown knife, would I need to mod a corollary weapon, or will the ammo be "fired" - thrown - from the hand? How would I code such ammo?
*le gasp*! would modding in a weapon [THROWING_KNIFE], with a dagger skill, and modding in an entry that's the same, ALSO as ammo, make it be thrown, then fought with at close range?
Will the wielder of such a tool only throw it or only stab with it? Would they throw until the last one, then stab? Are there any other buggy possibilities to this solution?
Sorry that this is so convoluted, it's hard to explain. Thanks again for the awesome help.
Logged

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Modding throwing knives
« Reply #12 on: October 26, 2009, 08:31:42 pm »

I don't think you can make a weapon into a type of ammo - they're two different item types, and I've had problems before in trying to make one matgloss entry with aspects of two types of matglosses.  Giving seperate weapon and ammo entries the same entry title would probably cause duplication issues, but even if it didn't it would definitely not work the way you want it to.

You could make the knife ammo, and then make another knife that acts as a launcher for it.  It could have [THROW] for ranged and [DAGGER] for melee (as long as both entries have different titles.  Otherwise, they can have the same damage values).
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

durt101

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #13 on: October 26, 2009, 08:39:42 pm »

I don't think you can make a weapon into a type of ammo - they're two different item types, and I've had problems before in trying to make one matgloss entry with aspects of two types of matglosses.  Giving seperate weapon and ammo entries the same entry title would probably cause duplication issues, but even if it didn't it would definitely not work the way you want it to.

You could make the knife ammo, and then make another knife that acts as a launcher for it.  It could have [THROW] for ranged and [DAGGER] for melee (as long as both entries have different titles.  Otherwise, they can have the same damage values).

Yeah, but that's my question. I'm okay with doing that, but if I do, then the last knife, the launcher knife, will be retained permanently for stabbing. Which makes more sense I guess, so I'll be content with that. I'll just mod in a throwing knife ammo under the dagger.
You guys were awesome. Thanks a ton.
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Modding throwing knives
« Reply #14 on: October 26, 2009, 08:42:19 pm »

So, my first question is: do I need a weapon from which to fire the ammo? If I modded in a hand-thrown knife, would I need to mod a corollary weapon, or will the ammo be "fired" - thrown - from the hand? How would I code such ammo?
In adventure mode anything can be thrown by hand. (Last night I threw an alligator corpse at a titan.) This includes any ammo.

In fortress mode, I have never seen any creature throw anything. So, in order to have the  throwing knives be used as ranged weapon, you would need the corollary weapon, your belt in this case.
*le gasp*! would modding in a weapon [THROWING_KNIFE], with a dagger skill, and modding in an entry that's the same, ALSO as ammo, make it be thrown, then fought with at close range?
Will the wielder of such a tool only throw it or only stab with it? Would they throw until the last one, then stab? Are there any other buggy possibilities to this solution?
Sorry that this is so convoluted, it's hard to explain. Thanks again for the awesome help.
In short, this would not work. The two items would be considered as completely different by the game.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.
Pages: [1] 2