Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding Ranged Weapons  (Read 828 times)

Urist McFluffles

  • Bay Watcher
    • View Profile
Modding Ranged Weapons
« on: May 12, 2015, 12:35:14 am »

So basically i'm trying to add a new gun to the game but every time I try using it in adventure or fortress mode the dwarves either don't pick it up or it says "you have nothing left to fire"

Spoiler (click to show/hide)

Spoiler (click to show/hide)
Logged

Propman

  • Bay Watcher
  • Eh.
    • View Profile
Re: Modding Ranged Weapons
« Reply #1 on: May 12, 2015, 12:41:23 am »

For one thing, the ammo class for your bullet is still an arrow, while your gun is specified to fire rounds. Change it to [CLASS:ROUND].
Logged
Quote from: from Pathos on April 07, 2010, 08:29:05 pm »
( It was inevitable, really. )

Delioth

  • Bay Watcher
  • Mass Gauntlet Wizard
    • View Profile
Re: Modding Ranged Weapons
« Reply #2 on: May 18, 2015, 01:46:55 am »

While you're at it, pop the MAXVEL up from that. It'll be a small thing at a small velocity- probably won't do so well (Or at least not as well as a gun should do. You might find it fine anyways, this is more of an opinion thing.)
Changing it to CLASS:ROUND should fix your ammo problem, though.
Logged
Help us write a story!
We're currently setting the scene and world- characters, civilizations, flora/fauna, cities, places, anything setting!
Products of my Boredom (Old)
Quote from: Shawtay
Delioth, you sir, are a wonderful, wonderful person.
When in doubt, Apply Magma

Aseaheru

  • Bay Watcher
  • Cursed by the Elves with a title.
    • View Profile
Re: Modding Ranged Weapons
« Reply #3 on: May 20, 2015, 10:37:09 am »

Heres a question that sort of ties into this: Is it possible to have a ranged weapon with a magazine, which when fired requires a longer reload?

And if so, if there is a way to allow the welder to load individual rounds into it when needed?
Logged
Highly Opinionated Fool
Warning, nearly incapable of expressing tone in text

Propman

  • Bay Watcher
  • Eh.
    • View Profile
Re: Modding Ranged Weapons
« Reply #4 on: May 20, 2015, 11:23:41 am »

I think at one point there was a DFhack script which could control the rate of fire for specific weapons, though I'm not sure what ever became of it. How well it would simulate these aspects is something I do not know, but the closest thing you get to reloading times in the raw is modding recovery times, which work for each individual firing, making them poor at simulting automatic weapons.
Logged
Quote from: from Pathos on April 07, 2010, 08:29:05 pm »
( It was inevitable, really. )

Aseaheru

  • Bay Watcher
  • Cursed by the Elves with a title.
    • View Profile
Re: Modding Ranged Weapons
« Reply #5 on: May 20, 2015, 11:35:59 am »

Well, lets hope that the Great and Powerful Toady eventually decides to add some variables that allow that. Possibly by nerfing the crossbow's speed and adding in a repeating crossbow? I dunno.
« Last Edit: May 20, 2015, 11:42:09 am by Aseaheru »
Logged
Highly Opinionated Fool
Warning, nearly incapable of expressing tone in text

scamtank

  • Bay Watcher
    • View Profile
Re: Modding Ranged Weapons
« Reply #6 on: May 20, 2015, 11:56:25 am »

the closest thing you get to reloading times in the raw is modding recovery times, which work for each individual firing, making them poor at simulting automatic weapons.

Well, no. Recovery times only apply to melee attacks.
Logged

Aseaheru

  • Bay Watcher
  • Cursed by the Elves with a title.
    • View Profile
Re: Modding Ranged Weapons
« Reply #7 on: May 20, 2015, 12:08:27 pm »

 So, as soon as you fire, you can shoot again, or does the shot already fired need to get removed from play first?

Because not it is looking as if Toady needs to add three or four new tags to ranged weapons...
Logged
Highly Opinionated Fool
Warning, nearly incapable of expressing tone in text

Propman

  • Bay Watcher
  • Eh.
    • View Profile
Re: Modding Ranged Weapons
« Reply #8 on: May 20, 2015, 12:53:41 pm »

the closest thing you get to reloading times in the raw is modding recovery times, which work for each individual firing, making them poor at simulting automatic weapons.

Well, no. Recovery times only apply to melee attacks.

Huh, through arena testing, I can confirm you are correct: changing the variables in ammo to higher or lower numbers did not effect the fire rate of two dwarves of equal skill when compared side by side and attacking a stationary target, meaning that altering it is entirely dependant on scripting.
Logged
Quote from: from Pathos on April 07, 2010, 08:29:05 pm »
( It was inevitable, really. )

Aseaheru

  • Bay Watcher
  • Cursed by the Elves with a title.
    • View Profile
Re: Modding Ranged Weapons
« Reply #9 on: May 20, 2015, 01:11:10 pm »

You can also tell from examples of two-melee attack ranged weaponry that are floating about in various mods...
Logged
Highly Opinionated Fool
Warning, nearly incapable of expressing tone in text

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Modding Ranged Weapons
« Reply #10 on: May 20, 2015, 08:49:11 pm »

So, as soon as you fire, you can shoot again, or does the shot already fired need to get removed from play first?

Because not it is looking as if Toady needs to add three or four new tags to ranged weapons...
When you fire in adventurer mode, and this probably applies to others firing as well, you fire the projectile instantly, and then sit still for five minutes reloading the weapon as you get brutally murdered by enemies that, when you fired, were an entire screen away.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia