View Issue Details

IDProjectCategoryView StatusLast Update
0012902Dwarf FortressDwarf Mode -- Jobs, Sleepingpublic2024-06-25 16:56
ReporterCrystalwarrior Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformPCOSWindowsOS Version10
Product Version50.11 
Summary0012902: NOSTUN Creature Caste flag prevents a creature from sleeping, even if they have a need to sleep
DescriptionIn a weird combination, if your custom creature has a NOSTUN flag enabled, and a NOSLEEP flag disabled, this means that your creature will *try* to sleep, but will immediately wake up on the next frame. This means that this creature is doomed to die, or at least spend an absurdly long time trying to sleep to reduce the sleepiness counter.
Steps To Reproduce* Create a creature with NOSLEEP set to false, and NOSTUN set to true
* (if using DFHack, view a unit, use gui/gm-editor, navigate to enemy.caste_flags and flip NOSTUN flag to true)
* Wait until the unit has a Sleep job
* (if using DFHack, view a unit's counters2 and set the sleepiness_timer to 80000+)
* Watch the poor unit sleep and wake up on the next tick, passing 10 ticks until next sleep attempt, and repeat.
Additional InformationWhile this behavior is not recorded with vanilla creatures, it makes it impossible to create a creature who cannot be STUNNED UNCONSCIOUS, but is able to WILLINGLY SLEEP.
I suggest if a creature has NOSLEEP set to false (meaning it has a need to sleep) that the NOSTUN flag is ignored for the sleeping job.
Tags51.01, AI, bed, behaviour, caste, flag, raws, sleep, unit

Activities

Quietust

2024-06-25 16:56

reporter   ~0042261

There is a note on the wiki for version 0.31 (posted exactly 14 years ago this past Saturday) claiming "Creatures with this tag never wake up from sleep in Fortress Mode and stay drowsy", so it would seem that this is a very old issue.

Add Note

Note

Issue History

Date Modified Username Field Change
2024-06-25 13:05 Crystalwarrior New Issue
2024-06-25 13:05 Crystalwarrior Tag Attached: sleep
2024-06-25 13:05 Crystalwarrior Tag Attached: unit
2024-06-25 13:05 Crystalwarrior Tag Attached: caste
2024-06-25 13:05 Crystalwarrior Tag Attached: flag
2024-06-25 13:05 Crystalwarrior Tag Attached: raws
2024-06-25 13:07 Crystalwarrior Tag Attached: 51.01
2024-06-25 13:07 Crystalwarrior Tag Attached: AI
2024-06-25 13:07 Crystalwarrior Tag Attached: bed
2024-06-25 13:07 Crystalwarrior Tag Attached: behaviour
2024-06-25 16:56 Quietust Note Added: 0042261