+:
- A line with no trigger runs when the mob spawns (
+onSpawn). MythicMobs’ own default isonCombat; the MythicMobs importer writes+onCombaton any imported line that had none, so imported skills behave as they did. - The
onis optional:+hurtand+onHurtare the same trigger. - MythicMobs’
~onHurtand the old#onHurtboth still parse. A file that uses them is rewritten to+the next time it loads.
Why
+? # is YAML’s comment character, so one hand edit that broke the loader’s quoting could silently turn a whole line into a comment. + means nothing to YAML.@trigger and @target
Every trigger records who caused it, and@trigger targets that entity:
@target is the mob’s current AI target, falling back to the trigger entity when it has none. Most of the time those are the same entity; when a mob is chasing one player and gets hit by another, @trigger is the one who hit it. See Targeters.
Mob triggers
Player and item triggers
MythicMobs’ player and item triggers load without errors, so a line using one never fails to parse:+onUse, +onSwing, +onCrouch, +onUncrouch, +onConsume, +onBlockPlace, +onBlockBreak, +onFish, +onFishBite, +onFishCatch, +onFishGround, +onFishReel, +onFishFail, +onTridentThrow, +onTridentHit, +onEquip, +onUnequip, +onPressQ, +onPressCtrlQ, +onPressF, +onPress, +onRelease, +onJoin, +onRespawn, +onCast, +onCustom, +onBlock, +onPlayerDeath.
Mobs never fire them on their own. An addon fires them through the API; see Extending the Effect Language.
Several lines, one trigger
Lines that share a trigger run top to bottom:Triggers live on the calling line
Only a mob’s owneffects: lines carry triggers. Lines inside a skill inherit the moment they were called from: the skill line has the trigger, the skill just runs.
?~isPlayer runs the line only when the trigger entity is a player. See Line Options.