Class Quest
Contains live state of quests in play.
Quests are instantiated from text source and executed inside quest machine.
Each quest is assigned a unique id (UID) as its possible for same question to be instantiated multiple times,
such as a basic fetch quest to two different dungeons. The name of quest cannot not be used for unique identification.
Child resources generally will not care about quest UID, but this is used by quest machine.
Assembly: Assembly-CSharp.dll
Syntax
public class Quest : IDisposable, IMacroContextProvider
Constructors
|
Improve this Doc
View Source
Quest()
Declaration
Fields
|
Improve this Doc
View Source
QuestFailureRep
Declaration
public const int QuestFailureRep = -2
Field Value
|
Improve this Doc
View Source
QuestSuccessRep
Declaration
public const int QuestSuccessRep = 5
Field Value
Properties
|
Improve this Doc
View Source
CurrentLogMessageId
Current log message ID, used only for expanding %qdt macro properly.
Declaration
public int CurrentLogMessageId { set; }
Property Value
|
Improve this Doc
View Source
DisplayName
Optional display name for future quest journal.
e.g. "Lady Brisienna's Letter"
Declaration
public string DisplayName { get; set; }
Property Value
|
Improve this Doc
View Source
ExternalMCP
External non-quest context provider.
Declaration
public IMacroContextProvider ExternalMCP { get; set; }
Property Value
|
Improve this Doc
View Source
FactionId
Faction ID the quest will affect reputation of.
Declaration
public int FactionId { get; set; }
Property Value
|
Improve this Doc
View Source
LastPlaceReferenced
Gets or sets last Place resource encountered during macro expand.
This will be used to resolve di, etc.
Can return null so caller should have a fail-over plan.
Declaration
public Place LastPlaceReferenced { get; set; }
Property Value
|
Improve this Doc
View Source
LastResourceReferenced
Gets or sets last QuestResource for Person/Foe encountered during macro expand.
This will be used to resolve pronoun, god, oath, etc.
Can return null so caller should have a fail-over plan.
Declaration
public QuestResource LastResourceReferenced { get; set; }
Property Value
|
Improve this Doc
View Source
OneTime
Whether this is a one time quest
Declaration
public bool OneTime { get; set; }
Property Value
|
Improve this Doc
View Source
QuestBreak
Allows other classes working on this quest to break execution.
This allows for "say" messages and other popups to happen in correct order.
Flag will be lowered automatically.
Declaration
public bool QuestBreak { get; set; }
Property Value
|
Improve this Doc
View Source
QuestComplete
True when quest has completed and will be tombstoned by quest machine.
Declaration
public bool QuestComplete { get; }
Property Value
|
Improve this Doc
View Source
QuestName
Short quest name read from source.
e.g. "_BRISIEN"
Declaration
public string QuestName { get; set; }
Property Value
|
Improve this Doc
View Source
QuestStartTime
Gets world time of quest when started.
Declaration
public DaggerfallDateTime QuestStartTime { get; }
Property Value
|
Improve this Doc
View Source
QuestSuccess
True when quest executes a "give pc" action, which indicates quest success.
If quest ends without this being set, quest can be considered failed.
Declaration
public bool QuestSuccess { get; set; }
Property Value
|
Improve this Doc
View Source
QuestTombstoned
True when quest has been tombstoned by QuestMachine.
Quest will persist a while after completion for post-quest rumours, failure text, etc.
Declaration
public bool QuestTombstoned { get; }
Property Value
|
Improve this Doc
View Source
QuestTombstoneTime
The time quest was tombstoned.
Not valid if quest has not yet been tombstoned.
Declaration
public DaggerfallDateTime QuestTombstoneTime { get; }
Property Value
|
Improve this Doc
View Source
SmallerDungeonsState
State of smaller dungeons setting at time quest started.
Persists through quest lifetime to inform smaller dungeon usage for dungeon sitelinks related to this quest.
Declaration
public QuestSmallerDungeonsState SmallerDungeonsState { get; }
Property Value
|
Improve this Doc
View Source
UID
Gets quest UID assigned at create time.
Declaration
public ulong UID { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddLogStep(Int32, Int32)
Adds quest log message for quest at step position.
Quests can only have 0-9 steps and cannot log the same step more than once at a time.
Declaration
public void AddLogStep(int stepID, int messageID)
Parameters
Type |
Name |
Description |
Int32 |
stepID |
StepID to key this message.
|
Int32 |
messageID |
MessageID to display for this step.
|
|
Improve this Doc
View Source
AddMessage(Int32, Message)
Declaration
public void AddMessage(int messageID, Message message)
Parameters
|
Improve this Doc
View Source
AddQuestor(Symbol)
Start tracking a new questor.
Declaration
public void AddQuestor(Symbol personSymbol)
Parameters
Type |
Name |
Description |
Symbol |
personSymbol |
Symbol of new questor.
|
|
Improve this Doc
View Source
AddResource(QuestResource)
Declaration
public void AddResource(QuestResource resource)
Parameters
|
Improve this Doc
View Source
AddTask(Task)
Declaration
public void AddTask(Task task)
Parameters
Type |
Name |
Description |
Task |
task |
|
|
Improve this Doc
View Source
ClearTask(Symbol)
Declaration
public void ClearTask(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
|
Improve this Doc
View Source
Dispose()
Declaration
|
Improve this Doc
View Source
DropQuestor(Symbol)
Stop tracking an existing questor.
Declaration
public void DropQuestor(Symbol personSymbol)
Parameters
Type |
Name |
Description |
Symbol |
personSymbol |
Symbol of questor to drop.
|
|
Improve this Doc
View Source
EndQuest()
Declaration
|
Improve this Doc
View Source
GetAllResources()
Declaration
public QuestResource[] GetAllResources()
Returns
|
Improve this Doc
View Source
GetAllResources(Type)
Declaration
public QuestResource[] GetAllResources(Type resourceType)
Parameters
Type |
Name |
Description |
Type |
resourceType |
|
Returns
|
Improve this Doc
View Source
GetClock(Symbol)
Declaration
public Clock GetClock(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetCurrentLogMessageTime()
Get the current log entry date time when opening the active quests log.
Declaration
public DaggerfallDateTime GetCurrentLogMessageTime()
Returns
Type |
Description |
DaggerfallDateTime |
Return the current log entry time if any, otherwise the quest start time.
|
|
Improve this Doc
View Source
GetFoe(Symbol)
Declaration
public Foe GetFoe(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetItem(Symbol)
Declaration
public Item GetItem(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetLogMessages()
Gets the active log messages associated with this quest.
Usually only one log step is active at a time.
This allows log messages to be displayed however desired (as list, verbose, sorted, etc.).
Declaration
public Quest.LogEntry[] GetLogMessages()
Returns
Type |
Description |
Quest.LogEntry[] |
LogEntry array, or null if quest completed.
|
|
Improve this Doc
View Source
GetMacroDataSource()
Declaration
public MacroDataSource GetMacroDataSource()
Returns
|
Improve this Doc
View Source
GetMessage(Int32)
Declaration
public Message GetMessage(int messageID)
Parameters
Type |
Name |
Description |
Int32 |
messageID |
|
Returns
|
Improve this Doc
View Source
GetPerson(Symbol)
Declaration
public Person GetPerson(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetPlace(Symbol)
Declaration
public Place GetPlace(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetQuestors()
Declaration
public Symbol[] GetQuestors()
Returns
|
Improve this Doc
View Source
GetResource(Symbol)
Declaration
public QuestResource GetResource(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetResource(String)
Declaration
public QuestResource GetResource(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
|
Improve this Doc
View Source
GetSaveData()
Declaration
public Quest.QuestSaveData_v1 GetSaveData()
Returns
|
Improve this Doc
View Source
GetTask(Symbol)
Declaration
public Task GetTask(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
Returns
|
Improve this Doc
View Source
GetTaskStates()
Declaration
public Quest.TaskState[] GetTaskStates()
Returns
|
Improve this Doc
View Source
ReassignLegacyQuestMarkers()
Declaration
public void ReassignLegacyQuestMarkers()
|
Improve this Doc
View Source
RemoveLogStep(Int32)
Removes quest log message for step position.
Declaration
public void RemoveLogStep(int stepID)
Parameters
Type |
Name |
Description |
Int32 |
stepID |
StepID to remove from quest log.
|
|
Improve this Doc
View Source
RestoreSaveData(Quest.QuestSaveData_v1)
Declaration
public void RestoreSaveData(Quest.QuestSaveData_v1 data)
Parameters
|
Improve this Doc
View Source
ScheduleClickRearm(QuestResource)
Schedule a quest resource to rearm player click immediately after task execution.
Declaration
public void ScheduleClickRearm(QuestResource resource)
Parameters
|
Improve this Doc
View Source
Schedule a quest message popup at end of task execution.
Message may be split into multiple chunks to display on screen.
Declaration
public DaggerfallMessageBox ShowMessagePopup(int id, bool immediate = false)
Parameters
Type |
Name |
Description |
Int32 |
id |
ID of message,
|
Boolean |
immediate |
Break quest execution at point of popup to display it immediately.
|
Returns
Type |
Description |
DaggerfallMessageBox |
MessageBox. Will be top of display stack for chunked messages. Always null after using immediate flag.
|
|
Improve this Doc
View Source
Start()
Declaration
|
Improve this Doc
View Source
StartTask(Symbol)
Declaration
public void StartTask(Symbol symbol)
Parameters
Type |
Name |
Description |
Symbol |
symbol |
|
|
Improve this Doc
View Source
TombstoneQuest()
Marks quest as tombstoned and schedules for eventual deletion.
Declaration
public void TombstoneQuest()
|
Improve this Doc
View Source
Update()
Declaration
Implements