How do I get a good night's sleep?

I've noticed that if I stay out too late or work myself to exhaustion during the day, I'll only have half my maximum energy the next morning.

However, exhaustion does not seem to necessarily guarantee a half-energy day and neither does staying up late; I've done both of those individually without any problems.

What are the conditions that trigger the half energy penalty? What can I do to get the most out of a working day while avoiding it?

I bit the bullet and decompiled the source code, and here's what I've been able to glean from it.

In summary, there are two factors that contribute to an energy penalty:

• If you are exhausted, you'll lose half your energy the next day. This only kicks in when you're properly exhausted and become sluggish, not when it just says "you're starting to feel exhausted".
• If you stay up past midnight, you'll lose up to half your energy, depending on how far past midnight it is (if it's only 12:10am, the energy loss is so small that you probably won't even notice it).

These two factors are applied cumulatively, so it's possible to wake with even less than half your energy.

One important (and possibly unintuitive) thing to keep in mind is that, as long as you're not exhausted, the energy you go to bed with has absolutely no effect on the energy you wake up with. If you go to bed late, it's entirely possible to wake up with less energy than you went to bed with. And if you work yourself down to near-exhaustion (but not full exhaustion) and go to bed early, you'll wake up with full energy.

Here's the step-by-step process of how your energy is calculated when you wake up:

• Your energy is set to its maximum.
• If you went to sleep exhausted, you lose half of your maximum energy, except for one point (so if your maximum energy is 270, you'll get 136).
• You lose a fraction of your energy based on how far past midnight it is. The formula's a bit complicated to describe, so here's a table (note the sudden leaps at 1:00am and 2:00am):

``````Sleep time    Energy loss (as percentage of maximum energy)
12:00am        0.0%
12:10am        2.5%
12:20am        5.0%
12:30am        7.5%
12:40am       10.0%
12:50am       12.5%
1:00am       25.0%
1:10am       27.5%
1:20am       30.0%
1:30am       32.5%
1:40am       35.0%
1:50am       37.5%
2:00am       50.0%
``````
• If it's past 3:00am, you'll lose half of whatever remains. I have no idea how it's even possible to get to 3:00am, but that's what the code says.
• Do you mean 2AM, not 3 at the end there? and as a programmer, i would have it set as a catch all kind of deal. If x is greater than 10, i don't care if its 100 or 1000, its still greater than 10.
– Ryan
Mar 29 '16 at 17:11
• Nope, definitely 3am. The bit of code that applies the linear(ish) penalty in the table treats any time after 2am as 2am, but for some odd reason there's an additional penalty after 3am. So (assuming there's no exhaustion penalty), 2:00am, 2:10am, 2:50am, and even 3:00am will reduce your energy by 50%, but 3:10am onward will reduce your energy by 75%. I'd post the decompiled code, but that might be a bit dodgy from a legal perspective.
– BenM
Mar 30 '16 at 20:53
• That is actually quite strange, but i guess it might just be unimplemented or changed features. What is annoying is when i go to bed at 1:30 with full energy and wake up with less than full.
– Ryan
Mar 30 '16 at 20:59
• Yeah, I find that annoying too, and fairly unintuitive. The takeaway point here is that unless you're exhausted, your energy when you go to bed has absolutely no effect on your energy when you wake up. In fact, I'm going to add that to my answer.
– BenM
Mar 30 '16 at 21:21
• There might be a caveat missing - I collapsed at 2:00 AM just inside my doorway the night before a festival, and woke up the next morning in my bed with full energy. It seems like you either get full energy the next day regardless for festivals, or something weird happens if you collapse in your house. Mar 31 '16 at 2:49

If you stay out past midnight or use energy until you're exhausted, you'll wake up the next day with half-energy.

When the game says "you're starting to feel exhausted..", you're not actually exhausted yet. It doesn't happen until you see the icon above your energy bar that looks like a blue face.

• In my experience, 1:00am is the cutoff, rather than midnight.
– BenM
Mar 20 '16 at 8:50
• In my experience my energy bar always restores fully as long as I get to the bed before 2:00 AM and am not exhausted. Mar 20 '16 at 16:33
• Exactly, this is why I haven't accepted the answer. I'd like a firmer bound than "past midnight", and I'm pretty sure I've gone to bed exhausted without getting the penalty before... Mar 21 '16 at 14:26