Ranged Weapon Melee Penalties


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Monday, 19th March 2012, 16:25

Ranged Weapon Melee Penalties

Are the penalties for attacking melee while wielding a ranged weapon scaled based on the weapon or take into consideration Unarmed Combat?

I ask because I am currently wielding a cursed sling (D9 and still not one Remove Curse scroll! Didn't realize it was an artifact b/c I'm playing near-trunk and all artefacts are showing up as "@description_needed" or somesuch) and I have 8 Unarmed Combat skill and am having little to no success in melee. I'd assume having a sling clenched in my fist wouldn't interfere THAT MUCH with melee combat. It's not like I'm trying to bean the monster over the head with an empty sling; I'm punching him with that sling in whatever way it's in my hand.

I can understand a crossbow being a bigger burden in the hands to conduct melee (though if used, it'd do more physical damage than, say, a sling), but a sling should be a minor penalty at worst.

Is it trying to use my Slings skill to hit the monster? That's nonsensical if so.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Shoals Surfer

Posts: 312

Joined: Thursday, 9th June 2011, 19:12

Post Monday, 19th March 2012, 16:35

Re: Ranged Weapon Melee Penalties

"You lash the orc with your sling"
The orc says "not my kink, sorry"

For this message the author Yet Another Stupid Noob has received thanks:
MyOtheHedgeFox
User avatar

Vestibule Violator

Posts: 1459

Joined: Sunday, 19th December 2010, 05:45

Location: New England

Post Monday, 19th March 2012, 17:05

Re: Ranged Weapon Melee Penalties

I don't know the exact formulas, but yes, making mele attacks with ranged weapons is not ideal.

This is somewhat of a moot point for ranged weapons users however, as there is no penalty to making a ranged attack at 0 range (So sling away!). Personally, I think it would make more sense if there was some penalty for trying to draw and fire your bow literally in an orc's face as he attacks you. Presumably this is why most ranged monsters switch to a mele weapon when adjacent to you, barring bowmasters, who are obviously just that good. (Not that there is a penalty, the AI just behaves as if trying to get a shot off at point blank range is a bad idea).

Not a moot point for melee users who make the mistake of wielding a cursed launcher, they're stuck with something they may not have the skill or ammo to use appropriately.

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Monday, 19th March 2012, 17:19

Re: Ranged Weapon Melee Penalties

It does no (base) damage, like hitting things with any other non-weapon. The "clumsily bash" message wasn't being properly displayed though, that's fixed now.
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Monday, 19th March 2012, 21:58

Re: Ranged Weapon Melee Penalties

mageykun wrote:I don't know the exact formulas, but yes, making mele attacks with ranged weapons is not ideal.

This is somewhat of a moot point for ranged weapons users however, as there is no penalty to making a ranged attack at 0 range (So sling away!).


This was a special case where (1) the description was buggy and misleading due to a bug and (2) I got cursed by it because of such (it looked like it read "uncursed" at a glance) and (3) I wasn't carrying any ammo, nor could I find any because I had nemelex-sacrificed all prior ammo for piety.

mageykun wrote:Personally, I think it would make more sense if there was some penalty for trying to draw and fire your bow literally in an orc's face as he attacks you. Presumably this is why most ranged monsters switch to a mele weapon when adjacent to you, barring bowmasters, who are obviously just that good. (Not that there is a penalty, the AI just behaves as if trying to get a shot off at point blank range is a bad idea).

Not a moot point for melee users who make the mistake of wielding a cursed launcher, they're stuck with something they may not have the skill or ammo to use appropriately.


I agree that point-blank missile weapons should be penalized at low skill (penalty eliminated at high skill), but I also think the melee penalty for attacking while wielding a ranged weapon need to be adjusted and compensate for a slightly penalized Unarmed Skill (secondary attacks notwithstanding).
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Spider Stomper

Posts: 195

Joined: Monday, 25th April 2011, 20:48

Post Tuesday, 20th March 2012, 02:21

Re: Ranged Weapon Melee Penalties

Re: point-blank shooting: My proposal is that for ranged weapons, the attack delay happens before the shot instead of after, and that any interruption-like event (primarily getting hit or taking damage, but there are probably other kinds) cancels the ranged attack.

So it'd look like this:
  Code:
[you press the button to fire]
You draw your bow, and prepare to fire.
[attack delay]
You shoot a +0 arrow.

or:
  Code:
You draw your bow, and prepare to fire.
The goblin hits you with a dagger. Your shot is interrupted!


Some balancing knobs to tweak:
  • Attack delay decreases with higher ranged skill, so with the proposal implemented exactly as above you would be less likely to be interrupted before you complete your shot.
  • Let the chance of being interrupted by damage decrease with the appropriate ranged skill.
  • Let only a fraction of the attack delay happen before the shot, and the rest after. Bonus points if the pre-delay to post-delay ratio differs by weapon type.

Ideally I'd like to see magic spells under a similar interruptible delay system, but that may be too game-ruining for early magic-using characters, or encourage tedious kiting.
User avatar

Abyss Ambulator

Posts: 1189

Joined: Friday, 28th January 2011, 21:45

Post Tuesday, 20th March 2012, 06:50

Re: Ranged Weapon Melee Penalties

I'd imagine Crossbows would have a quick pre-shot delay and long post-shot delay. It's just a point and click interface for shooting, but you have to place a new bolt and rewind the crossbow to reload it.

Bows and slings would make sense with a longer pre-shot delay. The bow you need to draw the arrow and aim. Reloading it you just reach back into your quiver for another arrow. The sling you need to spin it for momentum before releasing the rock. Reloading it is just putting one in the sling.

Blowguns, maybe even? Sticking a dart in a blowgun is a quick task, as is aiming and blowing some air.

Throwing weapons... well, I'd say about even too. Tossing something is fast, as is picking up another whatever to toss.
The best strategy most frequently overlooked by new players for surviving: not starting a fight to begin with.

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Tuesday, 20th March 2012, 14:24

Re: Ranged Weapon Melee Penalties

I'm not sure what the gain is from adding even more complicated delays to ranged weapons, really (whether at point blank or not).

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Tuesday, 20th March 2012, 14:57

Re: Ranged Weapon Melee Penalties

I think it was an attempt at a subtle nerf of ranged weapons. Intuitively, it seems like a bad idea to fire missiles at point blank range, but there's no mechanical drawback apart from being vulnerable to melee attacks from your opponent.

I don't know what XuaXua was going on about with unarmed combat, though.

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Tuesday, 20th March 2012, 15:59

Re: Ranged Weapon Melee Penalties

There are probably much better ways to nerf them if they need it than to add a lot of unnecessary complexity.
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Tuesday, 20th March 2012, 18:23

Re: Ranged Weapon Melee Penalties

BlackSheep wrote:I don't know what XuaXua was going on about with unarmed combat, though.


I'm referring to using Unarmed Combat in melee as a default (penalized) when wielding a missle weapon for the purposes of melee (read: hand to hand combat).

Use a unarmed combat skill with a to-hit penalty and a damage penalty when attacking MELEE while wielding a missile weapon in a hand, whether intentional or not (cursed). Curve the penalty based on the weapon held (100% penalty when wielding a crossbow, 50% when wielding a longbow, 10% penalty when wielding a sling, 0% when wielding a rock).

Potentially have separate penalties for to-hit and damage.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Tuesday, 20th March 2012, 18:54

Re: Ranged Weapon Melee Penalties

Why limit that to just missile weapons?
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Tuesday, 20th March 2012, 19:01

Re: Ranged Weapon Melee Penalties

BlackSheep wrote:Why limit that to just missile weapons?


I wasn't going to be so bold.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Tuesday, 20th March 2012, 19:12

Re: Ranged Weapon Melee Penalties

Attacking with a non-weapon means you get zero base damage. Much clearer and simpler than using some completely unrelated skill but with obscure, variable penalties.

For this message the author Kate has received thanks: 2
njvack, pivotal
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Tuesday, 20th March 2012, 20:07

Re: Ranged Weapon Melee Penalties

MarvinPA wrote:Attacking with a non-weapon means you get zero base damage.


That's great. What's the to-hit?
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Tuesday, 20th March 2012, 20:38

Re: Ranged Weapon Melee Penalties

Whatever your regular to-hit with no weapon bonuses is.
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Tuesday, 20th March 2012, 21:18

Re: Ranged Weapon Melee Penalties

MarvinPA wrote:Whatever your regular to-hit with no weapon bonuses is.


And is that based on a skill?
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Tuesday, 20th March 2012, 21:49

Re: Ranged Weapon Melee Penalties

Fighting skill contributes to it, yes. melee_attack.cc can probably answer questions, also.

For this message the author Kate has received thanks:
njvack
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Tuesday, 20th March 2012, 23:14

Re: Ranged Weapon Melee Penalties

So... someone with Unarmed 27 puts a grape or choko in his hand and attempts to attack melee and uses SK_Unarmed_Combat.
That's fine.

Someone with Unarmed 27 and no ammo puts a sling in his hand and attempts to attack melee and uses SK_Slings for striking. Totally makes sense.

Granted I just checked several files for the source to weapon_skill to see what it returns and can't locate it. Only damage in that source file you reference refers to ranged weapons.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Tuesday, 20th March 2012, 23:48

Re: Ranged Weapon Melee Penalties

nonsense.
When using anything else than a proper weapon (launcher, food, scroll,...) the only skill that factors in is fighting. UC and launcher skills have no effect when meleeing with a non-weapon.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Wednesday, 21st March 2012, 01:35

Re: Ranged Weapon Melee Penalties

galehar wrote:nonsense.
When using anything else than a proper weapon (launcher, food, scroll,...) the only skill that factors in is fighting. UC and launcher skills have no effect when meleeing with a non-weapon.


So...

  Code:
wpn_skill       = weapon ? weapon_skill(*weapon) : SK_UNARMED_COMBAT;


doesn't mean "if this is a weapon, give me the weapon skill associated with this weapon, otherwise give me the unarmed combat skill and assign this as the weapon skill" ?

To me, that reads as "if I have a sword or crossbow, give me the sword or crossbow skill, otherwise if I have a choco, deck of cards or nothing in my hands, give me unarmed combat", which is great except that crossbow skill shouldn't dictate how well I fight in melee with a crossbow; it should default to unarmed like the choco and deck do."
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Wednesday, 21st March 2012, 01:55

Re: Ranged Weapon Melee Penalties

No, it means if you have something in your weapon slot, find the relevant weapon skill. If you have nothing equipped, use UC.

EDIT: Found the weapon_skill function in itemprop.cc: it only returns a weapon skill if an item is a weapon and is not a ranged weapon (or is a rod/stave). Otherwise, it just returns Fighting, like galehar said.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 21st March 2012, 07:11

Re: Ranged Weapon Melee Penalties

XuaXua wrote:
galehar wrote:nonsense.
When using anything else than a proper weapon (launcher, food, scroll,...) the only skill that factors in is fighting. UC and launcher skills have no effect when meleeing with a non-weapon.


So...

  Code:
wpn_skill       = weapon ? weapon_skill(*weapon) : SK_UNARMED_COMBAT;


doesn't mean "if this is a weapon, give me the weapon skill associated with this weapon, otherwise give me the unarmed combat skill and assign this as the weapon skill" ?

It does, but then you have to look at how this variable is used.

  Code:
int melee_attack::player_apply_weapon_skill(int damage)
{
    if (weapon && (weapon->base_type == OBJ_WEAPONS
                   && !is_range_weapon(*weapon)
                   || weapon->base_type == OBJ_STAVES))
    {
        damage *= 2500 + (random2(you.skill(wpn_skill, 100) + 1));
        damage /= 2500;
    }

    return (damage);
}
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Wednesday, 21st March 2012, 13:08

Re: Ranged Weapon Melee Penalties

galehar wrote:
XuaXua wrote:So...

  Code:
wpn_skill       = weapon ? weapon_skill(*weapon) : SK_UNARMED_COMBAT;


doesn't mean "if this is a weapon, give me the weapon skill associated with this weapon, otherwise give me the unarmed combat skill and assign this as the weapon skill" ?

It does, but then you have to look at how this variable is used.

... snip damage calculation code...



That damage calculation code really take into account some manner of the size of the non-weapon object used; brass knuckles anyone?

Back on topic, every post I've made (except this one) has always been referring to how a weapon skill affects the "to-hit" chance, especially since I started this thread not even realizing weapon skill factors into damage.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Wednesday, 21st March 2012, 15:40

Re: Ranged Weapon Melee Penalties

If you're using a non-melee weapon in melee, what you're wielding doesn't factor into the to-hit calculation. It uses dex modified by strength as a base, then factors in:
Fighting skill
slaying bonuses
amulet of inaccuracy
invisible target
starving status
armour penalty
eyeball mutation

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Wednesday, 21st March 2012, 16:30

Re: Ranged Weapon Melee Penalties

Yeah, not unless you're getting in a stab, berserking or under the effect of a might potion.

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Wednesday, 21st March 2012, 16:57

Re: Ranged Weapon Melee Penalties

As has been explained multiple times already: weapon and unarmed combat skills have no effect at all on anything at all when using a non-weapon (this includes launchers) in melee. All non-weapons (this includes launchers) do zero damage in melee.

I see no reason to change any of that.
User avatar

Barkeep

Posts: 4435

Joined: Tuesday, 11th January 2011, 12:28

Post Thursday, 22nd March 2012, 14:15

Re: Ranged Weapon Melee Penalties

MarvinPA wrote:As has been explained multiple times already: weapon and unarmed combat skills have no effect at all on anything at all when using a non-weapon (this includes launchers) in melee. All non-weapons (this includes launchers) do zero damage in melee.

I see no reason to change any of that.


Is the "wield nonweapon before Mara clones you" thing a real trick, or is that apocryphal? The description of my clone doesn't, IIRC, include a wielded weapon at all...
I am not a very good player. My mouth is a foul pit of LIES. KNOW THIS.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Thursday, 22nd March 2012, 15:53

Re: Ranged Weapon Melee Penalties

It works. Wielding a bread ration causes the clone to do next to no damage. (I say next to no because when I took off all armor, it was able to plink me for like 1 HP per turn.)

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.