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

Wounds, This is a big one #79766

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OtherBiscuit
Copy link

@OtherBiscuit OtherBiscuit commented Feb 21, 2025

Summary

The Wounds system has been on the backburner for a while, and the design document is thorough enough to work with. This is going to change hitpoints and combat drastically, and thus will be tested and tweaked as I work on it.

Purpose of change

WIP, see design document #64424

Describe the solution

Wounds:

Rather than hitpoints, your main limbs will have wounds. As limbs are refined, this will be expanded to accommodate your unique digits, but the initial implementation only covers your mundane, fleshy body.

When attacked, you will accumulate wounds. If these wounds overlap, they are merged, increasing the surface area and potentially severity. Each wound is affected by its depth, type, and surface area (And much later, your mutations; cuts don't really cause issues with slimes)

For some examples of what wounds will look like:

ID:

The source of the wound affects its behaviour, healing method, etc. A third degree burn is much different than a burn from acidic material. Various injuries are assigned an ID in JSON, with the information for their healing and attributes.

Depth:

The deeper the wound, the closer it is to your major blood vessels, organs, bones, and vital areas. (Later, this will need to account for mutations altering your anatomy and bionics which may be damaged)

Surface Area:

An abrasion across your forearm would accumulate dirt and filth faster than a cut on your knee, and would need more material to cover.

WIP

Describe alternatives you've considered

Misc Notes

Bionics may be changed or JSON-ified, moving the specific changes to a generic damage function for future use may be more reasonable.

Organ Damage

A collapsed lung or a punctured heart would be invariably fatal to the average survivor. Not to mention brain damage from being knocked around. I assume instant deaths and common permanent debuffs are not intended, barring extreme circumstances. Unless I'm given a greenlight for some makeshift medical equipment similar to what you'd find in a staffed ambulance, the initial implementation will only trigger insta-death if the heart, lungs, or brain sustain immense damage. Other vitals and organs can be added with long-term damage changes.

WIP

Testing

WIP

Additional context

WIP

Copy link
Contributor

You are creating a pull request with the master branch as the head branch. This is completely fine if you plan to make contribution once or do not plan to do it often, but if you are interested in making multiple pull requests within a short span of time, this would prevent you from doing it comfortably. You may read https://docs.github.com/en/get-started/quickstart/contributing-to-projects#creating-a-branch-to-work-on for a typical workflow of contributing to a project on GitHub.

@github-actions github-actions bot added Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` labels Feb 21, 2025
@OtherBiscuit
Copy link
Author

Oh Christ I forgot to move this over to my branch. Very sorry.

@OtherBiscuit OtherBiscuit reopened this Feb 21, 2025
@OtherBiscuit OtherBiscuit marked this pull request as draft February 21, 2025 01:00
@OtherBiscuit OtherBiscuit changed the title Initial Migration of KorGgenT's work pt 1 Wounds, This is a big one Feb 21, 2025
@@ -1785,7 +1785,7 @@ void Character::bionics_uninstall_failure( int difficulty, int success, float ad
continue;
}
bp_hurt.emplace( bp->main_part );
apply_damage( this, bp, rng( 5, 10 ), true );
apply_damage( this, bp, damage_instance( damage_type::CUT, rng( 5, 10 ) ), true );
Copy link
Author

Choose a reason for hiding this comment

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

Bionics changes may be moot by now, I have to review it. Any extra changes will be caught on the next pass.

@GuardianDll
Copy link
Member

for the future, if you plan to base your work off the Korg commits, you should preserve the authorship of commits for proper attribution

bool wound::overlaps( int target ) const
{
if( location + id->size <= 100 ) {
return location >= target && location + id->size <= target;
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
return location >= target && location + id->size <= target;
return location <= target && location + id->size >= target;

Just fixing the wound::overlaps method

if( location + id->size <= 100 ) {
return location >= target && location + id->size <= target;
} else {
return location >= target || location + id->size - 100 <= target;
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
return location >= target || location + id->size - 100 <= target;
return location <= target || location + id->size - 100 >= target;

@RenechCDDA
Copy link
Member

Just to be clear this absolutely does need proper attribution if you want it be mergeable.

@ADekema
Copy link

ADekema commented Feb 21, 2025

How will this interact with HP mutations or with differant survivors having differant HP amounts based on weight and height?

@OtherBiscuit
Copy link
Author

How will this interact with HP mutations or with differant survivors having differant HP amounts based on weight and height?

HP mutations will change to make the survivor more susceptible to wounds (more than likely, just slight changes like small negative armour values to certain damage types unless a better idea comes along)

Hitpoints are mainly replaced by blood volume, which would increase with your size. Lose too much, you'll go into shock (and anemia), and eventually not have enough to keep your body oxygenated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` new contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants