Skip to main content

MythicMobs

Spawn MythicMobs mobs, cast skills, kill objectives and region spawners from TypeWriter.

Freev0.12Integrations
RequiresTypeWriter0.9Quest (TypeWriter extension)MythicMobsPacketEventsoptional

Overview​

MythicMobs connects the MythicMobs plugin to TypeWriter. The mobs and skills are still defined in MythicMobs; TypeWriter decides when and for whom they appear. You can spawn or despawn a mob from a sequence, cast a skill, react when a player kills or interacts with a mob, count kills as a quest objective, or let a region spawn mobs as long as players are nearby.

Mobs can be made private. A mob spawned with onlyVisibleForPlayer or a visibilityGroup is shown only to the player or the group, cannot be hurt by, target or be clicked by anyone else, and its sounds and particles are hidden from other players. This is what makes personal boss fights and per-player quest mobs possible on a shared server.

Since 0.12, visibility can also follow TypeWriter facts: with visibilityCriteria, a mob is seen, targeted and hurt only by the players who meet the criteria, re-checked continuously. A private arena driven by facts needs no group.

The extension runs on Paper and Folia and needs the TypeWriter Quest extension for the kill objective. The real source repository is Typewriter-MythicMobs.

Features​

  • Spawn and despawn — spawn a mob at a position with a level, or remove every active mob of a type.
  • Skill casting — run a MythicMobs skill as the player, from an action or from a cinematic segment.
  • Mob events — start sequences when a player kills a mob, is killed by a mob, or right-clicks a mob.
  • Kill objective — a quest objective that counts MythicMobs kills by name or regular expression, and counts kills by projectiles and tamed pets.
  • Region spawner — spawn mobs in one or several boxes when players are close, with a cap, a cooldown and a warmup. An optional group restricts it to the members of a group, each group with its own cycle.
  • Private mobs — visibility restricted to a player, a group or the players who meet criteria (facts), including damage, targeting, interaction, sounds and particles.
  • Cinematic mobs — spawn a mob during a cinematic, hidden from every other player, and cast skills on a timeline.
  • Mob count fact — how many mobs of a type are currently active, for dialogues and conditions.

Installation​

  1. Install MythicMobs on the server.
  2. Install the official TypeWriter Quest extension.
  3. Recommended: install PacketEvents. It is used to hide the sounds and particles of private mobs. Without it the extension logs PacketEvents not loaded — sound isolation disabled and private mobs stay visually private but not silent.
  4. Put the MythicMobs extension JAR in plugins/Typewriter/extensions/.
  5. Restart the server.

Getting started​

Make a boss appear only for the player who accepted a quest, and complete an objective when it dies:

  1. In MythicMobs, create the mob, for example CryptKing.
  2. In the TypeWriter web panel, open a sequence page and add a Spawn Mob action.
  3. Set mobName to CryptKing, level to 1, spawnLocation to the spot (capture the position in game), and turn onlyVisibleForPlayer on.
  4. Link a trigger or a criteria so the action runs when the quest starts.
  5. Open the quest page and add a MythicMob Kill Objective. Link the quest, a fact (a cachable fact that stores the progress), set mythicMobName to CryptKing, amount to 1 and write the display text.
  6. Optionally set onComplete to a sequence that gives the reward.
  7. Publish and test: other players cannot see, hit or hear the boss.
Reacting to a kill without a quest

Use Mob Death Event with a mobName and link triggers to the sequence to run. It fires when a player is the killer of the mob.

Combat visible only to some players​

A private arena: only the players who meet some facts see the mob, are targeted by it and can fight it.

  1. Create a fact (for example in_arena) and set it for the players who enter the arena.
  2. Add a Spawn Mob action and fill visibilityCriteria with that fact. The criteria are re-checked every visibilityRefreshInterval (1 second by default): a player who leaves the arena loses the mob at once, and the mob drops its target.
  3. Start the fight from a trigger of your choice.
  4. End it with a Despawn Mob action with scope set to VISIBLE_TO_PLAYER, which removes only the mobs the player sees, or let the mob leave on its own with abandonRange (above 0) and abandonDelay: it is removed when no allowed player stays within range for the delay. The web editor pre-fills new durations with 1 second, so check abandonDelay.
  5. Optional: set collidable to false to remove collision and pushing. It then applies to everybody.

All damage tied to a restricted mob (melee, projectiles, MythicMobs skills, fire) is blocked towards the players who are not allowed, and the other way round. Projectiles pass through.

