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:
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:
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:
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
Last updated
Was this helpful?