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 132
    • Issues 132
    • 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
  • Conditions

Last edited by Lxlp 5 days ago
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Conditions

Introduction

Conditions are used to determine whether or not an action may execute.

Conditions can be used in [1]:

  • Skill Mechanics
  • Drop Tables
  • Spawners
  • Random Spawners

When applying multiple conditions, all of them must be met in order for the skill to be executed. Some conditions allow arrays that can be split by commas. Such conditions only require one of the strings in the array to match.

To see how to use the premium only in-line conditions, click here!

Usage

Types

Conditions can be broken into three types:

  1. Entity Conditions: These check the conditions of an entity.
  2. Location Conditions: These check the conditions at a location. If a location condition is used while an entity is targeted, it will check the conditions at the entity's location.
  3. Compare conditions: These check for certain conditions between two different "things". For example, "Cuboid" will return true if a target is within a cube where the corners are two coordinates, while "StringEquals" will return true or false depending on whether two strings match.

Conditions can also be used in three different places within a meta skill:

  1. Conditions: Conditions in this section check the conditions of the caster or the caster's location.
  2. TargetConditions: Conditions in this section check the conditions of the target or target location inherited from the skill's targeter.
  3. TriggerConditions: Conditions in this section check the conditions of the entity that triggered the skill.

Examples

  Conditions:
  - globalscore{objective=Test;v=>10}

In the example above, the globalscore condition will check the caster's global score.

  TargetConditions:
  - globalscore{objective=Test;v=>10}

The example above uses the exact same condition, but here the globalscore condition will check the inherited target's global score. Since globalscore is an entity condition, it will only work if an entity is targeted.

Format:

SkillName:
  Conditions:
    - condition [variable]
  TargetConditions:
    - condition [variable] [action]
  TriggerConditions:
    - condition [variable] [action] [action_variable]
    - condition{variable1=value;variable2=value} [action] [action_variable]

These new "actions" control how the skill acts when a condition is met or not met. Here are some examples:

YourAwesomeSkill:
  Conditions:
    - day required
  TargetConditions:
    - stance defensive power 0.5
  TriggerConditions:
    - stance{stance=defensive} power 0.5
    - score{objective=test;value=>20} cancel
    - haspotioneffect{type=POISON;level=>0;duration=0to100} true

Ranged Values:
Ranged values use either the format #to# or #-#. You must use "to" instead of "-" if you want to use negative numbers in the range. For:

YourMagnificentSkill:
  Conditions:
    - altitude{a=1-5}
  TargetConditions:
    - distance{d=1to10} true
  TriggerConditions:
    - distance{d=1to10} true

Condition Actions

Condition Actions allow you to do additional things based off of conditions. The default condition action is true

Action Description
required (or true) The condition is required for the skill to run.
cancel (or false) The skill will not run if this condition is met.
power [multiplier] Modifies the skill's power (e.i. power 2.0 would double the skill's power)
cast [skill] Casts an additional skill if the condition is met.
castinstead [skill] Casts a different skill instead if the condition is met.
orElseCast [skill] Casts a different skill instead if the condition is not met. (4.12 MM)

Composite Conditions

Conditions can also be grouped by parenthesis and evaluated via the AND (&&) and OR (||) boolean operators. Conditions used this way can still have a condition action.

  Conditions:
  - ((day false || raining true) && onBlock{material=LIME_CONCRETE}) true

The condition is met when it's either raining or not daytime, and, in addition to that, only when the caster is on a LIME_CONCRETE block

The day and raining have their condition action declared, while onBlock uses the default one, true

Additional Conditions

Links to conditions added by addon plugins. Any conditions from these links will not work without that plugin installed.

  • ModelEngine 4
  • ModelEngine Legacy
  • Mythic Crucible
  • Mythic Enchantments
  • MCPets

Conditions

