Origins-Reborn
  • Contents
  • FAQ
  • Addons
  • Custom origins
    • Origin Powers
    • Layers
  • Placeholders
  • Troubleshooting
  • Configuration
  • Skript
  • Making your own Origins-Reborn addon
    • Creating the addon
    • Custom abilities
    • Ability
    • VisibleAbility
Powered by GitBook
On this page
  • Making Abilities
  • Testing Abilities
  • Using Abilities
  • Further Support

Was this helpful?

Skript

If you don't want to go through the hassle of making a plugin for your custom abilities, Origins-Reborn also has Skript compatibility, allowing you to make your own custom abilities for your origins in Skript!

If you've used Skript before, you might know that sometimes you need to use Skript addons to add compatibility for plugins.

However, you don't need to do this for Origins-Reborn, as it loads itself as a Skript addon when it detects that Skript has been installed, meaning all you need to make custom abilities is Origins-Reborn and Skript.

Making Abilities

First, you need to register your custom ability using Skript, using the following syntax:

(register|create) [(a new|an)] (ability|power) with (key|id) %string% [[and] (title|name) %string% [and] description %string%]

It might look a bit scary in that format, that's just how Skript processes text - here are some examples to make it a bit clearer:

on load:
    register a new ability with key "skript:my_ability"

That's a lot clearer now! Now it's easy to tell that this code makes a new ability with the key "skript:my_ability", when the skript loads.

This ability has no visible description, meaning you can give origins this ability and run code to check if the origin has the ability, but it will not show up in the origin selection GUI.

However, you can also create abilities with a visible description too:

on load:
    register an ability with key "skript:immortal" and title "Immortal" and description "You are immortal and cannot take damage."

This creates a new ability with the key "skript:immortal" named "Immortal" with a description of "You are immortal and cannot take damage."

This description shows up in the Origin selection GUI among the other abilities your origin has.

Testing Abilities

To check if a player has an ability, you can use the following syntax:

%player% has [(ability|power)] %string%

To check if a player does not have an ability, you can use the following syntax:

%player% (does not|doesn't) have [(ability|power)] %string%

For example:

on damage:
    if victim has ability "skript:immortal":
        cancel event

This allows you to test if a player has a custom ability, and run code if they do.

Using Abilities

To use your custom abilities in origins, you use the key you specified when creating the custom ability.

The id you specify should be in key value pairs, such as skript:ability where skript is the key and ability is the value.

This is put in the powers field in the origin json file like any other Origins-Reborn ability.

Further Support

PreviousConfigurationNextMaking your own Origins-Reborn addon

Last updated 2 months ago

Was this helpful?

See for more info on editing and creating origins.

If you have any questions or run into any issues with registering or testing for custom abilities, you can join the for support.

If you need help with Skript itself, such as understanding how events or variables work, you can get help from the or the .

here
Starshooter Discord server
skUnity docs
skUnity Discord server