Skip to content

SkillConnection ​

Inherits: Resource

Visual and logical links between skill nodes

Properties ​

intfrom_node_id
intto_node_id
ConnectionTypeconnection_typeConnectionType.PREREQUISITE
Colorline_colorColor.WHITE
floatline_width2.0
boolis_curvedfalse
floatcurve_strength0.5

Methods ​

boolis_logical_connection()
boolis_prerequisite_connection()
boolis_mutual_exclusion()
boolis_blocking_connection()
boolaffects_node( id: int )
intget_other_node_id( id: int )
Stringget_connection_direction()
Stringget_summary()
Array[Dictionary]validate()
boolis_valid()

Enumerations ​

enum ConnectionType ​

The options of connection type: prerequisite, visual only, mutual exclusive.

  • PREREQUISITE = 0
  • VISUAL_ONLY = 1

Property descriptions ​

int from_node_id ​

========== CONNECTION PROPERTIES ==========

int to_node_id ​

The node the connection goes to.

ConnectionType connection_type = ConnectionType.PREREQUISITE ​

What the connection means (a prerequisite, or a mutual exclusion).

Color line_color = Color.WHITE ​

========== VISUAL STYLING ==========

float line_width = 2.0 ​

The width of the line in the tree window.

bool is_curved = false ​

True when the line is drawn as a curve.

float curve_strength = 0.5 ​

How much curve if is_curved is true

Method descriptions ​

bool is_logical_connection() ​

========== CONNECTION LOGIC ==========

bool is_prerequisite_connection() ​

Is the connection a prerequisite?

bool is_mutual_exclusion() ​

Is the connection a mutual exclusion (both ways)?

bool is_blocking_connection() ​

Does the connection keep two nodes from being taken together?

bool affects_node( id: int ) ​

Is this node one of the two ends of the connection?

int get_other_node_id( id: int ) ​

The node at the other end of the connection (-1 when this node is not one of them).

String get_connection_direction() ​

A text about the direction of the connection.

String get_summary() ​

========== UTILITY METHODS ==========

Array[Dictionary] validate() ​

Checks the settings. Gives the problems found (empty when it is fine).

bool is_valid() ​

Is it free of errors?