ThePredictdocs v0.0.1 RC

Authoring

Skills & intents

How ThePredict reads your MythicMobs skills, the one-line Intention vocabulary that says what each skill is for, and the rules it follows when it casts them.

The Intention line

Each skill a choice points at says what it is for with one Intention line, next to its Cooldown. ThePredict reads it when the profile binds; MythicMobs ignores it.

plugins/MythicMobs/Skills/Guardian.ymlYAML
ThePredictGuardianMelee:
  Intention: DAMAGE, MELEE, DAMAGE_MEDIUM, WHEN_TARGET_IN_MELEE
  Cooldown: 2
  Skills:
  - delay 5
  - damage{a=6} @target

The line names what the skill does, never numbers. Reach, radius and wind-up come from the skill itself (see below). Jev never sees the primitive names either: it reads fixed English phrases built from them.

Writing rules

  • Write a YAML list or a comma-separated text. Primitives are read without regard to case, and - or inner spaces count as _.
  • A line holds at most 16 raw primitives and 400 characters. A valid line has 1 to 3 roles (the first is the primary one), exactly one delivery, at most one damage tier, up to 4 WHEN_ and 4 RISK_ primitives, optionally IGNORES_SHIELD, and at most one ANSWER_ primitive.
  • An unknown or repeated primitive is ignored with a warning; the rest of the line still counts. An unknown primitive that starts with WHEN_, RISK_, DAMAGE_ or ANSWER_ warns that it may need a newer ThePredict (FUTURE_TOKEN); any other is UNKNOWN_TOKEN.
  • An invalid line (no role, no delivery, too many of one family, or IGNORES_SHIELD together with RISK_BLOCKED_BY_SHIELD) is never used halfway: the choice becomes untyped (see untyped skills).
  • When ThePredict prints a line (/thepredict intention suggest), it uses the canonical order: roles (primary first), delivery, damage, WHEN_ and RISK_ in the order of the tables below, then IGNORES_SHIELD. That is why the example bolt reads WHEN_TARGET_FLEEING before WHEN_TARGET_AT_RANGE.
  • The vocabulary is versioned (currently v2). A primitive never changes its meaning or family, and no version is written in the line.

These warnings come from ThePredict when the profile binds. MythicMobs itself has no reason to reject the file because of this line.

Roles

1 to 3 per line. The first one is the primary role.

PrimitiveMeansHow ThePredict uses it
DAMAGEIts main end is to take health.Separates hits from everything else and turns on the damage checks before a cast (shield, invulnerability frames).
CONTROLStuns, slows, pushes or roots the target.Jev favors it to cut an escape or split a target; preferred against a raised shield.
GAP_CLOSECloses the distance at once.Makes an approach useful even when the target is far. With any_ready it fires while approaching, flanking, or keeping distance from beyond the band. It may also fire in melee when it deals damage and the target is in reach, or to punish an eating or drinking target; never during a retreat.
ESCAPEGets the caster away from danger at once.Fits only while moving away: with any_ready it fires on a retreat or while keeping distance inside the band. While evading at critical health it may fire with any movement except an approach.
DEFENSEReduces the damage the caster takes.Protecting rather than healing; fits low health or heavy pressure.
SUSTAINRestores the caster's health.Fits low health. With decision.pruning: safe, a sustain option is dropped from the question while the caster is healthy.
BUFFImproves the caster or its allies.An action without a target that does not compete with hits.
DEBUFFWeakens the target.Weakening rather than damaging.
SUMMONCreates allies.Changes how many fight on each side; Jev weighs it differently.
ZONEDenies an area for a while.Cutting paths or punishing kiting.
INTERRUPTCuts what the target is doing.Fits a target that drinks, eats or draws a bow.
FINISHERFinishes off a weakened target.Fits a target with critical health; counts as damaging.
OPENEROpens the fight with an advantage.Tells the first action of a fight from the routine.

Delivery

Exactly one per line.

