### Character Setup Dialog with Inputs Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Dialogs.md An example of a dialog used for character setup, featuring various input types like text, boolean, range, and options. The `WAIT_FOR_RESPONSE` action keeps the dialog open until a button is pressed. ```yaml CharacterSetup: Title: "Character Setup" CanClose: false AfterAction: WAIT_FOR_RESPONSE Columns: 2 Body: - Type: text Message: "Configure your character settings." Width: 300 Inputs: - Type: text Key: nickname Label: "Display Name" MaxLength: 16 - Type: bool Key: pvpEnabled Label: "Enable PvP?" - Type: range Key: difficulty Label: "Difficulty" Start: 1 End: 10 Initial: 5 Step: 1 - Type: option Key: classChoice Label: "Choose a Class" Options: warrior: "Warrior" mage: "Mage" ranger: "Ranger" Buttons: - Label: "Confirm" Tooltip: "Save your settings" Width: 150 Skill: CharacterConfirmed - Label: "Cancel" Width: 150 ExitButton: Label: "Close" Width: 100 ``` -------------------------------- ### Basic Missile Skill Setup Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/missile.md This example demonstrates how to set up a basic missile skill in a Mob file, triggering a skill named 'Homer' on a timer. ```yaml Mob: Type: ZOMBIE Skills: - skill{s=Homer} @target ~onTimer:100 ``` -------------------------------- ### PushBlock Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/PushBlock.md An example demonstrating pushing a block in the forward direction towards a wall. ```yaml Skills: - pushblock{dir=@Forward{f=1}} @ForwardWall{f=5;y=1;h=2;w=2} ``` -------------------------------- ### Static Placeholder Examples Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Placeholders.md Examples of static placeholders that resolve to a single, defined output. These are useful for simple replacements. ```yaml TestPlaceholder: 'a single value' AnotherTestPlaceholder: 'another single value' ``` -------------------------------- ### Example Drop Table Configuration Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/pre-2.0_changelogs.md This example demonstrates how to configure drop tables for items and experience. It shows the format for dropping specific items with amounts and chances, as well as experience drops. ```yaml SkeletonKingDrops: Drops: - 371:0 32-64 1 - exp 100 ``` -------------------------------- ### MythicMobs Spawner Configuration Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Spawners.md This is a comprehensive example of a spawner configuration file. It outlines various parameters that can be set for a spawner, such as mob type, location, spawning behavior, and conditions. ```yaml SpawnerName: MobName: mobTypeName World: worldname SpawnerGroup: GroupName X: 0 Y: 0 Z: 0 Radius: 0 RadiusY: 0 UseTimer: true MaxMobs: 1 MobLevel: 1 MobsPerSpawn: 1 Cooldown: 0 CooldownTimer: 0 Warmup: 0 WarmupTimer: 0 CheckForPlayers: true ActivationRange: 40 LeashRange: 32 HealOnLeash: false ResetThreatOnLeash: false ShowFlames: false Breakable: false Conditions: [] ActiveMobs: 1 ``` -------------------------------- ### Complete Mob Configuration Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/examples/Mob-Examples.md A comprehensive example combining all configurations for a custom mob, including type, stats, AI, equipment, options, and skills. ```yml Demon: Type: blaze # Mob Type Display: 'Demon' # Mob Display name Damage: 6 # The amount of Damage it deals Health: 60 # The amount of Health it has Faction: bad # Set the Demon's faction as "bad". Disguise: Player 164_ setCustomName Demon setCustomNameVisible false # Disguise it as a player with a skin. Requires LibsDisguises. AIGoalSelectors: - meleeattack # Uses melee attacks - randomstroll # Randomly walks - float # Randomly floats AITargetSelectors: - clear # Clears the mob's base AI - players # Firstly targets players - attacker # Targets whatever attacks it - specificfaction good # Targets mobs from the faction "good" Equipment: - NETHERITE_AXE HAND # Makes the mob hold a netherite axe in its hand Options: AlwaysShowName: false PreventOtherDrops: true PreventMobKillDrops: true MovementSpeed: 0.35 Silent: false Skills: # PARTICLE EFFECTS - effect:flames @self ~onTimer:100 # Every 100 ticks (5 seconds), show a spawner flame effect on mob's location. # SOUND EFFECTS - effect:sound{s=entity.elder_guardian.ambient;v=1;p=2} @self 0.5 ~onTimer:150 # Ever 150 ticks (7.5 seconds), 50% chance to play the entity.elder_guardian.ambient sound with volume 1 and pitch 2 - effect:sound{s=entity.elder_guardian.hurt;v=1;p=0.7} @self ~onDamaged # When the mob gets damaged, play the entity.elder_guardian.hurt sound with volume 1 and pitch 0.7 - effect:sound{s=entity.elder_guardian.death;v=1;p=0.7} @self ~onDeath # When the mob dies, play the entity.elder_guardian.death sound with volume 1 and pitch 0.7 - effect:sound{s=entity.blaze.death;v=0.3;p=0.7} @self ~onDeath # When the mob dies, also play the entity.blaze.death sound with volume 0.3 and pitch 0.7 ``` -------------------------------- ### onReady Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onReady.md This example demonstrates how to use the '~onReady' trigger to send a message to all players in the world when a mob is about to spawn from a spawner. It also shows the '~onFirstSpawn' trigger for comparison. ```yml EXAMPLE_MOB: Type: VILLAGER Skills: # sends a message to all the players in the world # when the mob is about to spawn from a spawner - message{m=READY TO SPAWN FROM A SPAWNER} @World ~onReady - message{m=READY TO SPAWN FROM A SPAWNER} @World ~onFirstSpawn ``` -------------------------------- ### Example Skill Using TargetedTargeter Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/TargetedTarget.md This example demonstrates how to use the TargetedTargeter in a skill configuration. It targets entities selected by a previous skill. ```yaml ExampleSkill2: Skills: - lightning @TargetedTarget ``` -------------------------------- ### Example Mob and Skill Configuration Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters.md This example demonstrates how to configure a mob with a skill that uses a meta targeter to target entities in a line between the caster and the initial target. ```yaml # Mob file Laser: Type: CREEPER Display: 'Laser' Health: 12 AITargetSelectors: - 0 clear - 1 players Skills: - skill{s=Laser} @target ``` ```yaml # Skill file Laser: Skills: - ignite @EntitiesInLine{r=1} ``` -------------------------------- ### Server Version Check Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Conditions/ServerVersionBefore.md This example demonstrates using the serverBefore condition to trigger a message skill if the server version is before 1.21.1. ```yaml Conditions: - serverBefore{version=1.21.1} Skills: - message{m="Ngl y'all gotta update"} @world ``` -------------------------------- ### Example Mob Equipment Configuration Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/Equipment.md An example demonstrating how to equip a mob with a custom helmet and a diamond sword. Ensure 'awesome_boss_helmet' is defined in your MythicMobs items. ```yaml awesome_boss: Type: pig_zombie Equipment: - awesome_boss_helmet HEAD - diamond_sword HAND ``` -------------------------------- ### GoToLocation AIGoal Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/ai/goals/GoToLocation.md This example demonstrates how to configure the GoToLocation AIGoal within MythicMobs. The mob will clear its current goals and then move to the coordinates 10, 20, 30. ```yaml AIGoalSelectors: - clear - goto 10,20,30 ``` -------------------------------- ### Example Mob with onChangeTarget Skill Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onChangeTarget.md This example demonstrates how to configure a mob to send a message to all players in the world when its target changes. ThreatTables must be enabled for this trigger to function. ```yml EXAMPLE_MOB: Type: CHICKEN Modules: ThreatTable: true Skills: # sends a message to all the players in the world # when the mob's target changes - message{m=Target Changed} @World ~onChangeTarget ``` -------------------------------- ### Basic LivingInCone Targeter Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/LivingInCone.md This example demonstrates how to use the LivingInCone targeter to apply an 'ignite' skill to entities within a cone of 45 degrees and a range of 20 blocks. ```yaml ExampleSkill: Skills: - ignite @LivingInCone{a=45;r=20} ``` -------------------------------- ### Basic Ring Targeter Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/Ring.md This example demonstrates how to use the Ring targeter to apply particles in a ring with a radius of 10 and 15 points around the caster. ```yaml ExampleSkill: Skills: - effect:particles @Ring{r=10;p=15} ``` -------------------------------- ### CancelEventSkill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/cancelevent.md This example demonstrates how to use the CancelEvent skill to prevent damage and display a message. The skill must be run with sync=true. ```yaml CancelDamageEvent: Skills: - CancelEvent - message{m="&cYou cannot hurt this mob!"} @trigger ``` -------------------------------- ### MPet Mob Configuration Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/2.5.x_changelogs.md Example of how to configure a custom mob using the MiniaturePets plugin integration. Specifies the MPet type, anchor mob, and visibility of the pet's name. ```yaml AngryPug: Type: MPET MPet: Type: PUG Anchor: SPIDER ShowName: true Display: 'Angry Pug' ``` -------------------------------- ### Clear Experience Levels Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/ClearExperienceLevels.md This example demonstrates how to use the clearexperiencelevels skill to clear experience levels from the player who triggered the event. ```yaml ExampleMob: Type: ZOMBIE Skills: - clearexperiencelevels @trigger ~onDamaged ``` -------------------------------- ### Metaskill Inheritance Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Metaskills.md A skill without its own targeter inherits targets from the calling metaskill. This example ignites players within a 10-block radius. ```yaml #MOB FILE ExampleMob: Type: ZOMBIE Skills: - skill{s=ExampleSkill} @PIR{r=10} ~onInteract ``` ```yaml #SKILL FILE ExampleSkill: Skills: - ignite ``` -------------------------------- ### Dust Color Transition Particle Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/Particle/Particle-Types/Dust_Color_Transition.md This example demonstrates how to use the dust_color_transition particle effect with specified start and end colors, and a size. ```yaml Skills: - particle{p=dust_color_transition;color=#FF0000;color2=#0000FF;size=1} ``` -------------------------------- ### Remount Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/remount.md This example demonstrates how to configure a 'Rider' mob that dismounts a 'TestHorse' when damaged and remounts when interacted with. Ensure the mount mob (TestHorse) is defined and exists. ```yaml Rider: Type: skeleton Display: 'Rider' Health: 12 Mount: TestHorse Skills: - dismount ~onDamaged - remount ~onInteract TestHorse: Type: horse Display: 'Test Horse' Health: 20 ``` -------------------------------- ### Example Mob Configuration with goToSpawn Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/ai/goals/goToSpawnLocation.md This example demonstrates how to configure a mob to use the goToSpawn goal. The mob will melee attack until it is more than 20 blocks from its spawn, then it will walk back to its spawn location, stopping when it is within 4 blocks. ```yaml ExampleMob: Type: ZOMBIE AIGoalSelectors: - clear - goToSpawn{speed=1;max=20;min=4} - meleeattack ``` -------------------------------- ### Doppleganger Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/doppleganger.md This example demonstrates how to use the Doppleganger skill to make a mob disguise itself as the nearest player upon spawning. Ensure Libs' Disguises is installed for this to function. ```yaml TotallyNotDitto: Type: SKELETON Skills: - doppleganger @NearestPlayer ~onSpawn ``` -------------------------------- ### FollowPath Mechanic Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/FollowPath.md This example demonstrates how to make a mob follow a path consisting of coordinates and a targeter. It also includes a message to be displayed when the mob reaches the final point. ```yaml Skills: - followPath{ speed=2; tolerance=2; path=(200,5,520),(200,5,500),@forward{a=5}; onGoal=[ - message{m="I DID IT"} @world ]} @self ~onInteract ``` -------------------------------- ### Example Placeholder with Arguments Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/API/Placeholders.md An example of a MythicMobs placeholder that utilizes placeholder arguments. Remember to set `usedPlaceholderArguments` in the `@MythicPlaceholder` annotation to the number of arguments expected. ```java package your.plugin.compat.mythicmobs.skills.placeholders.all; import io.lumine.mythic.core.skills.placeholders.types.GenericPlaceholder; import io.lumine.mythic.core.skills.placeholders.types.GenericPlaceholderTypes.StringPlaceholder; import io.lumine.mythic.core.utils.annotations.MythicPlaceholder; import io.lumine.mythic.core.skills.placeholders.PlaceholderContext; import javax.annotation.Nullable; @MythicPlaceholder(placeholder="example.placeholder",usedPlaceholderArguments = 1) public class ExamplePlaceholder extends GenericPlaceholder implements StringPlaceholder { private final ResolvedPlaceholderSegment argument; public ExamplePlaceholder(GenericPlaceholderArguments metaContext) { super(metaContext); this.argument = ... } @Nullable @Override public String applyWithMetaKeywords(PlaceholderContext placeholderContext) { return this.argument.getOrDefault(placeholderContext, PlaceholderString::get, null); } } ``` -------------------------------- ### Terminable Aura Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/Terminable.md This example demonstrates a terminable aura that cancels its execution if the caster's health drops below 50%. It also defines skills to run when the aura starts and when it terminates. ```yaml Skills: - terminable{ auraName=exampleAura; d=2000; conditions=[ - health{h=<50} true ]; onStart=[ - state{s=charged_attack} - delay 20 - skill{s=ChargedAttackDamage} ]; onTerminate=[ - state{s=charged_attack;remove=true} - state{s=stunned} ]} @self ``` -------------------------------- ### Dynamic Metaskill Creation with Variableskill Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Dynamic-Metaskills.md This example demonstrates creating a dynamic metaskill by setting variables and then executing them using vskill. It's useful for templating and bypassing placeholder limitations. ```yaml Testmob: Type: pig Skills: - skill{s= [ - setvariable{var=skill.temp;type=STRING;val=glow} @self - setvariable{var=skill.testskill2;type=STRING;val="["} - setvariable{var=skill.testskill2;type=STRING;val= - message{m=aaa} @World} @self - setvariable{var=skill.testskill2;type=STRING;val= - message{m=bbb} @World} @self - setvariable{var=skill.testskill2;type=STRING;val=]} @self - vskill{s=} - vskill{s= [ - particle{p=} @selflocation{y=2} ]} @self ]} @self ~onInteract ``` -------------------------------- ### Basic Item Configuration with Options Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Items/Options.md Illustrates the placement of options within an item's configuration. ```yaml example_item: Id: diamond Options: SomeOption: value ``` -------------------------------- ### Flee Conditional AI Goal Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/ai/goals/fleeConditional.md This example demonstrates how to configure a mob to flee when it has line of sight to a threat. The mob will flee at a speed of 2 and a safe speed of 2, starting when a threat is within 5 blocks. ```yaml ExampleMob: Type: ZOMBIE AIGoalSelectors: - clear - fleeConditional{distance=5;speed=2;safespeed=2;conditions=[ - inlineofsight true ]} ``` -------------------------------- ### Creeper Charged Message Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onCreeperCharge.md Sends a message to all players in the world when the mob gets charged. This snippet demonstrates the usage of the onCreeperCharge trigger. ```yaml EXAMPLE_MOB: Type: CREEPER Skills: # sends a message to all the players in the world # when the mob gets charge - message{m=CHARGED} @World ~onCreeperCharge ``` -------------------------------- ### Particle Line Helix Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/ParticleLineHelix.md This example demonstrates how to create a particle line helix effect. It specifies custom values for distance between points, helix length, starting Y offset, particle type, helix radius, and maximum distance. The effect is applied to a target location. ```yaml Skills: - particlelinehelix{Fo=true;db=0.4;hl=4;syo=1.8;p=scrape;hr=0.5;md=40} @targetlocation ``` -------------------------------- ### Registering a Skill as a Command Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Skill-Commands.md This example shows how to register a metaskill as a command with an ID and aliases. The 'Completions' section defines tab-completable arguments. ```yaml MyExampleSkills: Command: Id: skillTest Aliases: - testSkill Completions: example: - players Skills: - message{m= our hero!} @self ``` -------------------------------- ### Mob Skill Triggering Projectile Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/endprojectile.md Example of a mob skill that launches an 'ExplodingProjectile'. This setup ensures the projectile is launched and its associated tick and end skills are called. ```yaml Mob: Type: HUSK Skills: - skill{s=ExplodingProjectile} @target ~onTimer:20 - aura{auraName=explode;d=2} @self ~onTimer:200 ``` -------------------------------- ### Example MythicMobs Item Configuration Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/Changelogs.md Demonstrates the configuration of a custom item with various new component supports like AttackRange, Weapon, JukeboxPlayable, UseRemainder, RepairableBy, and PotDecorations. ```yaml AnItem: Material: DIAMOND AttackRange: 3.5 Weapon: ItemDamagePerAttack: 2 DisableBlockingForSeconds: 0.5 JukeboxPlayable: "minecraft:thirteen" UseRemainder: ADifferentItem RepairableBy: - STICK PotDecorations: Back: brick Left: arms_up_pottery_sherd Right: skull_pottery_sherd Front: prize_pottery_sherd ``` -------------------------------- ### Log Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/Log.md Logs 'Hello World!' to the console. This skill is useful for debugging or leaving messages in the server log. ```yaml Skills: - log{message="Hello World!"} @None ``` -------------------------------- ### Guardian Beam Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/GuardianBeam.md Demonstrates how to apply the Guardian Beam effect to a target. Configure duration, interval, Y offsets, and associated skills for start, tick, and end events. ```yaml Guardian_Beam: Skills: - guardianbeam{d=200;i=1;syo=1;fromOrigin=false;oS=AStartingSkill;oT=ATickingSkill;oE=AEndingSkill} @Target ``` -------------------------------- ### onEnterCombat Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onEnterCombat.md This example demonstrates how to use the onEnterCombat trigger to send a message to all players in the world when the mob enters combat. Ensure ThreatTables are enabled for the mob. ```yml EXAMPLE_MOB: Type: CHICKEN Modules: ThreatTable: true Skills: # sends a message to all the players in the world # when the mob enters combat - message{m=ENTERED COMBAT} @World ~onEnterCombat ``` -------------------------------- ### Applying Particles to Caster's Location Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/SelfLocation.md This example shows how to use the @SelfLocation targeter to apply particles to the caster's location. No specific setup or imports are required beyond defining the skill. ```yaml ExampleSkill: Skills: - effect:particles @SelfLocation ``` -------------------------------- ### Jump Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/jump.md This example demonstrates how to apply the jump skill to a mob, setting its jump velocity to 20. Ensure the velocity value is appropriate for the desired jump height. ```yaml SuperJump: Skills: - jump{velocity=20} ``` -------------------------------- ### Example Pack Directory Structure Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Packs.md Illustrates a typical directory structure for a MythicMobs pack, showing nested folders and various file types. ```tree 📦ExamplePack ┣ 📂files ┃ ┣ 📂aRandomFolder ┃ ┃ ┣ 📂aNestedFolder ┃ ┃ ┃ ┗ 📜ThisIsADroptableFile.droptable.yml ┃ ┃ ┣ 📜ThisIsAMobFile.mob.yml ┃ ┃ ┗ 📜ThisIsAPlaceholderFile.placeholder.yml ┃ ┣ 📂anotherRandomFolder ┃ ┃ ┣ 📜ThisIsAMobFile.mob.yml ┃ ┃ ┣ 📜ThisIsASchematic.schem ┃ ┃ ┗ 📜ThisIsASkillFile.skill.yml ┃ ┗ 📜ThisIsAStatFile.stat.yml ┗ 📜packinfo.yml ``` -------------------------------- ### Speak Mechanic for Mob Dialogue Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.7.x_changelogs.md Shows the 'Speak' mechanic for making mobs 'talk' in chat and display speech bubbles if a hologram plugin is installed. Examples cover interaction and damage events. ```yaml - speak{m="OH BOY I HAVE SPEECH BUBBLES NOW"} @trigger ~onInteract ``` ```yaml - speak{m="OW THAT HURTS I CANT BELIEVE YOU WOULD HIT AN INNOCENT MAN"} @trigger ~onDamaged ``` -------------------------------- ### Metaskill with OnFailSkill (Multiple Skills) Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Metaskills.md This example demonstrates using 'OnFailSkill' to execute multiple skills sequentially when the primary metaskill's conditions are not met. This is an alternative syntax for specifying the skill to run on failure. ```yaml ExampleSkill: Conditions: - day true OnFailSkill: - message{m="Oh my, it still isn\'t daytime?"} @World - message{m="That\'s quite the problem!"} @World ``` -------------------------------- ### Toggle Collidability with Aura Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/setcollidable.md This example uses an aura to temporarily make the mob non-collidable. The mob becomes non-collidable when the aura starts and becomes collidable again when the aura ends. This is ideal for effects that have a defined duration. ```yaml ExampleMob: Type: ZOMBIE Skills: - aura{d=100;rd=true;ms=1; onStart=[ - setcollidable{c=false} @self ]; onEnd=[ - setcollidable{c=true} @self ]} @self ~onDamaged ``` -------------------------------- ### Basic RaytraceTo Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/raytraceto.md This snippet demonstrates a basic usage of the raytraceto mechanic. It applies a damage skill when hitting an entity and particle effects when hitting a location. It also configures vertical offsets for the start and end points and uses the caster's eye location as the ray's origin. ```yaml MyRaytraceToSkill: Skills: - raytraceto{ entitySkill=[ - damage{amount=20} ]; locationSkill=[ - particles{p=flame;a=20;s=0.2;hS=0.1;vS=0.1} ]; startyoffset=1; targetyoffset=1; useeyelocation=true } @targetlocation ~onUse ``` -------------------------------- ### Example Dialog Configuration Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Dialogs.md A comprehensive example of a dialog file structure, including title, body, item display, text input, and buttons. This serves as a template for creating custom dialogs. ```yaml DialogName: Title: "Dialog Title" ExternalTitle: "Short Title" CanClose: true Pause: false AfterAction: CLOSE Columns: 1 Body: - Type: text Message: "Some text here." Width: 256 Conditions: - condition1 - Type: item Item: DIAMOND_SWORD Width: 64 Height: 64 Decoration: true ShowTooltip: true Inputs: - Type: text Key: myInput Label: "Enter something" MaxLength: 256 Multiline: false Width: 200 LabelVisible: true Buttons: - Label: "Confirm" Tooltip: "Click to confirm" Width: 150 Skill: SomeSkill Conditions: - condition1 ExitButton: Label: "Close" Width: 100 Skill: OptionalSkill ``` -------------------------------- ### Spawn MythicMob with Drop Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/drops/DropTypes/MythicMob.md This example shows how to configure a drop to spawn a specific MythicMob when the item is dropped. It includes settings for mob type, initial velocity, and spawning only on a solid surface. ```yaml Drops: - mythicmob{type=IncredibleLootchest;velocity=1;os=true} 1 1 ``` -------------------------------- ### Example Mob Inheriting Template Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/Templates.md An example mob that inherits from a template and overrides specific options. ```yaml ExampleMob: Template: TemplateMob Options: FollowRange: 16 ``` -------------------------------- ### Skill Mechanic Usage Examples Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/skill.md Provides examples of how to use the skill mechanic with different triggers and targets. ```yaml Skills: - skill{skill=AnotherSkill} @Target ~onAttack - skill{s=AnotherSkill} @Trigger ~onSpawn - skill:OtherSkill @Trigger ~onDeath ``` -------------------------------- ### Inline MetaSkills with Projectile Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.7.x_changelogs.md Demonstrates nesting skills within square brackets for inline MetaSkills, useful for complex mechanics like projectiles. Ensure proper indentation for YAML readability. ```yaml Skills: - projectile{ interval=1; velocity=30; bulletType=BLOCK; material=MAGMA_BLOCK; tyo=0.5; g=1; bulletSpin=-40; hnp=true; stopatentity=false; duration=100; onHit=[ - damage{amount=50} - ignite{ticks=20} ]; onTick=[ - particles{p=flame;a=20;hs=0.5;vs=0.5} ]; onEnd=[ - particles{p=largeexplode;a=50;speed=1;hs=0.05;vs=0.05} - effect:sound{s=entity.dragon_fireball.explode;p=0.6;v=2} - damage{amount=30} @ENO{r=5} ]; } @targetlocation ``` -------------------------------- ### Stop Using Item Basic Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/stopusingitem.md A basic example of stopping the nearest player from using an item. ```yaml Skills: # basic example - stopusingitem @NearestPlayer ``` -------------------------------- ### Basic currencygive Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/currencygive.md This example demonstrates how to use the currencygive skill to distribute money to nearby players upon mob spawn. It specifies the amount of money and the radius for player selection. ```yaml Skills: - currencygive{amount=20} @pir{r=20} ~onSpawn 0.2 ``` -------------------------------- ### Basic Taunt Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/Taunt.md This example demonstrates how to apply the taunt mechanic to entities within a radius. ```yaml Skills: - taunt @EIR{r=20} ``` -------------------------------- ### DamageTag Condition Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/5.4.x_changelogs.md Checks if the damage that triggered the skill has the given tag. Example usage for the FIRE tag. ```yaml - damageTag{tag=FIRE} ``` -------------------------------- ### Example Metaskill with Arrow Volley Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/sudoskill.md Defines a Metaskill named 'ExampleSudoskill' that casts an arrow volley and sends a message to the world, demonstrating a basic skill chain. ```yaml ExampleSudoskill: Skills: - arrowvolley{a=20;s=25;v=10;f=50;rd=200} @EIR{r=30} - message{msg="Triggername<&co> "} @world ``` -------------------------------- ### Mob Skills Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics.md This example demonstrates how to use the message skill with cooldown and repeat parameters for mob interactions. ```yaml ExampleMob: Type: ZOMBIE Skills: - message{m="This message will only be shown once every 5 seconds!";cooldown=5} @trigger ~onInteract - message{m="This one 5 times in a row over 2 seconds!";repeat=4;repeatInterval=10} @trigger ~onInteract ``` -------------------------------- ### Create and Execute MetaSkill Variable Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Variables.md Demonstrates how to define a MetaSkill variable and then execute it. Ensure a delay before executing MetaSkills with metamechanics to prevent errors. ```yaml # Create your MetaSkill variable - setvariable{var=skill.example;type=METASKILL;val=[ - message{m=hello world} @self ]} # Print the MetaSkill's original text - message{m=} # Execute the MetaSkill - vskill{variable=skill.example} ``` -------------------------------- ### MovePin Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/MovePin.md Moves the pin named 'example' to the current location of the caster. This skill cannot be used on MultiPins. ```yaml Skills: - movepin{pin=example} @selflocation ``` -------------------------------- ### Run Skill for Each Pin Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/ForEachPin.md This example demonstrates how to use the ForEachPin mechanic to apply a particle effect to each pin named 'YourCoolPin'. The 'skill' attribute defines the metaskill to be executed. ```yaml Skills: - foreachpin{name=YourCoolPin;skill=[ - particle{p=flame;a=20} ]} @self ``` -------------------------------- ### IsSibling Condition Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Conditions/IsSibling.md This example demonstrates how to apply the IsSibling condition within a TargetConditions block in MythicMobs configuration. ```yaml TargetConditions: - IsSibling ``` -------------------------------- ### Open Custom Menu Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/OpenCustomMenu.md Use this skill to open a custom menu named 'ExampleMenu' when a player interacts with an object. This requires MythicMobs Premium or MythicRPG. ```yaml Skills: - opencustommenu{m=ExampleMenu} @trigger ~onInteract ``` -------------------------------- ### MythicConditionLoadEvent Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.0.x_changelogs.md Developers can add custom conditions at runtime using MythicConditionLoadEvent. Examples will be provided on the manual and API forum. ```java public class MythicConditionLoadEvent - MythicConditionLoadEvent - Called on startup/reload for each custom condition referenced in the plugin. ``` -------------------------------- ### Dynamic Skill Execution Based on Caster Stance Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/variableskill.md This example shows how to execute a skill dynamically based on the caster's current stance. The skill name is constructed using 'ExampleMob_' followed by the caster's stance and a random number. ```yaml Example_StanceSkill: Skills: - vskill{s=ExampleMob__} @self ``` -------------------------------- ### MythicMechanicLoadEvent Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.0.x_changelogs.md Developers can add custom mechanics at runtime using MythicMechanicLoadEvent. Examples will be provided on the manual and API forum. ```java public class MythicMechanicLoadEvent - MythicMechanicLoadEvent - Called on startup/reload for each custom condition referenced in the plugin. ``` -------------------------------- ### RandomMessage Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/2.1.x_changelogs.md Sends a random message from a defined list to targets. This example demonstrates flexible skill formatting. ```yaml Skills: - randommessage{ m= "message 1", "message 2", "message 3"; } @PIR{r=20} ~onInteract - someotherskill ``` -------------------------------- ### Metaskill with OnFailSkill (Single Skill) Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Metaskills.md This example shows how to define a metaskill that executes another skill if its conditions fail. The 'OnFailSkill' alias is used here. ```yaml ExampleSkill: Conditions: - day true OnFailSkill: ExampleSkill2 ``` -------------------------------- ### Projectile Skill: Hit Conditions Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/projectile.md This example demonstrates using 'hitConditions' to specify that the projectile should only hit monsters that are not frozen. ```yaml - projectile{hitConditions=[ - isMonster true - isFrozen false ]} ``` -------------------------------- ### Disengage Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/disengage.md This example shows how to apply the disengage skill to a mob when it is damaged. The skill is triggered by the 'onDamaged' event. ```yaml ExampleMob: Skills: - disengage @trigger ~onDamaged ``` -------------------------------- ### targetnotwithin Condition Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Conditions/targetnotwithin.md This example demonstrates how to use the 'targetnotwithin' condition in MythicMobs. It checks if the target is more than 10 units away. ```yaml Conditions: - targetnotwithin{d=10} true ``` -------------------------------- ### Alternative Equipment Syntax Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.4.x_changelogs.md Demonstrates alternative syntaxes for equipping items, including specifying the slot and optionally the amount and chance. ```yaml Equipment: - iron_sword:0 - iron_sword:hand - iron_sword hand - iron_sword hand 1 0.1 //(you still have to enter amount before chance)// ``` -------------------------------- ### Self Targeter Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/Self.md This example demonstrates how to use the @Self targeter to apply a skill to the caster. It is commonly used in skill configurations. ```yaml ExampleSkill: Skills: - ignite @Self ``` -------------------------------- ### Multiply Global Score Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/modifyglobalscore.md This example demonstrates how to multiply the global score of 'someobjective' by 2. The 'modifyglobalscore' mechanic is aliased as 'mgs'. ```yaml Skills: - modifyglobalscore{objective=someobjective;action=multiply;v=2} ~onAttack ``` -------------------------------- ### Calling Skills with Shorthand Syntax Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.6.x_changelogs.md Demonstrates the new shorthand syntax for calling skills. This is useful for quick skill references in configurations. ```yaml Skills: - skill:someskill ~onAttack ``` -------------------------------- ### Wait Mechanic Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/Wait.md This example demonstrates using the Wait mechanic to pause a skill until the caster is on the ground, with a timeout of 300 ticks. ```yaml GroundSlam: Skills: - jump{v=5} - delay 5 - wait{cond=[ - onground ];tt=300} - explode ``` -------------------------------- ### Swing Offhand Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/SwingOffhand.md This example demonstrates how to use the swingoffhand mechanic within a MythicMobs skill. It is triggered on damaging a target. ```yaml Skills: - sudoskill{s=[ - swingoffhand @self ]} @trigger ~onDamaged ``` -------------------------------- ### onBucket Trigger Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onBucket.md This example demonstrates how to use the onBucket trigger to execute a series of skills when a 'Cow' mob is milked or stored in a bucket. The skills include sending a message, playing a sound, and causing an explosion. ```yaml ANormalCow: Type: Cow Skills: - skill{s=[ - message{m="HOW DARE YOU?!?!?"} @trigger - sound{s=entity.creeper.primed} - explosion{yield=5;delay=30} ];cd=2} @self ~onBucket ``` -------------------------------- ### Spin Mechanic Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/Spin.md This example demonstrates how to apply the spin mechanic to a spider, making it spin for 100 ticks with a velocity of 20. ```yaml SpinningSpider: Type: SPIDER Skills: - spin{duration=100;velocity=20} @self ~onTimer:100 ``` -------------------------------- ### Show Simple Dialog Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/ShowDialog.md Displays a basic dialog named 'WelcomeNotice' to the player who triggered the skill. Ensure 'WelcomeNotice' is defined in your Dialogs/ folder. ```yaml Skills: - showDialog{dialog=WelcomeNotice} @trigger ``` -------------------------------- ### Example Mob AI Target Selectors Configuration Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/Custom-AI.md This example demonstrates how to configure AIGoalSelectors and AITargetSelectors for a mob. It includes clearing existing goals, melee attacks, random strolling, and targeting players and golems. ```yaml SuperMob: Type: zombie Health: 200 Display: 'Superb Zombie' AIGoalSelectors: - clear - meleeattack - randomstroll AITargetSelectors: - clear - players - golems ``` -------------------------------- ### Bounding Boxes Overlap Condition Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Conditions/BoundingBoxesOverlap.md Example of using the boundingBoxesOverlap condition in a MythicMobs configuration. Set to 'false' to check for non-overlap. ```yaml TargetConditions: - boundingBoxesOverlap false ``` -------------------------------- ### MythicMobs Example Item with Enchantments Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Items/Enchantments.md An example demonstrating how to apply multiple enchantments, including a custom one, to a diamond pickaxe. This shows the application of standard enchantments and custom namespace enchantments. ```yml lethal_pickaxe: Id: diamond_pickaxe Enchantments: - SHARPNESS 3 - KNOCKBACK 1 - mythic:example_enchant 2 ``` -------------------------------- ### Example of Trigger Targeter Usage Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/Trigger.md This example demonstrates how to use the @trigger targeter in a MythicMobs skill configuration. It targets the entity that interacted with the skill. ```yaml TomTheMurderous: Type: COW Skills: - damage{a=20} @trigger ~onInteract ``` -------------------------------- ### Metaskill Override Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Metaskills.md A skill with its own targeter overrides the inherited targets. This example ignites all players in a 10-block radius but only messages the nearest player. ```yaml #MOB FILE ExampleMob: Type: ZOMBIE Skills: - skill{s=ExampleSkill} @PIR{r=10} ~onInteract ``` ```yaml #SKILL FILE ExampleSkill: Skills: - ignite - message{m="Why are you so close?"} @NearestPlayer{r=1} ``` -------------------------------- ### ForwardWall Targeter Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/ForwardWall.md This example demonstrates how to use the ForwardWall targeter to apply an effect to a plane of blocks. The plane is positioned 5 blocks away, with a y-offset of 1, a height of 2, and a width of 2. ```yaml ExampleSkill: Skills: - effect:particles @ForwardWall{f=5;y=1;h=2;w=2} ``` -------------------------------- ### Basic Mob Configuration with Level Display and Modifiers Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/Levels.md This example shows a basic mob configuration with a display name that includes the mob's level and defines how health and damage scale per level. ```yaml Zombie: Type: zombie Health: 100 Damage: 10 Display: '&5Zombie Lvl - ' Options: MovementSpeed: 0.3 Drops: - myDroptable LevelModifiers: Health: 5 Damage: 0.5 ``` -------------------------------- ### Ignite Last Attacker Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Targeters/InteractionLastAttacker.md This example demonstrates how to ignite the last entity that attacked the caster. It is configured to trigger once every 100 ticks. ```yaml ExampleInteractionEntity: Type: INTERACTION Skills: - ignite @interactionLastAttacker ~onTimer:100 ``` -------------------------------- ### ToggleLever Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/togglelever.md This example demonstrates how to use the togglelever skill to activate a lever at specific coordinates for 600 ticks (30 seconds). ```yaml OpenSecretDoor: Skills: - togglelever{duration=600;x=15;y=67;z=-213} ``` -------------------------------- ### Iterating over a Map with ForEachValue Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/ForEachValue.md This example shows how to iterate over a map where keys are player names and values are associated data. The 'ExampleSkill' is executed for each key-value pair, with '' and '' available. ```yaml ExampleForEachValueForMap: Skills: - setvariable{var=skill.mapnames;type=MAP;val="Steve=hello;Alex=1,2,3"} @self - foreachvalue{skill=ExampleSkill;values=} @self # Can also directly use the key=value;key2=value2... syntax ExampleSkill: Skills: - message{m="You have a value of "} @PlayerByName{name=} ``` -------------------------------- ### Basic Placeholder with Meta Keywords Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Placeholders/Meta-Placeholders.md Illustrates the general syntax for appending meta keywords to a placeholder. ```yaml ``` -------------------------------- ### Check Aura Type Condition - MythicMobs Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Conditions/HasAuraType.md This example shows how to use the 'hasAuraType' condition to check if the target entity has an aura of type 'Example'. ```yaml Conditions: - hasAuraType{type=Example} true ``` -------------------------------- ### Example Mob Configuration: Move Through Village Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Mobs/ai/goals/movethroughvillage.md This configuration demonstrates how to implement the 'movethroughvillage' AI goal for a ZOMBIE mob, setting its movement speed. ```yaml ExampleMob: Type: ZOMBIE AIGoalSelectors: - clear - movethroughvillage{s=2} ``` -------------------------------- ### TriggerConditions Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.0.x_changelogs.md Demonstrates the use of TriggerConditions to ensure a skill only casts if the triggering entity meets specific criteria. This example requires the trigger to be a ZOMBIE. ```yaml Skill: TriggerConditions: - entitytype ZOMBIE true Skills: ... ``` -------------------------------- ### Play Block Hit Sound Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Mechanics/PlayBlockHitSound.md This example demonstrates how to use the blockhitsound skill to play the target block's hit sound. This skill is only available on Paper servers. ```yaml Skills: - blockhitsound @targetlocation ``` -------------------------------- ### MetaskillCondition Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Conditions/MetaskillCondition.md Applies a Metaskill named 'metaskillcondition_check' with custom parameters 'hello' and 'world'. If the condition passes, a message is displayed. ```yaml YourNormalMetaskill: Conditions: - metaskillcondition{skill=metaskillcondition_check;hello=ciao;world=mondo} Skills: - message{m="Condition Passed"} @self metaskillcondition_check: Conditions: - holding{types=stick} Skills: - log{message=metaskill condition passed with parameters of } @self - determineCondition{det=true} @self ``` -------------------------------- ### TargetConditions Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/4.0.x_changelogs.md Shows how to use TargetConditions to filter which targets a skill will affect. In this example, only targets within the mob's line of sight will be ignited. ```yaml # Mob TestMob: Type: ZOMBIE Skills: - skill{s=Flare} @PlayersInRadius{r=20} # Skill Flare: TargetConditions: - lineofsight true Skills: - ignite{d=10} ``` -------------------------------- ### Particle Effect with Color Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/changelogs/2.3.x_changelogs.md Example of applying a color attribute to a particle effect. This specific example uses the 'reddust' particle and sets its color to magenta. ```yaml effect:particles{p=reddust;color=#FF00FF} ``` -------------------------------- ### Villager Trade Skill Example Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onTrade.md This example demonstrates how to send a message to all players in the world when a villager trades with a player. The skill is activated by the onTrade trigger. ```yaml EXAMPLE_MOB: Type: VILLAGER Skills: # sends a message to all the players in the world # when the mob's target changes - message{m=TRADED} @World ~onTrade ``` -------------------------------- ### MythicMobs Spawner Timing Explanation Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Spawners.md This note clarifies the sequence of events for spawner activation and mob spawning. It illustrates the order of warmup, mob spawning, and cooldown periods. ```text Timing: warmup-> mob spawns-> cooldown-> mob spawns*> ``` -------------------------------- ### Example: Sending a Message on Damage Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Triggers/onDamaged.md This example demonstrates how to send a message to all players in the world when a mob takes damage. The skill is activated by the onDamaged trigger. ```yml EXAMPLE_MOB: Type: CHICKEN Skills: # sends a message to all the players in the world # when the mob takes damage - message{m=DAMAGED} @World ~onDamaged ``` -------------------------------- ### New Way: Generic Skill with Parameters Source: https://github.com/mythiccraft/mythicmobs.wiki/blob/master/Skills/Metaskills.md Illustrates how skill parameters enable a single generic skill definition that accepts dynamic damage values from the calling skill. ```yaml #SKILL FILE ShadowDamage: Skills: - damage{amount=} #MOB FILE Mob1: Skills: - skill{s=ShadowDamage;damage=20} ~onAttack ```