Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicCrucible MythicCrucible
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 57
    • Issues 57
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicCrucibleMythicCrucible
  • Wiki
  • Dynamic Lore Generation

Dynamic Lore Generation · Changes

Page history
Update Dynamic Lore Generation authored Oct 27, 2024 by Lxlp's avatar Lxlp
Show whitespace changes
Inline Side-by-side
Showing with 35 additions and 3 deletions
+35 -3
  • Dynamic-Lore-Generation.md Dynamic-Lore-Generation.md +35 -3
  • No files found.
Dynamic-Lore-Generation.md
View page @ 04f6d448
......@@ -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.
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
BasicWeaponTest:
Lines:
- '<white><lore.stats>'
- ''
- '<placeholder.TestLine>'
- '<placeholder.TestLine>' # Custom placeholders found in placeholders.yml
- '<gold><placeholder.TestConditionalPlaceholder>'
- ''
- '<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:
```yml
......@@ -37,6 +61,15 @@ Note that `Description` is used as a placeholder in the `BasicWeaponTest`'s `<lo
## 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:
```yml
......@@ -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).
- More features for this are planned as well.
## Lore Attributes
......
Clone repository
Home
Changelogs
Commands / Permissions
API
FAQ / Common Issues
Guides
Usage
  • Installation
  • Item Options
  • Item Skills
  • Item Durability
  • Crafting Recipes
    • Workbenches
  • Item Updater
  • Ammo System / Guns
  • Dynamic Lore Generation
  • ResourcePack Generator
  • World Generation
  • Augments
Item Types
  • Blocks
  • Furniture
    • Paint Brush
  • Bags
  • Hats
Mechanics
  • Item Mechanics
  • Item Targeters
  • Item Triggers
  • Item Conditions
Placeholders
  • Placeholders