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 139
    • Issues 139
    • 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
    • Guides
  • Making an NPC

Last edited by Brickgard Mar 24, 2025
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Making an NPC

Difficulty: Beginner

Using a few basic tricks you can use MythicMobs to create highly versatile NPC's. The basic idea is to create a mob that has no AI/movement and doesn't despawn. We can then attach various mechanics and skills to our NPC mob such as messages, commands, or any skill you can think of.

Step 1 - Basic NPC

The first step is simply making your mob file, this can be anywhere, for this example we'll make a NPC subfolder.

Using the below mob as a base, we can make a simple NPC that just stands still. We are using LibsDisguises to make the mob look like a player.

plugins/MythicMobs/Mobs/NPC/Steve.yml

NPC_Steve:
  Type: INTERACTION
  Display: 'Steve'
  Disguise: Player Steve setDynamicName true
  Options:
    AlwaysShowName: true
    Despawn: persistent
  • NPC_Steve This is what you'll use to spawn your NPC. /mm m spawn NPC_Steve
  • Type: INTERACTION You can use whatever you like but we'll be using an interaction entity since it has no AI, no sound etc.
  • Display: 'Steve' This is what will appear above your NPC's head.
  • Disguise: Player Steve setDynamicName true This is what makes our NPC look like a player. You can replace "Steve" with whatever player name you want. You must keep the setDynamicName as true so the NPC can use the Display setting. For more information about using custom skins read here
  • AlwaysShowName: true This makes the nameplate show above your NPC.
  • Despawn: persistent This will keep your NPC spawned on reloads, restarts and chunk unloads.

Step 2 - Adding messages and commands

You can add messages or commands to your NPC using the Message and Command mechanics. For this guide we will be using @trigger and onInteract which will show the message or run the command for a user who right clicks the NPC. When you are testing make sure you're in SURVIVAL mode as creative mode players wont be targetable.

Message

This example will send a message to the player when they right click the NPC. We are adding the Universal Attribute cd=3 which will give it a cooldown of 3 seconds between clicks.

  Skills:
  - message{m=&bWelcome to Hypixel &a<trigger.name>&b!;cd=3} @trigger ~onInteract

Commands

This example will open a menu from DeluxeMenus for the player who right clicks the NPC.

  Skills:
  - command{c="dm open shops-blocks <trigger.name>"} @trigger ~onInteract

You can add as many skills or mechanics as you like to your NPC, not just messages and commands. You can run any mechanic and any metaskill.

Step 3 - ModelEngine (Optional)

If you want your NPC to use a ModelEngine model we can remove the disguise line and instead use 2 skills to apply a model to it. We will be using onSpawn and onLoad to make sure the model is always applied to the mob even after restarts.

You will also need to add a nametag bone to your models to display the name above them. You can do this by opening your model in Blockbench and creating an empty bone and calling it tag_name, then upload the newly edited model to your Blueprints folder and use /meg reload.

plugins/MythicMobs/Mobs/NPC/Steve.yml

NPC_Steve:
  Type: INTERACTION
  Display: 'Steve'
  Options:
    AlwaysShowName: true
    Collidable: false
    Despawn: persistent
  Skills:
  - model{m=SteveModel;n=name;save=true} @self ~onSpawn

With the model mechanic the attributes are

  • m=SteveModel This is where the name of your model goes, for example we have plugins/ModelEngine/Blueprints/SteveModel.bbmodel
  • n=name This is the name of our nametag bone we created.
  • save=true Tells ModelEngine that the model should be preserved, even across restarts

Step 4 - Spawning the NPC

You can now use /mm reload to reload the modified files and add your NPC into the server. Simply stand where you want the NPC to be and use /mm m spawn NPC_Steve.

You now have a NPC created by MythicMobs.

Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

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
    • Mechanics by Tag
  • 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