forked from TheComputerGeek2/MagicSpells
-
Notifications
You must be signed in to change notification settings - Fork 3
Spell Configuration
JasperLorelai edited this page Nov 1, 2020
·
28 revisions
- The section covers all base spell options. For individual spell options visit the spell list.
- Spell can be placed in any file which starts with "spell" and ends with ".yml" (a YAML configuration file).
- Spell files can be placed in the root folder or any folder in root starting with "spells". This does not support subfolders of spell folders.
- Click on the following to jump to the right section:
- Click Here for a guide about Subspell arguments.
Option | Description | Variable Type | Default Value |
---|---|---|---|
debug |
Enables spell-specific debug mode. | Boolean | false |
name |
String that gets displayed as spell name when scrolling through a spell list. We call it the external spell name because when listing a spell with this option as a subspell, you wouldn't use this name, but the internal spell name. It supports color codes, but when trying to cast the spell using the cast command, you have to specify the spell in quotations, without color codes. | String | null |
aliases |
A list of strings that can act as internal spell names. They cannot be used when specifying the spell as a subspell. | String List | null |
helper-spell |
When enabled it changes the way the spell loads in the plugin by disabling some features and hiding the spell from the spell list. The feature should only be used on spells that are casted as subspells, not on spells that cast directly as main spells - spells with cast-item , Passive spells, etc. That way only the main spells require permission options, any subspell that the main spells cast with this option enabled will skip further permission checking. |
Boolean | false |
always-granted |
If enabled, all players will be taught this spell. For more about permissions check this page of our wiki. | Boolean | false |
permission-name |
It defaults to the internal spell name, but it can be changed to any string. Multiple spells can have the same permission-name . For more about permissions visit this page. |
String | Internal spell name |
incantations |
A list of strings that would cast the spell when sent in chat by a player. | String list | null |
description |
A string that would be sent to chat when using the Help spell. | String | null |
cast-item |
Item Type that would make the spell cast whenever it is left-clicked. This option accepts one item or multiple of them separated by commas. Learn more about cast items here
|
String | null |
cast-items |
Same as above, but each Item Type is defined as an element of the string list. | String List | null |
right-click-cast-item |
Item Type that would make the spell cast whenever it is right-clicked. This option accepts one item or multiple of them separated by commas. | String | null |
right-click-cast-items |
Same as above, but each Item Type is defined as an element of the string list. | String List | null |
consume-cast-item |
Item Type that would make the spell cast whenever it is consumed. This option accepts one Item Type or multiple of them separated by commas. Examples of these items are potions, food, etc. | String | null |
consume-cast-items |
Same as above, but defined as a list of strings. | String List | null |
cast-with-left-click |
Defines whether the spell is castable on left click with the cast item thereof or on the bound item. | Boolean | Defined in general.yml
|
cast-with-right-click |
Defines whether the spell is castable on right-click with the cast item thereof. | Boolean | Defined in general.yml
|
dance-cast-sequence |
Series of characters that represent actions for the dance casting sequence. | String | null |
require-cast-item-on-command |
When true the player must be holding the cast item even when casting with the /cast command. |
Boolean | false |
bindable |
Defines whether this spell can be bound on an item. There is a difference between cast item methods and items spells have been bound on. | Boolean | true |
bindable-items |
A list of items this spell can be bound to using the Bind Spell. Leaving this option undefined makes the spell bindable to all types of items. | String List | null |
spell-icon |
An item that represents this spell for the Spellicon feature. Format: `item:data\ | name`. | String |
broadcast-range |
Distance that spell strings are broadcast from the casting player to other players nearby. This option overwrites the default range specified in your general.yml file. |
Integer | Defined in general.yml
|
experience |
Amount of experience given to the caster upon successful cast. | Integer | 0 |
cast-time |
Warm-up time defined in server ticks before the spell casts successfully. Effect position that can be used at the start of warm-up time is startcast . Leave at 0 for an instant cast. |
Integer | 0 |
interrupt-on-move |
If cast-time is defined above 0, this interrupts the cast-time for the spell when the player moves. The spell then fails to cast. |
Boolean | true |
interrupt-on-teleport |
Same as above, but this listens for any kind of teleport event to cancel the warm-up. | Boolean | true |
interrupt-on-damage |
Same as above, but this listens for when the caster receives damage to cancel the warm-up. | Boolean | false |
interrupt-on-cast |
Same as above, but this listens for whenever a spell is casted to cancel warm-up. | Boolean | true |
spell-on-interrupt |
Spell to cast if cast-time fails for the above mentioned reasons. |
String | null |
min-range |
Minimal range required for the targeting handler defined in block distance. | Integer | 0 |
range |
Same as above but it defines the maximal range. | Integer | 20 |
spell-power-affects-range |
Defines if the range is affected by Spell Power. | Boolean | false |
obey-los |
Defines whether the target handler should obey caster's line of sight. | Boolean | true |
can-target |
Restrict the target handler with a valid target list either as a string list or a string with the items separated by a comma. Valid targets: self or caster , player or players , invisible or invisibles , nonplayer or nonplayers , monster or monsters , animal or animals , entity type (this link may include entities from versions above yours). |
String List or String | null |
target-players |
Defines if the target handler should target players. | Boolean | true |
target-non-players |
Same as above for entities that aren't players. | Boolean | true |
beneficial |
Marks this spell as "beneficial". This modifies how targets are chosen by the target handler when using MagicSpellsTeams or other add-ons. | Boolean | Varies (Have no clue) |
target-damage-cause |
Damage type string for fake damage cause that wouldn't actually be applied to the target. This option and the one below only exists to create a fake damage event for compatibility for other plugins. | String | null |
target-damage-amount |
The amount of fake damage to apply. See option above for more info. | Integer | 0 |
effects |
Configuration section for Spell Effects. | Map | |
cost |
A string list of reagent costs required for the spell to cast. The list includes: health , mana , hunger , experience , levels , variable (- variable <variableName> <amount> ), durability , money (if Vault plugin is present), and Item Type. All items on this list require quantity separated from the reagent by a space character except Item Type which will assume the quantity of 1 if not specified. |
String List | null |
cooldown |
Defines in seconds and it is applied post cast. It can be modified using the cooldown modifier action and the ModifyCooldown spell. general.yml includes an option that defines whether cooldown is reset on plugin reload. It can also be reset using the command /c resetcd
|
Float | 0 |
server-cooldown |
Same as above but the cooldown is applied to everyone on cast. | Float | 0 |
shared-cooldowns |
Applies cooldown to the spell and to all spells defined in this spell list. | String List | null |
ignore-global-cooldown |
Ignores the cooldown set on server-cooldown . |
Boolean | false |
charges |
Defines how many times this spell can be casted before the cooldown is applied. | Integer | 0 |
recharge-sound |
Plays the sound by defined on charges decrement at a constant volume and pitch value of 1. | String | null |
modifiers |
View further documentation on this page. | String List | null |
target-modifiers |
Conditions for the target to consider for the target handler. View further documentation on this page. | ||
String List | null | ||
location-modifiers |
Conditions for the target location to consider for the target handler. View further documentation on this page. | String List | null |
prerequisites |
A list of spells that the caster is required to already know in order to learn this spell. | String List | null |
replaces |
Define a list of spells that this spell would replace upon when it gets learned by the caster. | String List | null |
precludes |
A list of spells the player can no longer learn if they know this spell. | String List | null |
restrict-to-worlds |
List of worlds this spell would be restricted to. It would not be castable in any other world. | String List | null |
variable-mods-cast |
Define a list of variable names and value modification methods separated by a space. The variables are modified even if the spell fails to cast - use the option below instead to avoid that. Operations: = (set), + , - , / , * , ^ (power), % (modulo), ? (randomiser, bounds from 0 to the argument). The value after, not separated by anything, should be the value it gets modified by. Example: variable-mods-cast: [varName =10] If operation is not specified, it will assume the operation of add . |
String List | null |
variable-mods-casted |
Same as above but it only modifies the caster's variable values on the successful cast. | String List | null |
variable-mods-target |
Same as above but it modifies the target's variable values if the targeted spell successfully found a target. | String List | null |
sound-on-cooldown |
Plays the sound by defined if the spell is currently on cooldown, at a constant volume and pitch value of 1. | String | Defined in general.yml
|
sound-missing-reagents |
Plays the sound by defined if the caster is missing the reagents required, at a constant volume and pitch value of 1. | String | Defined in general.yml
|
str-cost |
String that gets displayed under Cost on the Help spell. | String | null |
str-cast-self |
String sent to the caster on the successful cast. | String | null |
str-cast-others |
String sent to the other players nearby. The range is defined by the broadcast-range option which, if not defined, will assume the value specified in general.yml instead. |
String | null |
str-on-cooldown |
String sent to the caster if the spell is currently on cooldown. | String | Defined in general.yml
|
str-missing-reagents |
String sent to the caster if the caster does not have the reagents required for the spell to cast successfully. | String | Defined in general.yml
|
str-cant-cast |
String sent to the caster if the spell cannot be casted (e.g. if no target is found, etc.) | String | Defined in general.yml
|
str-cant-bind |
String sent to the caster if the spell is not bindable (e.g. if bindable is defined as false) |
String | null |
str-wrong-world |
String sent to the caster if the world the caster is in is not defined in restrict-to-worlds . |
String | Defined in general.yml
|
str-wrong-cast-item |
String sent to the caster if require-cast-item-on-command is set to true and they are not holding the cast item. |
String | Value of str-cant-cast
|
str-cast-start |
String sent to the caster on the successful cast. | String | null |
str-interrupted |
String sent to the caster if cast-time has been interrupted. |
String | null |
str-modifier-failed |
String sent to the caster when but a modifier that was specified failed. | String | null |
tags |
Define a list of strings. Some spells support the feature of spell filters that utilize this feature. E.g. allowed-spell-tags on the Silence spell. |
String List | null |
Option | Description | Variable Type | Default Value |
---|---|---|---|
can-cast-with-item |
Defines if this spell is castable with items. | Boolean | true |
can-cast-by-command |
Defines if this spell is castable with the /cast (spell) command. |
Boolean | true |
Option | Description | Variable Type | Default Value |
---|---|---|---|
always-activate |
Defines if the spell's reagents will be charged and the cooldown activated even if the spell fails to find a valid target. | Boolean | false |
play-fizzle-sound |
Defines if the spell should play the fire extinguish sound if the spell fails to find a valid target. | Boolean | false |
target-self |
Forces the targeting handler to target the caster instead. | Boolean | false |
spell-on-fail |
Spell to cast if the spell fails to cast (e.g. if it fails to find a target). | String | null |
str-cast-target |
String to send to the target if the target is a player. | String | null |
str-no-target |
String to send to the caster if the target handler failed to find a valid target. | String | null |
Option | Description | Variable Type | Default Value |
---|---|---|---|
can-cast-with-item |
Defines if this spell is castable with items. | Boolean | true |
can-cast-by-command |
Defines if this spell is castable with the /cast (spell) command. |
Boolean | true |
targeted |
Defines if this spell should become a targeted spell (it will accept Targeted Spell Configuration options). For versions below MS 4.0 this option will not be able to target entities other than players. | Boolean | false |
toggle |
Defines whether the spell can be deactivated while it's still active. It will only apply cooldown when its duration fades. | Boolean | true |
use-cost |
A string list of reagent costs required for the buff to be active. The cost will be charged on the interval defined with the option below. The list of cost reagents includes: health , mana , hunger , experience , levels , durability , money (if Vault plugin is present), and Item Type. All items on this list require quantity separated from the reagent by a space character except Item Type which will assume the quantity of 1 if not specified. |
String List | null |
use-cost-interval |
Interval defined in ticks for the use-cost option. |
Integer | 0 |
num-uses |
Number of uses before the buff spell expires. | Integer | 0 |
duration |
Buff spell duration specified in seconds before the buff expires. Set to 0 do define an infinite duration. | Float | 0 |
power-affects-duration |
Defines whether Spell Power can affect the duration of the spell. | Boolean | true |
cancel-on-give-damage |
Defines whether the buff spell will cancel if the caster deals damage to another entity. | Boolean | false |
cancel-on-take-damage |
Defines whether the buff spell will cancel if the caster receives damage. | Boolean | false |
cancel-on-death |
Defines whether the buff spell will cancel if the caster dies. | Boolean | false |
cancel-on-teleport |
Defines whether the buff spell will cancel if the server emits a teleport event for the caster. | Boolean | false |
cancel-on-change-world |
Defines whether the buff spell will cancel if the caster switches worlds. | Boolean | false |
cancel-on-spell-cast |
Defines whether the buff spell will cancel if the caster casts a spell. | Boolean | false |
cancel-on-logout |
Defines whether the buff spell will cancel if the caster leaves the game. | Boolean | false |
spell-on-use-increment |
Spell that will be casted whenever the buff spell has been used. This spell will be casted once even if num-uses is set to 0. |
String | null |
spell-on-cost |
Spell that will be casted whenever the buff spell tries to charge cost. | String | null |
!!!This is not the official MagicSpells wiki!!!
This wiki was cloned from the official one to document the changes to the plugin that were made specifically for Dwarves vs Zombies 2023 and Lords of Minecraft 2