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

Unobsolete the coilgun and nail magazine #41965

Merged
merged 23 commits into from
Jul 20, 2020
Merged

Unobsolete the coilgun and nail magazine #41965

merged 23 commits into from
Jul 20, 2020

Conversation

harison86
Copy link
Contributor

@harison86 harison86 commented Jul 9, 2020

Summary

SUMMARY: Content "Bring back the previously obsoleted coilgun"

Purpose of change

Coilguns are an item that exist in the real world, which are produced by hobbyists in garages/workshops using tools, materials, and skills that the player character could feasibly acquire in the Cataclysm. They are not especially lethal in comparison to powder-based firearms, but they are still dangerous and capable of inflicting wounds from a distance, and might be preferable in some cases due to their relative silence and availability of ammunition.

Describe the solution

The coilgun was obsoleted due to its unrealistic implementation. This PR alters the recipe and stats for the coilgun so that it hopefully meets current standards.

The skills required to craft the coilgun have been expanded and increased. Electronics 5 accounts for the circuitry of the coilgun itself, as well as for the usage of a UPS to power a home-made device - Electronics 5 is similarly required to craft a UPS conversion mod. Computers 3 accounts for the basic programming skill needed to set up the sensors and timing involved in the firing sequence. Fabrication 3 accounts for putting everything together in a gun-like construction made of plastic and metal that the player can comfortably wield.
A laptop has been added as a tool needed to craft the coilgun, for the player to interface with and program it. A plastic mold has also been added to the recipe.
The time to craft was increased from 25 minutes to 4 hours, taking up an entire evening instead of such a low amount of time for a complicated project.
The crafting materials were expanded and increased. Plastic chunks and scrap metal make up the structure of the coilgun. A processor board, amplifier circuit, circuit boards, and electronic scraps make up the circuitry. Some electronic scraps specifically represent photodiodes and LEDs used to track the projectile's position within the barrel. Power converters supply power to the coils from the UPS. A considerable amount of copper wire is used to make the eponymous coils.

The damage of the coilgun as well as flechettes have been lowered to be just under that of the weakest pistol available (Ruger LCR .22). It was noted in the comments of the PR that obsoleted the coilgun that the damage should be lowered to less than that of a pistol. The armor piercing capability of the coilgun and flechette have also been nerfed, so that the armor piercing of the nails/flechettes can only completely pierce a few layers of cotton clothing. The range and accuracy of flechettes have also been buffed, to reflect the fact that they have fins to stabilize their flight, unlike normal nails. The UPS consumption of the coilgun was also reduced from 5 to 2. Assuming each unit of UPS power is equal to 1 kJ, consuming 2 kJ per shot seemed much more in-line with real coilguns.

Describe alternatives you've considered

Adding "large capacitor"s as an item for use in the coilgun's recipe - I considered this unnecessary due to the existence of coilguns which do not utilize large capacitor batteries, as well as the fact that the coilgun runs off of a UPS, which can presumably provide all of the power capacitors would provide and then some.
Adding support for multiple magazine/ammo-types in guns, so that the coilgun can use both normal batteries and nails - I do not have the programming knowledge or familiarity with the code to implement such a change.
Leaving the UPS consumption of the coilgun at 5 - Assuming 2% efficiency, this would actually give the coilgun's projectiles similar kinetic energy to bullets fired from the Ruger LCR .22. I am uncertain what the best course of action would be and would leave that up to the veteran devs. I have no idea if the electronics could actually handle 5 kJ being discharged in such a short amount of time.

Testing

Made the items available using a small mod.
Spawned and test-fired the items.

Additional context

http://www.deltaveng.com/portable-coilgun/design/
https://www.instructables.com/id/Coilgun-1/
A couple examples I found particularly inspiring.

