-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
vitamins do things #50273
vitamins do things #50273
Conversation
data/json/effects.json
Outdated
@@ -1955,15 +1955,17 @@ | |||
{ | |||
"type": "effect_type", | |||
"id": "hypocalcemia", |
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.
Didn't Venera3 explain that basically hypocalcemia shouldn't be a thing because it can't devlop in the time frame of the game? #45564 (comment)
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 can comment it out,
Didn't Venera3 explain that basically hypocalcemia shouldn't be a thing because it can't devlop in the time frame of the game? #45564 (comment)
it shouldn't be, your intake should make it not happen unless it happens over many years assuming you eat something with calcium in it every once in while, and the maximum extent for it in this PR, is very mild to medium muscle stiffness, so only low level deficiency, especially given calcium pills exist around the place.
The reason it still exists, but in a very unlikely state, is so drugs that may impact the body's metabolism can make it happen over a more drastic timespan, thus the player has more consequences for their abuse 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.
300 days of absolutely no intake is astronomically unlikely in a normal gameplay situation, but I don't currently know enough about drugs or injuries to really have a take on how much they'd impact 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 specifically only implemented mild symptoms for these reasons as well, nerfing my already mild version, though I can probably reduce the speed malus if you think that works better.
as I've edited the PR summary to suggest, to remove calcium completely would definitely require a new PR purging calcium from all food items and drugs involved. |
B12: a healthy nonvegan adult has about 2000-5000 mcg of it stored in their liver (that's 500-1250 day's RDA) so the timeline could stand to be bumped up by a factor of two at least. Adding a max value to represent it being stored would fit well. Also, #47291 added support for effects influencing vitamins, so you could hook up a nice B12/Red blood cell interaction instead of fudging it with fatigue/strength reduction. |
alright, max is what would be 500 days (4000 game units) + effectively what it takes to reach the threshold for deficiency which is sort of arbitrary, it would be nice if I could define as a default starting amount and have units to base it on, but for now it makes sense just to keep it sort of arbitrary using the current system imo Drugs like alcohol of course, can decimate one's b12 supply, and I'm sure plenty of others. |
what's an ideal suggested fatigue_max_val value? |
I wouldn't go over 500 (about the midpoint between Very Sleepy and Dead Tired) for the highest intensity. You can scale up from 100 (almost Sleepy) in 200-point steps. |
I'm really not sure it's worth including b12 deficiency. Its effects are vague and hard to spot for a very long time after it develops, and nutritional deficiencies are hard to get in the first place. You'd need to have an effect that kicks in after two years and doesn't have any significant sequelae for much longer. Scurvy is the main one you want, and iron deficiency exacerbated by all the bleeding in combat. The other vitamin deficiencies just aren't going to happen unless we make them common due to mutations |
I'm planning on adding effects that drain b12 far more quickly to the effects of some drugs like alcohol to roughly simulate their effects on b12 irl (a hyper-realistic approximation would take way more code knowledge than I have, but I think just changing the rate value while drunk would be a good start) |
Perhaps vitamins in gane could drain more quickly than real life. In the game due to the blob humans heal incredibly quickly. Where do these nutrients come from? I don't know if it would be a desirable direction to take things, but until we can automate tasks I think vitamins levels would have to decrease much faster. Once time can pass by faster, I think seeing 100 days for a deficiency would be much more common. But for now, there are a few questionable things. For instance, broken limbs are functional within 5 days and healed in 10. I know that's only possible because of the blob, but I imagine you would need a tremendous amount of nutrients to recover all the constant injuries you receive, and would need to eat way more to compensate. Until time passes more quickly, I don't think most people will ever see a vitamin deficiency. |
I think the amount of fun to be had from vitamin deficiencies is vanishingly small, there's no need to make it more punitive just to show off the system. Even with severe alcoholism, B12 deficiency is fairly uncommon. It's just not a thing seem in an acute setting, you're looking at stuff that develops over long periods of time here. I would suggest that you stop looking for ways to make the existing vitamins relevant and instead look into nutrient deficiencies in wilderness survival. For this pr in specific, adding scurvy would be wonderful. In the longer term, perhaps hyponatremia or hypomagnesemia is more relevant. |
If I may repeat myself from the discord, if you want to add something because of a gameplay consideration (in this case, "eat the right things", more or less), you can always brand it as a weird apocalyptic/transdimensional/mutation effect - if you don't try to sell it as a "realism" thing, it won't be measured up to reality and you can go crazy with it. |
alright, so we have scurvy, and iron deficiency takes longer to occur "naturally" without injury than in vanilla, excess conditions were removed as they'd never happen and would confuse the player as they have been already. |
I may implement vitamin excess effects in a future PR, which one can see very apparently in the case of vitamin A for example off the top of my head, eating too many livers is a hazard seen in survival situations because of vitamin A from what I recall |
I think this is ready? |
We are players which really like your game, and we find the vitamin system is no longer available after some tests and check CDDA browser. So we decide to check github to find out what is happening. After watched your discussion, we do believed that you think too compliacted for this system. The purpose of this system is force player to find various kinds of food, including meat, vegetable, fruit and so on. Only thing you need to do, is try to make a system look like enough "realism", and the player will try to fix it to reality by imagination. Like meat(VB, IRON), vegetable(VA), fruit(VC), that is enough for player. The symptom do not need too complicated, just show some influence or debuff(lower stat etc.) and player will do something, only thing you need to do is make the symptom enough "realism". But the calcium need to be fixed, because there are no too many way to get calcium in game, now you have to drink 4 milk per day to ensure your calcium is enough. We suggest that you can improve calcium of other food, so milk will not be the only way to get calcium. Hope CDDA will be funner in the future. |
* remove all unlikely deficiencies and excess json lines, max fatigue for scurvy
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: |
Summary
SUMMARY: Balance "Malnutrition is not good for you"
Purpose of change
PK rebalancing has had working penalties for malnutrition for a while, to my eyes they seem fairly accurate to real life, the scientific articles and 5000 word essays on what values should specifically be had at a given level can be had later, for now we have a missing feature existing and working from readily available json changes.
Describe the solution
Malnutrition didn't do things other than iron deficiency due to the blood system PR, now it has negative effects on the player for more than iron deficiency.
Drugs altering vitamin metabolism in a future PR, leading to these deficiencies being more common than a player who does not consume drugs would face.
Some are very unlikely to be faced as is, but are implemented largely in preparation for these steps.
Describe alternatives you've considered
Allow players to eat only iron rich diets, and ignore all other vitamins in shame forever.
Testing
play game, eat terrible diet or too many multivitamins, suffer
Additional context
using some data from #33776
Data:
Iron deficiency is unchanged other than the loss-rate, it should occur at about 100 days of no real iron intake, it's not terribly likely, but does occur with vegetarian diets, which I figured would have some level of intake that would make this take more than 100 days with most players, it's quite uncommon in the US population, at least 5 million adults have it.
Vitamin C deficiency results in pain, fatigue, and overall negative health, this gets worse with progression
it should take about a month of no intake
"max_intensity": 3, "base_mods": { "pain_max_val": [ 35 ], "pain_chance": [ 900 ], "pain_min": [ 1 ], "pain_max": [ 5 ], "fatigue_chance": [ 900 ], "fatigue_max_val": [ 500, 200 ], "fatigue_min": [ 10 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ 0 ], "h_mod_chance": [ 900 ] }, "scaling_mods": { "pain_chance": [ -300 ], "fatigue_chance": [ -200 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ -100 ], "h_mod_chance": [ -300 ] },
Hypervitaminitosis does nothing for now as it's implementation is very vague and abstract, I'm considering changing it to have a minor health stat debuff as generally it's probably not ideal to have too much vitamin A, and probably a few others, but it would be very mild given how vague it is as a concept.