public sealed class DynamicEventDirectorWhat runs the dynamic events on one realm, and what walks their chains.
Remarks
Success and failure both lead somewhere, and this is where that happens. An escort that fails starts "retake the camp"; the camp being retaken starts the escort again. Doc 28 calls that the thing that makes a chain feel alive, and the machinery for it is one dictionary and one loop.
⚠ A chain is a graph with cycles and this does not try to prevent them. The camp being lost, retaken and lost again is the content, so there is no acyclicity check here and there could not be one. What is bounded instead is a single resolution: an ending starts its successors and stops, so a chain whose event succeeds instantly cannot recurse — see MaximumChainDepth.
⚠ An event already running is not started again. Two failures both branching to "retake the camp" is ordinary authoring, and the other reading gives two instances of one event on one realm, each with half the participants and its own set of rewards.
Fields and properties (5)
public const int MaximumChainDepthHow many links of a chain one ending may resolve before the director stops walking.
public QuestLibrary LibraryWhere the events come from.
public GameplayEventBus BusWhere the gameplay events come from.
public IEnumerable<DynamicEventInstance> RunningEvery event running now.
public int CountHow many are running.
Events (1)
public Action<EventChainStep>? SteppedRaised when an event ends, with whatever its ending started.
Methods (7)
public DynamicEventDirector(QuestLibrary library, GameplayEventBus bus)Makes a director.
public bool IsRunning(DefId id)Whether an event is running.
public DynamicEventInstance? Find(DefId id)The running instance of an event.
public DynamicEventInstance? Begin(DefId id)Starts an event.
public int Tick(float delta)Advances every running event and resolves whatever ended.
public bool Finish(DefId id, DynamicEventStatus status)Ends an event and resolves its chain. What a scripted outcome does.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (3)
- EventChainProjectionVixen.Editor.Gameplay.Quests
- EventChainProjectionTestsVixen.Editor.Gameplay.Quests.Tests
- DynamicEventTestsVixen.Gameplay.Quests.Tests