ThePredictdocs v0.0.1 RC

Authoring

Movement & goals

What each tactic movement does, how distances are measured, and the MythicMobs and Paper goals ThePredict installs on a bound mob.

Distances

Every movement works with the distance to the target, in blocks, and a few lines you set in the profile's Movement section (or inherit from profileDefaults).

KeyDefaultRuleUsed for
MeleeReach2.5greater than 0The MELEE band, where APPROACH stops, and the reach of melee skills.
Band.Inner5.0greater than MeleeReachKEEP_DISTANCE backs away when closer.
Band.Outer9.0greater than Band.InnerKEEP_DISTANCE closes in when farther.
RangedReach16.0at least Band.OuterUp to here the target is RANGED; farther, BEYOND.
Retreat.Distance10.0greater than 0Distance a RETREAT tries to open.
Retreat.Speed1.20.1 to 3Speed multiplier while retreating.
Approach.Speed1.150.1 to 3Speed while approaching, keeping distance and walking back to the arena.
Arena.Radiusno arenagreater than Band.OuterThe mob walks back to its spawn point when it gets farther.

Health works the same way: at or below Health.Critical (0.3) a creature is CRITICAL, at or below Health.Wounded (0.6) it is WOUNDED, above that HEALTHY. The ratio counts health plus absorption, for the mob and for players.

Movements

MovementWhat the mob does
APPROACHCloses in with the native navigator and stops at MeleeReach.
KEEP_DISTANCEBacks away when the target is closer than Band.Inner, closes in when it is farther than Band.Outer, and stays put in between.
RETREATMoves away over walkable ground until it has opened Retreat.Distance; with an arena, it stays inside it.
HOLDDoes not walk; keeps looking at the target and floating in water.
FLANKCircles a target that raises a shield until it is out of the blocking angle, and strikes from there. Only eligible against a raised shield, and it needs a Choice.
NONELeaves movement alone: the tactic only casts its skill. The only movement species with a Brain accept.

If a movement makes no progress for two decisions in a row (no movement goal running, or not getting closer or farther as it should), the intent is dropped with the reason NO_PROGRESS, typically when the target stands on a pillar, behind a wall or in water.

The goals ThePredict installs

With Predictor: true, ThePredict replaces the mob's movement goals with a set generated from the profile and installs it through the MythicMobs AI API (/thepredict inspect shows Goals: installed for revision <n>). Each tactical goal only runs while the current intent asks for its movement, through the predictormove condition. Only the movements some tactic uses get goals.

PriorityGenerated goalFor
0clear—
1floatalways
2goToSpawnLocation{maxrange=<Arena.Radius>;speed=<Approach.Speed>}only with an arena
3fleeConditional{distance=<Retreat.Distance>;speed=<Retreat.Speed>;mc=[ - predictormove{m=RETREAT} true ];targetconditions=[ - isTarget true ]}RETREAT
4fleeConditional{distance=<Band.Inner>;speed=<Approach.Speed>;mc=[ - predictormove{m=KEEP_DISTANCE} true ];targetconditions=[ - isTarget true ]}KEEP_DISTANCE (inner edge)
5moveWithinConditional{range=<Band.Outer>;speed=<Approach.Speed>;mc=[ - predictormove{m=KEEP_DISTANCE} true ]}KEEP_DISTANCE (outer edge)
6moveTowardsTargetConditional{speed=<Approach.Speed>;minrange=<MeleeReach>;maxrange=<FollowRange>;mc=[ - predictormove{m=APPROACH} true ]}APPROACH
7thepredict:flank (Paper goal)FLANK
8thepredict:hold (Paper goal)HOLD, whenever any movement is used
base + 10your base AI, without clearlevel 4 (BASE)
nextlookAtTarget, if the base AI lacks italways
lastthepredict:owner (ownership marker)—

The two flee goals carry targetconditions=[ - isTarget true ]: the mob only flees from its own target, never from the nearest living entity (which could be an ally). With Timing.TickLayer full, the Paper goal thepredict:micro takes priority 3 and goals 3 to 8 move down by one; the base AI does not move.

maxrange of APPROACH is the mob's FollowRange (without the decision.searchRadiusBlocks cap), or RangedReach when the mob has no follow range.

Base AI

The base AI is what the mob does at level 4, when ThePredict does not control it. ThePredict uses, in this order: the profile's BaseAI; otherwise the mob's AIGoalSelectors; otherwise 0 meleeAttack and 1 randomStroll. A clear line is dropped. If a line names a goal MythicMobs does not know, the installation is refused and the mob keeps its MythicMobs AI (install incomplete: 1 MythicMobs goals missing).

YAML
BaseAI:
- 1 meleeAttack
- 2 randomStroll

Mobs that do not take goals

Species with a Brain. Their vanilla AI is a brain, not a goal selector, so goals do not drive them. A profile for one of these species only accepts tactics with Movement: NONE; any other movement is an error such as species PIGLIN uses a Brain; only Movement: NONE is allowed. ThePredict installs no goals and inspect says Goals: not installed (MythicMobs keeps its AI). The species are:

allay, armadillo, axolotl, camel, frog, tadpole, goat, copper_golem, happy_ghast, nautilus, zombie_nautilus, sniffer, zoglin, breeze, creaking, hoglin, piglin, piglin_brute, warden, villager

A piglin guard: tactics without movementYAML
schemaVersion: 2
guard_piglin:
  MythicID: GuardPiglin
  Objective: Guard the gate and strike whoever comes close
  Choices:
    strike: { MythicID: GuardPiglinStrike }
  Tactics:
    strike_in_place: { Movement: NONE, Choice: strike }
    wait: { Movement: NONE }

Mobs that are not Creature (slime, magma cube, ghast, phantom, bat): MythicMobs gives them no movement goals, so ThePredict installs none either. inspect says Goals: not installed (MythicMobs keeps its AI) and the mob keeps its own AI.

Flyers and swimmers that are Creature do get goals, but their movement has not been tested and is not recommended in this release: ThePredict targets land mobs.

ThePredict 0.0.1 · release candidate. These pages describe this build, checked against its source code; it has not been verified on a live server yet.

ThePredict is an independent MythicMobs addon. Jev is TypeSafe's decision model; naming it does not imply endorsement. Fonts: Pixelify Sans, Inter and JetBrains Mono, under the SIL Open Font License.