Skill Web
  • Skill Web Documentation
  • đŸ•šī¸Quick Start
    • Installation
  • Start Developing
  • 💡General
    • Running the Demos
  • Menu Options
  • UI Customizations
    • uGUI
      • Skill Node
      • Connection Line
      • Web View
      • Hovercard
  • Datasets
  • 🎓Tutorials
    • Runes Demo Walkthrough
  • âœī¸Editors
    • Skill Bank
  • Web Creator
  • Settings
  • Components
    • Skill Web Initializer
    • uGUI
      • Skill Node UGUI
      • Connection Line
        • Curved Connection Line
      • Web View UGUI
        • Web View Selector UGUI
      • Skill Hovercard UGUI
    • Player Web Link
  • 📄Scripting API
    • Initialization
  • Skills
    • Skill
      • Skill Dataset Attributes
    • Skill Node
  • Webs
    • Web Graph
    • Web
  • UI
    • Loading a Web
    • Web View Input Handling
    • Customize Connection Line
    • Customize Hovercard
  • Player Web Link
  • Custom Logic
  • Saving & Loading
  • Events
  • Skill Web Settings
  • Procedural Generation (Beta)
  • đŸ› ī¸Support
    • Getting Help
  • 📚Changelogs
    • Latest Releases
    • Future Plans
    • ⭐Rate Me?
Powered by GitBook
On this page
  • Fields & Properties
  • Creating a Web
  • Notable Methods
  • Reset All Skills
  • Confirm Changes
  • Revert Changes
  • Get Node
  • Get Skill Node
  • Is Node Obtained
  • Is Obtained
  1. Webs

Web

The runtime version of the WebGraph.

The Web class is the runtime version of a WebGraph.

Fields & Properties

Name
Description
Type
Access

graph

The graph reference which is created with the Web Creator. This graph is used to create the actual runtime graph.

WebGraph

public

skillNodes

A dictionary of skill nodes.

Dictionary<int, SkillNode>

public

revertableState

The revertable graph state simply as a dictionary where the key is the skill node ID and the value is the skill node level.

Dictionary<int, int>

protected

Connections

A list of all skill connections.

List<Connection>

public

revertableSkillPoints

The skill points set when the graph is reverted.

int

protected

isReverting

If the graph is currently reverting. This flag is automatically set as needed when RevertChanges is called.

bool

public

HasUnsavedChanges

If there are unsaved changes made to the graph.

bool

public

Creating a Web

To create a web you need a reference to a WebGraph or a SavableWeb.

var webGraph = SkillWeb.GetWebGraph("My Web Graph");
var web = new Web(webGraph);

Notable Methods

Reset All Skills

The ResetAllSkills method simply resets the level of all skills.

web.ResetAllSkills();

Confirm Changes

The ConfirmChanges method confirms the changes made to the graph.

web.ConfirmChanges();

Revert Changes

The RevertChanges method reverts the changes made to the graph.

web.RevertChanges();

Get Node

The GetNode method gets a SkillNode by its node ID. This is not the skill ID.

SkillNode skillNode = web.GetNode(0);

Get Skill Node

You can get the first SkillNode by its skill ID or skill name with the GetSkillNode method.

SkillNode skillNode = web.GetSkillNode("My Skill");

Alternatively, you can use GetSkillNodes to get all skills in the graph with a matching skill ID or skill name.

List<SkillNode> skillNodes = web.GetSkillNodes("My Skill");

By State

You can get all skill nodes in specific states with the GetSkillNodes method.

List<SkillNode> lockedSkillNodes = web.GetSkillNodes(Skill.State.Locked);

Getting all obtained nodes has a special method called GetObtainedSkillNodes.

List<SkillNode> obtainedSkillNodes = web.GetObtainedSkillNodes();

Is Node Obtained

The IsNodeObtained method checks if a skill node with a specific node ID is obtained. This node ID is not the same as the skill ID.

bool isObtained = web.IsNodeObtained(0);

Is Obtained

The IsObtained method checks if a skill node with a specific skill ID or skill name is obtained.

bool isObtained = web.IsObtained("My Skill");
PreviousWeb GraphNextUI

Last updated 11 days ago