Table of Contents

Interface IRuntimeQuestFactory

Namespace
SkyrimForge
Assembly
SkyrimForge.dll

Creates quests that the journal lists, at runtime and without an .esp file.

public interface IRuntimeQuestFactory

Remarks

Each quest's progress is stored in the co-save and applied again after every load. Call members on the game's thread.

Methods

Create(string, string, IEnumerable<QuestStage>?, Type, IEnumerable<QuestScene>?, IEnumerable<QuestAlias>?, bool)

Creates a quest that the journal lists once it displays an objective.

IRuntimeQuest Create(string key, string name, IEnumerable<QuestStage>? stages = null, QUEST_DATA.Type type = Type.kSideQuest, IEnumerable<QuestScene>? scenes = null, IEnumerable<QuestAlias>? aliases = null, bool activeOnStart = false)

Parameters

key string

The name the quest's progress is stored under, unique among this plugin's quests and the same in every version of the plugin.

name string

The name the journal shows.

stages IEnumerable<QuestStage>

The stages SetAsync(QuestStage) sets.

type QUEST_DATA.Type

The journal's category for the quest.

scenes IEnumerable<QuestScene>

The scenes Start(int) starts. A scene a stage starts is declared without being passed here.

aliases IEnumerable<QuestAlias>

The aliases that belong to the quest though no objective targets them and no scene action uses them, such as one that gives an actor a package and one written only as a token into an objective's text or a stage's log entry. An alias an objective targets or a scene action uses is declared without being passed here.

activeOnStart bool

Whether the quest becomes the journal's active quest as it displays its first objective, at its start and at each start after RemoveFromJournalAndReset().

Returns

IRuntimeQuest

The quest.

Remarks

Callable from a plugin's start, before the game has data or a save.

Exceptions

ArgumentNullException

key or name is null.

FileNotFoundException

A scene line's fixed response names a voice file that does not exist.

ArgumentException

This plugin created a quest with key already, or two of the quest's stages or objectives have one index, or two of its aliases or scenes have one name, or a stage both completes and fails one objective, or completes or fails an objective created with no index that no stage displays, or a scene or phase sets a stage the quest does not declare, or an alias, a scene, a stage, or an objective belongs to another quest.