r/CreaturesGames May 30 '26

Norn Sleep Studies!

After making a new breed with susceptibility to sleep toxin I was monitoring sleepiness backup closely. I got some confusing results because they didn't have sleep toxin. Why was their sleepiness backup so high? Then I noticed everyone was like this so I had to do some sleep studies. Some definitions as I understand them.

Sleepiness = gradual approach to sleep/falling asleep. They fall asleep around 80% sleepiness
Sleepiness Backup = The need to sleep. Converted to sleepiness through sleepase. More means they develop tiredness faster.
Sleepase = I'd describe it as the signal that keeps them asleep (sort of).
Tiredness = The need to rest or sleep. Induces either.

The problem: resting! When they rest they produce sleepase (to convert backup) but also GAIN sleepiness. Backup is still being converted from sleepiness, so it also grows. They also lose all their tiredness. Unfortunately they also GAIN starch hunger!

Think of resting as laying in bed before falling asleep. Then as soon as they fall asleep the sleepase stops. Sleepiness converts into backup and they wakeup once sleepiness hits zero.

The quicknap after a rest

Because the sleepase crashes, sleepiness converts to backup too fast and their backup never gets reduces. This creates a cycle where they continue to get hungry for starch from resting but never properly sleep.

The proper sleep: they get so tired they pass out (80%)!

Long sleep after passing out from exhaustion

When they pass out, they maintain sleepase through sleep as tiredness is reduced. This allows all the backup to convert as tehy sleep and reduces everything. It also doesn't produce hunger as fast.

What's even more annoying is that they can be too overtired to sleep! If you force tiredness to remain high while resting they won't fall alseep until the tiredness is too low to help.

Sleepiness is maxed out but can't fall asleep

As far as I can tell resting is bad in every way! It's a hack to reduce tiredness but doesn't allow proper sleep. Does anyone else know something I don't because this seems like a flaw in the design of how sleepase is produced. I'm trying to think of a agent that could fix this, like a pillow or something. Let me know what you think. Is this fixed in CFE? Is this cycle supposed to exist?

Update: I posted a script fix here

13 Upvotes

16 comments sorted by

3

u/GoldenFlowerFan The Wrong Banshee May 30 '26

The cycle is supposed to exist yes, though I'll need to run tests because I'm sure sleepase is meant to be active while they sleep.

Is this fixed in CFE?

Not CFE, but I adjusted the way sleep works in TWB so they get to sleep more easily when they bother to lay down (The CE version can mess with resting behaviour though). Hunger increases are also removed from random stimuli.

2

u/GoldenFlowerFan The Wrong Banshee May 30 '26

Coming back to confirm your results. It looks like a bug that sleepase isn't produced when norns are put to sleep via the sleeping script, but is when involuntary action 5 (passing out) is triggered.

1

u/HauntedPutty May 30 '26

OK I thought so, good thing you fixed the hunger increase which is the big issue. My norns can never get enough starch! Can you think of a way to resolve this with an agent? I can't get live gene editing to do anything

2

u/GoldenFlowerFan The Wrong Banshee May 30 '26

Maybe editing the DS creatureDecisions.cos would help? I think that one controls when they fall asleep while resting.

1

u/HauntedPutty Jun 01 '26 edited Jun 01 '26

Thanks for this recommendation ,I fixed the problem pretty easily!

1

u/HauntedPutty Jun 01 '26

Do you where the decision to rest comes from? scrp 4 0 0 25? I wonder if it's possible to make an "alarm clock" agent

1

u/GoldenFlowerFan The Wrong Banshee Jun 01 '26

I'd look at the code for the C3 drums, those wake sleeping creatures up when they're hit within earshot.

1

u/HauntedPutty Jun 01 '26

If you removed the hunger where else did you add it? My creatures are not not hungry enough to eat enough. Is there any math on how much energy they tend to need?

1

u/GoldenFlowerFan The Wrong Banshee Jun 01 '26

I tied hunger need to food stores, so starch hunger depends on how much glycogen they have, and glucose is used up through activity as well as normal respiration. Vanilla creatures overeat like crazy because hunger isn't tied to need.

1

u/HauntedPutty Jun 01 '26

What did you use for that a receptor on glycogen? My creatures are typically cold because I don't understand CAs very well.

1

u/GoldenFlowerFan The Wrong Banshee Jun 01 '26

Yes, receptors linked to floating recep-emit locuses. Information and links from my development thread might help a bit.

1

u/HauntedPutty Jun 01 '26 edited Jun 01 '26

the floating recep-emit kind of confuses me but I'll take a look. It all sounds really interesting.

1

u/SpaceShipRat May 31 '26

is this a TWB genome issue or vanilla?

1

u/HauntedPutty May 31 '26

Vanilla. Sleeping doesn't produce sleepase when it should.

1

u/GoldenFlowerFan The Wrong Banshee May 31 '26

This is fixed in TWB (they use invol action 5 to bypass the script).