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
  • Targeters

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

Targeters

Targeters are used to determine what a skill targets when it is fired.

While targeters are technically optional (as the default targeter will usually be @trigger), forgetting a targeter is probably one of the most common mistakes people who are new to MythicMobs make.

When a targeter is used on the Skill mechanic, all of the skills inside of the meta-skill inherit the initial targeter. You can still overwrite the parent targeter for individual mechanics inside of the meta-skill by giving them their own targeter to use.

  • Additional Targeters
  • Targeters
    • Entity Targeters
      • Single-Entity Targeters
      • Multi-Entity Targeters
      • ThreatTable Targeters
    • Location Targeters
      • Single-Location Targeters
      • Multi-Location Targeters
    • Meta Targeters
      • Meta-Entity Targeters
      • Meta-Location Targeters
    • Special Targeters
  • Common Attributes
    • All Targeters
      • Sudo Attributes
    • Entity Targeters
    • Location Targeters
  • Targeter Options
    • Target Filters
    • Target Limits

Additional Targeters

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

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

Targeters

Entity Targeters

Single-Entity Targeters

Targeter Shorthand Description
@Self @Caster
@Boss
@Mob
Targets the caster of the mechanic
@Target @T Targets the caster's target
@Trigger Targets the entity that triggered the skill
@NearestPlayer Targets the nearest player in radius
@WolfOwner Targets the owner of the wolf
@Owner Targets the owner of the mob
@Parent @summoner Targets the parent of the mob
@Mount Targets the entity that the mob is currently riding
@Father @dad
@daddy
Targets the father of the casting mob.
@Mother @mom
@mommy
Targets the mother of the casting mob.
@Passenger Targets the rider of the casting mob.
@PlayerByName @specificplayer Targets a specific player by name. Supports placeholders.
@UniqueIdentifier @UUID Targets a specific entity by their UUID, supports placeholders
@Vehicle Targets the caster's vehicle
@InteractionLastAttacker @lastAttacker Targets the last entity that attacked the casting INTERACTION entity
@InteractionLastInteract @lastInteract Targets the last entity that interacted with the casting INTERACTION entity

Multi-Entity Targeters

Targeter Shorthand Description
@LivingInCone @entitiesInCone
@livingEntitiesInCone
@LEIC
@EIC
Targets all living entities in cone with a specified angle, length and rotation relative to facing direction
@LivingInWorld @EIW Targets all living entities in the caster's world
@NotLivingNearOrigin @nonLivingNearOrigin
@NLNO
Targets all non living entities in a radius near the origin
@PlayersInRadius @PIR Targets all players in the given radius
@MobsInRadius @MIR Targets all mythicmobs or vanilla overrides of the given type in a radius
@EntitiesInRadius @livingEntitiesInRadius
@livingInRadius
@allInRadius
@EIR
Targets all entities in the given radius.
@EntitiesInRing @EIRR Targets all entities in the given ring.
@PlayersInWorld @World Targets all players in the current world.
@PlayersOnServer @Server
@Everyone
Targets all players in the server.
@PlayersInRing Target all players between the specified min and max radius.
@PlayersNearOrigin Targets players near the origin of a meta-skill.
@MobsNearOrigin Targets all MythicMobs or vanilla overrides of the given type(s) in a radius around the origin
@EntitiesNearOrigin @ENO Targets all entities near the origin of a meta-skill
@Children @child
@summons
Targets any child entities summoned by the caster.
@Siblings @sibling
@brothers
@sisters
Targets any mobs that share the same parent as the caster.
@ItemsNearOrigin Targets item drops near the origin of a meta-skill.
@ItemsInRadius @IIR Targets all item drops in the given radius

ThreatTable Targeters

These targeters only work if the mob has Threat Tables enabled.

Targeter Shorthand Description
@ThreatTable @TT Targets every entity on the casting mob's threat table
@ThreatTablePlayers Targets all the players on the casting mob's threat table
@RandomThreatTarget @RTT Targets a random entity on the casting mob's threat table
@RandomThreatTargetLocation @RTTL Targets the location of a random entity on the casting mob's threat table

Location Targeters

Single-Location Targeters

