Skip to main content

MythicMobs NPC

MythicMobs mobs and BetterModel or ModelEngine models as interactive NPCs, with cinematics and quest objectives.

Paidv5.0Entities & models

Overview​

MythicMobs NPC turns a MythicMobs mob into a TypeWriter NPC. You keep designing the mob, its model and its skills in MythicMobs, then place it in the world from the web panel as an NPC definition (what the NPC is) and an NPC instance (where it stands and who sees it).

An NPC can show a name above its head, display quest markers, start a dialogue when a player right-clicks it, be hidden or shown by an action, play animations, and appear in cinematics. Models from BetterModel or ModelEngine are supported.

The extension runs on Paper. By default each player gets their own copy of the NPC (ticking off), so one player's cinematic or hide action never affects the others. Turn ticking on to get a real server-side mob that can walk around.

Features​

  • NPC definition and instance — define a MythicMob NPC once and place it as many times as you want, with a shared, per-player or per-group audience.
  • Name tag and quest markers — a floating name, and a ❗, ❓ or 💬 marker when the NPC has an objective or a dialogue for the player.
  • Interaction events — start dialogues on a right-click, filtered by sneaking, plus an event for hits in either direction.
  • Quest objectives — interact with an NPC, loot items from MythicMobs mobs, or count interactions with a mob.
  • Facts and variables — presence, distance, visibility, health, threat table, animations, level, power, faction, stance and any MythicMobs variable.
  • Show, hide and animate — actions to show or hide an NPC and to play or stop a ModelEngine or BetterModel animation.
  • Cinematics — NPC focus camera, camera attached to a model bone, NPC driven by a recorded tape, and MythicMobs skills cast at a position.
  • Camera and look-at bounds — force the player to look at an NPC or the nearest mob of a type during an interaction.
  • Stances — day and night idle and walk stances, plus interaction, attack and other stances, through ModelEngine or BetterModel.

Installation​

  1. Install MythicMobs and PacketEvents on the server.
  2. In TypeWriter, make sure the official Entity, Basic, Quest and Road Network extensions are installed. The build declares Quest and Road Network as dependencies and uses the Entity and Basic extensions at runtime.
  3. Optional: install BetterModel or ModelEngine for 3D models. BetterModel is checked first and ModelEngine is used when BetterModel is absent. Install Geyser if Bedrock players must see the bone camera.
  4. Obtain the extension from the stores (see the buttons in the summary panel above) and put the JAR in plugins/Typewriter/extensions/.
  5. Restart the server. The console prints MythicmobsNPCExtension has been successfully initialized.
  6. Create your mobs in MythicMobs (and attach their model there). The extension spawns and shows them but does not create or change the model.

Getting started​

Place a blacksmith that starts a dialogue when a player right-clicks it:

  1. In MythicMobs, create a mob with the internal name Blacksmith (with its model if you use one) and reload MythicMobs.
  2. In the TypeWriter web panel, open a static page and add a MythicMob NPC Definition. Set displayName to the name shown above the head and mobType to Blacksmith.
  3. Add a MythicMob NPC Instance. Link definition to the definition and set spawnLocation (with rotation) to where the NPC stands.
  4. Add a MythicMob NPC Interact Event. Link definition to the same definition and keep shiftType on ANY.
  5. In its triggers, link a dialogue entry (for example a spoken dialogue) from a sequence page.
  6. Publish and right-click the NPC. A 💬 marker shows above the NPC for players who can talk to it.

To make it a quest target, add an Interact MythicMob NPC Objective with entity set to the definition: the marker becomes ❓ (or ❗ when the quest is tracked) and a path stream leads to the NPC.

Choosing the mode

Leave ticking off for static NPCs: each player sees their own copy, which is what cinematics and per-player visibility need. Turn it on only when the mob must move or fight on the server, and set clientSideRadius above 0 so its AI stays enabled.

How it works​

The definition holds what the NPC is: mob type, name, name tag options, ticking mode, and the entity data that apply to every instance. The instance holds where it stands, its own entity data, an optional activity (for example a road network path) and a group.

Facts, variables, show and hide actions and the camera entries all refer to an instance. They find the live mob of the definition's mob type that is within a search radius of the instance's spawn point (5 blocks by default, set by radius on the target).

Configuration​

Texts and offsets that are not entry fields are TypeWriter snippets. Edit them in plugins/Typewriter/snippets.

