SkillNode

A container that stores skill data and connections.

Properties

NameDescriptionType

positionIndex

The position index of the node.

int

graphReference

The reference of the graph that this connection is a part of.

SkillGraph

key

A key that can be used to get the node in-game.

string

displayName

The name of the skill that should be displayed in-game.

string

description

The description of the skill. This should explain what the skill does.

string

skillTypeIndex

The index of the skill type.

int

lockedSprite

The sprite to use when the skill is locked.

string

unlockedSprite

The sprite to use when the skill is unlocked.

string

obtainedSprite

The sprite to use when the skill is obtained.

string

currentLevel

The current skill level.

int

maxLevel

The max skill level.

int

playerLevelRequirement

The level of the player required for this skill node to become unlocked.

int

treeTotalPointsSpentRequirement

The number of points required to be spent on this skill's skill tree for this skill to become unlocked.

int

cooldown

The cooldown of this skill.

float

duration

How long this skill should last.

float

windupDuration

The skill windup length.

float

isEffectOverTime

If this skill runs an effect per second.

bool

effectDuration

The length of the effect.

float

range

The range of this skill.

float

speed

The speed of this skill.

float

cost

The cost (mana/energy) of the skill.

float

isSingleTarget

If this skill is single target.

bool

isCancelable

If this skill can be canceled.

bool

uniqueShape

The unique shape type of this node.

SkillNode.Shape

uniqueSize

The unique size of this node.

float

isUnique

If this node is unique.

bool

state

The current state of the node.

SkillNode.State

isPlayerSkill

If this skill belongs to the player.

bool

stats

A list of skill stats.

List<UpgradableStat>

isLocked

If this skill is locked.

bool

isObtained

If this skill has been obtained.

bool

isMaxed

If this skill is maxed out.

bool

levelDisplayString

A simple string that displays the current and max level.

string

Methods

GetSkillType

Return Type: string

Gets the skill type.

GetSprite

Return Type: Sprite

Gets the sprite based on the skill state.

GetStat

Return Type: UpgradableStat

Gets a stat by name.

Parameters

NameDescriptionType

name

The name of the stat.

string

GetStat

Return Type: UpgradableStat

Gets a stat by index.

Parameters

NameDescriptionType

index

The index of the stat.

int

CreateSavableNode

Return Type: SavableSkillGraph.SavableSkillNode

Creates and returns a SavableSkillNode from this skill.

IsValid

Return Type: bool

Checks if the node data has been correctly set.

GetInterpolatedDescription

Return Type: string

Gets the description with variable interpolation.

GetInterpolatedText

Return Type: string

Gets the text with variable interpolation related to this skill.

Parameters

NameDescriptionType

original

The original text.

string

RequiresConnectionsToUnlock

Return Type: bool

Checks whether this skill has connection unlock requirements.

HasObtainedConnections

Return Type: bool

If this skill has any connection to other skills that are obtained.

TryUnlock

Return Type: bool

Tries to unlock this node. Unlocked nodes are upgradeable. Skills cannot be unlocked if the player doesn't meet the level requirement, no obtained skill leads to this skill through a connection, or if enough required skill points haven't been spent on skills in a specific skill tree. Returns true if successfully unlocked. Otherwise, false.

Parameters

NameDescriptionType

withoutNotify

If events should not be invoked. Default: false.

bool

TryUnlockAllThroughConnections

Tries to unlock all skills that are connected to this skill. Nothing will happen if this skill is not obtained.

TryUpgrade

Return Type: bool

Increases the skill level by an amount if possible. Returns true if successfully upgraded. Otherwise, false.

Parameters

NameDescriptionType

amount

The amount to increase by. Default: 1.

int

withoutNotify

If events should not be invoked. Default: false.

bool

TryDowngrade

Return Type: bool

Decreases the skill level by an amount if possible. Returns true if successfully downgraded. Otherwise, false.

Parameters

NameDescriptionType

amount

The amount to increase by. Default: 1.

int

withoutNotify

If events should not be invoked. Default: false.

bool

Deplete

Completely removes all upgrades.

Parameters

NameDescriptionType

withoutNotify

If events should not be invoked. Default: false.

bool

SetStatLevels

Sets the level of all stats to the current skill level.

RecalculateStats

Recalculates all stats.

CopyData

Entirely copies the data of another skill node.

Parameters

NameDescriptionType

other

The other skill node.

SkillNode

CopyData

Copies the data from a savable skill node.

Parameters

NameDescriptionType

savable

A savable skill node.

SavableSkillGraph.SavableSkillNode

CreateCopy

Return Type: SkillNode

Creates a copy of a skill node.

Parameters

NameDescriptionType

original

The skill node to copy.

SkillNode

Enums

Shape

Supported skill node shape types.

NameDescription

Square

Use a square shape.

Squircle

Use a squircle shape.

Circle

Use a circle shape.

State

Skill node states.

NameDescription

Locked

If the node is locked.

Unlocked

If the node is unlocked.

Obtained

If the node is obtained.

Maxed

If the node's level is maxed.

Last updated