Targeter Shorthand Description
@SelfLocation @casterLocation
@bossLocation
@mobLocation
Targets the caster's location
@SelfEyeLocation @eyeDirection
@casterEyeLocation
@bossEyeLocation
@mobEyeLocation
Targets the caster's eye location
@Forward Targets a location in front of caster's facing direction
@ProjectileForward Targets a location in front of the casting projectile, relative to its direction
@TargetLocation @targetloc
@TL
Targets the caster's target's location
@TriggerLocation Targets the location of the entity that triggered the skill
@SpawnLocation Targets the world's spawn location.
@CasterSpawnLocation Targets the location the caster spawned at.
@Location Targets the specified coordinates in the caster's world.
@Origin @source Targets the location of the "origin" or "source" of a meta-skill. While that is usually the casting mob, there are special cases where this is not true (such as with the Projectile Skill, where the "origin" is the location of the projectile).
@ObstructingBlock Tries to target the block in front of the caster that is obstructing it
@TargetBlock Targets the block the casting player is looking at.
@TrackedLocation Targets the mob's tracked location
@NearestStructure Targets the nearest structure of the specified type within a radius in the caster's world
@VariableLocation @varLocation Targets the location stored in the specified variable

Multi-Location Targeters

Targeter Shorthand Description
@ForwardWall Targets a plane in front of the caster
@PlayerLocationsInRadius @PLIR Targets all player locations in the given radius
@Pin Targets the location(s) of a pin.
@Ring Target points to form a ring of locations
@Cone Returns the # of points target locations that comprise a cone (Note: Cone is fixed on the y-axis, and cannot be rotated up or down)
@Sphere Targets points in a sphere around the caster
@Rectangle @cube
@cuboid
Returns the # of points target locations that comprise a rectangle
@RandomLocationsNearCaster @RLO
@randomLocationsOrigin
@RLNO
Targets random locations near the origin of a skill.
@RandomLocationsNearOrigin @RLO
@randomLocationsOrigin
@RLNO
Targets random locations near the origin of a skill.
@BlocksNearOrigin @BNO Targets all blocks in a radius around the origin of the metaskill.
@RingAroundOrigin @ringOrigin
@RAO
Targets locations in a specified ring around the origin.
@Spawners Targets the location of the specified spawners.

Meta Targeters

Meta Targeters targets relative to an inherited target. For example:

# Mob file
Laser:
  Type: CREEPER
  Display: 'Laser'
  Health: 12
  AITargetSelectors:
  - 0 clear
  - 1 players
  Skills:
  - skill{s=Laser} @target
# Skill file
Laser:
  Skills:
  - ignite @EntitiesInLine{r=1}

In the example skill above, the "ignite" mechanic will target entities between the caster and the targeter specified in - skill{s=Laser} @target, i.e. a line between the caster and the caster's target.

Some meta targeters also allow the mechanic to be casted "fromOrigin". This will change the starting location of the meta-targeter to be @Origin rather than the caster, which can allow for some complex effects, particularly when used with Projectiles.

Meta-Entity Targeters

Targeter Shorthand Description
@LivingInLine @entitiesInLine
@livingEntitiesInLine
@LEIL
@EIL
Targets any entities in a line between the inherited target and the casting mob.
@LivingNearTargetLocation @LNTL
@ENTL
@ENT
Targets all living entities near the inherited target.
@PlayersNearTargetLocations @playersNearTargetLocation
@PNTL
Targets all players near the inherited targets.
@TargetedTarget @Targeted Targets the inherited targeted entities.

Meta-Location Targeters

Targeter Shorthand Description
@Line Targets locations between the mob and the inherited targets.
@RandomLocationsNearTargets @randomLocationsNearTarget
@randomLocationsNearTargetEntities
@randomLocationsNearTargetLocations
@RLNT
@RLNTE
@RLNTL
Targets random locations around the inherited targets.
@FloorOfTargets @FOT
@floorsOfTarget
Targets the blocks underneath the inherited targets.
@LocationsOfTargets @locationOfTarget
@LOT
Targets the location of the inherited target entities.
@TargetedLocation @targetedLocations
@targetedLoc
Targets the location of the inherited target locations.
@BlocksInRadius @BIR Targets all blocks in a radius of the inherited targets.
@BlocksInChunk @BIC Targets all blocks in a chunk relative to the inherited target.
@BlockVein @vein
@bv
Target all adjancent blocks that match the blocktype, starting from the origin of the skill.

Special Targeters

Targeter Shorthand Description
@None Provides no target. (Useful for mechanics with no target input.)
@Region Special targeter to target a region. Only works with specific mechanics

Common Attributes

There are some common attributes that can be used in most of the Targeters, depending on the targeter's returned value

All Targeters

Sudo Attributes

Attribute Shorthand Description
sudoparent fromparent, ofparent, asparent, parent, ofparent If this attribute is set to true, the targeter will be parsed as if it was the Parent of the casting entity executing the mechanic
sudoowner fromowner, ofowner, asowner, owner, ofowner If this attribute is set to true, the targeter will be parsed as if it was the Owner of the casting entity executing the mechanic
sudotrigger fromtrigger, oftrigger, astrigger, trigger, oftrigger If this attribute is set to true, the targeter will be parsed as if it was the Trigger of the skilltree executing the mechanic

In this example, the mob will keep getting teleported in front of its owner, since the Forward targeter is using the sudoowner attribute, and is, as such, getting parsed as if it was the owner of the casting mob executing the mechanic

TestOwner:
  Type: Wolf
  Skills:
  - setOwner @NearestPlayer{r=99} ~onSpawn
  - tp @Forward{f=5;y=1;sudoowner=true} ~onTimer:1

Entity Targeters

Attribute Shorthand Description
useboundingbox bb If the targeter is performing a distance check, this option allows it to check against the bounding box of the target instead of the center of its hitbox
unique u The maximum number of times an entity can be targeted. Defaults to 1, disable with 0. This is mostly used for meg models with multiple hitboxes
nomegbb nmb Whether MEG sub hitboxes should be filtered out

Location Targeters

Attribute Shorthand Description
xoffset xo, x Centers the offset on the x axis
yoffset yo, y Centers the offset on the y axis
zoffset zo, z Centers the offset on the z axis
forwardOffset foffset, fo Centers forward and backward offset, based on the caster's viewing angle
sideOffset soffset, so Centers left and right offset, based on the caster's viewing angle
rotatex rotx Rotation on the x axis
rotatey roty Rotation on the y axis
rotatez rotz Rotation on the z axis
coordinatex cx Sets the x axis coordinate
coordinatey cy Sets the y axis coordinate
coordinatez cz Sets the z axis coordinate
blocktypes blocktype, bt Only targets selected block types. Multiple blocks can be listed by separating them using a ,
You can add a # at the front of the type to indicate that the block only needs to match part of the type, add @ to indicate that the block only needs to match the start of the type
blockignores blockignore Excludes selected block types from the targeter. Multiple blocks can be listed by separating them using a ,
coordinateyaw cyaw Sets the yaw value
coordinatepitch cpitch Sets the pitch value
blockcentered centered Boolean value. If set to true, the center of the block at the target location will be targeted, instead of the target location itself

Targeter Options

Target Filters

Target Filters allow you to filter out certain targets, and makes targeters a lot more flexible.

They are used with two options (available on ANY entity-targeter):

  • ignore=X
  • target=X

For example, to make a targeter that will ignore any players or non-hostile mobs, you'd use this:

damage{a=20} @EntitiesInRadius{r=10;ignore=players,animals}

To make a targeter ONLY target players, you'd do something like this:

skill{s=ASkill} @EntitiesInRadius{r=5;target=players}

Possible filters include:

  • self
  • animals (non-hostile mobs)
  • armorstands/armor_stands
  • creative (ignored by default)
  • creatures (any type of sentient entity)
  • flyingmobs
  • marker
  • monsters (hostile mobs)
  • NPCs (Citizens NPCs, ignored by default)
  • players
  • samefaction (mobs marked with the same faction type)
  • spectator (ignored by default)
  • vanilla
  • villager
  • watermobs
  • owner
  • More coming later...

You can also turn off specific filters by just adding the option targetXXXXX replacing XXXXX with the filter name, e.g. targetPlayers=false or targetcreative=true

Note: As of MM 4.15 or MM 5.0, you can set the default target filters in MythicMobs/config.yml

Target Limits

All entity and location targeters also support target limits (as of v5.0.4). With this you can limit how many entities/locations are targeted, including the order in which they are selected.

This is done with the options:

  • limit=#
  • sort=X

Lets say you want your ability to only target the 2 nearest players within 30 blocks. To do this, you'd simply set the limit 2 to and sort by nearest:

  • @PlayersInRadius{r=30;limit=2;sort=NEAREST}

Currently, sort can have the following values:

General sorters:

  • NONE (usually sorts by how long the entity has existed)
  • RANDOM
  • NEAREST
  • FURTHEST

Entity Only Sorters

  • HIGHEST_HEALTH
  • LOWEST_HEALTH
  • HIGHEST_THREAT
  • LOWEST_THREAT
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
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Examples
Useful Tips