Condition Type Description
Altitude Entity Tests how far above the ground the target entity is
Biome Location Tests if the target is within the given list of biomes
BiomeType Location Tests for the biome category at a location.
BlockType Location Tests the material type present at the target location
BlockTypeInRadius Location Checks against the amount of specified blocks in a radius around the target location
Blocking Entity Tests if the targeted player is blocking with a shield
BowTension Meta Checks the bow tension of when an entity shoots from a bow
Burning Entity Whether or not the target entity is on fire
Chance Meta The chance that the metaskill has to be executed
Charged Entity Checks if the target creeper is charged
Children Entity Tests how many children the caster has
Color Entity Tests the entity's colors
Crouching Entity Whether or not the target entity is crouching
Cuboid Compare Whether the target is within the given cuboid between location1 x location2
DamageAmount Meta Checks for a range of damage taken
DamageCause Meta Checks the type of the damage cause
DamageTag Meta Checks the tags of the damage cause
Dawn Location If the time is dawn, from 22000 to 2000 in-game time
Day Location If the time is day, from 2000 to 10000 in-game time
Dimension Location If the target location is within a certain dimension
DirectionVelocity Entity If the target has a velocity matching the given parameters
Distance Compare Whether the distance between the caster and target is within the given range
DistanceFromSpawn Location Whether the distance from the world's spawn point to the target is within the given range
DistanceFromTrackedLocation Location Whether the distance from the tracked location to the target is within the given range
Dusk Location If the time is dusk, from 14000 to 18000 in-game time.
EnchantingExperience Entity Checks the target player's experience points
EnchantingLevel Entity Checks the target player's experience level
EnderDragonAlive Location Checks if there is at least one EnderDragon alive in the world of the targeted location
EnderDragonPhase Entity Checks if the ender dragon is in a phase or phases
EntityItemIsSimilar Entity Tests if the target item entity is similar to another item
EntityItemType Entity Tests the type of the target item entity
EntityMaterialType Entity Tests the material of the target item entity
EntityType Entity Tests the entity type of the target
Faction Entity Tests for the targets faction
FallSpeed Entity If the fall speed of the target is within the given range
FieldOfView Compare Tests if the target is within the given angle from where the caster is looking
FoodLevel Entity Checks if the target has food within the range
FoodSaturation Entity Checks if the target has food within the range
Gliding Entity If the target is gliding
GlobalScore Entity Checks a global scoreboard value
HasAI Entity Checks if the target entity has its AI enabled
HasAura Entity Checks if the target entity has the given aura
HasAuraStacks Entity Tests if the target has the given range of stacks from an aura
HasAuraType Entity Checks if the target entity has the given aura type
HasCurrency Entity If the target has the given amount of vault currency
HasEnchantment Entity Checks if the target entity's equipped item has an enchantment
HasGravity Entity Tests if the target mob has gravity
HasInventorySpace Entity If the target has the given amount of empty inventory space
HasItem Entity Tests if the target player has the given number of given material
HasOffhand Entity Checks if the target entity has something in the offhand
HasOwner Entity Tests if the target mob has an owner
HasParent Entity Tests if the target mob has a parent
HasPassenger Entity Checks if the target entity has a passenger
HasPermission Entity Tests if the target player has a permission
HasPotionEffect Entity Tests if the target entity has a potion effect
HasTag Entity Tests if the target has a scoreboard tag
Health Entity Matches the target's health
Height Location Checks if the target's Y location is within a range
HeightAbove Location Checks if the target's Y location is above a value
HeightBelow Location Checks if the target's Y location is below a given value
Holding Entity Checks if the target is holding a given material(support MythicMobs and MMOItems)
InBlock Location Checks the material at the target location
inClaim Location Checks if the target location is inside a claim
InCombat Entity Checks if the target mob is considered in combat
InPinRegion Location Checks if the target location is within a region delimited by two pins
IsInSurvivalMode Entity Checks if the target player is in survival mode
Inside Location Checks if the target has a block over their head
isBaby Entity Checks if the target entity is a baby
isCaster Entity Checks if the target is the caster
isChild Entity Checks if the target is a child of the caster
isClimbing Entity Checks if the target entity is climbing
IsCreeperPrimed Entity Checks if the target creeper is primed to explode
isFlying Entity Checks if the target player is flying
isFrozen Entity Checks if the target entity is frozen
isLeashed Entity Checks if the target has been leashed
isLiving Entity Checks if the target is a living entity
isMonster Entity Checks if the target is a monster
isMythicMob Entity Checks if the target is a MythicMob
IsParentAlive Entity Checks if the parent of the target entity is still alive
IsParent Compare Checks if the target entity is the parent of the caster
isPlayer Entity Checks if the target is a player
isRaiderPatrolLeader Entity Checks if the target entity is the captain of a pillager group
isSaddled Entity Checks if the target entity is saddled
isTamed Entity Checks if the target entity is tamed
IsUsingSpyglass Entity Checks if the target player is using a spyglass
ItemIsSimilar Entity Checks that targeted player's inventory slot if it's similar to an item
ItemRecharging Entity Checks if the target's weapon is recharging
ItemType Meta Checks against the material of the item that triggered the skill
LastDamageCause Entity Checks the target's last damage cause
LastSignal Entity Matches the last signal received by the target mob
Level Entity Checks the target MythicMob's level
LightLevel Location Tests the light level at the target location
LightLevelFromBlocks Location Tests the light level originating from light-emitting blocks at the target location
LineOfSight Compare Tests if the target is within line of sight of the caster
LineOfSightFromOrigin Compare Tests if the target is within line of sight of the caster
LivingInRadius Location Matches a range to how many living entities are in the given radius
LocalDifficulty Location Tests the difficulty scale at the target location
LunarPhase Location Checks the target world's lunar phase
MaterialIsOnCooldown Entity Checks if the target player's specified material is on cooldown
MobsInChunk Location Matches a range to how many mobs are in the target location's chunk
MobsInRadius Location Checks how many mobs are in a given radius
MobsInWorld Location Matches a range to how many mobs are in the target world
Moist Location Checks if the target block of farmland is hydrated
MoistureLevel Location Checks if the target block of farmland has the specified level of hydratation
MotionX Entity Checks the X motion of the target entity against a range.
MotionY Entity Checks the Y motion of the target entity against a range.
MotionZ Entity Checks the Z motion of the target entity against a range.
Mounted Entity If the target entity is riding a mount/vehicle
Moving Entity If the target has a velocity greater than zero
MythicMobType Entity Checks the MythicMob type of the target mob
MythicPack Meta Checks for the presence of Pack
MythicPackVersion Meta Checks if a pack has a specified version
MythicPackVersionGreater Meta Checks if a pack has a version greater or equal the specified one
Name Entity Checks against the entity's name
NearClaim Location If the target location is near any GriefPrevention claims
Night Location If the time is night, from 14000 to 22000 in-game time
NotInRegion Location If the target location is not within the given WorldGuard region
OffGCD Entity Checks if the target mob has an active Global Cooldown
OnBlock Location Matches the block the target entity is standing on
OnGround Entity If the target entity is standing on solid ground
Outside Location If the target has open sky above them
Owner Compare Checks if the target entity is the owner of the caster
OwnerIsOnline Entity Checks if the owner of the target mob is online, if the owner is a player
Pitch Entity Checks if the pitch of the target entity is within a range
PlayerKills Entity Matches how many players the target mob has killed
PlayerNotWithin Location Checks if any players are within a radius of the target
PlayerWithin Location Checks if any players are within a radius of the target
PlayersInRadius Entity Checks how many players are in a radius
PlayersInWorld Meta Matches the number of players in the caster's world
PlayersOnline Meta Matches the number of players online
Plugin Meta Checks if the specified plugin is running on the server
Premium Meta Checks if MythicMobs Premium is running on the server
Raining Location If it's raining in the target world
Region Location If the target is within the given WorldGuard region
SameFaction Entity Tests if the caster and target are in the same faction
Score Entity Checks a scoreboard value of the target entity
ServerNmsVersion Meta Checks if the server is running the specified minecraft NMS version.
ServerVersion Meta Checks if the server is running the specified minecraft version.
Size Entity Checks the size of the target entity
SkillOnCooldown Entity Checks if the given skill is in cooldown for the target
SpawnReason Entity Checks against the spawn reason of the target
Sprinting Entity Checks if the target Player is sprinting
Stance Entity Checks the stance of the target mob
StringEquals Meta Checks if value1 equals value2. Both values can use variables and placeholders.
Structure Location Matches if the target location is inside of a structure
Sunny Location If the weather is sunny in the target world.
TargetInLineOfSight Entity Tests if the target has line of sight to their target
TargetNotInLineOfSight Entity Tests if the target doesn't have line of sight to their target
TargetWithin Entity Tests if the target's target is within a certain distance
TargetNotWithin Entity Tests if the target's target is not within a certain distance
Targets Meta Tests if the number of inherited targets from the parent skilltree matches the given range.
Thundering Location If it's thundering in the target world
TriggerBlockType Meta Checks against the material type that triggered the skill
TriggerItemType Meta Checks against the item material type that triggered the skill
VariableEquals Meta Checks if the given variable has a particular value.
VariableInRange Meta Checks if the given numeric variable is within a certain range.
VariableIsSet Meta Checks if the given variable is set.
VehicleIsDead Entity Checks if the casters mounted vehicle is dead.
Velocity Entity Checks the velocity of the target entity against a range.
Wearing Entity Tests what the target entity has equipped.
World Location Checks the name of the target world.
WorldTime Location Matches a range against the target location's world's time.
Yaw Entity Checks the yaw of the target entity against a range.
yDiff Entity Checks the difference in Y between the targeted entity and the caster.

More Examples

FlameShock:
  Cooldown: 1
  Conditions:
  - targetwithin 15
  - targetinlineofsight true
  - incombat
  - stance aggressive
  - onblock GRASS
  - offgcd
  Skills:
  - gcd{t=60}
  - message{m="<mob.name> begins casting a spell"}
  - potion{t=SLOW;d=60;l=7}
  - delay 60
  - message{m="<target.name> &ecombusts"}
  - effect:particles{p=flame;a=20;hS=3;vS=1;s=0;y=2}
  - potion{t=HARM;d=1;l=1}

[1] Not all conditions may be applicable everywhere.

Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Mythic Add-ons
Compatible Plugins
API Information
Packs
  • Pins
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
  • Effects
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
  • Math
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Examples
Useful Tips