PrimitiveMeansHow ThePredict uses it
MELEEA hit on a target within arm's reach.Reach is Movement.MeleeReach, or targetwithin when the skill has it.
PROJECTILEA projectile that travels and may miss.Dodgeable; pair it with RISK_SLOW_PROJECTILE when it is slow.
HITSCANAn effect at range that lands at once.Not dodgeable; its reach is the skill's targetwithin.
AREA_AROUND_SELFAn area centred on the caster.Its radius is the r of the skill's radius targeter (@PlayersInRadius, @MobsInRadius, @EntitiesInRadius; 5 when unset).
AREA_AT_TARGETAn area centred on the target.Aim matters less; punishes grouped enemies.
CONEA sweep in front of the caster.Its length is the range of @EntitiesInCone (16 when unset) or targetwithin.
SELFAffects only the caster.Needs no reach and no target.

Damage tier

At most one. Without a tier, the skill counts as "deals damage, tier unknown" when it has the DAMAGE or FINISHER role or a damaging mechanic (for example a CONTROL skill that also runs damage), and as "no damage" otherwise. So the shortest valid line, DAMAGE, MELEE, works.

PrimitiveMeansHow ThePredict uses it
DAMAGE_LOWDeals little damage.Jev compares damaging options by tier; exact numbers do not help it.
DAMAGE_MEDIUMDeals medium damage.Same.
DAMAGE_HIGHDeals a lot of damage.Same; also orders the ready skills of any_ready.

Best when

0 to 4 per line.

PrimitiveMeansHow ThePredict uses it
WHEN_TARGET_LOW_HEALTHWorks best when the target's health is critical.Finishers; a local tie-break bonus.
WHEN_TARGET_SHIELDINGWorks best when the target blocks or raises a shield.Skills that break or go around a shield.
WHEN_TARGET_FLEEINGWorks best when the target moves away.Ranged punishment or gap closers.
WHEN_SELF_LOW_HEALTHWorks best when the caster's health is critical.Heals and defenses.
WHEN_ENEMIES_GROUPEDWorks best when the target has another enemy close by.Area skills.
WHEN_TARGET_AT_RANGEWorks best when the target is beyond melee.Ranged attacks.
WHEN_TARGET_IN_MELEEWorks best when the target is in melee.Hits and short areas.

Risks

0 to 4 per line.

PrimitiveMeansHow ThePredict uses it
RISK_LEAVES_CASTER_EXPOSEDLeaves the caster exposed afterwards.A poor fit at critical health; gets a recovery after the hit.
RISK_ROOTS_CASTERThe caster cannot move while it uses it.Same; Jev weighs it against fleeing.
RISK_SELF_DAMAGEHurts the caster.Weighed against the caster's own health.
RISK_NEEDS_LINE_OF_SIGHTNeeds a line of sight.Turns on the line-of-sight check before the cast. The binder suggests it when the skill checks lineofsight.
RISK_SLOW_PROJECTILEA moving target may dodge it.A poor fit when the target is moving away.
RISK_BLOCKED_BY_SHIELDA raised shield blocks it.Makes explicit what damage already does by default.
RISK_HITS_ALLIESMay hurt allies.Matters in fights with several mobs.

Shield

PrimitiveMeansHow ThePredict uses it
IGNORES_SHIELDGoes through shields.The skill is cast even against a raised shield. Also read from ignoreshield=true on the damage mechanic.

Tell answers

Changing soon

Tells and telegraphing will be redefined in an upcoming release.

At most one. It sets how the target should answer this skill's tell, and so which PREDICTOR_TELL_* signal is sent, unless the profile's Choices.<id>.Telegraph.Answer names another. Without either, the answer follows the delivery (see Stances, tells & poise).

PrimitiveMeansHow ThePredict uses it
ANSWER_BLOCKThe tell asks for a shield.The skill's tell asks the target to block: PREDICTOR_TELL_BLOCK. A Choices.<id>.Telegraph.Answer in the profile wins over it.
ANSWER_DODGEThe tell asks for a sidestep.Asks to sidestep: PREDICTOR_TELL_DODGE.
ANSWER_BACK_OFFThe tell asks the target to leave reach.Asks to leave its reach: PREDICTOR_TELL_BACK_OFF.
ANSWER_BREAK_SIGHTThe tell asks the target to break line of sight.Asks to break line of sight: PREDICTOR_TELL_BREAK_SIGHT.
ANSWER_INTERRUPTThe tell asks the target to hit during the wind-up.Asks to hit the caster during the wind-up: PREDICTOR_TELL_INTERRUPT.

