Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 152
    • Issues 152
    • 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
  • MythicMobsMythicMobs
  • Wiki
    • Skills
  • Dynamic Metaskills

Dynamic Metaskills · Changes

Page history
Update Dynamic Metaskills authored Aug 23, 2024 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 9 additions and 7 deletions
+9 -7
  • Skills/Dynamic-Metaskills.md Skills/Dynamic-Metaskills.md +9 -7
  • No files found.
Skills/Dynamic-Metaskills.md
View page @ 4e035ffc
......@@ -16,8 +16,8 @@ Since this is pretty much uncharted territory, if you have any information usefu
## How does this works?
Basically, it all boils down to two things:
- The usage of the [variableskill mechanic](/skills/mechanics/variableskill)
- The existence of [inline metaskills]: /Skills/Metaskills#inline-metaskills
- The usage of the [variableskill mechanic]
- The existence of [inline metaskills]
By combining those two things, it is now possible to do something like this
```yaml
......@@ -37,7 +37,7 @@ Testmob:
- vskill{s=<skill.var.testskill>}
- vskill{s=
[
- e:p{p=<skill.var.temp>} @selflocation{y=2}
- particle{p=<skill.var.temp>} @selflocation{y=2}
]} @self
]} @self ~onInteract
```
......@@ -65,17 +65,18 @@ Testmob:
- vskill{s=<skill.var.testskill2>}
- vskill{s=
[
- e:p{p=<skill.var.temp>} @selflocation{y=2}
- particle{p=<skill.var.temp>} @selflocation{y=2}
]} @self
]} @self ~onInteract
```
# Bypassing Placeholder Support Limits
Not every attribute of every mechanic, condition or targeter has support for placeholders. This is often a limiting factor for a lot of advanced projects. But not anymore!
Let's look at the examples above: at the time of writing the particle mechanic does not have placeholder support for its particle attribute, and yet that works when used with the methods described here. How come?
By using the setvariable mechanic to write the particle mechanic one can delegate the job of parsing the value of the attribute to the setvariable mechanic, which *has* placeholder support for the value attribute. The resulting string can then be executed via the variableskill mechanic.
That is because the vskill mechanic itself is parsing the value of that placeholder *before* anything else is executed, and when the particle mechanic is called everything has already been parsed for it
One must then note that this operation is not exclusive to mechanic's attribute: you can literally use placeholders for *every single character* of the string that is being built, and as long as the result after parsing can then be considered a proper inline metaskill it will work!
One must then note that this operation is not exclusive to mechanic's attribute: you can literally use placeholders for *every single character* of the string that is being built, and, as long as the result after parsing can then be considered a proper inline metaskill, it will work!
# Storing Dynamic Metaskills
......@@ -83,4 +84,5 @@ As you already saw, the newly made metaskill is being stored inside a variable.
<!-- LINKS -->
[variableskill mechanic]: /skills/mechanics/variableskill
[variableskill]: /skills/mechanics/variableskill
\ No newline at end of file
[variableskill]: /skills/mechanics/variableskill
[inline metaskills]: /Skills/Metaskills#inline-metaskills
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
  • Equipment Slots
  • Intratick Scheduling
  • Dynamic Metaskills
Other
  • Pins