... | @@ -8,17 +8,41 @@ Here is an example item using these features. The details to make something like |
... | @@ -8,17 +8,41 @@ Here is an example item using these features. The details to make something like |
|
|
|
|
|
The base Mythic folder or individual pack folder can contain a `lore-templates.yml` file where lore templates are defined.
|
|
The base Mythic folder or individual pack folder can contain a `lore-templates.yml` file where lore templates are defined.
|
|
|
|
|
|
Here is an example of a `lore-templates.yml` file.
|
|
Here are two examples of what a `lore-templates.yml` file may look like, each with one of the different valid syntaxes.
|
|
```yml
|
|
```yml
|
|
BasicWeaponTest:
|
|
BasicWeaponTest:
|
|
Lines:
|
|
Lines:
|
|
- '<white><lore.stats>'
|
|
- '<white><lore.stats>'
|
|
- ''
|
|
- ''
|
|
- '<placeholder.TestLine>'
|
|
- '<placeholder.TestLine>' # Custom placeholders found in placeholders.yml
|
|
- '<gold><placeholder.TestConditionalPlaceholder>'
|
|
- '<gold><placeholder.TestConditionalPlaceholder>'
|
|
- ''
|
|
- ''
|
|
- '<lore.Description{wrap=10}>'
|
|
- '<lore.Description{wrap=10}>'
|
|
```
|
|
```
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
LoreTemplateTest:
|
|
|
|
- Line: '<item.group>'
|
|
|
|
- Line:
|
|
|
|
- '{stats}'
|
|
|
|
- '{stats}<yellow>Stats:'
|
|
|
|
- '{stats-each}<white><stat.display>'
|
|
|
|
- Filler: '----'
|
|
|
|
- Line:
|
|
|
|
- '{augments:GEM}Gems:'
|
|
|
|
- '{augments-each:GEM}<augment.display>'
|
|
|
|
- Filler: '----'
|
|
|
|
- Conditions:
|
|
|
|
- notEmpty <item.lore.Description>
|
|
|
|
Line: '<item.lore.Description>'
|
|
|
|
- Filler: '----'
|
|
|
|
```
|
|
|
|
> If a line starts with {stats} or {augments} it will only render if stat/augment exist
|
|
|
|
|
|
|
|
> {stats-each} and {augments-each:TYPE} lines will repeat for every stat/augment
|
|
|
|
|
|
|
|
##
|
|
|
|
|
|
An item could utilize this template by using `Lore.Template: BasicWeaponTest ` instead of providing a list of lore:
|
|
An item could utilize this template by using `Lore.Template: BasicWeaponTest ` instead of providing a list of lore:
|
|
|
|
|
|
```yml
|
|
```yml
|
... | @@ -37,6 +61,15 @@ Note that `Description` is used as a placeholder in the `BasicWeaponTest`'s `<lo |
... | @@ -37,6 +61,15 @@ Note that `Description` is used as a placeholder in the `BasicWeaponTest`'s `<lo |
|
|
|
|
|
## Lore Placeholders
|
|
## Lore Placeholders
|
|
|
|
|
|
|
|
| Placeholder | Description |
|
|
|
|
|--------------------|-----------------------------------------------------------------------------------|
|
|
|
|
| <lore.*> | Fetches the value from the * key under the item's Lore field [(see below)](#other-information-about-lore-templates) |
|
|
|
|
| {stats} | If a line starts with this, it will only render if the item has stats |
|
|
|
|
| {stats-each} | If a line starts with this, it will repeat for each stat the item has, and each line can fetch stats-specific values for each of those stats, like <stat.display> |
|
|
|
|
| {augments:GEM} | If a line starts with this, it will only render if the item has the augment of the specified type |
|
|
|
|
| {augments-each:GEM} | If a line starts with this, it will repeat for each augment of the specified type the item has, and each line can fetch augemnt-specific values for each of those augments, like <augment.display> |
|
|
|
|
|
|
|
|
### Custom Placeholders
|
|
The `<placeholder.*>` placeholders in the above example are referencing the examples provided from the new `placeholders.yml`, which can also be used:
|
|
The `<placeholder.*>` placeholders in the above example are referencing the examples provided from the new `placeholders.yml`, which can also be used:
|
|
|
|
|
|
```yml
|
|
```yml
|
... | @@ -73,7 +106,6 @@ TestRandomPlaceholder: |
... | @@ -73,7 +106,6 @@ TestRandomPlaceholder: |
|
|
|
|
|
- A line with `<lore.stats>` will be iterated and replicated for each stat using the tooltip formats configured in [`stats.yml`](/../../../MythicMobs/-/wikis/Stats).
|
|
- A line with `<lore.stats>` will be iterated and replicated for each stat using the tooltip formats configured in [`stats.yml`](/../../../MythicMobs/-/wikis/Stats).
|
|
|
|
|
|
- More features for this are planned as well.
|
|
|
|
|
|
|
|
## Lore Attributes
|
|
## Lore Attributes
|
|
|
|
|
... | | ... | |