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

Make vitamin deficiencies and hypervitaminosis non-cosmetic. #33776

Closed
wants to merge 1 commit into from
Closed

Make vitamin deficiencies and hypervitaminosis non-cosmetic. #33776

wants to merge 1 commit into from

Conversation

nexusmrsep
Copy link
Contributor

Summary

SUMMARY: Features "Make vitamin deficiencies and hypervitaminosis non-cosmetic."

Purpose of change

For some unknown reason it seems that vitamin deficiencies and hypervitaminosis had only cosmetic meaning, with no real symptoms/consequences other then triggering messages.

I have two theories: either there once was something there and it was removed, and I can't find it even by digging the 'blame' history of the project, or there was nothing there from the beginning, and I'm under auto-suggestion that there was something.

Whatever the truth realy is, I'm proposing to change this current status quo.

Describe the solution

The deal is to deliver a set of symptoms and medical effects to the vitamin deficiencies and hypervitaminosis, possibly as close to real life medical symptoms of those afflictions, as viable from the game design standpoint. In effect:

  • every type has it's own distinct symptoms, but some symptoms are similar between deficiencies;
  • there are some cosmetic symptom messages describing what character feels or observes, and there are non-cosmetic discrete symptoms; sometimes symptoms trigger some real effects on the player
  • symptoms are tiered (3 levels, with exception for hypervitaminosis, and Vit A that has a moving scale withing a single pool of effects)
  • symptoms from different levels can stack, but were made not to overwhelm
  • symptoms may also trigger more often with progression of severity
  • some symptoms are in fact other in-game effects like nausea, etc.
  • many symptoms are suppressed when character is sleeping.

1. Hypervitaminosis
That one was easy to make, but is also a little slack on my side. Since each excess of certain vitamin can in real life cause it's own set of symptoms, and here hypervitaminosis throws them into one bag, I consciously decided to leave it be as is, but follow the direction of it causing general metabolic instability. To achieve it I linked it with "Chemical Imbalance" trait/mutation. It will trigger a set of often contradicting effects upon a player, to simulate that their body can't self regulate too well, and homeostasis is off balance. This has no levels or tiers.

2. Anemia (iron deficiency)
Lack of iron impairs production of hemoglobin and therefore ability to carry oxygen by red blood cells. This triggers variety of symptoms, focusing on weakness, fatigue, cold limbs, later in dizzyness, soreness, breathlessness, and severe malaise and lethargy. Base anemia symptoms: fatigue, loss of stamina, loss of strength, impact on health are placed in effect JSON.

  • level 1 symptoms are cold limbs, pale skin, and weakness;
  • level 2 anemia introduces dizzynes, shakes, headaches, cravings for non-comestibles, mouth and tongue soreness;
  • level 3 anemia introduces restless legs, severe tiredness, breathlessness;

3. Hypocalcemia (calcium deficiency)
Calcium regulates electric conductance in human body, and lack of ionized calcium in blood serum results in a variety of neuromuscular symptoms: numbness, twitches, contractions, cramps, at later stages becoming very violent and severe variations of such. Main symptoms: loss of dexterity and loss of speed are placed effect's JSON.

  • level 1 symptoms are mostly numbness
  • level 2 calcium deficiency introduces more neuromuscular symptoms
  • level 3 calcium deficiency introduces severe neuromuscular symptoms, seizures included

Calcium deficiency does not trigger osteoporosis like the previous flavor suggested, at least not in short-term acute form we deal here. It'd have to be years long.

4. Vitamin B12 deficiency
Vitamin B12 deficiency causes B12-specific anemia, gastric symptoms (including loss of taste) and progressive neurodegeneration, starting from minor neurological symptoms (brain fog - loss of focus, depression), memory loss, and ending (in more severe stages) in dementia, here represented by forced skill rust. Symptoms of anemia and health cap are placed in effect's JSON.

  • level 1 symptoms are mostly anemia related, plus loss of focus (brain fog)
  • level 2 B12 deficiency introduces more gastric and memory problems; at this stage loss of taste activates and map memory is impaired
  • level 3 B12 defficiency introduces dementia and force activates skill rust. B12 deficiency effect (shown in menu) descriptions were for that reason expanded to tell player where the rust comes from.

5. Night blindness (Vit A deficiency)
Vitamin A deficiency has two main symptoms: night blindness and xerophthalmia (dry eye syndrome).
Night blindness was built in to affect sight depending on available light; you see well in light, but your threshold of seeing anything in dark places is hampered, your eyes cannot adjust to the darkness. No shadows for you, only darkness. This is progressive with severity, but now the unlit interiors are far more likely to be in complete darkness for you (take a flashlight with you) and night falls more instantly. There is little to no dusk for you, sun sets and you are quickly engulfed in darkness.
Other symptom - xerophthalmia - for this effect was placed on a moving scale and a common pool of symptoms that starts with cosmetic messages and ends in short but sudden loss of sight. The scale shifts with severity, so severe symptoms don't trigger on low severity, and some cosmetic effects don't show on highest severity, while the pool itself is shared among the levels.

