CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.65k stars 4.18k forks source link

RELOAD_AND_SHOOT weapons do not display the move cost of loading them with ammo in the 'f'ire menu, and lock you into loading ammo dangerously. #54997

Closed VitreousEyes110 closed 5 months ago

VitreousEyes110 commented 2 years ago

Describe the bug

Weapons such as bows and slings that are loaded with each firing do not display the cost of loading the ammo into the weapon in the 'f'ire menu. After the fire menu is entered and the ammo is selected, pressing '.' or 'a/c/p' results in extra movement points being spent on obtaining the ammo from its container without having displayed that information to the player, and with no way to stop loading the ammo even if in danger/hurt. This combined with a container that is slow to get items from could result in a potentially lethal amount of time passing with no way to opt out.

Related to #54973 RELOAD_AND_SHOOT weapons have something weird going on in general when it comes to loading and unloading ammo within the 'f'ire menu.

Steps to reproduce

  1. Create a character, give them:
    • A slingshot
    • A short rope
    • Several pebbles, inside the short rope
  2. Wield the slingshot, spawn a zombie near the character.
  3. Press 'f' and see the supposed amount of movement points it costs to aim and fire the sling shot at various levels
  4. Select an aiming option with 'a/c/p' or slightly increase aim level with '.' and see the massive number of turns that pass due to the cost of removing ammo from the short rope, the lack of pop-ups about danger, and the inability to stop the loading of ammo from continuing.

Expected behavior

Screenshots

No response

Versions and configuration

Additional context

No response

coyo7e commented 2 years ago

Do any ranged weapons explicitly display the incremental movement cost of using '.' to increase aiming time? I'm genuinely curious because it's a thing I've never explored and only recently started using when I started trying to "snipe" using an M110 to take out automated turrets and stuff on a recent character.

Additionally, some weapons simply do not improve and can actively get worse aim if you spend too much time "aiming", slings specifically come to mind to me because I've made-used the IRL and the more you spin them the less chance you have of releasing in a consistent arc. I've read some books on medieval weaponry which went in-depth on slings, their ammo etc, and apparently a medieval slinger would be able to lift and chuck it within 1 or 2 loop-arounds otherwise they'd usually already gained too much spin-speed and would stop spinning and re-try rather than continuing to spin and eyeball a target (staff slings were a one-time whipping motion, where you'd release at the apex of the arc, you didn't do loop-the-loops with them at all).

This lines up with personal use experience where I made a sling from a broken slingshot pouch and some shoelaces - the more I spun it the harder and faster it went, but the less I was able to accurately release with any sort of timing that would allow me to feel where the arc would go. (I eventually got good enough to take out stationary birds and such maybe one in 20 shots, and I can see how someone who spent a couple hundred hours and more could probably do so pretty consistently. RIP birds, and I feel bad about it now, but I grew up in the country and wandering around shooting things with a gun, or bow and arrow, or slingshot, or whatever I came up with, was like, the only thing to do when I wasn't stuck doing chores and stuff. My folks knew I wouldn't fire toward human populated areas and pretty much just didn't care past that.)

Slings are a super weird weapon though, apparently most shepherd kids could load a sling and whip it at a coin-sized target 100-150 paces away and hit the target easily because they did not much else while herding their sheep/goats etc than just stand around whipping rocks at stuff and then using them to defend their flocks from wolves and whatnot.. Goliath legit never had a chance against David because the sling is a NASTY weapon that causes brutal blunt trauma through non-plate armor, and many types of sling ammo were pointed or sometimes made from soft clay that would transmit the blunt force into someone's body and could cause internal ruptures and major head injuries without even breaking the skin.. Shaped sling ammo from roman times have commonly been found to have taunts etched onto their sides as well, literally putting the name of your foe onto the bullet, as it were, or putting a magical curse or an "eff you" onto them etc. What an epic humiliation to be killed by a random falling stone that has "suck testicles, you plebeian!" etched on it, and have your buddies pick up your body and the stone and find the screed scrawled onto it.

https://www.mentalfloss.com/article/63739/sarcastic-jokes-found-roman-bullets

VitreousEyes110 commented 2 years ago

Something of note that I found is that after the ammo has been loaded by pressing '.' or 'a/c/p', pressing 'esc/q' to back out of the 'f'ire menu does not pass time, implying that the issue in #54973 is not time being spent unloading ammo but instead time being spent loading ammo, and that the points spent on unloading RELOAD_AND_SHOOT weapons are actually being refunded as intended.

To sum up my understanding of the full problem as succinctly as I can:

The issue could be solved by:

Apologies for having this as two separate issues, I was under the impression they were distinct but after a little more testing I'm fairly sure that it's just loading RELOAD_AND_SHOOT weapons that's the culprit, not unloading. Disregard my previous comments about unloading in #54973.

LeahLuong commented 2 years ago

If the other issue is redundant, you should close it w/ a pointer @ this 1.

Cynthius commented 10 months ago

Not sure if this is relevant or a known issue, but I'm getting danger popups when loading now. However, hitting [Y]es at the danger prompt to abort loading my weapon doesn't seem to do anything.

I've been hitting [Y]es for the "dangerously close" warning before the zombie's even reached me, but I'm still being subject to several seconds worth of mauling before the load action can finish and control is returned to the player.