@anothersimulacrum anothersimulacrum added [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Jul 9, 2020
Copy link
Contributor

@mlangsdorf mlangsdorf left a comment

Choose a reason for hiding this comment

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

I'm not sure that I see the point in these coil guns, but they are something that people kitbash together IRL.

"ammo": [ "nail" ],
"skill": "rifle",
"range": 12,
"ranged_damage": { "damage_type": "stab", "amount": 1 },
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"ranged_damage": { "damage_type": "stab", "amount": 1 },
"ranged_damage": { "damage_type": "bullet", "amount": 1 },

damaging coilguns are probably closer to high velocity, low momentum attacks like bullets than they are to low velocity, medium momentum attacks like arrows.

"description": "A homemade gun, using electromagnets to accelerate a ferromagnetic projectile to high velocity. Powered by UPS.",
"weight": "2041 g",
"volume": "2750 ml",
"longest_side": "46 cm",
Copy link
Member

@anothersimulacrum anothersimulacrum Jul 9, 2020

Choose a reason for hiding this comment

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

This seems a little short short: For comparison, rifles with similar volumes:
shotgun_s | 2044 ml | 95 cm
ak74 | 2167 ml | 87 cm
aksemi | 2167 ml | 87 cm
remington700_270 | 2202 ml | 1135 mm

Copy link
Contributor Author

@harison86 harison86 Jul 9, 2020

Choose a reason for hiding this comment

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

Lengthened to 80 cm. The coilguns I was drawing inspiration from did appear short compared to powder-based rifles, since they don't need a long barrel to contain an explosion. Lengthening the barrel of a coilgun means adding more coils, which is probably for the best in the context of killing zombies.

@esotericist
Copy link
Contributor

i'd like to see more references for how you landed at the specific recipes here.

@Maleclypse
Copy link
Member

https://dev.narc.ro/cataclysm/format.html for linting

@I-am-Erk
Copy link
Member

I-am-Erk commented Jul 9, 2020

Hmm. I'm not opposed to the idea of a coilgun and you've done a good job with the stats. I think using nails as a projectile is a bit of a sticking point though. The coilguns in your example use specifically shaped ammo: a nail is not at all a good ranged projectile. An ammunition made from nails might be fine, and the extra step of needing to machine your ammo would help limit a weapon like this.

@ghost
Copy link

ghost commented Jul 9, 2020

Speaking of which, aren't nail gun nails held in special magazines?

@harison86
Copy link
Contributor Author

@I-am-Erk Flechettes are already shaped metal projectiles with fins for stable flight. Would it be a suitable solution to nerf the damage, range, and accuracy of nails as ammo to reflect their not-goodness as projectiles? That way you could use nails as coilgun ammo, but they would be appropriately weak and unreliable, and you would need to craft flechettes to make the coilgun practical. This would also apply to the nail gun.

@Xenomorph-III They are, though I didn't see any coilguns designed to use them, so I have no idea how feasible it would be for the player to use nail gun magazines for the coilgun in place of the makeshift spring loaded one. To my knowledge the nails in a nail gun magazine are typically held together in a strip by plastic or glue, not loosely stacked.

@I-am-Erk
Copy link
Member

Ah, I see, I missed that the combatnail was actually a flechette. That's pretty reasonable, actually.

@@ -8,7 +8,7 @@
"material": [ "steel" ],
"symbol": "=",
"color": "dark_gray",
"proportional": { "price": 3, "damage": { "damage_type": "stab", "amount": 3.0, "armor_penetration": 3.0 } }
Copy link
Member

Choose a reason for hiding this comment

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

This and the one below it should do bullet, not stab.
Also, I think the nail should be worse as ammo, but I'm not a stickler on that (3 armor pen and 4 damage still seems a bit high, and dispersion seems a little low).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, both do bullet damage now.
Coilgun with nails now does 1+3 damage, 1 armor pen, 180+180 dispersion.
Coilgun with flechettes now does 1+6 damage, 3 armor pen, 180+90 dispersion.

@harison86
Copy link
Contributor Author

Sorry if I'm just being impatient, is there anything else I need to address before this can be merged?

@anothersimulacrum
Copy link
Member

Doesn't look like it to me, just being slow on merging.

@I-am-Erk
Copy link
Member

I normally don't merge gun PRs but I think this one is pretty acceptable

@I-am-Erk I-am-Erk merged commit c77ce2e into CleverRaven:master Jul 20, 2020
@cyborg29x
Copy link

@harison86 It seems that the armor penetration, range and dispersion values for the flechette ammunition are wrong. It shows up in-game (vanilla build 10885) as the following:

flechettes

Instead of the intended 3 AP, +6 range and +90 dispersion, the values that appear are 0 AP and the same two stats as the nails:

nails

@esotericist
Copy link
Contributor

@cyborg29x please do not comment on merged pull requests with bug reports. open a new issue instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants