ReplayPathEntry
One entry in a replay commit inside Path. The
Kind discriminator (a ReplayActionKind value) controls
which additional fields are populated. Default kind is
SelectChoice for back-compatibility with v3 saves
where every entry was a bare {uuid, id}StoryBonsai.Runtime.Persistence.PlayerSelection.
public class ReplayPathEntry
Inheritance System.Object → ReplayPathEntry
Remarks
Prefer the static factory methods (SelectChoice(string, string), EnterScene(string, bool, string), MoveTo(string), AdvanceTime(int, string), StartEncounter(string), LeaveScene()) over constructing instances directly — they enforce the correct field population for each ReplayActionKind.
Properties
ActivityUuid
Uuid of the completed Activity entity. Populated for
ActivityCompleted entries.
public string? ActivityUuid { get; }
Property Value
AdvanceTimeReason
Source of the time advance — one of "advanceTime" (explicit event) or
"setBucket" (time-bucket assignment). Populated for
AdvanceTime entries; aids debugging of
time-advance replays.
public string? AdvanceTimeReason { get; }
Property Value
CallerNodeUuid
Uuid of the node that triggered the scene transition. Populated for EnterScene entries; used during replay to reproduce the caller context exactly.
public string? CallerNodeUuid { get; }
Property Value
Id
Human-readable node id of the selected choice (e.g. node_accept_quest).
Stored alongside Uuid to aid debugging; the replay engine
resolves by uuid, not id.
public string Id { get; }
Property Value
Kind
Discriminator that identifies which action this entry records and which fields are populated. See ReplayActionKind for the full set of values.
public ReplayActionKind Kind { get; }
Property Value
LocationId
Id or uuid of the destination location. Populated for MoveTo entries — mirrors the argument to MoveTo(string).
public string? LocationId { get; }
Property Value
MinutesElapsedTarget
Absolute elapsed-minutes target after the advance. Populated for AdvanceTime entries. The value is post-advance (i.e. the total minutes elapsed at the end of this commit, not the delta).
public Nullable<int> MinutesElapsedTarget { get; }
Property Value
ResolvedFields
Resolved field values the consumer passed to ActivityEvent.Complete().
Populated for ActivityCompleted entries; replay
re-applies them via SetField before re-invoking the completion.
public List<ResolvedActivityField>? ResolvedFields { get; }
Property Value
System.Collections.Generic.List<ResolvedActivityField>
ReturnAfter
When true, the runtime re-enters the caller scene after the target
scene completes. Populated for EnterScene entries;
mirrors the returnAfter argument to
EnterScene(string, bool).
public bool ReturnAfter { get; }
Property Value
SceneId
Id or uuid of the target scene. Populated for EnterScene and StartEncounter entries.
public string? SceneId { get; }
Property Value
StartScope
Scene scope for StartProject commit-origin markers —
"full" or "isolated". Null on every other kind.
public string? StartScope { get; }
Property Value
Uuid
Node uuid of the selected choice. Populated for
SelectChoice entries — corresponds to the
uuid argument passed to SelectChoice(string).
public string Uuid { get; }
Property Value
Methods
ActivityCompleted(string, List<ResolvedActivityField>)
Creates a ActivityCompleted entry for a blocking-activity completion.
public static ReplayPathEntry ActivityCompleted(string activityUuid, List<ResolvedActivityField> fields);
Parameters
activityUuid System.String
Uuid of the completed Activity entity.
fields System.Collections.Generic.List<ResolvedActivityField>
The resolved field values passed to Complete() (writable, value-bearing fields only).
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = ActivityCompleted.
AdvanceTime(int, string)
Creates a AdvanceTime entry for a time-advance action.
public static ReplayPathEntry AdvanceTime(int minutesElapsedTarget, string reason);
Parameters
minutesElapsedTarget System.Int32
Absolute elapsed-minutes total after the advance.
reason System.String
Source of the advance — "advanceTime" or "setBucket".
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = AdvanceTime.
EnterScene(string, bool, string)
Creates a EnterScene entry for a scene transition.
public static ReplayPathEntry EnterScene(string sceneId, bool returnAfter, string callerNodeUuid);
Parameters
sceneId System.String
Id or uuid of the target scene.
returnAfter System.Boolean
Whether to return to the caller scene after the transition completes.
callerNodeUuid System.String
Uuid of the node that triggered the transition.
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = EnterScene.
LeaveScene()
Creates a LeaveScene entry for a leave-scene action.
public static ReplayPathEntry LeaveScene();
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = LeaveScene.
MoveTo(string)
Creates a MoveTo entry for a location change.
public static ReplayPathEntry MoveTo(string locationId);
Parameters
locationId System.String
Id or uuid of the destination location.
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = MoveTo.
SelectChoice(string, string)
Creates a SelectChoice entry for the given node.
public static ReplayPathEntry SelectChoice(string uuid, string id);
Parameters
uuid System.String
Uuid of the selected node.
Human-readable id of the selected node (for debugging).
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = SelectChoice.
StartEncounter(string)
Creates a StartEncounter entry for an encounter start.
public static ReplayPathEntry StartEncounter(string sceneId);
Parameters
sceneId System.String
Id or uuid of the encounter scene.
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = StartEncounter.
StartProjectOrigin(string, bool)
Creates a StartProject commit-origin marker (blocking-activity pause record only — never part of a saved path).
public static ReplayPathEntry StartProjectOrigin(string? sceneId, bool isolatedScope);
Parameters
sceneId System.String
Explicit start scene uuid, or null for the project’s declared entry.
isolatedScope System.Boolean
True when the start used SceneScope.Isolated.
Returns
ReplayPathEntry
A new ReplayPathEntry with Kind = StartProject.