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

Water cannon can load acid #2605

Merged
merged 1 commit into from
May 13, 2023

Conversation

chaosvolt
Copy link
Member

Summary

SUMMARY: Features "Allow using acid items as ammo, loading water cannon with acid"

Purpose of change

Misc idea on my todo list, fairly easy JSON stuff unless the added code idea in alternatives section gets asked for. In a nutshell, adds an idea that gives water cannons a bit more use besides just doling out zero-damage stuns, offers the player access to an exotic damage type, makes use of an otherwise-uncommon drop_action, and makes it so we have support for dedicated player-usable acid-spraying weapons in the future if desired.

Describe the solution

  1. Defined ammotype acid, with generic concentrated acid as the default ammo.
  2. Added ammo_data to acid water, weak acid water, and concentrated acid, being comestibles. Sets ammotype of acid and same recovery rate as water, defined damage.
  3. Added ammotype, damage, and recovery effect to sulfuric acid, hydrochloric acid, nitric acid, and acetic acid. Damage ratings start with a simple scaling up from the acid water types, then for types where what acid it actually is can be determined is ranked roughly by acidity (assuming most common commercial concentration, when I could find that).
  4. Added acid as a valid ammotype for water cannon, added to description to reflect that.
Ammo Damage Acid field from drop action?
Weak acid water 1 No
Acid water 2 No
Acetic acid 3 No
Concentrated acid 3 Yes
Nitric acid 4 Yes
Hydrochloric acid 5 Yes
Sulfuric acid 6 Yes

Describe alternatives you've considered

  1. Adding support for an ammo effect that adds a chance of damaging (presumably modified by gun durability) with each shot. If desired guess it could be added, possibly also used for dragon's breath shells.
  2. Adding some other way to access acid water without having to enable acid rain. Maybe as a map extra or overmap special in swamps, that replaces the normal water with shallow pools of varying tiers of acid water, could work.
  3. Adding a craftable acid sprayer for handheld use in this PR itself, so the player can commit warcrimes on foot.
  4. Just saying "fuck it" and removing NO_RELOAD from water cannons so the player can use them handheld.

Testing

  1. Checked affected files for syntax and lint errors.
  2. Load-tested in compiled build.
  3. Spawned in a fire engine, filled one of the tanks with sulfuric acid instead.
  4. Emptied out all the water tanks for good measure.
  5. Confirmed that shooting it leaves behind acid fields instead of dropping the item on the ground.
  6. Blasted a zombie with it, confirmed it damages them.

Problem: I don't see any way to control exactly which tank a vehicle-mounted will prefer to draw from, so the player seems to have no way to choose whether they want to moisten enemies or melt them.

Additionally, vehicle turrets seem to like to have their shots just continue right through the enemy hit with them, so it only deposits any resulting acid fields at the edge of its range. Until, that is, the target dies mid-burst, then the remaining shots impact on that tile instead.

Additional context

@github-actions github-actions bot added the data PRs related to datas. Won't crash game (probably) label Apr 8, 2023
@scarf005 scarf005 added the easy Simple task that doesn't require understanding the code much label May 12, 2023
@NappingOcean
Copy link
Contributor

Can I review this PR?

@scarf005
Copy link
Member

scarf005 commented May 12, 2023

yeah, as it's one of the simpler PRs, this would be a good learning experience.

@NappingOcean
Copy link
Contributor

NappingOcean commented May 12, 2023

Shooting on ground

Honeycam.2023-05-13.00-08-23.mp4

Shooting on Mi-go

Honeycam.2023-05-13.00-22-53.mp4

EDIT: Add shooting on decayed zombie, whose armor is weak enough to get damages

Honeycam.2023-05-13.01-02-50.mp4

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

LGTM. as there's many duplicates in acid fields it could be copy-from sometimes later.

@scarf005 scarf005 merged commit 5fbab82 into cataclysmbnteam:upload May 13, 2023
@chaosvolt chaosvolt deleted the blursed-riot-control branch May 13, 2023 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data PRs related to datas. Won't crash game (probably) easy Simple task that doesn't require understanding the code much
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants