Table of Contents

Class QuestTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ScriptableObject template defining a quest, its requirements, objectives, and reward structure. Does not contain lifecycle logic; that lives in QuestController.

[CreateAssetMenu(fileName = "New Quest", menuName = "FishMMO/Character/Quest/Quest", order = 1)]
public class QuestTemplate : CachedScriptableObject<QuestTemplate>, ICachedObject
Inheritance
Object
ScriptableObject
QuestTemplate
Implements
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Fields

AutoProgression

Quests that are automatically offered after this quest is turned in.

public List<QuestTemplate> AutoProgression

Field Value

List<QuestTemplate>

CharacterAttributeRequirements

Character attribute requirements needed to accept the quest.

public List<QuestAttributeRequirement> CharacterAttributeRequirements

Field Value

List<QuestAttributeRequirement>

CompletedQuestRequirements

Quests that must have been turned in before this quest can be accepted.

public List<QuestTemplate> CompletedQuestRequirements

Field Value

List<QuestTemplate>

Description

Description of the quest narrative.

[TextArea(2, 6)]
public string Description

Field Value

string

IconReference

Addressable reference to the icon texture for this quest.

public AssetReferenceTexture2D IconReference

Field Value

AssetReferenceTexture2D

Objectives

Objectives that must be completed for this quest.

public List<QuestObjective> Objectives

Field Value

List<QuestObjective>

Rewards

Item rewards granted upon turn-in.

public List<BaseItemTemplate> Rewards

Field Value

List<BaseItemTemplate>

TimeToCompleteInSeconds

Time allowed to complete the quest in seconds. Zero means unlimited.

public uint TimeToCompleteInSeconds

Field Value

uint

Properties

Icon

The icon for this quest (loaded at runtime on client).

public Texture2D Icon { get; }

Property Value

Texture2D

Name

The name of the quest derived from the asset name.

public string Name { get; }

Property Value

string

Methods

CanAcceptQuest(IPlayerCharacter)

Evaluates whether a player character meets all acceptance requirements.

public bool CanAcceptQuest(IPlayerCharacter character)

Parameters

character IPlayerCharacter

The player character to evaluate.

Returns

bool

True if the character may accept this quest.

OnLoad(string, string, int)

Called when the quest template is loaded into cache. Loads the icon on the client.

public override void OnLoad(string typeName, string resourceName, int resourceID)

Parameters

typeName string

The type name of the resource.

resourceName string

The resource name.

resourceID int

The resource ID.

OnUnload(string, string, int)

Called when the quest template is unloaded from cache. Releases the icon on the client.

public override void OnUnload(string typeName, string resourceName, int resourceID)

Parameters

typeName string

The type name of the resource.

resourceName string

The resource name.

resourceID int

The resource ID.