Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Last active February 22, 2025 20:57
Show Gist options
  • Save KageDesu/14103a269f604649d304e41497b92873 to your computer and use it in GitHub Desktop.
Save KageDesu/14103a269f604649d304e41497b92873 to your computer and use it in GitHub Desktop.
Simple Skills Tree Plugin Guide

Simple Skills Tree plugin guide


Setup

Skill Points Storage

  • Optionally, you can store Skill Points for an actor in a variable by adding the following to the Actor's Note:

    <pSkillPointsVarId:X>

    where X is the variable ID where the game will store the actor's skill points.

  • Default Usage: Skill Points are used to learn skills, but you can set the skill cost to 0 if desired.

  • Recommendation: Remove all skills from the "Learnable Skills" table in the Database for classes.

  • Example:

    <pSkillPointsVarId:120>
  • Warning: If the plugin parameter "Skill Points Per Level Up Gain" is set to any value, that value will be added to the actor's variable <pSkillPointsVarId:X> on level up.


Script Calls

  • OpenSkillTreeEditor();
    Opens the skills tree editor for editing skills trees for classes.
    WARNING: This script call only works in Playtest mode and requires a mouse.
    Note: The game player does not have access to the skills tree editor.

  • OpenSkillTreeForActor(actorId, categoryIndex);
    Opens the skills tree for the specified Actor ID.

    • categoryIndex: Index of the category (0 - default).
      This script call is for game players to manage their skills in-game.
  • RemoveAllSkillTrees();
    Removes all skills trees from the game.

  • ModifySkillPointsForActor(actorId, value);
    Modifies skill points for the specified actor.

  • ClearSkillPointsForActor(actorId);
    Clears skill points for the specified actor.

  • ResetSkillTreeCategory(actorId, categoryIndex);

    • Resets the specified category for the actor.
    • All learned skills will be forgotten.
    • All spent skill points will be refunded.
    • If skill been learned by switch, it will be turned off.

Example:

ResetSkillTreeCategory(1, 0); // Resets the first (default) category for actor 1.
  • HideSkillTreeCategory(classId, categoryIndex);
    Hides the specified category for the class. Note: First category (with index 0) cannot be hidden.

  • UnhideSkillTreeCategory(classId, categoryIndex);
    Unhides the specified category for the class.


Changing Visuals

  1. Edit Plugin Parameters
  2. Edit NUI .json files in data\PKD_SimpleSkillsTree\ (Do not edit files in the Generated folder!)
  3. Edit Images in img\pSimpleSkillsTree\

Adding More Skill Shapes

  • By default, three shapes are used: A, B, C.
    To add more shapes, update the Plugin Parameters (see "Skill Visual Types").

  • New Shape Example (D):
    Create new image files in img\pSimpleSkillsTree\ for the new shape:

    • skillCell_D_active_00.png
    • skillCell_D_active_01.png
    • skillCell_D_available_00.png
    • skillCell_D_available_01.png
    • skillCell_D_editor_00.png
    • skillCell_D_editor_01.png
    • skillCellMask_D.png

Extra Information

  • Skills Preview Images:
    Place images in img\pSimpleSkillsTree\preview\

  • Animated Skill Previews:
    Place .webm files in the movies\ folder (requires VPlayer plugin).

Renaming Skills Tree Category for Class

Add the following to the Class Note section:

<pSTCatName_X:CATEGORY_NAME>
  • X is the index. 0 is the default first category name (usually the class name).
  • Use subsequent indexes for additional category names.

Examples:

  • <pSTCatName_0:Furry>
  • <pSTCatName_1:Defense>

Set custom background for a skill tree category for Class

Add the following to the Class Note section:

<pSTCatBackImage_X:IMAGE_NAME>
  • X is the index. 0 is the background for default first category.
  • IMAGE_NAME is the name of the image file without the extension.
  • Use subsequent indexes for additional category.
  • Image should be in img\pSimpleSkillsTree\ folder.

Examples:

  • <pSTCatBackImage_0:FurryBackground>
  • <pSTCatBackImage_1:DefenseBackground>

diffImages

Set custom image for skill

If you don't want to use the default icon for a skill, you can set a custom image for it.

Add the following to the Skill Note section:

<pImgForST:NAME>

extraImage

extraImageDemo

  • NAME is the name of the image file without the extension.
  • Image should be in img\pSimpleSkillsTree\ folder.

Adding Skill Tree Menu Item to VisuStella MZ Menu Core

  • Add new Item to Plugin Parameter Command Window List

ParameterName

  • Set next values:
    • Symbol: pSkillTree
    • STR: Text: Skills Tree
    • JS: Show: return true
    • JS: Enable: return true
    • JS: Ext: return null
    • JS: Run Code: SceneManager._scene.commandPersonal()
    • JS: Personal Code: OpenSkillTreeForMenuActor()

ItemParameters bak


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment