Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0009660Dwarf FortressDwarf Mode -- Thoughts and Preferencespublic2016-03-26 19:482017-11-11 15:40
chaosvolt 
Loci 
normalminoralways
resolvedduplicate 
0.42.06 
 
0009660: Happiness/stress balancing issues
This was discovered during discussion of an older issue that I mistakenly assumed to be the cause ( http://www.bay12games.com/dwarves/mantisbt/view.php?id=9074 [^] ).

Essentially, the nerfs to delicious tantrum spirals have pushed things to what might be might the opposite extreme, in that it takes a considerable amount of long-term stress before any visible effect occurs. While it's a relief to have dwarves that aren't as touchy as they used to be, this also makes it so that there's vastly reduced incentive to keep citizens happy.

In particular, it took examination in DFHack to confirm that a deliberately-engineered worst-case scenario was actually causing any stress whatsoever.
1. Acquire dwarves.
2. Intentionally make their lives a living hell.
3. Observe the extent to which it takes time (on the order of years) for any visible effects develop.
A save for examination is provided here: http://dffd.bay12games.com/file.php?id=11868 [^]

The starting seven were sealed in and subjected to a lack of entertainment, no beds or other furniture, drinking from an aquifer with no well (and obviously no booze), a repetitive diet, enforced nudity via a uniform assignment, forced exposure to sunlight after having had time to develop cave adaptation, accidental drinking of vomit (due to prior action), and summary execution of one dwarf.

The nudity alone would've driven dwarves insane within a month under the old happiness system, whereas if I recall I'd instituted that action at some point during the summer.
balance, happiness, Save Included, stress
duplicate of 0009074resolved Toady One Dwarves are permanently 'fine' and never experience mental deterioration (except Strange Moods). 
Issue History
2016-03-26 19:48chaosvoltNew Issue
2016-03-26 19:53chaosvoltTag Attached: balance
2016-03-26 19:53chaosvoltTag Attached: happiness
2016-03-26 19:53chaosvoltTag Attached: Save Included
2016-03-26 19:53chaosvoltTag Attached: stress
2016-03-26 19:53chaosvoltTag Attached: gratuitous torture of dwarves
2016-03-26 19:57chaosvoltNote Added: 0034928
2016-04-01 01:25jjl2357Note Added: 0034948
2016-04-01 12:32chaosvoltNote Added: 0034954
2016-04-01 13:44DaliTimelordNote Added: 0034956
2016-04-01 13:44DaliTimelordNote Edited: 0034956bug_revision_view_page.php?bugnote_id=0034956#r14114
2016-04-02 11:48chaosvoltNote Added: 0034964
2016-04-02 11:49chaosvoltNote Edited: 0034964bug_revision_view_page.php?bugnote_id=0034964#r14118
2016-06-13 13:23kane_tNote Added: 0035401
2016-06-13 13:24kane_tNote Edited: 0035401bug_revision_view_page.php?bugnote_id=0035401#r14281
2016-06-13 13:25kane_tNote Edited: 0035401bug_revision_view_page.php?bugnote_id=0035401#r14282
2016-06-14 03:47JustAnotherLurkerNote Added: 0035404
2016-06-14 07:36chaosvoltNote Added: 0035405
2016-06-15 09:13DwarfuTag Detached: gratuitous torture of dwarves
2016-06-15 11:51kane_tNote Added: 0035411
2016-06-15 12:50chaosvoltNote Added: 0035412
2017-01-23 15:14chaosvoltNote Added: 0036213
2017-03-12 12:20absolutetbiNote Added: 0036316
2017-03-12 12:34absolutetbiNote Edited: 0036316bug_revision_view_page.php?bugnote_id=0036316#r14651
2017-03-12 17:57chaosvoltNote Added: 0036317
2017-11-11 15:40LociNote Added: 0036857
2017-11-11 15:40LociRelationship addedduplicate of 0009074
2017-11-11 15:40LociStatusnew => resolved
2017-11-11 15:40LociResolutionopen => duplicate
2017-11-11 15:40LociAssigned To => Loci

Notes
(0034928)
chaosvolt   
2016-03-26 19:57   
Additional thanks to Shonai_Dweller for confirming that stress is in fact working at all.
(0034948)
jjl2357   
2016-04-01 01:25   
On the other hand, having constant live target practice for a squad of marksdwarves makes the entire fort stressed out by feeling vengeful.
(0034954)
chaosvolt   
2016-04-01 12:32   
I've seen that be the only reliable source of red thoughts at least, yes. I've yet to see it build up to the point of making the stress marker appear though. :V
(0034956)
DaliTimelord   
2016-04-01 13:44   
While reading Dwarf Therapist most of my dwarves have about 20,000-30,000 negative stress. Maybe it's because I start my embarks focusing on making lavish meals. :]

(0034964)
chaosvolt   
2016-04-02 11:48   
(edited on: 2016-04-02 11:49)
In other words, you've demonstrated further that in a normal fort, you won't get many, if any, tantrums. I mean if an intentional worst-case-scenario can't get a dwarf to crack in a reasonable timeframe, that's a sign we've gone too far. XP

(0035401)
kane_t   
2016-06-13 13:23   
(edited on: 2016-06-13 13:25)
I definitely find this myself. -50,000 to -99,999 stress is basically uniform in all of my forts, and it really doesn't take much. Part of the problem is the extent to which positive emotions stack linearly, and the lack of any kind of complacency built into dwarf personalities.

Realistically, dwarves shouldn't equally ecstatic the fifth time they see a great seat. Eventually, they should start growing inured to nice furniture and great meals. There should still be some effect, but it should definitely drop off after a few months.

And, each successive simultaneous emotion of the same type should have a logarithmic, not linear, compounding effect. That would also help balance between things that are common (positive emotions like "high-quality furniture" or "good booze") and things that are rare (like deaths or severe arguments).

(0035404)
JustAnotherLurker   
2016-06-14 03:47   
I have had a few dwarves become stressed to the neighborhood of 100k+ unintentionally despite a fully mature fortress. I don't recall specifics, but I believe most of them came about as a result of seeing the hundreds of bits and pieces of intelligent invaders scattered across the surface outside. "Horrified by witnessing death" x 500 does a pretty good job of rapidly stressing out non-hardened or particularly vulnerable dwarf.

That said, restricting the unhappy dwarves to the interior usually succeeded in a slow recovery over a period of months to years, depending on personality. The only outright stress-breakages (SRM, depression, berserk) I've had have all been in long-term residents and mercenaries, due to a lower buffer (mentioned below) and fewer potential destressors (labors, food, etc).

The vast majority of the population tended to remain happy without any dedicated efforts beyond a legendary dining hall/tavern with mist generators, minimal quarters, and the usual clothing/food/drink.

I don't think complacency is the right solution here, though, as kane_t suggested. That would easily lead to the situation where tantrums are not merely inevitable, but eventually unstoppable in long-lived fortresses. I'd say the (apparent) permanence of stressors is the bigger factor. That is, stressors and destressors currently appear to function as permanent flat modifiers. This means that the constant stream of destressors from furniture, meals, etc buffers stressors to such a degree that it takes a truly massive or prolonged shock (the aforementioned Death x 500, for example) to overcome. If, instead, there was a tendency for overall stress level to return to neutral (0) over time, with magnitude dependent on how far non-neutral it is, I feel we'd have a more reasonable system. Depending on the balance of recurring stressors/destressors, dwarves would level off at different happiness levels.
(0035405)
chaosvolt   
2016-06-14 07:36   
Hmm. Making stressors and destressors fade away enough that they can't keep unhappiness permanently offset sounds like a good way to handle it.

Another option is to lower the stress threshold before unhappiness ensues. This alone wouldn't prevent a normal fort from never seeing a tantrum, but it WOULD make stress more visible once things start going wrong.
(0035411)
kane_t   
2016-06-15 11:51   
The complacency thing was a minor point, but, to clarify, I didn't mean that positive emotions would drop off to zero, only that they would have less impact the more you're exposed to it. You might be getting 100% benefit from the quality of your nice furniture at first, but eventually it'll drop down to some minimum, like 40%. That way you can model dwarves being excited about new luxuries without having that effect be permanent, and still have luxuries be better than not having them.

However, I think that's only a minor change. It's the linear nature of all these effects that's the real problem, I think. Dwarf Fortress does a lot of things linearly that it really should do logarithmically, and stress is one of them. The first unpleasant thing you experience in a day has a bigger impact on you than the fiftieth, after all.

Also, switching the stress spectrum *itself* to logarithmic would prevent dwarves from going to a singularity on either side. It would be very hard to get to -99,999 stress because the closer you get to it, the more positive emotions you need to progress.

Basically, the way it seems to work now is that as long as your situation is more positive than negative (even if infinitesimally so) you constantly get happier and happier until you hit -99,999 and nothing bad can ever bother you. If stress was modelled logarithmically, the "quality" of your situation would correspond to some point on the graph, say -20,000, and you would get asymptotically happier as you approach that point, but you wouldn't be able to go past it until something in your life gets even better.
(0035412)
chaosvolt   
2016-06-15 12:50   
Maybe, but there's one issue your ideas are missing. In my worst-case scenario, there was as few sources of positive thoughts as I could, and they still never got unhappy in a reasonable timeframe. The threshold for unhappiness also could probably be changed, but by how much I'm unsure.

Making happiness and unhappiness taper off in effect as the stress/destress levels increase would mitigate some of these problems, but not fix it entirely.
(0036213)
chaosvolt   
2017-01-23 15:14   
Recent conversation I had concerning my test save for this bug:

[4:39 PM] Kallin: Torture Fortress has an insane ghost.
[4:39 PM] Chaosvolt: How long did you play it before someone got stressed?
[4:40 PM] Kallin: Like a year 3:
[4:41 PM] Chaosvolt: So, reminder. That means about TWO AND A HALF years of nudity, boredom, and the worst living conditions I could arrange before anybody even complained, let alone went nuts.
[4:41 PM] Kallin: It took another three years or so to snap. >_>
[4:42 PM] Chaosvolt: Now, stick 7 DF2012 dwarves in a barren hole with no booze, no well, no furniture, enforced nudity, and nothing to do and tell me how long before they become unhappy. <3
(0036316)
absolutetbi   
2017-03-12 12:20   
(edited on: 2017-03-12 12:34)
I think part of the reason for this in normal forts is http://www.bay12games.com/dwarves/mantisbt/view.php?id=9812. [^] Dwarves that have ever had alcohol are permanently changed to retain all the personality effects of it, making them almost immune to stress. I was able to drive dwarves insane in test fortresses only if I either did not bring any alcohol on embark or reduced the effects of alcohol. Alcohol seems to have an excessive effect on the stresses that dwarves receive. It still does take a significant amount of time for stress to cause problems without ever having alcohol, and that should probably be changed.

(0036317)
chaosvolt   
2017-03-12 17:57   
Ahahahah. How sad.

But yeah, even if you made a torture fort without alcohol (and why the hell wouldn't you), stress buildup is insanely slow. If this bug is accurate than it likely worsens the poor balancing but isn't the cause on its own.
(0036857)
Loci   
2017-11-11 15:40   
This issue is being tracked as 0009074.