Talents
constTalents:object
Defined in: client/api.d.ts:5930
Local talent (perk) tree state — UPerksTree.
Type Declaration
Section titled “Type Declaration”abilityTags()
Section titled “abilityTags()”abilityTags():
string[]
Every gameplay tag live on the player’s RPGAbilityComponent; empty before the pawn exists.
Returns
Section titled “Returns”string[]
addAbility()
Section titled “addAbility()”addAbility(
abilityName):boolean
Pushes an RPGAbility onto the player directly; repair path when a purchased talent’s tag is missing.
Parameters
Section titled “Parameters”abilityName
Section titled “abilityName”string
The perk’s AbilityID, e.g. Talent_Core_DodgeFast.
Returns
Section titled “Returns”boolean
addPoints()
Section titled “addPoints()”addPoints(
amount):boolean
Moves the unspent talent point pool.
Parameters
Section titled “Parameters”amount
Section titled “amount”number
Signed delta; negative spends.
Returns
Section titled “Returns”boolean
available()
Section titled “available()”available():
boolean
Whether the perk tree singleton exists yet; false before world entry.
Returns
Section titled “Returns”boolean
getLevel()
Section titled “getLevel()”getLevel(
id):number
Current talent level (0 = not taken); -1 for an unknown id or before the tree exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
getPoints()
Section titled “getPoints()”getPoints():
number
Unspent talent points; -1 before the tree exists.
Returns
Section titled “Returns”number
getState()
Section titled “getState()”getState(
id):string
‘unavailable’ | ‘available’ | ‘purchased’ | ‘upgradeUnavailable’, or null for an unknown id/unavailable tree.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
grant()
Section titled “grant()”grant(
id):boolean
Force-grants the talent: free, ignores the level and lock gates, marks it purchased and applies its ability.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
has(
id):boolean
Whether the talent is purchased.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
hasAbilityTag()
Section titled “hasAbilityTag()”hasAbilityTag(
tag):boolean
Whether the live RPGAbilityComponent carries the tag — the real test of whether a talent is doing anything.
Parameters
Section titled “Parameters”string
e.g. RPGAbility.Talent.Core.Talent_Core_DodgeFast
Returns
Section titled “Returns”boolean
list()
Section titled “list()”list(
category?):object[]
Talents with their live state, level and gates, or null before the tree exists.
Parameters
Section titled “Parameters”category?
Section titled “category?”string
Perk type (Core, Spells, DarkWizard, Infiltrator, SancWheel, …); omit to sweep every type.
Returns
Section titled “Returns”object[]
purchase()
Section titled “purchase()”purchase(
id):boolean
Buys the talent the game’s own way: spends a point and honours the level, lock and prerequisite gates. Use activate() to force one.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
refund()
Section titled “refund()”refund(
id):boolean
Removes a talent and returns its point to the pool.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
remove()
Section titled “remove()”remove(
id):boolean
Removes a talent WITHOUT refunding its point, and resets its level to 0.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
reset()
Section titled “reset()”reset(
category?):boolean
Refunds every talent, or every talent in one category.
Parameters
Section titled “Parameters”category?
Section titled “category?”string
Returns
Section titled “Returns”boolean
setLevel()
Section titled “setLevel()”setLevel(
id,level?):boolean
Sets the UPGRADE TIER of a talent the player owns. Refused for one they don’t: the game would apply its ability without purchasing it.
Parameters
Section titled “Parameters”string
level?
Section titled “level?”number
Defaults to 1; 0 clears.
Returns
Section titled “Returns”boolean
upgrade()
Section titled “upgrade()”upgrade(
id):boolean
Buys the next level of an already-purchased talent.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean