Mod description
What this mod adds
Description:
While Sleep Actions should always last longer than Nap Actions, Paras should be able to wake up from their sleep to resolve needs like using the bathroom or grabbing a midnight snack.
This mod was quite tricky to tune.
In addition to waking up to relieving needs, I wanted to make sure that sick paras could still do so, work shifts were considered and influence their decisions, and they need to also be prone to going back to bed if their sleep need wasn’t so great after the nature’s call (but still above the <= 4 triggers of the regular sleep action).
All must be done without causing paras to choose the go back to sleep action with the higher sleep value at just any time (i.e. only under certain conditions and within a certain time of getting out of bed).
So, after days of trial and error, here it is.
Specifics:
[code]
within Actions:All Actions:
SleepInBed:
Action Details:
End Condition:
RequirementsOneMustBeTrue:
• RequirementsAllMustBeTrue
◦ NeedValue Sleep >= 5 (higher than five would prevent sick paras from relieving their needs)
◦ RequirementsOneMustBeTrue
▪ NeedValue Bathroom <= 4
▪ NeedValue Hygiene <=3
▪ NeedValue Hunger <=3
• NeedIsFull Sleep
ToddlerSleepInBed: (toddlers are more sensitive, they wake up easier and faster as a result of their needs).
Action Details:
End Condition:
RequirementsOneMustBeTrue:
• RequirementsAllMustBeTrue
◦ NeedValue Sleep >= 5 (higher than five would prevent sick paras from relieving their needs)
◦ RequirementsOneMustBeTrue
▪ NeedValue Bathroom <= 4
▪ NeedValue Hygiene <=4
▪ NeedValue Hunger <=4
▪ NeedValue Affection <=4
▪ Emotions Angry >= 4
◦ NeedIsFull Sleep
Within Autonomy:Score Based Idle Autonomy Rules:
Added Autonomy ReliefNeed_Sleep-GoBackToBed:
Score 9 (stronger than most, because once needs are relieved after getting up mid-sleep, going back to bed should be a priority. In testing, occasionally paras will still decide to do other activities they enjoy still.)
Score Modifiers:
-1 for NeedScore Sleep, multiplied
+3 for TimeBeforeNextWorkDay < 12h
+2 for ActionPerformedNumberOfTimesSince UseToilet >= 1 since 2h
+1 for ActionPerformedNumberOfTimesSince WashBodyInShower >= 1 since 2h
+3 for ActionPerformedNumberOfTimesSince CryInShower >= 1 since 2h (I’ve been there, it’s exhausting)
+2 for EmotionsOfTypeValue Negative >= 3 (depression = going back to bed)
Context Requirements:
RequirmentsAllMustBeTrue:
• RecentActionHistorySince SleepInBed since 6h33m
• NeedDifferenceFromMax Sleep <= 2 = FALSE
• RequirementsOneMustBeTrue
◦ RequirementsAllMustBeTrue
▪ TimeBeforeNextWorkday > 2h22m
▪ NeedValue Bathroom >= 3
▪ NeedValue Hunger >= 3
▪ NeedValue Hygiene >= 3
◦ RequirementsAllustBeTrue
▪ NeedValue Sleep <= 7
▪ TimeBeforeNextWorkday < 9h
▪ TimeBeforeNextWorkday > 3h33m
▪ NeedValue Bathroom >= 4
▪ NeedValue Hunger >= 4
▪ NeedValue Hygiene >= 4
◦ RequirementsAllMustBeTrue
▪ NeedValue Bathroom >= 4
▪ NeedValue Hunger >= 4
▪ NeedValue Hygiene >= 3
▪ TimeBeforeNextWorkday > 24h
[/code]
Discussion
Comments
No wiki comments yet · be the first.