Skip to content
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

Airgun nerf & air cylinders #38654

Closed

Conversation

misterprimus
Copy link
Contributor

@misterprimus misterprimus commented Mar 8, 2020

How to use

Spawn the pneumatic air rifle & some pellets and experiment firing it.

Summary

SUMMARY: Balance "Makes air guns realistic."

Purpose of change

#38196

The purpose is to make air guns more realistic by adding an air component to them. Currently flamethrowers just "work" and the air rifle abstracts the reloading process of the air (in addition to using impossible "pebbles" for ammo). This maintains these parameters separately and uses appropriate ammunition.

Describe the solution

Mainly changes the air rifle to be like something you'd be able to buy online and adds compressed air as an item.

Describe alternatives you've considered

#38498

Testing

Just JSON changes here. I tested the pumping mechanics in a different PR. One day I suspect those will be usable with precharged pneumatics once multimags is done.

Additional context

@ZhilkinSerg ZhilkinSerg added 0.E Content Freeze [JSON] Changes (can be) made in JSON Game: Balance Balancing of (existing) in-game features. Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Mar 14, 2020
@misterprimus misterprimus marked this pull request as ready for review March 14, 2020 19:56
@ghost
Copy link

ghost commented Apr 14, 2020

Isn't this PR now invalid since the weapons are going to be obsoleted(#39438)?

@misterprimus
Copy link
Contributor Author

misterprimus commented Apr 14, 2020

Isn't this PR now invalid since the weapons are going to be obsoleted(#39438)?

Possibly. I have no idea what his criteria for obsoleting items is other than that he decided he doesn't want something, so therefore it goes away. This PR was supposed to be a temporary measure that made the pneumatic weapons a lot less ridiculous and more realistic, while still providing for the ability to make these weapons until a more comprehensive change occurs to weapon parts. In reality you'd make a DIY weapon out of parts from a damaged existing weapon and the same would apply to repairing firearms (you would find compatible intact parts and replace them until you have one functional gun), which is IMO even more ridiculous currently in DDA. My gun fouling PR was partly designed to remedy this by unabstracting gun wear by separating fouling and damage. Modern guns are machined or stamped in a factory. You can't just "fix" an M16A4's bent parts (which are forged to act like clockwork) with a magical DIY "firearm repair kit." However I'm not aware of any such PR being in the works as it would require big changes like keeping track of the condition of individual parts of an item and having those parts contribute to the functioning of the item in component-specific ways. I'd say that's a long way off if it ever arrives.

I suppose if I had to choose between making something like the pneumatic pebble rifle nonexistent or as is, I'd choose nonexistent, but as this PR suggests it's not a binary choice like that with some intermediate solutions available.

@anothersimulacrum
Copy link
Member

That PR is removing the pneumatic weapons that are videogame references and have no resemblance to something that exists. A PR adding pneumatic weapons that bear actual resemblance to or model something that exists is fine.

@kevingranade
Copy link
Member

Though caveat to that, a new pneumatic weapon that fires pebbles is likewise not going to be ok, it needs to fire a functional ammunition like lead shot or steel bearings.

@misterprimus
Copy link
Contributor Author

Though caveat to that, a new pneumatic weapon that fires pebbles is likewise not going to be ok, it needs to fire a functional ammunition like lead shot or steel bearings.

This one would fire pellets that have to be made from metal, not pebbles.

@lgtm-com
Copy link

lgtm-com bot commented May 6, 2020

This pull request introduces 1 alert when merging 5d189f0 into f7d6b59 - view on LGTM.com

new alerts:

  • 1 for Comparison result is always the same

@misterprimus
Copy link
Contributor Author

This pull request introduces 1 alert when merging 5d189f0 into f7d6b59 - view on LGTM.com
new alerts:

1 for Comparison result is always the same

Not sure what this means.

@@ -1944,6 +1945,9 @@ void player::process_items()
if( ch_UPS_used > 0 ) {
use_charges( "UPS", ch_UPS_used );
}
if( ch_AIR_used > 0 ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It believes that this condition will never be true.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ch_AIR_used is initialized to zero and never changed, so this comparison can never be true.

@misterprimus
Copy link
Contributor Author

Do the devs want these changes? Just wondering since I heard they were going in their own direction with compressed air weapons and this thing has been open for 2 months. If the devs don't want this, then there's no point in fixing that error, as simple as the fix may be (not sure if I'm going to get merge conflicts, though, this being so old).

@ymber
Copy link
Member

ymber commented May 15, 2020

This isn't a correct approach. units::energy is only for electricity. Gas canisters should be magazines with gastight MAGAZINE type pockets and the guns will need to support at least a magazine for compressed air and a magazine for pellets. There's a lot of infrastructure needed for this concept to work properly.

@misterprimus misterprimus deleted the airgun-nerf-&-air-cylinders branch December 30, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants