Level Instances, Data Layers and sublevels

How repeated Level Instances stay independent, how Data Layer and sublevel content is identified, and the context-aware lookup and reset nodes.

Level Instances create a problem that Stable IDs alone cannot solve: place the same source level three times and you have three Actors carrying the same authored ID. WSRF handles it with container identity, and the whole mechanism is automatic.

Container identity

Every managed Actor resolves to a FWSRFContainerIdentity:

FieldMeaning
ContextGuidInvalid for the main world; a deterministic GUID for a streamed container
SourceLevelPackageThe authored level the Actor belongs to
RuntimeLevelPackageThe level package it lives in at runtime
ContainerLabelA readable label for diagnostics
DataLayersThe Data Layer names that apply to it

Combined with the local Stable ID, that produces the effective identity used by records, the World Manifest and persistence snapshots.

Repeated Level Instances

Two copies of the same source level get different container GUIDs, so their Actors get different effective identities even though their local Stable IDs are identical.

Consequences, all of them automatic:

  • resetting one instance does not touch the other;
  • persistent state saved for one instance applies only to that instance;
  • a Stable-ID dependency resolves inside its own instance when you use the context-aware lookup.
Level Instance A: local id 7f3c… + container GUID A  ->  effective identity A
Level Instance B: local id 7f3c… + container GUID B  ->  effective identity B

Nothing to configure

You author the source level once, with ordinary state components. The instancing math is done by the shared container resolver at registration, respawn and manifest build. There is no per-instance setup step.

Context-aware nodes

When content is instanced, “find the lever with this ID” is ambiguous. These nodes disambiguate by container:

NodeUse
Find Loaded Actor In ContextResolve a local Stable ID inside the caller’s own container. Pass any Actor from that container as context.
Find Loaded Actor By Effective IdResolve a full effective identity directly
Reset World Region In ContextReset a region only inside the container owning the context Actor
FWSRFResetRequest::ContainerContextThe same restriction expressed on a full request

Inside instanced content, prefer Find Loaded Actor In Context over Find Loaded Actor. In a normal non-instanced map the two behave the same.

Data Layers

Data Layer names are part of the container identity, so records carry the Data Layers that applied to their Actor.

A reset targeting Actors in an inactive Runtime Data Layer does not activate it. Those records are marked Pending Restore and reconciled when the layer becomes active and the Actors register again — the same rule as unloaded World Partition cells.

Streamed sublevels

Independently streamed sublevels behave like any other container: their Actors resolve a container identity from their level package, unloading marks records StreamedOut rather than Destroyed, and reloading rebinds each Actor to its existing record.

The subsystem listens for level add and remove events, so a sublevel returning triggers reconciliation of its pending records without any call from your code.

Reset semantics across containers

SituationResult
Region reset, all content loadedApplied immediately
Region reset, some cells unloadedLoaded records applied, unloaded ones marked Pending Restore
Region reset with ContainerContext setOnly records in that container are selected
Sublevel reloads after a pending resetThe pending reset is applied on registration
A Level Instance is unloaded and reloadedRecords rebind by effective identity; no duplicates

Verified scope

The streaming behaviour documented here corresponds to what was validated during development: repeated Level Instances, independent sublevels and Runtime Data Layers, ten-cycle non-duplication gates, and a 10,000-record manifest benchmark.

Where the line is

WSRF reconciles world state for the Actors it manages. It does not decide what streams, does not force cells or Data Layers to load, and does not replace World Partition or Level Streaming.

Last updated: 2026-08-26

Type to search titles, sections and keywords.