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

NewMed, Implementing Medical Gameplay into SS14 #19383

Draft
wants to merge 160 commits into
base: master
Choose a base branch
from

Conversation

Jezithyr
Copy link
Contributor

@Jezithyr Jezithyr commented Aug 21, 2023

The mythical medical refactor system. Heard whispered in hushed tones in the corners of the contributor channels, it is indeed REAL! If you listen very carefully you might be able to hear it's cry.... "Just a week away"

Requires: #30254, (Chemistry Refactor Pt.2)

Important

Development on this PR is temporarily paused. Development will resume once the chemistry refactor is complete.

Discord discussion thread (for those that prefer discord):
https://discord.com/channels/310555209753690112/1206508273704894525
I will also be posting/discussing design there and I check it more actively than github, so it's a better place to bring up design ideas/questions. You can also use github discussions if you don't like discord, I just don't check it as often. :)

About the PR

This is a complete rewrite of the wounds branch, focusing on making it easier to integrate in forks while being more extensible. I also simplified the logic a bit and added some helper functions for body system.

Progress checklist

TODO: update the progress checklist

Rough Current System Progress as of writing (7/22/24):

  • WoundSystem: Done
  • WoundingLogic: Done
  • MedicalConditions: 50%
  • BleedingSystem: 80%
  • ConsciousnessSystem: 80%
  • PainSystem: 60%
  • BloodTypes: Done
  • Pulse/Circulation: 60%
  • Breathing: Done
  • EnergySystem(Metabolism): 70%
  • Stomach/Digestion: 20%
  • Eating/Drinking: 30%
  • Liver/Scrubbing/Poision: 0%
  • ReagentAbsorption(Metabolism): 10%
  • Treatments: 20%
  • Surgery(Porting RMC-14 Surgery): 0%
  • MedicalMenu: 10%
  • "QuickTreatment": 0%

Why / Balance

Technical details

Media

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

This is going to cause issues with custom damage types and weapon damage or humanoid armor will need to be re-balanced to work properly with wounds. Additionally, any new races will need to be setup with either the common humanoid traumas or require custom traumas to be created. If woundables are not present on a humanoid it will never enter crit or death

Changelog

@Jezithyr Jezithyr mentioned this pull request Aug 21, 2023
37 tasks
@Jezithyr
Copy link
Contributor Author

@deltanedas This is the updated medical branch, I'm still working on porting the stuff over from the other branch but it's quite a bit simpler and easier to use. Sorry for leaving the old branch sitting for so long, I needed a break from coding for a while since work was getting hectic. It's calmed down alot now so I'm able to work on this more :)
I'll try to keep you up to date in the discussion as I add/rewrite functionality

@VektorZ1
Copy link

Pog, someone's doing surgery again

@UbaserB
Copy link
Member

UbaserB commented Aug 21, 2023

just a week away

@github-actions github-actions bot added Merge Conflict This PR currently has conflicts that need to be addressed. and removed Merge Conflict This PR currently has conflicts that need to be addressed. labels Aug 22, 2023
@space-wizards space-wizards deleted a comment from github-actions bot Aug 24, 2023
@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Aug 30, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added Merge Conflict This PR currently has conflicts that need to be addressed. and removed Merge Conflict This PR currently has conflicts that need to be addressed. labels Aug 31, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@nopeingeneer

This comment was marked as off-topic.

1 similar comment
@VektorZ1

This comment was marked as off-topic.

@UbaserB

This comment was marked as off-topic.

@KingOnBudget

This comment was marked as off-topic.

@BolloTea
Copy link

BolloTea commented Sep 14, 2023

Guys, it will be people. The person may have personal problems. Many people have been waiting for this refactoring for more than a year and are ready to wait a little longer. And if someone can’t stand it, then take it and code it yourself

@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 14, 2023
@deltanedas
Copy link
Contributor

submodule was already ok pro

@Jezithyr
Copy link
Contributor Author

Jezithyr commented Sep 15, 2023

submodule was already ok pro

Yeah, It was a bad merge, some weird shit happened and i thought it was the submodule acting up. I'm going to remove the submodule update so that the tests don't break

@Jezithyr
Copy link
Contributor Author

Just a week away…

I work full-time as a AAA game developer, I work on SS14 in my spare time (Which has been a bit limited as of late). "Just a week away" is a meme, not a promise and it will get done when it gets done. Medical gameplay is complex and touches many systems, which means it takes time to code (especially if you want to do it properly).

@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 15, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Jezithyr
Copy link
Contributor Author

requires #20202

@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 16, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added Merge Conflict This PR currently has conflicts that need to be addressed. and removed Merge Conflict This PR currently has conflicts that need to be addressed. labels Sep 16, 2023
@Jezithyr Jezithyr closed this Sep 21, 2023
@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label May 14, 2024
@Agustron24
Copy link

