|
Spell Reagents are resources you use to cast a spell - the most standard being something like "mana". MythicRPG comes with a couple hardcoded reagents, but also allows you to create custom reagents that you can manipulate however you want, including by scaling using the stat system.
|
|
Spell Reagents are resources you use to cast a spell - the most standard being something like "mana". MythicRPG comes with a couple hardcoded reagents, but also allows you to create custom reagents that you can manipulate however you want, including by scaling using the stat system.
|
|
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
## Hardcoded Reagents
|
|
## Hardcoded Reagents
|
|
| Hardcoded Reagents | Description |
|
|
| Hardcoded Reagents | Description |
|
|
|--------------------------|---------------------------------------------------------------------|
|
|
|--------------------------|---------------------------------------------------------------------|
|
... | @@ -7,7 +9,7 @@ Spell Reagents are resources you use to cast a spell - the most standard being s |
... | @@ -7,7 +9,7 @@ Spell Reagents are resources you use to cast a spell - the most standard being s |
|
| food | Requires food to cast. Consumes food when the spell is used. |
|
|
| food | Requires food to cast. Consumes food when the spell is used. |
|
|
|
|
|
|
## Custom Reagents
|
|
## Custom Reagents
|
|
Custom Reagents are defined in a `reagents.yml` in any pack folder.
|
|
Custom Reagents are defined in a `reagents.yml` in any [pack] folder.
|
|
|
|
|
|
Each reagent file can have as many reagents in it as you'd like, but they must all have unique names.
|
|
Each reagent file can have as many reagents in it as you'd like, but they must all have unique names.
|
|
|
|
|
... | @@ -19,17 +21,49 @@ Each reagent file can have as many reagents in it as you'd like, but they must a |
... | @@ -19,17 +21,49 @@ Each reagent file can have as many reagents in it as you'd like, but they must a |
|
| MaxValue | The max value of the reagent. Can be a stat using `stat.[stat_name]` |
|
|
| MaxValue | The max value of the reagent. Can be a stat using `stat.[stat_name]` |
|
|
| Global: true | If true, players always have this reagent. |
|
|
| Global: true | If true, players always have this reagent. |
|
|
|
|
|
|
### Custom Reagent Placeholders
|
|
```yaml
|
|
Custom Reagent values can be displayed using PlaceholderAPI placeholders - we recommend using our HappyHUD plugin for this to create nice-looking reagent bars.
|
|
|
|
|
|
|
|
- `%mythic_reagent_[name]%` - The reagent's current value
|
|
|
|
- `%mythic_reagent_max_[name]%` - The reagent's maximum value
|
|
|
|
|
|
|
|
### Example `reagents.yml` file
|
|
|
|
```
|
|
|
|
Mana:
|
|
Mana:
|
|
Display: 'Mana'
|
|
Display: 'Mana'
|
|
MinValue: 0
|
|
MinValue: 0
|
|
MaxValue: stat.MAX_MANA
|
|
MaxValue: stat.MAX_MANA
|
|
Global: true
|
|
Global: true
|
|
```
|
|
```
|
|
|
|
|
|
|
|
#### Optional Supporting Stat
|
|
|
|
As you see above in the `MaxValue` option, instead of setting a static value it's possible to use a [stat] as the `MaxValue`, making it dynamically change depending on the player's stats.
|
|
|
|
|
|
|
|
To implement one such [stat], you can write something like the following in the `stats.yml` file in any [pack] folder
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
MAX_MANA:
|
|
|
|
Enabled: true
|
|
|
|
Display: 'Max Mana'
|
|
|
|
BaseValue: 1000
|
|
|
|
Formatting:
|
|
|
|
Additive: '+<value> Max Mana'
|
|
|
|
Multiply: '+<value> Max Mana'
|
|
|
|
Compound: 'x<value> Max Mana'
|
|
|
|
```
|
|
|
|
|
|
|
|
## Consuming Reagents
|
|
|
|
Reagents can be consumed when performing certain actions. You can consume them by:
|
|
|
|
- Using the [modifyresource](/Skills/Mechanics/ModifyResource) mechanic
|
|
|
|
```yaml
|
|
|
|
- modifyReagent{reagent=mana;amount=10} @self
|
|
|
|
```
|
|
|
|
- Selecting them as a Cost when casting a [Spell](/Spells)
|
|
|
|
```yaml
|
|
|
|
Cost:
|
|
|
|
- mana 50
|
|
|
|
```
|
|
|
|
|
|
|
|
## Custom Reagents Placeholders
|
|
|
|
Custom Reagent values can be displayed using PlaceholderAPI placeholders - we recommend using our HappyHUD plugin for this to create nice-looking reagent bars.
|
|
|
|
|
|
|
|
- `%mythic_reagent_[name]%` - The reagent's current value
|
|
|
|
- `%mythic_reagent_max_[name]%` - The reagent's maximum value
|
|
|
|
|
|
|
|
|
|
|
|
<!-- LINKS -->
|
|
|
|
[pack]: /../../../mythicmobs/-/wikis/Packs
|
|
|
|
[stat]: /../../../mythicmobs/-/wikis/Stats |
|
|
|
\ No newline at end of file |