Show / Hide Table of Contents

Class QuestResource

All quest resources hosted by a quest must inherit from this base class. Symbol will be set by inheriting class after parsing source text.

Inheritance
Object
QuestResource
ActionTemplate
Clock
Foe
Item
Person
Place
Namespace: DaggerfallWorkshop.Game.Questing
Assembly: Assembly-CSharp.dll
Syntax
public abstract class QuestResource : IDisposable

Constructors

| Improve this Doc View Source

QuestResource(Quest)

Constructor.

Declaration
public QuestResource(Quest parentQuest)
Parameters
Type Name Description
Quest parentQuest

Parent quest owning this resource. Can be null.

Fields

| Improve this Doc View Source

BLANK

Declaration
public const string BLANK = "BLANK"
Field Value
Type Description
String

Properties

| Improve this Doc View Source

Gender

Gets resource gender where available. Will default to Male if inheriting class does not override.

Declaration
public virtual Genders Gender { get; }
Property Value
Type Description
Genders
| Improve this Doc View Source

HasPlayerClicked

Gets flag stating if player has clicked on this Person resource in world. If consuming click rearm using RearmPlayerClick().

Declaration
public bool HasPlayerClicked { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

InfoMessageID

Gets or sets message ID for "tell me about" this resource in dialog. -1 is default and means no message of this type is associated with this resource.

Declaration
public int InfoMessageID { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

IsHidden

Gets or sets flag to hide this quest resource in world. Has no effect on Foes or quest resources not active inside scene.

Declaration
public bool IsHidden { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

ParentQuest

Parent quest of this quest resource (if any).

Declaration
public Quest ParentQuest { get; }
Property Value
Type Description
Quest
| Improve this Doc View Source

QuestResourceBehaviour

Gets or sets reference to QuestResourceBehaviour in scene. This property is not serialized - it should be set at time of injection or deserialization.

Declaration
public QuestResourceBehaviour QuestResourceBehaviour { get; set; }
Property Value
Type Description
QuestResourceBehaviour
| Improve this Doc View Source

RumorsMessageID

Gets or sets message ID for "any news?" about this resource in dialog. -1 is default and means no message of this type is associated with this resource.

Declaration
public int RumorsMessageID { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Symbol

Symbol of this quest resource (if any).

Declaration
public Symbol Symbol { get; protected set; }
Property Value
Type Description
Symbol
| Improve this Doc View Source

UsedMessageID

Gets or sets message ID to display when resource (item) is used by player. -1 is default and means no message of this type is associated with this resource.

Declaration
public int UsedMessageID { get; set; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

Dispose()

Called when quest ends so resource can clean up.

Declaration
public virtual void Dispose()
| Improve this Doc View Source

ExpandMacro(MacroTypes, out String)

Expand a macro from this resource.

Declaration
public virtual bool ExpandMacro(MacroTypes macro, out string textOut)
Parameters
Type Name Description
MacroTypes macro

Type of macro to expand.

String textOut

Expanded text for this macro type. Empty if macro cannot be expanded.

Returns
Type Description
Boolean

True if macro expanded, otherwise false.

| Improve this Doc View Source

GetMessage(Int32)

Declaration
public List<TextFile.Token[]> GetMessage(int messageId)
Parameters
Type Name Description
Int32 messageId
Returns
Type Description
List<TextFile.Token[]>
| Improve this Doc View Source

GetResourceSaveData()

Get full resource save data including resource specific data.

Declaration
public QuestResource.ResourceSaveData_v1 GetResourceSaveData()
Returns
Type Description
QuestResource.ResourceSaveData_v1
| Improve this Doc View Source

GetSaveData()

Request resource-specific save data only for serialization. Must be handled by implementing class.

Declaration
public abstract object GetSaveData()
Returns
Type Description
Object
| Improve this Doc View Source

ParseMessageTags(String)

Parse optional message tags from this resource.

Declaration
protected void ParseMessageTags(string line)
Parameters
Type Name Description
String line
| Improve this Doc View Source

PostTick(Quest)

Called at the end of every quest tick. Allows quest resources to perform some cleanup action after actions have run for this tick.

Declaration
public virtual void PostTick(Quest caller)
Parameters
Type Name Description
Quest caller
| Improve this Doc View Source

RearmPlayerClick()

Rearm click so player can click again if quest allows it.

Declaration
public void RearmPlayerClick()
| Improve this Doc View Source

RestoreResourceSaveData(QuestResource.ResourceSaveData_v1)

Restore full resource save data including resource specific data.

Declaration
public void RestoreResourceSaveData(QuestResource.ResourceSaveData_v1 data)
Parameters
Type Name Description
QuestResource.ResourceSaveData_v1 data
| Improve this Doc View Source

RestoreSaveData(Object)

Restore resource-specific deserialized data only. Must be handled by implementing class.

Declaration
public abstract void RestoreSaveData(object dataIn)
Parameters
Type Name Description
Object dataIn
| Improve this Doc View Source

SetPlayerClicked()

Check if player click has been triggered.

Declaration
public void SetPlayerClicked()
| Improve this Doc View Source

SetResource(String)

Set the resource source line. Always call this base method to ensure optional message tags are parsed.

Declaration
public virtual void SetResource(string line)
Parameters
Type Name Description
String line

Source line for this resource.

| Improve this Doc View Source

Tick(Quest)

Called every Quest tick. Allows quest resources to perform some action. Quest will not call Tick() on ActionTemplate items, they should override Update() instead.

Declaration
public virtual void Tick(Quest caller)
Parameters
Type Name Description
Quest caller
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX