Introduction
This component inherits from NPCStats and adds classes, race, background and level to an object. It provides access to Stats, Attributes, Status Conditions, Stat Events, Status Effects, Languages, Respawn, Race, Classes, Level, Background, and Plugins.

Fields#
| Name | Description |
|---|---|
| Select Option UI | Prefab used for selectioning Add-On Choices |
| On Class Added | Event raised when a Class is added |
| On Class Removed | Event raised when a Class is removed |
| On Classes Changed | Event raised when a Class is added or a Class' level changes |
| On Level Changed | Event raised when the player's level changes |
| On Race Changed | Event raised when the Race is changed |
| On Background Changed | Event raice when the Background is changed |
| On Perk Added | Event raised when a Perk is added |
| On Perk Removed | Event raised when a Perk is removed |
| On Perks Changed | Event raised when a Perk is added or removed |
| On Trait Added | Event raised when a Trait is added |
| On Trait Removed | Event raised when a Trait is removed |
| New Choice Waiting | Event raised when a new choice is waiting for manual selection |
| Respawn Transform | Object to modify position and rotation on respawn |
| Respawn Condition | Condition that must be true to trigger respawn |
| Save Position | Add position when saving stats |
| Save Rotation | Add rotation when saving stats |
| Respawn Modifiers | Stat Modifiers to apply on a respawn |
| Save Filename | Filename to load on respawn, if blank no load is triggered |
| On Respawn | Event raised when object respawns |
| On Languages Changed | Event raised when a Language is added or removed |
| On Language Added | Event raised when a Language is added |
| On Language Removed | Event raised when a Language is removed |
| On Effect Added | Event raised when a Status Effect is added |
| On Effect Removed | Event raised when a Status Effect is removed |
| On Resistance Added | Event raised when a Status Effect Resistance is added |
| On Resistance Removed | Event raised when a Status Effect Resistance is removed |
| Broadcast Messages | Broadcast message to 'GDTK_STATS' channel |
| Plugins | List of plugins to run in sequence |
| On Stats Reloaded | Event raised when Stats are reloaded |
| On Initialized | Event raised when Stats is initialized |
| On Shutdown | Event raised when Stats is initialized |
| On Event Triggered | Event raised when a Stat Event is triggered |
| On Attribute Added | Event raised when an Attribute is added |
| On Attribute Removed | Event raised when an Attribute is removed |
| On Status Condition Added | Event raised when a Status Condition is added |
| On Status Condition Removed | Event raised when a Status Condition is removed |
| On Focus Added | Event raised when Focus is added |
| On Focus Removed | Event raised when Focus is removed |
| On Focuses Changed | Event raised when Focuses change |
| On Heartbeat | Event raised every Update |
| On Token Heartbeat | Event raised when a Token Heartbeat is invoked |
| On Display Name Changed | Event raised when Display Name changes |
| On Color Changed | Event raised when Color changes |
Properties#
| Name | Description |
|---|---|
| awaitingChoices | List of choices awaiting user selection |
| background | Gets/Sets the Bacground for the object |
| classes | Returns a read-only list of Classes assigned to the object |
| levelId | Returns the id of the stat associate with leveling |
| perks | Returns a read-only list of Perks assigned to the object |
| preventLevelGain | Gets/Sets whether to suspend Level Gaining. When changing from false to true any and all Levels that were suspended will be added in sequence. |
| race | Gets/Sets the Race for the object |
| startingBackgroundId | Returns the starting background id |
| startingClassId | Returns the starting class id |
| startingRaceId | Returns the starting race id |
| traits | Returns a read-only list of Traits assigned to the object |
| languages | Returns a read-only list of languages known to object |
| activeEffects | Returns a read-only list of Status Effects currently active on this object. |
| resistances | Returns a read-only list of Status Effects currently active on this object. |
| actor | Gets reference to the associated actor |
| attributes | Returns a read-only list of Attributes on the object. |
| blackboard | Returns the blackboard for the object |
| busy | True if the system is currently loading or saving data. |
| color | Color associated with this object |
| focuses | Returns a read-only list of Foceses assigned to the object |
| database | Returns a reference to the Stats Database in the scene. |
| displayName | Name of the creature or object attached |
| globalStats | Returns a reference to the Global Stats in the scene. |
| initialized | True if object has been initialized. |
| registeredSources | Returns a list of registered IUniquelyIdentifiable sources. |
| source | Returns base StatSource |
| startingAttributeIds | Returns list of starting attribute ids |
| startingConditionIds | Returns list of starting status condition ids |
| stats | Returns a list of initialized stats. |
| statusConditions | Returns a read-only list of initialized Status Conditions. |
Methods#
| Name | Description |
|---|---|
| AddAddOnPlugins | Adds one or more Add-On Plugin |
| AddClass | Adds a Class to the object. If that Class already exists its level is increased by 1. |
| AddPerk | Adds a Perk to the object |
| AddTrait | Add a Trait to the object |
| DataLoad | Loads data to a specified stream |
| DataLoadJSON | Load data from JSON string |
| DataLoadJSONFile | Load JSON data from file |
| DataSave | Saves data to a specified file |
| DataSaveJSON | Save data as a JSON string |
| GetCharacterLevel | Returns the current Character level |
| GetClass | Get a Class available on this object by id |
| GetClassLevel | Get the level of a Class available on this object by id |
| GrantCustomReward | Grants player a custom reward |
| HasClass | Check if object has a specific Class |
| HasPerk | Check if object has a specific Perk |
| Initialize | Initialize the object. This is done automatically on Awake. |
| IsRace | Check if object is a specific Race |
| JSONExport | Export selected data to JSON |
| JSONImport | Import JSON data |
| RemoveAddOnsFromSource | Remove all Add-Ons from a specific source |
| ProcessAwaitingAddon | Remove a choice from the awaiting list |
| RemoveClass | Remove a Class from object |
| RemovePerk | Remove a Perk from the object |
| RemovePerkFromSource | Remove all Perks from a specific source |
| RemoveSource | Remove a IUniquelyIdentifiable source |
| RemoveTraitsFromSource | Remove all Traits from a specific source |
| SetBackground | Set the Background of this object |
| SetCreationClass | Sets the 'Character Creation' class for player, removing all other classes |
| SetRace | Set the Race of this object |
| Shutdown | Shutdown the system |
| SubscribeToClassChange | Subscribe to Class changes |
| UnsubscribeFromClassChange | Remove subscription from Class changes |
| AddLanguage | Add an Attribute to the object. |
| KnowsLanguage | True if object has a Language with the provided id. |
| RemoveLanguage | Removes a language by id |
| RemoveLanguagesFromSource | Remove all languages from a specified source |
| SubscribeToLanguageChange | Subscribe to Language changes |
| UnsubscribeFromLanguageChange | Remove subscription from Language changes |
| AddEffect | Adds a Status Effect to the object by id. |
| AddEffectResistance | Adds a Status Effect Resistance to the object by id. |
| GetModifier | Get a Stat Modifier by instance id |
| RemoveEffect | Removes an effect from the object by id. |
| RemoveEffectResistance | Removes all Status Effect Resistance by id |
| RemoveEffectResistancesFromSource | Remove all Status Effect Resistance from a specified source |
| SubscribeToEffectEvents | Subscribes to Status Effect events. |
| UnsubscribeFromEffectEvents | Unsubscribes from Status Effect events. |
| AddAttribute | Add an Attribute to the object. |
| AddFocus | Adds a Focus to the object. If that Focus already exists its level is increased by 1. |
| AddStat | Adds a new Stat to the object. Cannot be done while object is initialized. |
| AddStatModifier | Adds a new Stat Modifier to the object. |
| AddStatusCondition | Adds a Status Condition to the object. |
| ClearSources | Removes all Identifiable Sources. Cannot be done while initialized. |
| ClearStats | Removes all Stats. Cannot be done while initialized. |
| GetFocus | Get a Focus available on this object by id |
| GetFocusLevel | Get the level of a Focus available on this object by id |
| GetPlugin | Get a plugin of a specific tyep |
| GetSource | Returns an Identifiable Source by id |
| GetStat | Get a Stat by id. |
| GetValue | Get the value of a formula/expression. |
| GetValueWithDictionary | Get the value of a formula/expression. |
| HasAttribute | True if object has an Attribute with the provided id. |
| HasFocus | Check if object has a specific Focus |
| HasFocuses | Check if object has a list Focuses |
| IsConditionTrue | Check if an expression resolves to true. |
| RaiseEvent | Raises a Stat Event by id |
| RaiseTokenHeartbeat | Raises a Token Heartbeat |
| RefreshActor | Attempt to find actor for component |
| RegisterSource | Manually add an IUniquelyIdentifiable source |
| RemoveAttribute | Remove an Attribute by id |
| RemoveAttributesFromSource | Remove all Attributes from a specified source |
| RemoveFocus | Remove a Focus from object |
| RemoveFocusesFromSource | Remove all Focuses from a specified source |
| RemoveStatModifier | Remove a Stat Modifier |
| RemoveStatModifiersFromSource | Remove all Stat Modifiers from a specified source |
| RemoveStatusCondition | Remove a Status Condition by Id |
| RemoveStatusConditionsFromSource | Remove all Status Conditions from a specified source |
| SubscribeToAttributeChange | Subscribe to Attribute changes |
| SubscribeToEventTriggers | Subscribe to Stat Events |
| SubscribeToFocusChange | Subscribe to Focus changes |
| SubscribeToHeartbeat | Subscribe to Heartbeats |
| SubscribeToTokenHeartbeat | Subscribe to Token Heartbeats |
| UnsubscribeFromAttributeChange | Remove subscription from Attribute changes |
| UnsubscribeFromEventTriggers | Remove subscription from Stat Events |
| UnsubscribeFromFocusChange | Remove subscription from Focus changes |
| UnsubscribeFromHeartbeat | Remove subscription from Heartbeats |
| UnsubscribeFromTokenHeartbeat | Remove subscription from TokenHeartbeats |