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 150
    • Issues 150
    • 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

Conditions · Changes

Page history
revamped condition explanations authored Oct 26, 2024 by Lxlp's avatar Lxlp
Show whitespace changes
Inline Side-by-side
Showing with 45 additions and 35 deletions
+45 -35
  • Skills/Conditions.md Skills/Conditions.md +45 -35
  • No files found.
Skills/Conditions.md
View page @ dd02376f
[[_TOC_]]
## Introduction ## Introduction
Conditions are used to determine whether or not an action may execute. Conditions are used to determine whether or not an action may execute.
...@@ -13,61 +15,57 @@ When applying multiple conditions, all of them must be met in order for the skil ...@@ -13,61 +15,57 @@ When applying multiple conditions, all of them must be met in order for the skil
To see how to use the premium only in-line conditions, [click here!](/skills/Inline-Conditions) To see how to use the premium only in-line conditions, [click here!](/skills/Inline-Conditions)
## Usage ## Types
### Types
Conditions can be broken into four types:
Conditions can be broken into three types:
1. Entity Conditions: These check the conditions of an entity. 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. 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. 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
4. Meta conditions: they will not necessarily check against any inherent property of either the caster or a target. For instance, "StringEquals" will return true or false depending on whether two strings match. Those strings *can* be placeholders that fetch the value from either the caster or a target, but that is just one possible application.
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. ## Usage
2. TargetConditions: Conditions in this section check the conditions of the target or target location inherited from the skill's targeter. Conditions can also be used in three different places within a metaskill:
3. TriggerConditions: Conditions in this section check the conditions of the entity that triggered the skill. #### Conditions
Conditions in this section check against the caster or its location.
```yaml
Conditions:
- health{h=>10}
```
> Checks if the caster has more than 10 health points
### Examples
```yaml ```yaml
Conditions: Conditions:
- globalscore{objective=Test;v=>10} - globalscore{objective=Test;v=>10}
``` ```
In the example above, the globalscore condition will check the caster's global score. > In the example above, the globalscore condition will check the caster's global score.
##
#### TargetConditions
Conditions in this section check against the [inherited target](/Skills/Metaskills#inheritance) of the metaskill
```yaml ```yaml
TargetConditions: TargetConditions:
- globalscore{objective=Test;v=>10} - health{h=>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. > Checks if the inherited targeted entities have more than 10 health points, and only those that do will be inherited as an inherited target by the metaskill. If none do then the metaskill, by default, will not execute.
**Format**:
```yaml ```yaml
SkillName:
Conditions:
- condition [variable]
TargetConditions: TargetConditions:
- condition [variable] [action] - globalscore{objective=Test;v=>10}
TriggerConditions:
- condition [variable] [action] [action_variable]
- condition{variable1=value;variable2=value} [action] [action_variable]
``` ```
> The example above 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.
These new "actions" control how the skill acts when a condition is met ##
or not met. Here are some examples: #### TriggerConditions
Conditions in this section check against the trigger of the metaskill
```yaml ```yaml
YourAwesomeSkill:
Conditions:
- day required
TargetConditions: TargetConditions:
- stance defensive power 0.5 - health{h=>10}
TriggerConditions:
- stance{stance=defensive} power 0.5
- score{objective=test;value=>20} cancel
- haspotioneffect{type=POISON;level=>0;duration=0to100} true
``` ```
**Ranged Values:** > Checks if the trigger of the metaskill has more than 10 health points
## 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: 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:
```yaml ```yaml
YourMagnificentSkill: YourMagnificentSkill:
...@@ -79,7 +77,6 @@ YourMagnificentSkill: ...@@ -79,7 +77,6 @@ YourMagnificentSkill:
- distance{d=1to10} true - distance{d=1to10} true
``` ```
## Condition Actions ## Condition Actions
Condition Actions allow you to do additional things based off of conditions. The default condition action is **true** Condition Actions allow you to do additional things based off of conditions. The default condition action is **true**
...@@ -132,6 +129,19 @@ OtherSkill: ...@@ -132,6 +129,19 @@ OtherSkill:
> is checked before > is checked before
> `sunny orElseCast OtherSkill` > `sunny orElseCast OtherSkill`
```yaml
YourAwesomeSkill:
Conditions:
- day true
TargetConditions:
- stance{s=defensive} power 0.5
TriggerConditions:
- stance{stance=defensive} power 0.5
- score{objective=test;value=>20} false
- haspotioneffect{type=POISON;level=>0;duration=0to100} true
```
## Composite Conditions ## Composite Conditions
Conditions can also be grouped by parenthesis and evaluated via the **AND** (`&&`) and **OR** (`||`) boolean operators. 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 used this way can still have a condition action.
......
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
  • Advanced User Guides and Techniques