Update Archetypes authored by Taiyou06's avatar Taiyou06
# What is an Archetype?
Archetypes in Mythic represent the idea of things like "classes", "professions", "jobs", etc. Rather then having separate generic systems for each, in Mythic you get the full set of tools to create these things however you want.
When creating Archetypes, they can be divided into groups. The most common group would probably be `CLASS`, and this is the default group when making an archetype.
Archetypes are the building block MythicRPG uses for things like **classes**, **professions**, **races**, and **specializations**. Rather than shipping a separate system for each, MythicRPG gives you the full archetype toolkit and lets you express any of those concepts with the same configuration.
# Configuring Archetypes
Archetypes are configured in the `Archetypes` folder inside any Mythic pack. Just create a `.yml` file inside the Archetypes folder, and you can put as many archetypes inside this file as you'd like - organize it however makes sense to you!
[[_TOC_]]
The example pack generates a `classes.yml` file which contains several simple example classes.
## Archetype Groups
### Configuration
Every archetype belongs to a **group** declared via its `Group:` field. Groups are how MythicRPG decides what a player can hold at once: a player has at most **one active archetype per group**, and as many active archetypes as there are groups.
The example pack ships with two groups — `CLASS` and `PROFESSION` — but the names are arbitrary. Any string you put in `Group:` registers a new group the first time it's used. Common patterns:
- `CLASS` for combat / role identity (Wizard, Warrior, Cleric, …)
- `PROFESSION` for trade-style activities (Miner, Fisher, Smith, …) — see [Professions](/Archetypes/Professions)
- `RACE` for permanent character traits (Human, Elf, Dwarf, …)
- `SUBCLASS` for nested specializations
Two archetypes in the same group are mutually exclusive. Two archetypes in different groups stack — their stat modifiers, spells, talents, and skills all apply simultaneously.
## Configuring Archetypes
Archetypes are configured in the `Archetypes` folder inside any [Mythic pack](/../../../MythicMobs/-/wikis/Mob-Packs). Create any `.yml` file inside that folder and put as many archetypes inside as you'd like.
The example pack generates a `classes.yml` with simple starters.
### Configuration Options
| Option | Description |
|-----------------|--------------------------------------------------------------------------------------|
| Group | The type of archetype this falls under, such as 'CLASS' |
| Display | The proper display name of this archetype, such as 'Wizard' |
| Description | The description of the archetype |
| BaseStats | A list of base stats for this archetype |
| StatModifiers | Unlike base stats, these will apply on top of a player's stats and can stack with other archetypes |
| [SpellUnlocks] | A list of spells unlocked by this archetype |
| InitSkills | A list of skills called when a player gains this class |
| QuitSkills | A list of skills called when a player loses this class |
| LevelSkills | A list of skills called when a player levels up this class |
| Skills | A list of mechanics applied to anyone with this archetype. Functions the same as how Mythic Mobs are configured |
| [Leveling] | A list of options regarding how the class levels up |
| Bindings | Force a player's bindings as they level up |
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Group` | The group this archetype belongs to. Determines what the player can hold simultaneously. Defaults to the archetype's id. |
| `Category` | Free-form category tag, used by the [`hasArchetypesInCategory`](/Skills/Conditions/HasArchetypesInCategory) condition for grouping in skill logic. |
| `Display` | The proper display name (e.g. `'&aWizard'`). Defaults to the archetype's id. |
| `DisplayOrder` | Sort order in menus and lists. Lower values appear first. Defaults to `0`. |
| `Description` | A multi-line description used in menus and command output. |
| `Icon` | Standard [Mythic icon options](/../../../MythicMobs/-/wikis/Custom-Items) — material, model, lore, etc. |
| `Permission` | Optional permission node players must have to be assigned this archetype. |
| `Leveling` | Leveling configuration block: `MinLevel`, `MaxLevel`, `ExperienceCurve`, `ExperienceSource`. See [Leveling](/Archetypes/Leveling). |
| `PointRewards` | List of [point](/Points) grants per level (`PerLevel:` and `SpecificLevel:`). |
| `TalentTree` | Inline talent tree for this archetype. See [Talents](/Archetypes/Talents). |
| `SpellUnlocks` | Spells the player learns at given archetype levels. Format: `<spell>[:<spellLevel>] [<archetypeLevel>]`. See [Learning](/Spells/Learning#leveling). |
| `BaseStats` | List of `<STAT> <value>` lines. **Replaces** the player's base stat (last archetype to set wins; loss reverts to the global default). |
| `StatModifiers` | List of `<STAT> <value> [Operation]` lines. **Stacks** with other archetypes' modifiers. Operation is `Additive` (default), `Multiply`, `Compound`, `Set`. |
| `Bindings` | Force a learned spell into a hotbar slot. Format: `<slot> <spell>`. |
| `ClickCombos` | Per-archetype overrides of [click-combo slots](/Spells/Casting#click_combo--click--dance-combos). Format: `<slot> <combo>`. |
| `Skills` | A list of mob-style skill lines with triggers — applied passively to anyone holding this archetype. Same syntax as Mythic mob skills. |
| `InitSkills` | Skills run when a player gains this archetype. |
| `QuitSkills` | Skills run when a player loses this archetype. |
| `LevelSkills` | Skills run when a player levels up this archetype. |
### `BaseStats` vs `StatModifiers`
These two are easy to confuse:
- **`BaseStats`** sets the player's base value for a stat for as long as they hold the archetype. Useful for "this class has 30 max health by default."
- **`StatModifiers`** layers a modifier on top of whatever the base value is. Multiple archetypes' modifiers stack, so this is what you want for "+5% damage" or "+10 mana" bonuses.
Both accept Mythic placeholders, including `<L>` for the player's archetype level:
```yaml
BaseStats:
- HEALTH '20 + 5*<L>'
StatModifiers:
- DAMAGE 0.05 ADDITIVE_MULTIPLIER
- MAX_MANA 10
```
### Default Archetypes
You can configure a 'default' archetype that new players will start as in the `config-archetypes.yml` file inside the `MythicMobs` plugin directory.
With the example files, by default, RPG comes with 2 archetype groups - `class` and `profession` - which can be changed or removed if you'd like. The example files also come with a default class - `Adventurer`. This class doesn't do anything by default but serves as a basic starting point for the examples.
You can configure default archetypes that new players are auto-assigned. Set `DefaultArchetypes:` in `config-archetypes.yml` (in the `MythicMobs` plugin folder). Each entry is a single line in the format `<Group> <ArchetypeId>`:
```yaml
ADVENTURER:
Display: 'Adventurer'
MaxLevel: 1
Configuration:
CommandFeedback: true
DefaultArchetypes:
- CLASS Adventurer
- PROFESSION Drifter
```
Set `RequireUnlocking: true` in the same config to gate archetypes behind the `unlock` system (players must explicitly unlock an archetype before they can pick it).
## Examples
### A simple class
```yaml
TestArchetype:
Wizard:
Group: CLASS
Display: 'an archetype'
Display: '&5Wizard'
Description:
- 'A scholar of the arcane.'
Icon:
Material: ENCHANTED_BOOK
Leveling:
MinLevel: 1
MaxLevel: 50
ExperienceCurve: TEST_STATIC
ExperienceSource: MOBS
ExperienceCurve: STANDARD
ExperienceSource: SPELLCASTING
BaseStats:
- HEALTH '20 + 5L'
- MAX_HEALTH 18
- MAX_MANA '50 + 5*<L>'
StatModifiers:
- HEALTH 2 ADDITIVE_MULTIPLIER
InitSkills: []
QuitSkills: []
- SPELL_DAMAGE 0.10 ADDITIVE_MULTIPLIER
PointRewards:
- Type: TALENT_POINTS
PerLevel: 1
SpellUnlocks:
- MagicMissile
- Fireball 5
- Polymorph 20
Bindings:
- 1 Fireball
- 2 IceBall
- 3 PoisonBall
- 1 MagicMissile
TalentTree:
PointType: TALENT_POINTS
Menu: wizard_talents
Talents:
ArcaneIntellect:
MaxPoints: 5
Components:
- Type: STATS
Stats:
- SPELL_DAMAGE 0.02 ADDITIVE_MULTIPLIER
InitSkills:
- sound{s=block.enchantment_table.use} @self
- message{m="<gold>You have become a Wizard!"} @self
LevelSkills:
- sound{s=ui.toast.challenge_complete} @self
```
### Passive on-event hooks via `Skills:`
The `Skills:` block runs Mythic skills with triggers for as long as the player holds the archetype. Useful for passives that don't need to be a learnable spell:
```yaml
Berserker:
Group: CLASS
Display: '&cBerserker'
Skills:
- message{m="item"} ~onPickupItem ?triggeringItemType{type=TestFireWand}
- sound{s=entity.wither.spawn;v=0.4} @self ~onDamaged
- effect:particles{p=crit;amount=10} @self ~onAttack
- message{m="&c+5% damage!"} @self ~onTimer:200 ?inCombat
```
### Click-combo overrides per archetype
You can override which slot a click combo maps to on a per-archetype basis. This is useful when different classes should have different "default" combo layouts:
```yaml
TestMiner:
Group: PROFESSION
Display: 'Miner'
Leveling:
MinLevel: 1
MaxLevel: 50
ExperienceCurve: TEST_FORMULA
ExperienceSource: MINING
Rogue:
Group: CLASS
ClickCombos:
- 1 LL
- 2 LR
- 3 RL
- 4 RR
```
See [Casting](/Spells/Casting#click_combo--click--dance-combos) for how slot-mode click combos work.
<!-- LINKS -->
[Leveling]: /Archetypes/Leveling
......
......