11 Abilities
Nictogen edited this page 2021-08-19 23:36:01 +00:00

This page shows you what abilities are available and how you can change their settings.


Information on available abilities can be accessed in abilities.html, a page where all data and the structures for each ability can be found. This page can be found in the addonpacks folder

2 Ways to add abilities

First Way

The first and the recommended way is giving each ability you are adding a key:

"abilities": {
	"example_ability": {
		"ability": "lucraftcore:health"
	}
}

As you can see, example_ability is the key for your lucraftcore:health ability, this allows you to uniquely identify each ability, even if you have duplicates!

Second Way

The second way is using an array to set your abilities:

"abilities": [
	{
		"ability": "lucraftcore:health"
	}
]

While each ability will have their own keys generated by LucraftCore, you lose the ability to uniquely identify each ability.

Default ability settings

"required_level": 1,
"required_ability": "modid:ability",
"required_superpower": "modid:superpower",
"cooldown": 100,
"parent_ability": "modid:ability",
"hidden": true

required_level (optional) Defines the minimum level you need for this ability.

required_ability (optional) Defines the ability that needs to be unlocked for this ability. NOTE: You have to define the ability that is needed BEFORE this ability. You need to specify the id of the ability (which is set by "id")

required_superpower (optional) Defines the superpower that is needed for this ability to be unlocked. This obviously only makes sense for suit sets.

cooldown (optional) The amount of ticks before you can use this ability again. In the given example the cooldown lasts 5 seconds (5 * 20 = 100).

parent_ability (optional) Defines the ability that shall be used when using the child ability. NOTE: You have to define the ability that is needed BEFORE this ability. You need to specify the id of the ability (which is set by "id")

hidden (optional) If this is enabled, the ability won't show up in the ability bar.

Toggle Power ability "lucraftcore:toggle_power"

Writing toggle power ability

Firstly, you have to write your toggle ability before all other abilities.

"abilities": {
	"toggle_example": {
		"ability": "lucraftcore:toggle_power"
	}
}

Setting toggle power ability as a required ability

There are 2 ways:

Using conditions

"abilities": {
	"toggle_example": {
		"ability": "lucraftcore:toggle_power"
	},
	"test_ability": {
		"ability": "lucraftcore:flight",
		"conditions": [
			{
				"type": "lucraftcore:ability",
				"ability": "toggle_example"
			}
		]
	}
}

conditions is first created, then you write {} to contain one condition.
Inside this condition, you have the type, which is lucraftcore:ability.
For lucraftcore:ability condition, it only has ability. This takes in toggle_example, a key you used to create toggle_power earlier.

Using required_ability

"abilities": {
	"toggle_example": {
		"ability": "lucraftcore:toggle_power"
	},
	"test_ability": {
		"ability": "lucraftcore:flight",
		"required_ability": "toggle_example"
	}
}

required_ability uses the key used to create toggle_power ability

Attribute modifier abilities

Abilities with amount, operation and uuid is as follows:

"amount": 0.5,
"operation": 1,
"uuid": "0669d99d-b34d-40fc-a4d8-c7ee963cc842"

amount https://minecraft.gamepedia.com/Attribute#Modifiers

operation https://minecraft.gamepedia.com/Attribute#Modifiers

uuid A random ID under which the attribute modifier is saved.
You can use this site to get a random UUID: https://www.UUIDTools.com/