Class ScrollConsumableTemplate
Abstract base class for scroll consumable templates, which grant abilities when consumed. Inherits from ConsumableTemplate and adds ability learning logic.
public abstract class ScrollConsumableTemplate : ConsumableTemplate, ICachedObject, ITooltip
- Inheritance
-
ObjectScriptableObjectScrollConsumableTemplate
- Implements
- Derived
- 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
- Extension Methods
Fields
AbilityEvents
The ability EVENTS learned when the scroll is consumed.
public List<AbilityEvent> AbilityEvents
Field Value
Remarks
Knowledge comes in two kinds and crafting needs both: a base ability is the core, an effect is what configures it. A scroll could only ever teach the first, so half the crafting vocabulary had no way into a player's hands but a merchant.
AbilityTemplates
The list of ability templates that will be learned when the scroll is consumed.
public List<BaseAbilityTemplate> AbilityTemplates
Field Value
Methods
BuildTooltip(TooltipContent, bool)
Describes the scroll, and names what reading it teaches.
public override void BuildTooltip(TooltipContent content, bool describingInstance)
Parameters
contentTooltipContentThe content being assembled.
describingInstancebool
Invoke(IPlayerCharacter, Item, uint)
Invokes the scroll consumption logic, granting abilities to the character if successful. Calls base Invoke to handle cooldown and charge logic.
public override bool Invoke(IPlayerCharacter character, Item item, uint currentTick)
Parameters
characterIPlayerCharacterThe player character consuming the scroll.
itemItemThe scroll item being consumed.
currentTickuint
Returns
- bool
True if the scroll was successfully consumed and abilities granted, false otherwise.