Scripting - Sponge-RPG-dev/NT-RPG GitHub Wiki

There is multiple way to register custom content such as skills, or event listeners into the ntrpg plugin.

Java API NT-Script Denizen MagicSpells
Language Java,Kotlin,etc Yes Yes Yes
Execution Compiled Compiled Interpreted Interpreted
Distribution .jar .conf (text) .yml (text) .yml (text)
Reloading at runtime Yes Yes Yes Yes
Difficulty 4 2 1 1
Plugin dependencies None None Denizen MagicSpells

Java API

NT-Script

Denizen

Nt-Rpg plugin fires a denizen event that you can listen to in a denizen script.

  • <entity> casts skill
  • filter switch: id

Event Contexts:

  • skill_id - returns SkillId from the skilltree
  • caster - returns character tag for caster
  • skill_context - returns skill context tag that you can use to access skill settings

Examples

File: Nt-RPG/skilltrees/testskilltree.conf

  Name: testskilltree
  Skills: [
    {
    SkillId: "ntrpg:denizen_test"
    Type: "denizen"
    Name: "DenizenTest"
    Description: [
      "Hello-world example for denizen interop"
    ]
    SkillSettings: {
      some_setting_node: "7 + level"
    }
  }

File: Denizen/scripts/skills.dsc

skills:
    type: world
    debug: true
    events:
      on player casts skill id:denizen_test:
        - announce "Denizen will handle execution of <context.skill_id>"
        - announce "some_setting_node: value <context.skill_context.value[some_setting_node]>"

MagicSpells

Examples

⚠️ **GitHub.com Fallback** ⚠️