Slowly seeing how all squares get filled :D

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label May 24, 2024
@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Jun 23, 2024
@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Jun 30, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@z9ctn4fn
Copy link

Add estrogen and testosterone

@whateverusername0
Copy link
Contributor

surgery. just a week away

@Verbalase
Copy link

please god, provide me peak…

@Brandon-Huu

This comment was marked as off-topic.

@Jezithyr
Copy link
Contributor Author

Newmed isn't dead, I just need to refactor parts of chemistry before I can continue. Starting with: #30254 .

  • Part 1 of the chem refactor is converting Reagents/Reactions to Entities and adding support for creating/removing/modifying reagents/reactions during gameplay. This is something that will be shared/co-developed with RMC-14 (they need the functionality for creating randomized chems).
  • Part 2 of the chem refactor is updating the solutions API to be less complicated/convoluted to use, moving solutions to use fixedpoint4 for more precision, and implementing rate limiting for reactions. Once part 2 is done, work can continue on NewMed since it will be no longer held back by missing chem functionality.

/// The second value is: low (diastolic) pressure. This is the blood pressure in between pumps.
/// </summary>
[DataField, AutoNetworkedField] //TODO: Required
public BloodPressure HealthyBloodPressure = (120,0);

Choose a reason for hiding this comment

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

Paired values should be 120/80? Unless I'm misunderstanding, I read diastole as 0 here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh not sure why that's 0, it should be 80 yeah. Nice catch!

/// The maximum rate that this heart will safely beat at.
/// </summary>
[DataField(required:true), AutoNetworkedField]
public FixedPoint2 MaximumRate = 190;

Choose a reason for hiding this comment

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

Just a tiny suggestion, Maximum rate should be given by 220 - player age in years. (Nitpicking i know but I figured i'd write it still)

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a tiny suggestion, Maximum rate should be given by 220 - player age in years. (Nitpicking i know but I figured i'd write it still)

Why?

Choose a reason for hiding this comment

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

That's the formula I learned in med school for calculating maximum heart rate for a given person. It considers age as a factor, which can sort of simulate older patients being more prone to heart attack vs. younger patients. Atrial fibrillation for example is very uncommon and noticeable to young adults experiencing it, on the contrary senior residents can be in a situation where more than half of their heartbeats are skipped or incomplete. I understand if Jezithyr finds it superfluous.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds cool

Copy link
Contributor Author

@Jezithyr Jezithyr Aug 6, 2024

Choose a reason for hiding this comment

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

Just a tiny suggestion, Maximum rate should be given by 220 - player age in years. (Nitpicking i know but I figured i'd write it still)

Yeah I was originally going to use that formula but I want respiratory parameters to be configurable per species. I also wanted to simplify things a little bit for the sake of players, so that they didn't need to worry about patient age. (Atleast in a first version).

My other worry is that players sometimes set very high ages for RP reasons and I don't want that to break the cardiac simulation or end up punishing those players.

@Jezithyr
Copy link
Contributor Author

Jezithyr commented Aug 6, 2024

You may be worrying that newmed is dead after the discord message I posted about it being paused. I'm here to tell you that is no longer the case! The issues that I mentioned have been resolved and I'm back to working on both the chem-refactor and newmed!

@Jezithyr
Copy link
Contributor Author

Jezithyr commented Aug 6, 2024

also @godtierprogrammer thank you for the reviews I really appreciate someone putting in the effort to read through my frankly kludged together code :P . At this point the newmed branch is mainly prototyping and not really something I'd consider ready for review, there is a whole bunch of half-finished/slapped together stuff that is there to prototype out the functionality rather than serve as the actual implementation. (My plan was to get everything semi working so that I could bring people in to work on the content/yml, while I'd rewrite the backend to be more maintainable/less hacky)

Part of the reason why I started working on refactoring chemistry is because I realized while prototyping newmed that there was no way to get the functionality I needed from chem/reactions without creating some truly awful hackery. Not to mention that any time I ended up interacting with reagent/solution code I wanted to lay down and cry 😭. What I'm trying to say is that chances are large parts of NewMed are going to get rewritten pre-merge anyways so there isn't really much point to doing reviews at this stage unless you really want to (I won't stop you! Just know that I might end up rewriting that code anyways 😅).

@Agustron24
Copy link

You may be worrying that newmed is dead after the discord message I posted about it being paused. I'm here to tell you that is no longer the case! The issues that I mentioned have been resolved and I'm back to working on both the chem-refactor and newmed!

LETS FUCKING GO!

Nice to see you okay again

@Everturning
Copy link

the name of the PR sounds like a business
NewMed, Implementing Medical Gameplay into SS14 since 2023. New product in under a week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design Holy Shit This is real important!! Merge Conflict This PR currently has conflicts that need to be addressed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.