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
  • Attributes
  • Scaler
  • Base Value
  • Scaling
  • Example
  1. Skills
  2. Skill

Skill Dataset Attributes

A simple way of adding stats to datasets.

Skill datasets support attributes specifically designed add scaling stats with ease.

Attributes

Scaler

The Scaler attribute can be used on an int or float field to mark it as a value that scales with the level of the skill. This attribute accepts an ID (string).

[Scaler("damage")]
[NonSerialized] // Recommended to prevent it from appearing in the Skill Bank
public float damage;

Base Value

The BaseValue attribute can be used on an int or float field to mark it as a value that should be used as the base value for a Scaler field. This attribute accepts an ID (string), which must be the same as the Scaler field that it's meant to target.

[BaseValue("damage")]
public float baseDamage;

Scaling

The Scaling attribute can be used on an int or float or AnimationCurve field to mark it as the scaling source for a Scaler field. This attribute accepts an ID (string) and a scaling mode (ScalingMode). The ID must be the same as the Scaler field that it's meant to target. The scaling mode does not need to be defined if the attribute is used on an AnimationCurve field.

[Scaling("damage")]
public float damageScaling;

Scaling Modes

Name
Description

Linear

Linear scaling (base + scaling * level - 1).

Exponential

Ramped up scaling (base * scaling^(level - 1)).

Curve

Use an animation curve as the scaling source.

Example

Below is an example of what a custom dataset would look like if the above was implemented.

using Esper.SkillWeb;
using Esper.SkillWeb.Attributes;
using System;
using UnityEngine;

[CreateAssetMenu(fileName = "Custom Skill Dataset", menuName = "Skill Web/Datasets/Custom Skill Dataset")]
public class CustomDataset : DefaultSkillDataset
{
    [BaseValue("damage")]
    public float baseDamage;

    [Scaling("damage")]
    public float damageScaling;

    [Scaler("damage")]
    [NonSerialized]
    public float damage;

    public override string GetDescription()
    {
        string description = base.GetDescription();

        // Append the description to include the damage stat
        description += $"\n\nDamage: {damage}";

        return description;
    }
}
PreviousSkillNextSkill Node

Last updated 12 days ago