Ranged melee weapons?

so let’s begin by saying I have very little in the way of computer skills. let’s just let that sink in :slight_smile:

i’ve been trying to make a bull whip to put in the game, and i can get it to spawn via debug so it works. but it got me thinking that weapons like whips and awl pikes are really made for striking before the enemy closes into melee range, and are weaker, or at least damage differently, when in close range. so i dabbled in trying to get a bull whip to work with an extra tile of reach by modelling it off a bow - but of course there’s the issue of ‘ammo’ - which melee weapons don’t use. there was some more computer dabbling but i haven’t had any success.

has anyone got any ideas of how to extend the reach/range of a melee weapon?

you could just have it give you a extra hit. But, eh…Thats the cheap way of doing it xD

You could add in another weapon trait/skill/thing that, when it is present on a weapon, makes it call an overloaded version of the shoot method that does not require ammo.

Yea, basically the last, you’d give the item a flag indicating that it has reach (let’s go with “reach”) call game::target() and hook it up to calling game::target() directly at some point, you’d need to attach it to a shortcut to trigger it since you can’t “bump to attack”, at least to get it working just call it from 'f’ire, but check on the flag and shunt around the normal gun firing method.

We’ve been debating doing something like this for a while now, GlyphGryph is pretty strenuously against it, and I’m on the fence about it. I don’t have a particularly good feel about the rest of the developers, I get the impression that it’s some kind of for/against split.

thanks for the advice - very succinct!

i was wondering why something similar hadn’t come up, didn’t know there was controversy on the subject. at the moment i’ve just been fiddling with the json files to get the whip balanced, and was hoping there was a hack there somehow to increase its reach. oh well, looks like it’s time to get in to codeblocks begins reading newbie guide though i predict doomed failure.

i think adding reach to some weapons will add a lot of flavour and playing styles, once balanced. i’m sure there will be some exploits, but what zed hoard currently can’t be killed with a window and a 2x4. that’s until fatigue comes in, right? :slight_smile:

[quote=“Tripsky, post:5, topic:2631”]thanks for the advice - very succinct!

i was wondering why something similar hadn’t come up, didn’t know there was controversy on the subject. at the moment i’ve just been fiddling with the json files to get the whip balanced, and was hoping there was a hack there somehow to increase its reach. oh well, looks like it’s time to get in to codeblocks begins reading newbie guide though i predict doomed failure.

i think adding reach to some weapons will add a lot of flavour and playing styles, once balanced. i’m sure there will be some exploits, but what zed hoard currently can’t be killed with a window and a 2x4. that’s until fatigue comes in, right? :)[/quote]

This should be sufficient to allow you to make it work. Honestly, you might want to just copy over a lot of the shooting code, and modify it from there.

http://is.ptithcm.edu.vn/~tdhuy/Programming/AbsoluteC++.pdf

well what I wanted to see for longer weapons was a defensive bonus against enemies because you can keep them at a distance, and the ability to do better with a kind of “defensive attack” I’ve been working on. But that doesn’t really apply to weapons like whips or slungshots which are honestly more similar to an immeditely retrievable thrown weapon. For those I think such a sytem might make sense.

We have ranged weapons that don’t use their hardcoded ammo and can’t be reloaded. so it should be too hard.

Why don’t you just code a script which evokes throwing copy of the weapon which immediately breaks when it reaches the target?
I don’t think it would be too hard, just adding an if_then_else in fire function and splitting it into the classic firing and this thing for weapons with “long” attribute.

so i had a look at the source code. i think i will have to have a longer look into C++ before i attempt anything - or can attempt anything.

Its something that was discussed before to make more melee weapons viable. A range bonus seems to be the way to go.
Atm its Rapier, katana, combat knife and Martial arts or GTFO. The rest of the weapons arent that good or useful. Even the awl pike, maces, sledgehammers are crippling rather than making you stronger. Dont be fooled by the high dammage numbers. They wont do that much more than other weapons (some did lower dammage than the rapier) but are slow as hell making them useless.