SnippetDefaultPurpose
objective.entity.indicator.tracked<gold><b>❗Marker when the NPC is the target of the tracked quest.
objective.entity.indicator.normal<blue><b>❓Marker when the NPC is the target of an active objective.
objective.entity.indicator.dialogue<white><b>💬Marker when the NPC has an available interaction.
entity.nameplate<other> then <reset><display_name>Layout of the name tag. <other> is the lines from the entity data.
entity.name.color#40000000Background colour of the name tag and marker.
quest.objective.interact_mythicmob_npcInteract with <entity>Default text of the interact objective.
advancedQuest.display<display> (<current>/<required>), in grey tonesLine of the counting objectives (loot, skill) while in progress. Placeholders: <display> (the objective display text), <current>, <required>. The key is shared with the other BTC objective extensions, so one edit restyles all of them.
advancedQuest.completed✔ then the struck-through <display> and (<current>/<required>)Same line once amount is reached. Same placeholders.
mythicmob_npc_look_at_interaction_bound.look_back_delay500Milliseconds the player can look away before the look-at bound turns them back.
mythicmob_type_look_at_interaction_bound.look_back_delay500Same, for the look-at bound by mob type.

Entries​

38 entries, generated from the extension source.

Actions4
Events3
Objectives3
Facts6
Cinematics4
Entities2
Entity data4
Interaction bounds3
Variables9

Troubleshooting​

The NPC never appears. The console prints Could not spawn MythicMob NPC '<type>' at <location> when mobType is not a MythicMobs mob name or the spawn fails. mobType is the mob's internal name, with the same capitalisation as in MythicMobs. Check that MythicMobs loaded the mob and that the chunk of spawnLocation can load.

The extension warns that MythicMobs is missing. On startup the log says MythicMobs plugin not found! This extension requires MythicMobs to function properly. Install MythicMobs and restart.

Facts and variables always return their default. They resolve the live mob near the instance's spawn point. If the NPC moved further than radius (default 5 blocks), or the mob type differs, nothing matches and the fact returns 0. Increase radius in the target.

The dialogue does not start on click. The interact event only reacts to an NPC placed by a MythicMob NPC Instance, and definition must be the instance's definition. interactionType chooses the click: RIGHT_CLICK, LEFT_CLICK or ALL. Before version 4.9.1, only right-clicks were handled, and on Paper 26.x not even those: update the extension.

Players do not share the NPC. With ticking off and no group on the instance, every player gets their own copy, so one player's hide action or cinematic does not affect others. Set a group on the instance to share the NPC inside a party or guild.

A bone is not hidden or attached. Bone Visibility Data and Attachment Data are applied to the model as soon as it exists and after every respawn, with ticking on and off. A bone or model name the model does not know is skipped and the console logs it: check the names against the model.

The bone camera shows nothing or the player keeps the normal view. boneName must exist on the model, and the mob must be spawned for that player. With an Entity Cinematic, use entityCinematic so the camera follows exactly that mob. The camera starts at the player's eyes and snaps to the bone as soon as the model is found.

The model flickers when the player or the camera is close to the NPC. This is ModelEngine culling: ModelEngine judges from the model's feet whether the model is behind the player (backcull) or behind blocks (blockedcull), and up close it wrongly hides the model, then shows it again. From version 4.9.1, the extension turns both culls off on every NPC as soon as its ModelEngine model is detected, so there is nothing to configure. If the flicker remains, look for the console warning ModelEngine exposes no back/blocked cull setter: it means your ModelEngine version does not let the extension change these settings. Then add cullconfig{backcull=false;blockedcull=false} @self ~onSpawn to the skills of the MythicMobs mob, after its model mechanic, and respawn the NPC. BetterModel models are not affected.

An animation started by the mob's skills does not show. With ticking off, an animation started from the mob's own skills, such as state{...} @self ~onSpawn, may never show, or show for a single tick, most often in cinematics. The same mob spawned with /mm m spawn plays it fine. For these NPCs, MythicMobs runs the mob's ~onLoad skills right after its ~onSpawn skills; when the mob also declares its model on ~onLoad (the usual model{...} @self ~onLoad line), the model is rebuilt and the animation is lost. Play the animation from TypeWriter with Mythicmob NPC Play Animation instead: it plays above the NPC's idle, walk and skill animations and waits for the model. If the animation must stay in MythicMobs, repeat the same state{...} line with the ~onLoad trigger:

MyNpcMob:
Skills:
- model{mid=my_model} @self ~onSpawn
- model{mid=my_model} @self ~onLoad
- state{mid=my_model;s=my_animation} @self ~onSpawn
- state{mid=my_model;s=my_animation} @self ~onLoad

An animation stays frozen on its first frame. Before version 4.9.1, a play animation action whose speed was left empty in the panel was saved with a speed of 0, which froze the animation. Update the extension: a speed of 0 or less now plays at normal speed.

The NPC is missing from a cinematic in another world. Before version 4.9.1, when the camera of a cinematic moved the player to another world, the NPC of a MythicMob NPC Entity Cinematic stayed in the player's previous world, so it only showed after a few launches. Update the extension: the NPC now follows the player into the cinematic's world.

  • MythicMobs — spawn, skill and kill entries for regular MythicMobs mobs.
  • BetterModel — BetterModel models as NPCs, with the same cinematic approach.