Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0006512Dwarf FortressDwarf Mode -- Thoughts and Preferencespublic2014-06-24 11:122014-09-25 21:28
Quietust 
Toady One 
normalminorhave not tried
resolvedfixed 
0.34.11 
0.40.13 
0006512: Cave Adaptation broken, does not cause pain, stun, or nausea
In previous versions of Dwarf Fortress (most notably 0.28.181.40d and earlier), a cave-adapted dwarf exposed to sunlight would experience Pain, Fatigue, Stun, and possibly also Nausea (depending on the degree of adaptation), as well as an unhappy thought.

In the current version, however, this appears to be broken - it applies the unhappy thought and the Fatigue, but the Pain/Stun/Nausea are skipped entirely.

I played multiple fortresses back in version 0.31.xx and wondered why my dwarves never vomited when they went outside - in all likelihood, it was broken back then as well.
In version 0.23.130.23a (and likely also 0.281.181.40d), CaveAdapt 604800-800000 would trigger the following:
* Nauseated by the sun lately
* +200 fatigue (unless NOEXERT)
* +50-99 nausea (unless NONAUSEA)
* +20 pain (unless NOPAIN)
* +50-99 stun (unless NOSTUN)

Similarly, CaveAdapt 403200-604799 would trigger the following:
* Irritated by the sun lately
* +50 fatigue (unless NOEXERT)
* +10 pain (unless NOPAIN)
* +25-49 stun (unless NOSTUN)
No tags attached.
Issue History
2014-06-24 11:12QuietustNew Issue
2014-06-24 11:34QuietustNote Added: 0024842
2014-07-31 06:33QuietustNote Added: 0028024
2014-07-31 06:48TalvienoNote Added: 0028027
2014-08-07 09:56QuietustNote Added: 0028527
2014-08-07 10:09QuietustNote Added: 0028528
2014-08-07 10:104maskwolfIssue Monitored: 4maskwolf
2014-08-07 10:50SirPenguinNote Added: 0028533
2014-08-07 14:34QuietustNote Added: 0028541
2014-08-07 14:35QuietustNote Edited: 0028541bug_revision_view_page.php?bugnote_id=0028541#r10920
2014-08-07 21:21FootkerchiefAssigned To => Footkerchief
2014-08-07 21:21FootkerchiefStatusnew => confirmed
2014-09-16 12:46Toady OneStatusconfirmed => resolved
2014-09-16 12:46Toady OneFixed in Version => Next Version
2014-09-16 12:46Toady OneResolutionopen => fixed
2014-09-16 12:46Toady OneAssigned ToFootkerchief => Toady One
2014-09-25 21:284maskwolfIssue End Monitor: 4maskwolf

Notes
(0024842)
Quietust   
2014-06-24 11:34   
If the removal of these effects was intentional, then at the very least the thought text needs to be changed (since they don't actually get irritated or nauseated).
(0028024)
Quietust   
2014-07-31 06:33   
Just checked version 0.40.05, and this is still the case.
(0028027)
Talvieno   
2014-07-31 06:48   
That's strange - in 40.03 I had dwarves vomiting all over the place outside my fortress... I'm not sure what else that could've been. I remember very clearly having dwarves vomiting a lot outside in 31.25 as well - that looked like a total mess in a snowy glacier biome. Perhaps it might not be fully broken... it might just be that they have to be inside for far longer to get it to work?
(0028527)
Quietust   
2014-08-07 09:56   
Cave adaptation "happens" at exactly one place in the game's code, and I've examined that place rather thoroughly and it does not do anything with pain, stun, or nausea - if your dwarves are vomiting outside, it is either the result of an Injury (e.g. blunt trauma to the guts) or a Syndrome (inflicted by a titan or forgotten beast).

As a quick test, I just did a test embark in a new world, used DFHack to give everybody 2 years worth of cave adaptation, then had them stand outside - they all got bad thoughts about being "nauseated by the sun lately" and were observed to have increased fatigue, but they showed no sign of being stunned or nauseated.
(0028528)
Quietust   
2014-08-07 10:09   
Something else strange appears to be going on - if I attempt to forcibly make a dwarf nauseated (by setting the relevant timer), the nausea dissipates immediately once I unpause the game. The same happens with pain, dizziness, paralysis, numbness, and fever, but not winded/stunned/webbed.
(0028533)
SirPenguin   
2014-08-07 10:50   
Could it be that Fort Mode timers are using the Adventure Mode timescale? 34.01 had an enormous amount of rework done to syndromes, their triggers/timing, etc.
(0028541)
Quietust   
2014-08-07 14:34   
(edited on: 2014-08-07 14:35)
angavrilov suggested a more likely explanation on IRC - nausea, pain, dizziness, paralysis, numbness, and fever are all controlled by Syndromes and Wounds, so it's possible that the code is discarding those status ailments if it cannot detect a reasonable source for them.