Class QuestManager
Provided management of quests across the game.
public static class QuestManager
- Inheritance
-
QuestManager
- Inherited Members
Methods
CreateQuest(Type, string?)
Creates a new quest for the player to complete from your custom quest class.
public static Quest CreateQuest(Type questType, string? guid = null)
Parameters
questTypeTypeYour custom quest class that derived from Quest.
guidstringThe unique identifier for this quest. By default, assigned a random GUID.
Returns
CreateQuest<T>(string?)
Creates a new quest for the player to complete from your custom quest class.
public static Quest CreateQuest<T>(string? guid = null) where T : Quest
Parameters
guidstringThe unique identifier for this quest. By default, assigned a random GUID.
Returns
- Quest
The instance of your quest.
Type Parameters
TYour custom quest class that derived from Quest.
GetQuestByGuid(string)
Returns a Quest instance by the Quest GUID
public static Quest? GetQuestByGuid(string guid)
Parameters
guidstringThe unique identifier to use for searching this quest
Returns
- Quest
The quest instance
GetQuestByName(string)
Returns a Quest instance by the Quest Name. Searches custom mod quests only. For base game quests, use S1API.Quests.QuestManager.GetBaseGameQuestByName(System.String).
public static Quest? GetQuestByName(string questName)
Parameters
questNamestringThe quest title to use for searching this quest
Returns
- Quest
The quest instance, or null if not found
Get<T>()
Returns a QuestWrapper instance using a typed identifier. Declare an identifier class annotated with [Identifiers.QuestName("...")]. Works for both custom mod quests and base game quests.
public static QuestWrapper? Get<T>() where T : IQuestIdentifier
Returns
- QuestWrapper
The quest wrapper instance, or null if not found.
Type Parameters
TA quest identifier type implementing IQuestIdentifier.