6. Scurvy (Vit C deficiency)
Vit C deficiency initial symptoms are malaise and lethargy (quite like anemia but not connected to hemoglobin production), then progresses into various health problems: moving teeth, spontaneous bleeding, jaundice, gastric problems, swollen limbs, muscle twitches, etc. (fatigue & poor wound healing are placed in effect's JSON). Scurvy also causes mood changes and depression.

  • level one scurvy focuses on malaise and lethargy symptoms
  • level two scurvy introduces petechiae (red bloody blotches on the skin), teeth and gums symptoms, dry mouth and eyes,
  • level three scurvy introduces jaundice, edema (swollen tissues), neuropathy (neural disease) & nausea, spontaneous bleeding.

Describe alternatives you've considered

Leaving it cosmetic, but that is actually no option. You don't build a sophisticated system that simulates something to leave it with no effect in the end. Or a psychological effect only.

Additional context

@I-am-Erk
You may be the right person to take a look at this idea.

TODO:

  • main features
  • extensive testing
  • tweaks
  • cleanup if needed

@nexusmrsep nexusmrsep added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Items: Food / Vitamins Comestibles and drinks [C++] Changes (can be) made in C++. Previously named `Code` labels Sep 2, 2019
@kholat
Copy link
Contributor

kholat commented Sep 3, 2019

They used to have all this, it somehow got removed at some point? I remember I used to have vitA deficiency a lot which would lower my perception, also hypocalcemia which reduced my bash damage resistance.

@ghost
Copy link

ghost commented Sep 3, 2019

Yep I remember this too, and cannot remember any removal..?

@nexusmrsep
Copy link
Contributor Author

It must have happened one point in time before 0.D release. But I couldn't pinpoint the time and reason. Whatever it was, in it's absence I thought I'd try to adjust them anyway to something resembling true medical symptoms.

@stale
Copy link

stale bot commented Oct 3, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Oct 3, 2019
@I-am-Erk I-am-Erk added the (P3 - Medium) Medium (normal) priority label Oct 3, 2019
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Oct 3, 2019
@RosieMcCattail
Copy link
Contributor

Overdosing on water-soluble vitamins is almost impossible, so you're probably not risking a B12 or C overdose at all. Just a note.

Copy link
Member

@I-am-Erk I-am-Erk left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, I was away when you made this and forgot about it when I came back.

Overall, I am not a fan of how we present vitamin deficiencies - "your anaemia improves" etc - but I think it is out of the scope of this PR to fix those. Later on we'll want them to be much more vague and easily mistaken for each other, so that you need to use medical skills and tools to figure out what's wrong with you.

},
"scaling_mods": {
"dex_mod": [ -2 ],
"speed_mod": [ -15 ]
Copy link
Member

Choose a reason for hiding this comment

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

Really, hypocalcaemia in a gameplay relevant way has nothing to do with bones. You'd have to be severely hypocalcaemic for many years to get osteoporosis.

In game, hypocalcaemia that matters would be profound, nerve-affecting lack of calcium. It is very hard to get, but the main symptoms would be numbness and seizures, followed by death if it hits too low a level.

For sanity checking, this is not something you can really get through malnutrition unless you try extremely hard. I am not convinced it belongs in the game at all yet.

"h_mod_min": [ -1 ],
"h_mod_min_val": [ -50 ],
"h_mod_chance": [ -200 ]
},
Copy link
Member

Choose a reason for hiding this comment

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

This looks great to me, based on numbers alone. The check would be how long it takes to develop anaemia and how fast these symptoms worsen. Until we have a blood loss system I'd assume it should take a few weeks to months of insufficient dietary iron to progress in anaemia stages.

"fatigue_chance": [ -200 ],
"h_mod_min": [ -1 ],
"h_mod_chance": [ -200 ]
},
Copy link
Member

Choose a reason for hiding this comment

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

This is pretty reasonable, although the primary effect of b12 deficiency is numbness (and it doesn't always go away). It is very difficult to develop b12 deficiency through dietary insufficiency, but I think that is already modeled by b12 being common in foods in the game.

b12 deficiency also causes anaemia, so you may want to consider copying some of the anaemia effects in here at a lower level.

"h_mod_min": [ -1 ],
"h_mod_min_val": [ -100 ],
"h_mod_chance": [ -300 ]
},
Copy link
Member

Choose a reason for hiding this comment

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

What, you aren't modeling the loss of teeth and hair?

Scurvy is a potentially fatal illness. Do we have the ability to model slower wound healing and increased infection risk in effects yet? Scurvy also causes anaemia and could have some of the anaemia effects copied over at reduced levels, just like b12 deficiency.

Unlike the others, scurvy actually does happen with real diets and it's important we do a good job on this one. Looking good so far.

@yowshi
Copy link
Contributor

yowshi commented Nov 26, 2019

should it be mentioned that it is like almost impossible to get hypervitaminosis for vitamin C since it is water soluble and extreme excess gets flushed out by the kidneys?

@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/concerning-symptoms/22085/21

@ZhilkinSerg
Copy link
Contributor

Feel free to reopen if you want working on it again.

@nexusmrsep nexusmrsep deleted the vit_deficiencies branch May 4, 2020 17:17
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: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON (P3 - Medium) Medium (normal) priority stale Closed for lack of activity, but still valid.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants