| MinLevel | The level the player starts at with this archetype |
| MaxLevel | The maximum level of this archetype |
| ExperienceCurve | The experience curve this archetype uses |
| ExperienceSource | The experience source group this archetype can benefit from |
[[_TOC_]]
For example:
# Learnable Spells
## Admin Commands
The most obvious way to learn spells is by using admin commands.
The admin command to teach someone a spell is:
`/mythicrpg spells teach [name] [spell]`
You can also use the `unlearn` command to remove a spell from someone.
## Archetypes
### Leveling
Spells can be configured to automatically be given by an archetype upon reaching a certain level.
This is configured in an archetype's `SpellUnlocks` section.
```yaml
```yaml
Pyromancer:
TestArchetype:
Group:CLASS
Leveling:
Display:'Pyromancer'
MinLevel:1
SpellUnlocks:
MaxLevel:50
-Fireball
ExperienceCurve:TEST_STATIC
-RainOfFire 10
ExperienceSource:MOBS
```
```
In this example:
- A player would learn `Fireball` immediately upon gaining the Pyromancer archetype
- The player would then learn `RainOfFire` upon reaching level 10
If a player loses an archetype, all spells learned from it will be lost.
### Talent Trees
_coming soon_
## Experience Curves
Experience Curves determine how much experience is needed to reach each level, and are defined in `experience-curves.yml` inside any Mythic pack folder. Inside this file, you can define as many custom experience curves as you want.
## Mechanics
There are two types of curves, `FORMULA` and `STATIC`:
Players can be taught spells using the `teachSpell` mechanic (or have them removed via the `forgetspell` mechanic).
-`FORMULA` - Uses math to determine the experience needed to level, where `x` is the next level
-`STATIC` - You define the values for each level yourself
You can use this to create NPCs or [Custom Menus](/../../../MythicMobs/-/wikis/Custom-Menus) that teach spells, have a boss that teaches a spell upon being defeated, or to use with Crucible to create your own custom tome-type items.
An experience curve file might look like this:
```yaml
```yaml
Skills:
TEST_FORMULA:
-teachSpell{spell=DoubleJump} @trigger
Type:FORMULA
Formula:'x*100'
TEST_STATIC:
Type:STATIC
Levels:
1:100
2:200
3:500
```
```
## Signs
## Experience Sources
Spell Signs can be used to create signs that will teach spells when right-clicked.
Experience Sources are a group of different things that experience can be earned from. They are defined inside an `experience-sources.yml` file in any Mythic pack folder, and each file can contain any number of source groups.
To create one, you simply make a sign with the first line as `[Learn Spell]` and the 2nd line as the spell's ID.
Each experience source group can contain sections of one or more types of sources.
## Tomes
An experience source called `MOBS` might look like this:
Tomes are special items that can teach you a spell. These can be given to players directly or (more likely) put in loot chests, dropped by mobs, etc.
**You can obtain a tome using admin commands:**
`/mythicrpg spells tome get [spell]`
Mobs can also drop a tome using the custom `spelltome{spell=X}` drop type.
# Globally Available Spells
Global Spells and Global Mechanics are spells and mechanics you can have automatically apply to all players.
These included both active and passive spells, as well as special mechanics you can define to run on all players in the `config-spells.yml` config file.
## Global Spells
Global Spells are spells that are automatically given to everyone.
To make a spell global, you simply put `Global: true` in the mythic skill's configuration.
```yaml
```yaml
SomeGlobalSkill:
MOBS:
Spell:true
Sources:
Global:true
-Type:killEntity
...
Conditions:[]
TriggerConditions:[]
Values:
-ZOMBIE 1to2
-HUSK 1to2
-SKELETON 50
-Type:killmythic
Conditions:[]
TriggerConditions:[]
Values:
-TestingDummy2 100
```
```
This will cause the spell to be given to all players, and if it's a passive it will automatically trigger for all players.
## Global Mechanics
### Conditions and Trigger Conditions
Global Mechanics are defined in the`config-spells.yml` file, at the bottom under the `GlobalSkills` section. These are defined exactly like your typical mob skills, and will apply to all players.
Every source in a group can be filtered using`Conditions` and `TriggerConditions`. Both lists use the same condition syntax as Mythic [Skill Conditions](../Skills/Conditions.md), and if any condition fails the source grants no experience for that event.
The default config file comes with a single example that would be used to give people basic "mana regeneration":
-**Conditions** evaluate against the player as the caster (their world, location, level, permissions, held item, etc.)
```yaml
-**TriggerConditions** evaluate against the player as the trigger entity. Useful for the same kinds of self-checks; entity-target filtering (e.g. "only zombies") is not yet routed through these.
Configuration:
GlobalSkills:
For example, restricting mining XP to a designated mining world for players level 10 or higher:
#
```yaml
# Example of using this to implement global mana regeneration
However, you are able to use pretty much any mechanics or mythic triggers that apply to players here, and call any other mythic skills, allowing you to use the mythic skill system to trigger all sorts of other random things you may want.
> Per-source config options (such as `PlayerPlaced` on `BLOCK_BREAK`, `Multiplier` on `VANILLA`, `Amount` / `PerDamage` / `MinimumDamage` on `DAMAGING`, distance tuning on `MOVING`, etc.) are not yet documented here.