-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
More pharmacological expansion infrastructure work + a few new drugs #70239
Conversation
I'm not you and I can't tell you what to do, but if I were doing what you are doing, I would rip out the entire pkill infrastructure and replace it with a series of vitamins, NSAIDs and opiates. That way you can more granularly control what effects are happening and the potential interactions of drugs. As an example once opiates and stims are a vitamin you could create a two hidden effects that when you have both together produce a third vitamin that reflects the issues of taking uppers and downers together rather than them canceling out. Different types of opiates would just produce more opiate vitamin or if you wanted to get real granular you could create a new vitamin for each opiate type and model their own burn rates in the metabolism and create interactions based on that. The vitamin system is incredibly useful for creating complex interactions. |
That sounds like a great project. The issue is that I have never used the vitamin system before and this sounds quite complicated. I have never made such sweeping changes to the game before. For now, what I added does not really interact with the pkill system that much. I can certainly move onto replacing the entire pkill system after this is added. Using vitamins for everything sounds like a much better way of handling individual drugs than what I am doing. In any case, I'd like to keep this PR to what I have outlined (simply hooking up json meds to these variables). Once that is merged, I can take a look at the more ambitious case of replacing everything with vitamins, but I believe what I am building now is good enough. |
Also, I'd love to have someone with more medical knowledge like @I-am-Erk 's opinion on this. |
the PR as it stands does what it says on the tin. I think getting this merged as-is makes more sense, as it brings value to the game already. I would appreciate advice by more senior contributors on this. I will work on getting the new meds added to loot lists for now. |
Well, to be honest, every single line of C++ code I have written in this PR doesn't actually have any gameplay effect (much like beta blockers), so I guess I should just throw it all out? This PR is mainly infrastructure for drugs like beta blockers. I see no point in removing perfectly functional code just because it could be possibly JSONified in the future. In regards to redundant code, I hope you realize that the functions I am modifying (heart rate, blood pressure etc.) were added in 2021 and have never been used since. Once this goes through, feel free to implement everything I've done in JSON if you want to. I do not wish to rush things, but I do not see a credible argument to change anything in this PR yet. I am waiting on @I-am-Erk's review of these changes, as I respect his opinion on this very much. |
OK I think I can finally start looking at this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to get back to work but i'm about halfway through
Co-authored-by: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
Co-authored-by: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
Co-authored-by: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Needs to resolve conflicts. |
I am waiting on @I-am-Erk's full review first. |
So as you mentioned to me on Discord, I think there's some concern here about how vitamins interact with this system, where if you take multiple aspirin the duration increases. It's not something I'd necessarily call a blocker, but I think it's something we'd need to fix fairly soon. Probably vitamins aren't the right tool for this, although one option would be to design an alternative type of vitamin that operates differently to represent drugs. Basically we need to have some kind of system for dose-response curves. It can be quite simple, and I'm not sure if vitamins or a special type of effect flag are a better method. Like I said, I'm okay with putting this in using vitamins so long as this is something we think about longer term |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not great at reading c++ like this, but what I see there looks pretty good.
Co-authored-by: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
Great. I'll push the otc painkiller rename changes. |
…clysm-DDA into newdrugs_branch
this should be ready. |
Summary
Content "Further pharmacological expansion infrastructure + adds a few new drugs that make use of the system "
Purpose of change
This PR is based on #53152 and builds on #53187
Changes:
Showcasing 6 ( assume drug works for 80 mins, and that stomach digestion takes 30 )
Aspirin (and other drugs) by default worked as the first figure. With my system, we can get figure 3.
For now, the drugs I have changed and added don't have linear effects, just a single effect based on if their concentration is >0. In the future, this may be reconsidered for even more realism, but such a change will probably be too granular for gameplay purposes.
For reference, actual image of what irl drug concentrations look like. You can see Figure 3 is a cheap approximation of this.
This new vitamin drug system will also make it possible for us to model new drug interactions in the future. The intention is (in some future PR) to rip out the pkill and stim infrastructure and replace it with associated vitamins, as this allows for more granular representation of effects.
Remember that the heart rate, blood pressure and respiration rate variables do nothing in-game currently.
Describe the solution
I have added new different effects in order to better differentiate NSAID painkillers from acetaminophen and other generic painkilling effects such as alcohol or marijuana.
Currently, aspirin increases bleeding duration by around 5% (non stacking), and this lasts for 5 days.
I have added the painkillers to loot lists. I simply added them wherever aspirin was, and tried to rebalance so that ibuprofen and acetaminophen are most common, with aspirin and naproxen less common.
I did not add metaprolol to any loot lists as it has no gameplay effect (except changing the printout of the fitness band).
Describe alternatives you've considered
Not doing this.
Testing
Spawned in, ensured acetaminophen and aspirin stacked, and that aspirin increases bleeding duration.
Also tested that ibuprofen increases blood pressure, even though this does nothing in-game.
Tested that metaprolol actually blocks pain from affecting heart rate, and checked that it takes 30 mins to kick in and 24 hours to dissipate.
Additional context