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

Add Ablative Pockets #52745

Merged
merged 17 commits into from
Nov 24, 2021
Merged

Conversation

bombasticSlacks
Copy link
Contributor

@bombasticSlacks bombasticSlacks commented Nov 10, 2021

Summary

Features "Adds ablative pockets to ESAPI vest along with ablative functionality"

Purpose of change

Based on a discussion on the discord having modern armored vests with actual ablative pockets where the armored plates go and having logic for them to break instantly instead of degrade was desired. This does all of that.

Describe the solution

As of November 11th I've modified the UI slightly based on feedback from someone in my life who does it for a living
This PR does a bunch of stuff:

  1. Adds new armor flags "ABLATIVE LARGE", "ABLATIVE_MEDIUM" for front and side ballistic plates. These flags are needed for the armor to fit in ablative pockets of the correct size.
  2. Adds new armor flag "CANT_WEAR" for armor that cannot be worn directly.
  3. Adds a new attribute for armor "non_functional" this is the itype_id of the item that this becomes when it is destroyed. Only currently applies to ablative armors.
  4. Adds new pocket attribute "ablative". If set to true the armor of the item in this pocket has a chance to reduce damage if the item with the pocket is hit. The item inside the ablative pockets encumbrance is also added to the armor. This also sets "holster" to true for the pocket so only 1 thing will fit in it.
  5. Removes the Empty Ballistic Vest
  6. Makes the ESAPI Vest the US ballistic vest, with 4 ablative pockets for ESAPI and ESBI plates. It now has 100% coverage since the ablative pockets are % based (its ID is still ballistic_vest_esapi)
  7. Gives esapi and esbi plates armor data as well as the CANT_WEAR and appropriate ablative flag
  8. Removes the current recipe for the ESAPI vest
  9. Replaces current spawns of the empty_ballistic_vest with the ballistic_vest_esapi
  10. Add two new item_group's military_ballistic_vest which is a ballistic_vest_esapi with a 50% chance to have each of it's pockets full with a plate and military_ballistic_vest_pristine which is identical but with guaranteed plates in each pocket.
  11. Replaces current spawns of the ballistic_vest_esapi with the appropriate item group from 10 above.
  12. All professions that start with an ESAPI vest now start with a full one.
  13. Adds logic for the above things. Specifically:
  • Ablative armor can be added or removed from ablative pockets.
  • Encumbrance of ablative armor in ablative pockets is added to the main item.
  • On getting hit in a piece of armor with ablative pockets, roll a d100 and iterate through all pockets to see if you hit one of the ablative pockets (using their coverage value as the chance to hit each). At most one pocket will be used for absorption.
  • If an ablative plate is hit with damage check to see if it is destroyed outright. This test is currently simple: vests IRL are rated for 3 rounds of the caliber they block so take damage taken / damage absorption, multiply by 33% and check against that. So the weaker an attack the less chance it breaks the plate wear-as strong attacks are much more likely to break the plate.
  • If an ablative pocket is destroyed it is replaced in its pocket with its "non-functional" version.
  • UI to support all of this information. With correct feedback on specific menus and custom info bits for ablative pockets. (Previews will be shown bellow)

Originally when writing this I missed a few details they are:

  • Adjusted ceramics values from 3 bash, 5 cut, 6 ballistic to 1,2,2. Since the plates are now the appropriate 25mm they actually are. This leaves it with fairly similar stats. The bash is a bit lower the cut is a bit higher.
  • Modified some pocket calculation code to omit ablative pockets from calculating max volume and max weight since they don't have a defined max volume and max weight meaning they have default volumes and weights that are massive (they just take appropriate plates).
  • I've also adjusted the other armors that use ceramic as follows:
  • RM13 armor now has a custom material called hyperweave which is to represent its sci-fi ceramic plates. It has the old ceramic values (exactly). So there are no changes to it.
  • exo armors, removed ceramic from the heavy and basic exo suit added the hyperweave instead.

Describe alternatives you've considered

A number of other suggestions were made on the discord.
Hard coding this for ESAPI vests.
Some other less involved less system.

Testing

Loaded up the game. Start as a military profession. Spawn in some plates and vests, wear em and insert/remove some plates. Spawn some zombie soldiers make sure they spawn with vests containing plates.

Additional context

Here are some pictures of UI and items:

Inventory (just like normal pockets):
image

Fully Loaded US ballistic vest (UI Improved since first posting):
image

Empty US ballistic vest:
image

ESAPI ballistic plate
image

ESBI ballistic plate
image

Shattered plate:
image

Attempting to wear a plate directly:
image

Some shots from a TALON:
image

Aftermath of the above shots:
image

Aftermath shown on the vest:
image

Zombie Soldier Drops:
image

@Maleclypse Maleclypse added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Nov 10, 2021
@Amoebka
Copy link
Contributor

Amoebka commented Nov 17, 2021

Ballistic plates aren't the only ceramic items in the game. Changes to protection values of the material affect more than just them.

@bombasticSlacks
Copy link
Contributor Author

Combat exoskeletons are the only other armor. I was going to handle those in a seperate PR to just recreate their values with the new armor materials stuff.

@bombasticSlacks
Copy link
Contributor Author

I've fixed the other ceramic armours as part of this PR

@kevingranade kevingranade merged commit a1526c2 into CleverRaven:master Nov 24, 2021
Rivet-the-Zombie added a commit that referenced this pull request Nov 24, 2021
…i-recipe

Obsolete the esapi vest recipe removed in #52745
@l29ah
Copy link
Contributor

l29ah commented Nov 25, 2021

Damn this PR turned my full ESAPI vests into empty US ballistic ones :(

@bombasticSlacks
Copy link
Contributor Author

bombasticSlacks commented Nov 25, 2021

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` <Enhancement / Feature> New features, or enhancements on existing 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.

5 participants