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 137
    • Issues 137
    • 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
    • Mechanics
  • variablemath

variablemath · Changes

Page history
Update variablemath authored Oct 11, 2024 by Lxlp's avatar Lxlp
Show whitespace changes
Inline Side-by-side
Showing with 19 additions and 16 deletions
+19 -16
  • skills/mechanics/variablemath.md skills/mechanics/variablemath.md +19 -16
  • No files found.
skills/mechanics/variablemath.md
View page @ 2c971ed9
Mechanic: VariableMath ## Description
======================
Sets a variable to the result of a math equation, where 'x' is the Sets a variable to the result of a math equation, where 'x' is the
[variable](/skills/variables)'s current value. [variable](/skills/variables)'s current value.
Attributes Basically a setvariable mechanic with some extra spices
----------
| Attribute | Aliases | Description | Default Value |
|-----------|---------|-------------------------------------------------|---------------|
| var | | The name and scope of the variable | |
| equation | eq, e | The operation to be done, must be inside quotes | |
## Attributes
| Attribute | Aliases | Description | Default |
|-----------|-----------|----------------------------------------------------------------------|---------|
| equation | eq, e | The operation to be done, must be inside quotes | x |
> This mechanic inherits every *inheritable* attribute of the [SetVariable](skills/mechanics/setvariable) mechanic
Examples
----
## Examples
Storing a placeholder in a variable Storing a placeholder in a variable
```yaml
MMOVar: MMOVar:
Skills: Skills:
- variableMath{var=target.exp;equation="%mmocore_level%"} - variableMath{var=target.exp;equation="%mmocore_level%"}
```
Doing math Doing math
```yaml
Math1: Math1:
Skills: Skills:
- variableMath{var=caster.damage;equation="<caster.hp>*5"} - variableMath{var=caster.damage;equation="<caster.hp>*5"}
Math2: Math2:
Skills: Skills:
- variableMath{var=caster.speed;equation="(<caster.var.age>/5)+1"} - variableMath{var=caster.speed;equation="(<caster.var.age>/5)+1"}
```
## Aliases
- [x] mathvariable
- [x] varmath
- [x] mathvar
\ 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
Other
  • Particles Types
  • Audience
  • Equipment Slots
  • Pins
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • SkillTree
  • Intratick Scheduling
  • Dynamic Metaskills