Advanced Topics

This section covers more complex features of the plugin, including persistence, networking, and custom C++ extensions.

Save & Load

The system includes built-in support for saving and loading. On the CrimsonSkillTreeManager component, ensure bSaveSkillTreeAfterEveryChange and bLoadAllSkillTreesPostInitialize are checked. The manager will then automatically handle loading data from the specified SaveSlotName after initialization and will save data whenever a node's state changes.

Add Skill Tree Display

Multiplayer Support

The plugin is designed for multiplayer from the ground up.

Extending with Blueprint

Many base classes in the plugin are marked as Blueprintable, meaning you can easily create a Blueprint-based child class to add your own logic without writing any C++.

Example: Custom Tooltip Description

Imagine you have a complex condition and want to provide a more descriptive, dynamically generated tooltip for it in the UI. You can do this by overriding a function in a Blueprint child class.

  1. In the Content Browser, create a new Blueprint Class.
  2. In the "Pick Parent Class" dialog, search for and select CrimsonSkillTree_ActivationCondition_AttributeRequirement. Name your new Blueprint something like BP_MyCustomAttributeRequirementCondition.
  3. Open the new Blueprint. In the "My Blueprint" panel on the left, hover over the "Functions" category and click the "Override" dropdown.
  4. Select GetTooltipDescription from the list.
  5. A new function graph will open. Here, you can add any logic you need and connect the final `FText` to the `Return Node`.
  6. Now, when you add this condition (`BP_MyCustomCondition`) to a skill node, the UI will automatically call your new overridden function to get the tooltip text.

You can also just modify the C++ code itself!

The default implementations are generic due to project specific requirements.

Extending with C++

For advanced users, the entire system is extensible through C++. You can create new child classes in C++ from pretty much everything!

For example:

  • UCrimsonSkillTree_NodeEventBase to create entirely new types of skill effects.
  • UCrimsonSkillTree_ActivationConditionBase to create new kinds of unlocking rules.
  • UCrimsonSkillTreeWidget_LineDrawingPolicyBase to create new visual styles for the connection lines.

You can even override the base UCrimsonSkillTreeManager if you need to change any logic depending on your project!