-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bow Shooting Takes Too Long #73354
Comments
Thank you. The character tries to get all 52 arrows just to load one and then put the rest (51) back into the quiver. Now I see that this is definitely broken. The calculated moves to draw an arrow should be per arrow, not for the whole bulk. Also as I understand right now the character first aims the bow and only then!!! takes an arrow and loads it. How can anyone aim a bow without loading an arrow first? Does the bow just hang in the air in the same position while the character inserts the arrow? |
Well, if you consider it as broken, at least it was not broken by me :) About the order of aiming and shooting, it's not that important if you see it as a whole. The real thing is, to change the function so you don't get every single move "refunded" when deciding not to shoot and walk away. But I didn't find a way to do it properly right now, so just did a port over. Might be less realistic, but still much more intuitive IMO. |
Yes, if anything, your patch hes helped expose weirdness in loading calculations. I suppose, there is a code that adjusts item access time based on item size. And as 52 arrows are not really 52 individual items but rather a single "arrow" with 52 charges, this code "adjusts" the time based on the combined "item" mass/volume/whatever. I believe this also affects staff sling and its "rock" ammunition. |
It seems as though there are two separate issues: A quiver taking longer to draw an arrow when there are many arrows, and shorter to draw when there is only one, is also a bug because it does not accurately reflect reality. The bow being aimed fully and then having an arrow is a bug, because that is not how bows behave in real life. Perhaps one of the inconsistencies is that bows are being treated somewhat similar to firearms |
I don't think the caveat holds here - presumably you're already eyeing down your target and have a loose range estimate on the order 10's of yards by the time you decide to draw on it. That's not something you're taking multiple seconds to assess, its going to be an intuition-based estimate that you start consciously assessing range from. Not to mention that range is not the only component of aiming, especially against a moving target. With auto-reaim on though, it seems unfair to penalize the character for drawing another arrow if the player's intention is to stop firing. Frankly I don't see why bows can't be reloaded like any other firearm. All of them already have the two-handed fire flag, so it isn't unreasonable to assume that 'loading' the bow means 'arrow in hand' or even 'nocked but not drawn'. That would make this whole problem moot. It does make archery mains slightly more annoying since you have to manually (r)eload after every shot but that seems like a reasonable tradeoff for consistent interaction. |
@cosmo-naut
In step two, there were two bugs. The first one is, if you press f to enter the aim ui, then immediately quit it without any aiming action, you were supposed to get all the moves "refunded". The functions were wrote in that way, but failed to do so, thus you were losing moves by simply entering the aim ui. That's why auto re-aiming was banned for RAS weapon. Also, for all the other firearms without RAS flag, simply quitting the aim ui do not mean you give up shooting, nor is the aiming progress lost. All that things makes it annoying to fight with RAS weapons. There were a lot of discussions about this issue, yet no one did move on and implement their plan. So I choosed an existing solution. |
Maybe Cataclysm-DDA/src/character.cpp Lines 7286 to 7293 in 91763a3
This is 4-5 extra moves per arrow, some what reasonable I think, taking an arrow out of 50 arrows should cost more time. Cap it at like 50 moves for RAS weapon would be a solution. |
Yes, it seems that this function is the culprit. However, arrows in a quiver are not interlocked so there shall be little to no difference between getting an arrow from nearly full or almost empty quiver. The main issue is "charges". Right now we do not have 52 arrows in the quiver. We have a single really big arrow with 52 charges and each time a character tries to get this arrow (s)he spends the amount of moves needed to fetch that big arrow. Charges are causing a lot of issues and I believe this is one of them. Either the "it.volume()" function needs to be re-written to accept X amount of charges as an argument to correctly retrieve the volume of X arrows instead of all of the bulk, or arrows (and possibly other ammunition) shall be "discharged". The later will also fix character's miraculous ability to hold 125 rocks (or shall I say "rock (125)"?) in her/his hands like a juggler. UPDATE
Oh, maybe the function can already accept charges via charges_in_it argument… Maybe in this case this argument has to be set to 1 (because we are getting just one arrow to load). |
When reloading, you need to obtain the ammo and reload it. Lines 11532 to 11534 in 5d07beb
In item_reload_cost() everything goes well, qty is passed to charges_in_it to correctly calculate penalties.Cataclysm-DDA/src/item_location.cpp Line 720 in 5d07beb
But in obtain_cost() , or more exactly, when calculating obtain cost from container, qty is lost, so charges_in_it is -1, thus penalties is counted by the volume of the whole bulk.
|
Describe the bug
It seems after #73305 bow shooting time has been broken.
My character has 10 marksmanship and 10 archery:
However, it takes 344 moves to shoot an arrow without even aiming:
And after spending ~90 moves gaining steadiness it still takes 277 moves (~2.8 seconds) to just release an arrow.
Another test, now with actual enemy. Initial readiness:
And after getting aiming to the "Precise Aim" level it still takes 269 moves (~2.7 seconds) to just release the arrow:
Even if we assume these ~270 moves are spent loading another arrow for second shot (#73305 mentioned), moves still do not add. This bow takes 50 moves to load:
and the quiver takes 20 moves to fetch an arrow from:
So, total moves spent to reload shall be around 70, not 270. So, where are those additional 200 moves come from?
Addition: even after disabling the "Reaim after firing" option, I still get the 269 moves to shoot without spending any time aiming, so these 269 move are not related to reloading.
Attach save file
Skyforest-trimmed.tar.gz
Steps to reproduce
Expected behavior
I expect a character to be able to release an arrow in approximately 10 moves (0.1 second) -- standard human reaction time, AFAIK -- after his/her bow is loaded and aimed at target/enemy. Or, perhaps, ~23 moves or so (the same amount that is needed to pull the trigger of M16A1 rifle in-game).
I also expect 70 moves (20 to get an arrow and 50 to insert it) to be spent getting a bow initially readied to shoot (i.e. after the "f" button has been pushed to aim but before the aiming interface appears).
Screenshots
See bug description.
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth]
]
Additional context
N/A
The text was updated successfully, but these errors were encountered: