-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Change crossbow firing skills to match related firearms. #21545
Change crossbow firing skills to match related firearms. #21545
Conversation
@@ -840,7 +840,7 @@ | |||
"price" : 324000, "//" : "Modern crossbows can come in anywhere from $300 to $2K. Large plus Antique = expensive.", | |||
"material" : ["iron", "wood"], | |||
"flags" : ["FIRE_TWOHAND", "STR_RELOAD", "PRIMITIVE_RANGED_WEAPON", "TRADER_AVOID"], | |||
"skill" : "archery", | |||
"skill" : "rifle", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly switch to launcher instead of rifle? I'm abivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Miniguns are rifles and not launchers and they're less similar to rifles than big xbows to small ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aspects I'm thinking of are bulk, weight and inaccuracy, Gantz has all of thse in spades, it's essentially a siege engine you can barely carry.
Basically if no one has an argument for switching it to launcher I'll leave it using the rifle skill :)
Honestly the minigun probably shouldn't use rifle either, but I don't think launcher is any better, nothing really fits at all.
You took the point I presented in that pull request, and went in the absolute opposite direction. |
I agree that crossbows are operated in a rifles manner, not bows. Both should be raised up to head, stock should rest at the shoulder. Bows are aimed and fired in a different manner. |
Very well then. It at least will be closer to consistent than current handling. Reminder that Vehicle Additions Pack has the scopio ballista, and that More Survival Tools has the makeshift crossbow. |
In addition, remember that professions that start with crossbows will like have archery skill, this will have to be changed. |
So recently I was poking through item.cpp and was reminded that the gunmod function that separates crossbows from other types of ranged weapon was never updated to account for crossbows using rifle skill, as it was switched from archery by CleverRaven/Cataclysm-DDA#21545 On looking at the function I decided that there were two ways to fix it. Either convert the "if ammo is bolt or it's a bullet crossbow, it's a crossbow" statement to not care about the archery skill, since it triggering would make the function return before it could grab the gun skill anyway. Or I could implement a flag check. The main reason to do this is, aside from checking for specific ammo types and item IDs not being a good way to do this, there are going to be items that fire bolts but shouldn't count as a crossbow, example being the pneumatic bolt driver, plus you may have items that should be a crossbow but wouldn't be under that check. No vanilla examples of the former come to mind, though outside repo of course adds the example of wraithslayer crossbows in Arcana.
* Fix crossbow gunmod compatibility So recently I was poking through item.cpp and was reminded that the gunmod function that separates crossbows from other types of ranged weapon was never updated to account for crossbows using rifle skill, as it was switched from archery by CleverRaven/Cataclysm-DDA#21545 On looking at the function I decided that there were two ways to fix it. Either convert the "if ammo is bolt or it's a bullet crossbow, it's a crossbow" statement to not care about the archery skill, since it triggering would make the function return before it could grab the gun skill anyway. Or I could implement a flag check. The main reason to do this is, aside from checking for specific ammo types and item IDs not being a good way to do this, there are going to be items that fire bolts but shouldn't count as a crossbow, example being the pneumatic bolt driver, plus you may have items that should be a crossbow but wouldn't be under that check. No vanilla examples of the former come to mind, though outside repo of course adds the example of wraithslayer crossbows in Arcana. * Update item.cpp
* Fix crossbow gunmod compatibility So recently I was poking through item.cpp and was reminded that the gunmod function that separates crossbows from other types of ranged weapon was never updated to account for crossbows using rifle skill, as it was switched from archery by CleverRaven/Cataclysm-DDA#21545 On looking at the function I decided that there were two ways to fix it. Either convert the "if ammo is bolt or it's a bullet crossbow, it's a crossbow" statement to not care about the archery skill, since it triggering would make the function return before it could grab the gun skill anyway. Or I could implement a flag check. The main reason to do this is, aside from checking for specific ammo types and item IDs not being a good way to do this, there are going to be items that fire bolts but shouldn't count as a crossbow, example being the pneumatic bolt driver, plus you may have items that should be a crossbow but wouldn't be under that check. No vanilla examples of the former come to mind, though outside repo of course adds the example of wraithslayer crossbows in Arcana. * Update item.cpp
If aftermath of CleverRaven/Cataclysm-DDA#21545 ever gets fixed this will need an update to the DDA version too, but for now only BN has fixed it. Per Noct's suggestion in DMs, their idea for the bolt rifle was an electrically-assisted crossbow so it would count for crossbow gunmods. Also means it gets dampening slot now that that's fixed in BN to actually be usable on crossbows. Also removed mechanism slot as nothing compatable with crossbows exists currently. Ported over the gunmod slot changes to DDA version too but as mentioned it's been basically 5 years so no telling if the "check for archery skill to screen for crossbows" code will get fixed on their end.
So it turns out a long-forgotten side effect of CleverRaven/Cataclysm-DDA#21545 was breaking the janky hardcoded injection of certain flags and ammo effects into cataclysmbnteam/Cataclysm-BN#1857 makes this more important in BN but implemented same general changes to both versions in case DDA ever notices that function (and it's been about 5 years so literally everyone evidently never noticed any changes to crossbow behavior). Also updated the deployable vehicles in DDA version, as CleverRaven/Cataclysm-DDA#59572 updated folding vehicles. While a great idea on paper, in practice they somehow managed to invent a form of JSON that's even MORE of an unreadable mess than vehicle JSON is, with making folded_parts something you have to work with to implement deployable vehicles now.
As mentioned a few times previously, the act of firing a crossbow doesn't bear any resemblance to the act of firing a bow, so using the same skill for both is nonsense.
Additionally, this provides a means to train various firearm skills without having to resort to expending valuable firearm rounds.
Thanks to @DangerNoodle for reminding me to get around to this in #21538