MythicMobs
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
grouprestricts 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
- Install MythicMobs on the server.
- Install the official TypeWriter
Questextension. - 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 disabledand private mobs stay visually private but not silent. - Put the MythicMobs extension JAR in
plugins/Typewriter/extensions/. - Restart the server.
Getting started
Make a boss appear only for the player who accepted a quest, and complete an objective when it dies:
- In MythicMobs, create the mob, for example
CryptKing. - In the TypeWriter web panel, open a sequence page and add a Spawn Mob action.
- Set
mobNametoCryptKing,levelto1,spawnLocationto the spot (capture the position in game), and turnonlyVisibleForPlayeron. - Link a trigger or a criteria so the action runs when the quest starts.
- Open the quest page and add a MythicMob Kill Objective. Link the
quest, afact(a cachable fact that stores the progress), setmythicMobNametoCryptKing,amountto1and write thedisplaytext. - Optionally set
onCompleteto a sequence that gives the reward. - Publish and test: other players cannot see, hit or hear the boss.
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.
- Create a fact (for example
in_arena) and set it for the players who enter the arena. - Add a Spawn Mob action and fill
visibilityCriteriawith that fact. The criteria are re-checked everyvisibilityRefreshInterval(1 second by default): a player who leaves the arena loses the mob at once, and the mob drops its target. - Start the fight from a trigger of your choice.
- End it with a Despawn Mob action with
scopeset toVISIBLE_TO_PLAYER, which removes only the mobs the player sees, or let the mob leave on its own withabandonRange(above 0) andabandonDelay: it is removed when no allowed player stays within range for the delay. The web editor pre-fills new durations with 1 second, so checkabandonDelay. - Optional: set
collidabletofalseto 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.
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: nearbyto make a mob visible only to the nearest player (within 100 blocks) when it spawns. Mobs that spawn with the reasonsNATURAL,RANDOMorRANDOM_SPAWNget the same treatment, even without the option. Mobs already restricted by a TypeWriter entry are left alone. -
Mob matching. The
mobNamefields 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) andadvancedQuest.completed(amount reached, default✔then the struck-through<display>and the progress). Placeholders:<display>(the objectivedisplayfield),<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
- Despawn Mythicmobs MobDespawn a mob from MythicMobs
- Execute Mythicmob SkillExecutes a MythicMobs skill
- Spawn Mythicmobs MobSpawn a mob from MythicMobs
Events3
- Mythicmobs Interact EventMythicMob Interact Event
- Mythicmobs Kill Player EventMythicMob Kill Player Event
- On Mythic Mob DieWhen a player kill a MythicMobs mob.
Objectives1
- Mythicmob Kill ObjectiveAn objective to kill MythicMobs mobs
Facts4
- Mythic Mob Count FactCount the number of active Mythic Mobs of the specified type
- Mythicmob FactionMythicMob Faction
- Mythicmob LevelMythicMob Level
- Mythicmob StanceMythicMob Stance
Cinematics2
- Mythicmob CinematicSpawn a MythicMob during a cinematic
- Mythicskill CinematicTrigger a MythicSkill during a cinematic
Definitions1
- Mythic SpawnerMythicMobs Spawner with Corner System
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.
Related extensions
- MythicMobs NPC — use MythicMobs mobs as interactive NPCs.