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 162
    • Issues 162
    • 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
  • Variables

Variables · Changes

Page history
added Set, List and Map variable types authored Jul 21, 2025 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 58 additions and 3 deletions
+58 -3
  • Skills/Variables.md Skills/Variables.md +58 -3
  • No files found.
Skills/Variables.md
View page @ ef4ee175
......@@ -13,6 +13,10 @@ an error if you try to use a variable type for something that makes no sense.
| FLOAT | A number with decimal places. |
| DOUBLE | A number with decimal places. Can represent much larger numbers than a FLOAT |
| STRING | A word or sentence. |
| SET | A set of unordered and unique values |
| LIST | An ordered list of entries |
| MAP | A list of key-value pairs |
| LOCATION | A location in the server. Can only be set via special mechanics |
# Variable Scopes
......@@ -34,6 +38,57 @@ All variable mechanics and conditions accept `var=` and `scope=` attributes to d
- setvariable{var=somevariable;scope=target; ...}
```
## Special Variable Types
### Set
```yaml
# Create a set
- setvariable{var=skill.example;type=SET;val=1,2,hello}
# Add a value to a set
- variableadd{var=skill.example;amount=world}
- variableadd{var=skill.example;amount=1} # If you add a value that is already present, the set will not change
# Remove a value from a set
- variablesubtract{var=skill.example;amount=hello}
# Print a set
- message{m=<skill.ver.example>} # 1,2,world
```
### List
```yaml
# Create a list
- setvariable{var=skill.example;type=LIST;val=1,2,hello}
# Add a value to a list
- variableadd{var=skill.example;amount=world}
# Remove a value from a list (using its index)
- variablesubtract{var=skill.example;amount=0}
# Print a list
- message{m=<skill.ver.example>} # 2,hello,world
- message{m=<skill.ver.example.0>} # 2
```
### Map
```yaml
# Create a map
- setvariable{var=skill.example;type=LIST;val="hello=world;mamma=mia"}
# Add a value to a map
- variableadd{var=skill.example;amount="pizza=pasta;please=help"}
# Remove a value from a map(using its key)
- variablesubtract{var=skill.example;amount=hello}
# Print a map
- message{m=<skill.ver.example>} # mamma=mia;pizza=pasta;please=help
- message{m=<skill.ver.example.please>} # help
```
## Variable Mechanics
Variable mechanics are special mechanics that utilize variables. They can target entities, locations, or nothing, but the target can affect the outcome depending on what scope you're using. For example, trying to get a target-scope'd variable will obviously fail if you're not targeting an entity.
......@@ -41,9 +96,9 @@ Variable mechanics are special mechanics that utilize variables. They can target
|--------------------------------------------------------|--------------------------------------------------|
| [SetVariable](/skills/mechanics/setvariable) | Initializes and sets a variable. |
| [SetVariableLocation](/skills/mechanics/setvariablelocation) | Sets a variable, whose value depends on the target location. |
| [VariableUnset](/skills/mechanics/variableunset) | Unsets the variable. |
| [VariableAdd](/skills/mechanics/variableadd) | Adds to a numeric variable. |
| [VariableSubtract](/skills/mechanics/variablesubtract) | Subtracts from a numeric variable. |
| [VariableUnset](/skills/mechanics/variableunset) | Unsets the variable. |
| [VariableAdd](/skills/mechanics/variableadd) | Adds to a variable. |
| [VariableSubtract](/skills/mechanics/variablesubtract) | Subtracts from a variable. |
| [VariableMath](/skills/mechanics/variablemath) | Lets you do calculations with numeric variables. |
......
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Config Files

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

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
    • Mechanics by Tag
  • 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

Other
  • Math
  • Pins

Enums
  • Particles Types
  • Audience
  • Equipment Slots
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Shape
Technical
  • Item Matcher
  • SkillTree
  • Advanced User Guides and Techniques