What ThePredict reads from the skill

Everything that MythicMobs already enforces is read from the skill, once, when the profile binds:

FactRead from
Reachtargetwithin{d=N} in the skill's Conditions (a number only). Otherwise a melee skill uses Movement.MeleeReach.
Area radiusThe r of a radius targeter (@PlayersInRadius, @MobsInRadius, @EntitiesInRadius); 5 when unset, as in MythicMobs.
Cone lengthThe range of @EntitiesInCone (16 when unset), or targetwithin.
Wind-upThe ticks of each delay, plus the delay= option of cosmetic mechanics (effect:*, particles, sound, message), up to the first mechanic that is not cosmetic. Capped at 100 ticks; unknown when a delay is a placeholder or a range.
RecoveryThe trailing delay lines after the hit.
Cooldown and chargesThe native Cooldown (seconds) and Charges.
Shield and invulnerabilityignoreshield=true and ignoreinvulnerability=true on the damaging mechanics.
Line of sightA lineofsight condition in Conditions or TargetConditions.
Pushdamage knockback (unless preventknockback), throw, leap, explosions and pulls. Override with Choices.<id>.Displacement.
AlliesTargeters such as @MobsInRadius, @Parent, @Children or @Owner. Override with Choices.<id>.TargetsAllies.

An AREA_AROUND_SELF without a radius targeter, or a CONE without range or targetwithin, cannot be completed: the choice becomes untyped and the warning says why.

Watch out targetwithin changes MythicMobs too

Adding targetwithin{d=N} to a skill's Conditions makes MythicMobs refuse the skill beyond N blocks of Mob.getTarget() for every trigger, not only for ThePredict. Add it only when that is what you want.

Skills that run other skills

ThePredict does not follow what a skill runs inside another skill (skill{s=…}, randomskill), a projectile (projectile) or an aura (aura). A skill with any of those lines counts as a skill that can deal damage, with an assumed knockback, and the binder warns once per skill:

Console
skill '<S>': it runs nested skills, projectiles or auras that ThePredict does not follow; it may deal damage and a knockback is assumed

If that skill does not push, set Displacement: NONE on its choice. If it is not a damaging skill, say so in its Intention line.

Untyped skills and PredictValues

A skill without a valid Intention line (and without an administrator Purpose) is untyped: it only fires as the choice of its own tactic (decision.untypedCast tactic_only), and Jev learns nothing about it beyond the tactic's description. PredictValues no longer give a skill a purpose. The binder says which case applies:

Console
skill '<S>' has no Intention; the choice is untyped and only casts with its own tactic
PredictValues of skill '<S>' are no longer read; write an Intention

Old files may keep their PredictValues: with a valid Intention they are kept as history and cause no warning. Every new line needs at least a role and a delivery:

Old PredictValues entryWrite instead
MELEE_ATTACKDAMAGE, MELEE
RANGED_ATTACKDAMAGE, PROJECTILE or DAMAGE, HITSCAN
DEFENSEDEFENSE, SELF
SINGLE_TARGET / AREA_TARGETa delivery: MELEE, PROJECTILE, AREA_AT_TARGET…
LOW_DAMAGE / MEDIUM_DAMAGE / HIGH_DAMAGEDAMAGE_LOW / DAMAGE_MEDIUM / DAMAGE_HIGH
APPLIES_POISON / APPLIES_BAD_OMENDEBUFF plus a delivery
HEALS_CASTERSUSTAIN, SELF
SUMMONS_ALLYSUMMON plus a delivery
IGNORES_SHIELDIGNORES_SHIELD, or ignoreshield=true on the damage mechanic

The binder also checks that the line and the skill agree, in English, without excluding the profile: skill '<S>' checks lineofsight but its purpose has no NEEDS_LINE_OF_SIGHT risk, purpose deals damage but skill '<S>' has no damage mechanic, skill '<S>' ignores shields but the purpose says BLOCKED_BY_SHIELD, and the reverse cases. A tactic whose movement can never let its skill land is flagged too: Tactics.keep_distance_and_strike: Movement KEEP_DISTANCE keeps the target beyond Band.Inner 5 but skill 'melee' reaches 2.5; this tactic never casts.

How ThePredict casts

