Actors in inactive cells don't heal from resting
In vanilla MW, when the player rests, all actors in the world regain health as well (https://wiki.openmw.org/index.php?title=Research:Stats_and_Levelling#Resting). In OpenMW this is currently done for actors in active cells only.
This has a big impact on gameplay because it allows to exit a dungeon mid-fight, rest, come back and continue fighting with no penalty.
#2 Updated by R. D. over 1 year ago
I just tested this, and yes, NPCs including Foryn Gilnith do regain health if you sleep.
I suspect the reason that the other poster here thought this NPC did not regain health is because he only waited, he did not sleep. The area immediately outside Foryn Gilnith's Shack is a no-sleep area. Foryn Gilnith will not regain health if you just wait. This had me confused for a little bit, too.
Foryn Gilnith will regain 5.2 health points per hour of sleep. Another NPC, Tanisie Verethi in Addamasartus, will regain 3 health points per hour of sleep.
I also tested fatigue regeneration with Foryn Gilnith. He would regenerate fatigue gradually while I was in the cell with him, but once I left, the fatigue value stopped changing. If I waited or slept for an hour outside the cell, though, his fatigue refilled to full.
I tested magicka regeneration with Melar Baram in Addamasartus. He would regain 7.5 magicka points every hour I slept while outside the cell. He did not regain magicka if I only waited.
The NPCs regained their health, magicka and fatigue by these same amounts if I slept/waited in the same cell as them. Fatigue was refilled to full even when the NPC had been brought down to around -50 fatigue.
#8 Updated by Andrei Kortunov 4 months ago
We can skip non-loaded cells
Which cells are opposite to non-loaded? Active ones?
In this case we can get active cells:
And iterate over creatures and NPC in these cells:
No, there is a difference between 'loaded' and 'active' cells.
loaded - (State_Loaded in CellStore) means the contents of the cell have been loaded from game files and can be modified. Once loaded, a cell is never unloaded (unless you start a new game or load another saved game). Cells can be loaded as a result of script access, so there may be some cells that are loaded even if you haven't visited them before.
active - cell is in the current scene (cell grid) that surrounds the player. All active cells are also loaded cells.