SkillGraph

The main class for skill trees. This contains all skill tree data.

Properties

NameDescriptionType

enabled

If this skill graph is enabled. Skill graphs must be enabled to be visible in-game.

bool

forPlayer

If this skill graph is for the player.

bool

id

The ID of the skill graph. This is best left unchanged.

string

displayName

The display name of the skill graph.

string

gridDimensions

The grid dimensions. This will control the number of initial graph skills.

Vector2Int

nodeSize

The size of each node.

float

nodeShape

The main shape of all nodes.

SkillNode.Shape

visibility

The visibility of the graph.

SkillGraph.GraphVisibility

nodes

A list of nodes in this graph.

List<SkillNode>

connections

A list of skill connections in this graph.

List<SkillConnection>

nodeCount

The amount of nodes that should exist.

int

Methods

CountTotalPoints

Return Type: int

Calculates the number of points that would be required to completely upgrade all skills.

CountPointsSpent

Return Type: int

Calculates the total number of points spent in this graph.

ResetNodeStates

Resets all node states.

GetNodeByPosition

Return Type: SkillNode

Returns the node with the position index or null if it doesn't exist.

Parameters

NameDescriptionType

positionIndex

The node's position index.

int

GetNodeByIndex

Return Type: SkillNode

Returns the node with the index or null if it doesn't exist.

Parameters

NameDescriptionType

index

The node index.

int

GetNodeByKey

Return Type: SkillNode

Returns the node with the key or null if it doesn't exist.

Parameters

NameDescriptionType

key

The node key.

string

GetFirstAvailablePositionIndex

Return Type: int

Returns the first available position index or -1 if no position is available.

AddEmptySkillNode

Return Type: SkillNode

Creates and adds an empty skill node.

Parameters

NameDescriptionType

positionIndex

The position index of the skill node.

int

TryUnlockLockedNodes

Tries to unlock locked nodes.

DepleteNodesWhereNecessary

Depletes all nodes which don't meet the requirements of remaining in the obtained state.

GetConnectionsOfNode

Return Type: List<SkillConnection>

Creates and returns a list of all connections of a specific node.

Parameters

NameDescriptionType

index

The index of the node.

int

CopyData

Entirely copies the data of another skill graph.

Parameters

NameDescriptionType

other

The other skill graph.

SkillGraph

CopyData

Copies the data from a savable skill graph.

Parameters

NameDescriptionType

savable

The savable skill graph.

SavableSkillGraph

CreateSavableSkillGraph

Return Type: SavableSkillGraph

Creates and returns a SavableSkillGraph from this graph.

GetSkillGraphByName

Return Type: SkillGraph

Gets the skill graph by name.

Parameters

NameDescriptionType

name

The name of the skill graph.

SkillGraph

GetSkillGraphByID

Return Type: SkillGraph

Gets the skill graph by ID.

Parameters

NameDescriptionType

id

The ID of the skill graph.

SkillGraph

CreateCopy

Return Type: SkillGraph

Creates a copy of a skill graph.

Parameters

NameDescriptionType

original

The skill graph to copy.

SkillGraph

Enums

GraphVisibility

NameDescription

Visible

Allow the graph to be displayed in the skill tree window.

Hidden

Do not display in the skill tree window.

Last updated