ThePredict casts with its own MythicMobs trigger (THEPREDICT; you never write it). @target and @trigger are the mob's target. Right before casting, it checks, in order:

  1. The target is the expected one: the leader of the threat table, otherwise Mob.getTarget(). A skill with a native targetwithin also waits until Mob.getTarget() is that same target.
  2. The native Cooldown and charges.
  3. The reach of the delivery, and line of sight when the line says RISK_NEEDS_LINE_OF_SIGHT or the skill checks lineofsight.
  4. The target's invulnerability frames and shield.
  5. The skill's own Conditions.
OutcomeWhat happened
CASTThe skill was cast.
NOT_ELIGIBLENot ready yet (cooldown, reach, a condition): it waits without being consumed and retries.
DEFERRED_INVULNERABLEThe target was just hit and vanilla would ignore the hit: it waits, unless every damaging mechanic has ignoreinvulnerability=true.
SKIPPED_SHIELDA damaging skill is not cast into a raised shield that would block it, unless the line has IGNORES_SHIELD or the damage has ignoreshield=true.
REJECTED_BY_MYTHICMOBSMythicMobs refused it: a failed chance (rolled once, at cast time, never checked in advance), a cancelled event or no charges left.

Rhythm

A skill fires on its own Cooldown. Tune the Cooldown to control spam.

  • With Timing.CastMode any_ready (the default), every skill with a valid Intention fires on the first tick it is ready, using its Cooldown and Charges, besides the tactic's own choice. GAP_CLOSE and ESCAPE skills only fire in a direction that makes sense (closing in, or getting away). Exceptions: a gap closer that deals damage may also hit in melee, and the PUNISH_CONSUMING and EVADE_CRITICAL reactions lift the rule (see reactions). With intent_only, only the tactic's choice fires.
  • A skill without Cooldown spams under any_ready: it fires every time it can. That rhythm is yours to set.
  • The only guards ThePredict adds: one cast start per tick, and the mob stays busy until the skill's wind-up is over. There is no extra minimum gap.
  • A vanilla hit (Kind: VANILLA_MELEE) has no Cooldown: it keeps the vanilla attack rhythm, one hit every 20 ticks, even when the target's invulnerability is shorter.
  • The PREDICTOR_<TACTIC> signal is not repeated when the same tactic is renewed.
  • Skills already running (delay lines, projectiles in flight) are not cancelled when the tactic changes.
  • With decision.castThread same_tick (the default), delay 10 waits exactly 10 server ticks.

ThePredict sorts each skill into a cooldown class from its native Cooldown (plus CD): NONE (0 s), SHORT (up to 3 s), MEDIUM (up to 10 s), LONG (more) or UNKNOWN (no fixed readable value, for example a placeholder). A vanilla hit is SHORT (MEDIUM with a CD of 60 ticks or more). /thepredict inspect shows each class on its Skills line.

Tip Gating classic skills

Skills on the mob's own triggers (~onAttack, ~onTimer) keep firing while ThePredict controls it. To stop them from adding damage on top of the tactics, start their Conditions with predictorcontrol false: they then only run when ThePredict is not in control. See MythicMobs vocabulary.

Suggesting a line

/thepredict intention suggest [profile] prints, for each bound choice, the canonical Intention line of its current purpose, and what the line cannot carry (for example a reach that needs targetwithin). It never writes MythicMobs files. Without a profile ID it covers every bound profile. Permission: thepredict.admin.

Purpose override (administrators)

Choices.<id>.Purpose is internal data and an administrator override for tuning one mob, not something authors write. It replaces the skill's Intention line for that choice (the binder warns Choices.<id>.Purpose overrides the Intention of skill '<S>') and is the only form that takes numbers (Reach, Radius, WindUp). Its keys are in the profile reference.

To move a profile that still has Purpose sections to Intention lines:

  1. Run /thepredict intention suggest <profile> and copy each line into its skill, under Intention.
  2. Run /mm reload. /thepredict inspect should show origin=skill with the same roles, delivery and conditions.
  3. Remove Purpose from the profile; while it stays, the profile wins and the warning says so.
  4. Removing PredictValues is optional; they are no longer read.

To go back, put the Purpose back in the profile: it wins over the skill's line.

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.