Skills that deal no damage (potion, throw...) cannot be traced to a player. Add the MythicMobs target condition typewritervisible (alias twvisible) to them: it is true only when the target is allowed to see the caster.

Inline, as a condition of the targeter. Keep the two spaces after [ and the one before ], MythicMobs needs them:

Skills:
- potion{type=SLOW;duration=100} @PlayersInRadius{r=10;conditions=[ - twvisible true ]} ~onTimer:40

Do not write ?twvisible at the end of the line: MythicMobs checks those conditions on the mob, not on the players it targets.

Or in a metaskill. Its own lines take no targeter: they run on each target that passed the condition.

# Mobs file
Skills:
- skill{s=ArenaBossSlow} @PlayersInRadius{r=10} ~onTimer:40

# Skills file
ArenaBossSlow:
TargetConditions:
- twvisible
Skills:
- potion{type=SLOW;duration=100}

twvisible false in the targeter is the opposite: only the players who may not see the mob.

note

MythicMobs reads its files before Typewriter loads. When twvisible appears in them, the extension runs /mm reload once at server start, so you have nothing to do. The condition keeps working after a Typewriter reload. If Typewriter is stopped, it lets every player through and logs one warning asking for /mm reload.

Limits. Collision is all or nothing. Non-damaging skills are not filtered without twvisible. Sounds and particles played far from the mob are not hidden. A mob whose source entry is deleted stays hidden from everyone. After a server restart, a mob with abandonRange is removed if no allowed player comes near within abandonDelay.

How it works​

Configuration​

Most settings are entry fields. Two behaviours are worth knowing:

  • Automatic isolation. In the MythicMobs mob file, set Options.VisibilityGroup: nearby to make a mob visible only to the nearest player (within 100 blocks) when it spawns. Mobs that spawn with the reasons NATURAL, RANDOM or RANDOM_SPAWN get the same treatment, even without the option. Mobs already restricted by a TypeWriter entry are left alone.

  • Mob matching. The mobName fields of the events are regular expressions matched against the MythicMobs internal name, not case-sensitive in Mob Death Event and MythicMob Interact Event. Use .* to match any mob.

  • Objective display format. The MythicMob Kill Objective line in the quest tracker is not hardcoded. It is read from two TypeWriter snippets, edited in plugins/Typewriter/snippets.yml: advancedQuest.display (in progress, default <display> (<current>/<required>) in grey tones) and advancedQuest.completed (amount reached, default ✔ then the struck-through <display> and the progress). Placeholders: <display> (the objective display field), <current> and <required>; PlaceholderAPI placeholders are also parsed. The two keys are shared with the other BTC objective extensions, so one edit restyles every counting objective.

Entries​

14 entries, generated from the extension source.

Actions3
Events3
Objectives1
Facts4
Cinematics2
Definitions1
Placeholder facts

MythicMob Faction, MythicMob Level and MythicMob Stance always return 0 in the current release. They are reserved for a later version: do not build conditions on them.

Troubleshooting​

Nothing spawns. mobName must be the MythicMobs internal name of an existing mob. If the mob is unknown, Spawn Mob silently does nothing. Compare it with the mob file name in MythicMobs.

"Skill ... not found" error in the log. Execute Skill and Skill Cinematic throw this error when skillName is not a MythicMobs skill. If the log says the skill "is not usable at this time", it is on cooldown or its conditions failed.

A spawner never spawns. The player must be within defaultActivationRange (24 blocks by default, measured to the centre of the region) of a region. The spawner is checked once per second and starts about five seconds after the server starts. Also check criteria, that warmup has elapsed, that the cooldown (defaultCooldown, in ticks) has passed and that the mob count in range is under defaultMaxMobs. Set the mobType correctly: the log says Cannot find MythicMob ... otherwise.

Other players still see a private mob. Visibility only applies to mobs spawned by TypeWriter entries, by the nearby option or by natural spawns. Other mobs stay public. The spawn action also needs a player: with visibilityGroup set but the player in no group, the mob falls back to the triggering player only.

The kill objective does not count. The objective only counts while the quest is active for the player and the player (or their projectile or tamed pet) delivers the kill. If mobs is not empty, mythicMobName is ignored. Check that the fact is a cachable fact entry.

The kill-player event never fires. MythicMob Kill Player Event matches mythicMobType as a case-sensitive regular expression against the internal name of the mob that caused the death. Leave it empty to match any MythicMob.