Difference between revisions of "Cell Reset"

7,731 bytes added ,  18:00, 11 July 2016
Rewrote the whole section, based of many tests
imported>QQuix
(Added info about dead actors)
imported>QQuix
(Rewrote the whole section, based of many tests)
Line 79: Line 79:
One alternative that works fine is to use [[ResetInterior]] on the hidden cell just after moving the disposable actor there.
One alternative that works fine is to use [[ResetInterior]] on the hidden cell just after moving the disposable actor there.


== Cell Reset x Actors==
[[FormID#Dynamic references|Dynamic]] actors are removed, dead or alive, scripted or not scripted.


Cell Reset does not remove information about [[FormID#Non-dynamic references|non-dynamic]] actors in the cell, dead or alive, scripted or not scripted, persistent or not. (which makes sense, as NPCs go all over the place and would be bad if they were reset back to their editor location because the cell they happen to be at the moment got reset)
Actors are automatically removed from a cell by the Oblivion engine when one of two events occur after the 72 hours Cell Reset Timer expires (either naturally or by [[ResetInterior]]): 
#the game is saved, or
# the player returns to the cell.
In other words, when the game is saved after the 72 hours have passed, some actors are removed and will not be part of the save file. Or, if the player returns to the cell more than 72 hours after he left, some actors are removed from the cell. Which actors are removed in each case will be detailed below.


Dead bodies of [[FormID#Non-dynamic references|non-dynamic]] actors are removed from view when the cell is reset. The game keeps the information, so those actors can be resurrected, if needed. If a script resurrects that actor while the player is the same cell, the actor will not show up automatically.  [[Reset3DState]] does not help here. To show the resurrected actor either (1) move it somewhere else and back (can be done in the same frame, one [[MoveTo]] after another) or (2) the player must leave and reenter the cell.
The event of reentering the cell splits into two scenarios, depending on the use of [[ResetInterior]], so there are three distinct scenarios when actors are removed:
*External Cell Reset (ECR) – When the game is saved more than 72 after the player left the cell or any time the game is saved after the [[ResetInterior]] function is used (even if before the 72 hours).
*Internal Cell Reset (ICR) – When the player reenters the cell after the 72 hours Cell Reset Timer expired and [[ResetInterior]] has not been used
*Internal Cell Reset Extended (ICRx) – When the player reenters the cell after [[ResetInterior]] has been used after the last time he left.


Note on ResetInterior – This function sets the Cell Detach Time and the Cell Reset Hours values to -1, so the next time the player enters the cell, the Interior Cell Reset will be executed, as if the Cell Reset Timer has expired.
The following table resumes what happens in each scenario to actors with various combinations of characteristics
{|border="1" cellpadding="5" cellspacing="0" style="text-align: center;"
|-
! scope="col" style="width: 80px; background:#efefef;" |CS / Dynamic
! scope="col" style="width: 80px; background:#efefef;" |Dead
! scope="col" style="width: 80px; background:#efefef;" | Persistent
! scope="col" style="width: 80px; background:#efefef;" |Respawn
! scope="col" style="width: 60px; background:#efefff;" |Not Removed
! scope="col" style="width: 60px; background:#efefef;" |ECR - External Cell Reset
! scope="col" style="width: 60px; background:#efefef;" |ICR - Internal Cell Reset
! scope="col" style="width: 60px; background:#efefef;" |ICRx - Internal Cell Reset Extended
|-
! style="font-size: 110%;" |CS
! style="font-size: 110%;" |N
! style="font-size: 85%;" |Y/N
! style="font-size: 85%;" |Y/N
! style="font-size: 110%;" |•
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |
|-
! style="font-size: 110%;" |CS
! style="font-size: 110%;" |Y
! style="font-size: 85%;" |Y/N
! style="font-size: 110%;" |N
! style="font-size: 85%;" |
! style="font-size: 85%;" |
! style="font-size: 110%;" |•
! style="font-size: 110%;" |•
|-
! style="font-size: 110%;" |CS
! style="font-size: 110%;" |Y
! style="font-size: 85%;" |Y/N
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |•
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |
|-
! style="font-size: 110%;" |DYN
! style="font-size: 110%;" |N
! style="font-size: 110%;" |N
! style="font-size: 85%;" |Y/N
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
|-
! style="font-size: 110%;" |DYN
! style="font-size: 110%;" |N
! style="font-size: 110%;" |Y
! style="font-size: 85%;" |Y/N
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
|-
! style="font-size: 110%;" |DYN
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |N
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
! style="font-size: 110%;" |•
! style="font-size: 110%;" |•
|-
! style="font-size: 110%;" |DYN
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |N
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
|-
! style="font-size: 110%;" |DYN
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |N
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
! style="font-size: 110%;" |•
|-
! style="font-size: 110%;" |DYN
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |Y
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |
! style="font-size: 110%;" |•
|}
Sort of obvious note: actors that may be removed by more than one event, are removed by the event that occurs first.
As seen in the table, actor characteristics/flags, directly or indirectly, affects the Cell Reset behavior.
These are the general rules, which may be overruled depending on the combinations (discussed later on):
*Quest Item flag - Actors with the “Quest Item” flag checked are never removed, under any circumstance. Period!  All considerations below refer to non-Quest-Item actors.
*Essential flag – The Essential flag affects Cell Reset only indirectly: since they do not die, all considerations about dead actors do not apply to Essential actors.
*Respawn flag
**Dynamic actors with the Respawn flag on are only removed from outside the cell (ECR and ICRx). Otherwise, they are still valid when the player reenters the cell and are not removed with their non-respawn counterparts.
**If not removed, Respawn actors continue in the cell with most of their values unchanged. Scripted actors keep running their scripts with the vars preserved.
**The only noticed difference is that dead actors resurrect (standing up and [[GetDead]] returns false), although their Health remains zero.
*Persistent –
**Dynamic, persistent actors are only removed with ICRx.
**Persistence on non-dynamic actors, of course, depends on how the “Persistent reference” flag is set when the actor is created in the Construction Set.
**Persistent, dynamic actors are created when a reference is dynamically created based on a Base Object with the “No low level processing” off.
**Non-persistent, dynamic actors are created when a reference is dynamically created based on a Base Object with the “No low level processing” off.
*Dead –
**Dead actors are removed when the player reenters the cell.
**Dead bodies of non-dynamic actors are removed from view when the cell is reset. The game keeps the information, so those actors can be resurrected, if needed. If a script resurrects that actor while the player is the same cell, the actor will not show up automatically. Reset3DState does not help here. To show the resurrected actor either (1) move it somewhere else and back (can be done in the same frame, one MoveTo after another) or (2) the player must leave and reenter the cell.
*[[FormID#Non-dynamic references|non-dynamic]] –
**Cell Reset does not remove information about non-dynamic actors in the cell, dead or alive, scripted or not scripted, persistent or not. (which makes sense, as NPCs go all over the place and would be bad if they were reset back to their editor location because the cell they happen to be at the moment got reset)
**In a few cases, Cell Reset may flag their FormIDs as Deleted (see [[IsRefDeleted]]), but does not remove the FormID from the game. The actor himself does disappear, thou.
*[[FormID#Dynamic references|Dynamic]] – Dynamic actors may or may not be removed, depending on the other flags
Some other ways of reading the table:
*ECR removes all dynamic, non-persistent actors, regardless of the other flags.
*ICRx removes all dynamic actors, regardless of the other flags.
*ICRx is the only way of removing persistent, dynamic actors
*ICR and ICRx remove all dead, non-respawn actors, including the non-dynamic ones.
*The only non-dynamic actors removed are the dead, non-respawn actors. As mentioned, they are not actually removed. Their FormIDs are flagged as Deleted ([[IsRefDeleted]] returns true), but are not removed from the game and remains valid ([[IsFormValid] returns true])
*Dynamic, non-persistent actors are removed by ECR. Since, sooner or later, everybody saves the game, these actors do not bloat the savegame file (all vanilla leveled list creatures are in this category, as they have the “No low level processing” flag checked and, therefore, spawn as non-persistent )
*If the player never reenters a cell containing dynamic actors, the persistent ones will never be removed. Non-persistent actors are removed by ECR.
*If the player reenters the cell, dynamic dead actors are removed from the game.
*Respawn actors removed by ECR do not respawn because the removal is done before the player enters the cell, so when the player enters, the references to those actors are already gone.


==Cell Reset x Items==
==Cell Reset x Items==
Anonymous user