Class QuestTemplate
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
-
ObjectScriptableObjectQuestTemplate
- 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.nameObject.hideFlags
Fields
AutoProgression
Quests that are automatically offered after this quest is turned in.
public List<QuestTemplate> AutoProgression
Field Value
CharacterAttributeRequirements
Character attribute requirements needed to accept the quest.
public List<QuestAttributeRequirement> CharacterAttributeRequirements
Field Value
CompletedQuestRequirements
Quests that must have been turned in before this quest can be accepted.
public List<QuestTemplate> CompletedQuestRequirements
Field Value
Description
Description of the quest narrative.
[TextArea(2, 6)]
public string Description
Field Value
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
Rewards
Item rewards granted upon turn-in.
public List<BaseItemTemplate> Rewards
Field Value
TimeToCompleteInSeconds
Time allowed to complete the quest in seconds. Zero means unlimited.
public uint TimeToCompleteInSeconds
Field Value
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
Methods
CanAcceptQuest(IPlayerCharacter)
Evaluates whether a player character meets all acceptance requirements.
public bool CanAcceptQuest(IPlayerCharacter character)
Parameters
characterIPlayerCharacterThe 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
typeNamestringThe type name of the resource.
resourceNamestringThe resource name.
resourceIDintThe 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)