ThePredictdocs v0.0.1 RC

Authoring

MythicMobs vocabulary

The conditions, the mechanic, the placeholders and the signals ThePredict adds to MythicMobs, so your own skills can follow what the mob is thinking.

ThePredict publishes what each bound mob is doing, and your skills decide what to show. It never adds a particle, a sound or an animation by itself: every visible or audible cue comes from your own skills, triggered by the conditions, placeholders and signals on this page.

Conditions and mechanic

Names work in any case, like every MythicMobs component. Each condition works both in a skill's Conditions and in a goal's mobconditions.

predictorcontrolcondition
Arguments
none

True while ThePredict controls the mob (level JEV, ALTERNATIVE or LOCAL, not expired). False without a session, at BASE, when the intent expires and when the plugin stops. Use predictorcontrol false to silence classic timer skills while ThePredict fights.

- predictorcontrol false
predictormovecondition
Arguments
m, movement

True while ThePredict controls the mob and asks for this movement: APPROACH, KEEP_DISTANCE, RETREAT, HOLD, FLANK or NONE, any case. An unknown movement makes it always false and warns once per load. The generated movement goals use it.

- predictormove{m=RETREAT} true
predictortacticcondition
Arguments
t, tactic

True while ThePredict controls the mob with this tactic. Write the tactic ID exactly, in lower case; an invalid value (or none) is always false and warns, suggesting the lower-case form when that is the only difference.

- predictortactic{t=retreat_and_defend} true
predictorstancecondition
Arguments
s, stance

True when the mob's published stance is one of the listed names (neutral, pressing, guarded, evasive, windup, recovery, staggered; comma-separated, any case), or when the list includes enraged and the mob is enraged. Unlike the other conditions it does not need control: it also works at BASE while the mob has a session.

- predictorstance{s=windup,recovery} true
predictorzonecondition (alias predictorzonefact)
Arguments
fact, f

True while ThePredict controls the mob and the zone publishes this terrain fact (see Zones & terrain). Facts exist only with an effective zone mode of full and Zone.Facts: true. target_near_drop is not accepted; an unknown fact is always false and warns at load.

- predictorzone{fact=cover_near} true
predictorrolecondition
Arguments
role, r

True while ThePredict controls the mob and the group gave it this role (pressure, flank, ranged, support, control, guard, reserve). False at BASE or after the intent expires, even if the mob keeps its role.

- predictorrole{role=flank} true
predictorplancondition
Arguments
plan, p

True while ThePredict controls the mob and its group follows this plan (press_main_target, surround_target, split_targets, screen_the_leader, harass_from_range, fall_back_and_regroup, search_last_known).

- predictorplan{plan=surround_target} true
predictortokencondition
Arguments
pool

True while ThePredict controls the mob and it holds an attack token of this pool (melee or ranged) on its target.

- predictortoken{pool=melee} true
predictorpatterncondition
Arguments
pattern, p

True while ThePredict controls the mob and its current target has this pattern active (see Patterns). Names are lower case; an unknown name is always false and warns at load. Patterns are published only in the bias and full modes, so with the shipped observe mode this condition is always false.

- predictorpattern{p=shield_turtle} true
predictordecidemechanic
Arguments
none

A mechanic, not a condition. Asks ThePredict to bring the next decision of the mob's encounter forward, for example when the mob takes damage. It never waits or fails; a mob without an encounter changes nothing, and a mob already marked is not marked twice.

- predictordecide @self ~onDamaged

Control conditions are false without a live intent. predictorcontrol, predictormove, predictortactic, predictorrole, predictorplan, predictortoken, predictorzone and predictorpattern are false without a session, at level BASE, when the intent expires and when the plugin stops. So when ThePredict lets go, the mob returns to its base goals on the next cycle. predictorstance is the exception: it is true while the mob has a session and its published stance matches, also at BASE.

An invalid argument (an unknown movement, tactic, fact or pattern) makes the condition always false, and the console warns once per load.

Placeholders

Use them in any MythicMobs text, for example message{m="<caster.predictor.tactic>"}. The caster is the bound mob. On a mob without a session every placeholder shows none, so you can tell an unbound mob (none) from a bound one playing its base AI (base).

PlaceholderShows
<caster.predictor.tactic>Current tactic ID; none without a session.
<caster.predictor.movement>Current movement in lower case (approach, keep_distance, ...); none without a session.
<caster.predictor.level>Control level: jev, alternative, local or base; none without a session.
<caster.predictor.confidence>Confidence of the current decision with two decimals (0.73); 0.00 before the first decision, none without a session.
<caster.predictor.state>controlled while ThePredict controls the mob, base otherwise, none without a session.
<caster.predictor.pressure> changing soonPressure rung 0–8 while the difficulty controller plays; none otherwise.
<caster.predictor.stance>Visible stance in lower case: neutral, pressing, guarded, evasive, windup, recovery or staggered; none without a session.
<caster.predictor.poise>Poise left, 0–100; none when the profile has no Poise section.
<caster.predictor.answer> changing soonWhat the open tell asks of the target (block, dodge, back_off, break_sight, interrupt); none without a tell.
<caster.predictor.telegraph> changing soonTicks until the telegraphed hit lands; none without a tell.
<caster.predictor.zone>Published terrain facts, comma-separated (cover_near,narrow_ground); none without facts (they need zone mode full).
<caster.predictor.pushdanger>What a push would do to the mob where it stands: none, harm, lethal or unknown. none also without a zone.
<caster.predictor.role>Group role in lower case; none when the group assigned none.
<caster.predictor.plan>Group plan in lower case; none when the group has none.
<caster.predictor.token>Attack token held: melee, ranged, both or none.
<caster.predictor.slot>Position slot the group gave the mob around its target; none when it has none.
<caster.predictor.squad>Size of the mob's squad; none without a squad.
<caster.predictor.pattern>The target's most confident active pattern in lower case; none otherwise. Published only in the bias and full pattern modes (always none with the shipped observe).
<caster.predictor.forecast>The target's forecast next action, shown only while the forecast is accurate enough (patterns.forecastMinAccuracy) and the pattern mode is bias or full; none otherwise.

Signals

ThePredict talks to your skills with native MythicMobs signals. React to one with ~onSignal:<NAME> in the mob's Skills:

YAML
Skills:
- sound{s=entity.warden.roar} @self ~onSignal:PREDICTOR_RETREAT_AND_DEFEND
- setstance{stance=guarded} @self ~onSignal:PREDICTOR_STANCE_GUARDED

How a signal reaches a mob:

  • A signal is only sent when the mob listens for it: a line with ~onSignal:<NAME>, or a bare ~onSignal (which MythicMobs runs for any signal without its own handler), in the Skills of the mob or of its Template. A handler written inside another skill does not count, because MythicMobs does not register it either.
  • Write the name in upper case, exactly. Whether MythicMobs compares signal names without case is not confirmed.
  • A signal is not a paid call: it never sends anything to Jev.
SignalSent when
PREDICTOR_<TACTIC>A new tactic starts at level JEV, ALTERNATIVE or LOCAL. PREDICTOR_ plus the tactic ID in upper case, for example PREDICTOR_RETREAT_AND_DEFEND. Never when the same tactic is renewed, never when control drops to BASE.
PREDICTOR_TELL_<ANSWER>A telegraphed hit starts its tell (see Stances, tells & poise). Changing soon.
PREDICTOR_STANCE_<STANCE>The visible stance changes.
PREDICTOR_STANCE_ENRAGED, PREDICTOR_STANCE_CALMAn enraging context starts or ends.
PREDICTOR_ROLE_<ROLE>The group gives the mob a new role; at most once every 5 seconds.
PREDICTOR_PLAN_<PLAN>The group adopts a new plan.
PREDICTOR_PATTERN_<PATTERN>A habit of the mob's target becomes active, or comes back active after a rest (see Patterns). Once per activation, and only in the bias and full pattern modes.

All the names, by family:

Tells (changing soon)

PREDICTOR_TELL_BLOCK PREDICTOR_TELL_DODGE PREDICTOR_TELL_BACK_OFF PREDICTOR_TELL_BREAK_SIGHT PREDICTOR_TELL_INTERRUPT

Stances

PREDICTOR_STANCE_NEUTRAL PREDICTOR_STANCE_PRESSING PREDICTOR_STANCE_GUARDED PREDICTOR_STANCE_EVASIVE PREDICTOR_STANCE_WINDUP PREDICTOR_STANCE_RECOVERY PREDICTOR_STANCE_STAGGERED

Group roles

PREDICTOR_ROLE_PRESSURE PREDICTOR_ROLE_FLANK PREDICTOR_ROLE_RANGED PREDICTOR_ROLE_SUPPORT PREDICTOR_ROLE_CONTROL PREDICTOR_ROLE_GUARD PREDICTOR_ROLE_RESERVE

Group plans

PREDICTOR_PLAN_PRESS_MAIN_TARGET PREDICTOR_PLAN_SURROUND_TARGET PREDICTOR_PLAN_SPLIT_TARGETS PREDICTOR_PLAN_SCREEN_THE_LEADER PREDICTOR_PLAN_HARASS_FROM_RANGE PREDICTOR_PLAN_FALL_BACK_AND_REGROUP PREDICTOR_PLAN_SEARCH_LAST_KNOWN

Enemy patterns (only in the bias and full pattern modes)

PREDICTOR_PATTERN_SPAMS_CLICKS PREDICTOR_PATTERN_CRIT_JUMPER PREDICTOR_PATTERN_WTAP_PRESSURE PREDICTOR_PATTERN_PREDICTABLE_STRAFE_LEFT PREDICTOR_PATTERN_PREDICTABLE_STRAFE_RIGHT PREDICTOR_PATTERN_CHASES_RETREAT PREDICTOR_PATTERN_SHIELD_TURTLE PREDICTOR_PATTERN_SHIELD_LATE PREDICTOR_PATTERN_OVEREXTENDS_AFTER_BLOCK PREDICTOR_PATTERN_NO_SHIELD PREDICTOR_PATTERN_FAILS_ANSWER_BLOCK PREDICTOR_PATTERN_FAILS_ANSWER_DODGE PREDICTOR_PATTERN_FAILS_ANSWER_BACK_OFF PREDICTOR_PATTERN_FAILS_ANSWER_BREAK_SIGHT PREDICTOR_PATTERN_FAILS_ANSWER_INTERRUPT PREDICTOR_PATTERN_FAILS_DODGE_PROJECTILE PREDICTOR_PATTERN_WEAK_TO_AREA PREDICTOR_PATTERN_HEALS_AT_LOW_HP PREDICTOR_PATTERN_PEARLS_WHEN_LOW PREDICTOR_PATTERN_RETREATS_WHEN_LOW PREDICTOR_PATTERN_RELIES_ON_TOTEM PREDICTOR_PATTERN_KITES_AT_RANGE PREDICTOR_PATTERN_SEEKS_HIGH_GROUND PREDICTOR_PATTERN_MACE_DIVER PREDICTOR_PATTERN_FIXED_CADENCE

Watch out A stuck mob repeats its signal

If a mob playing locally makes no progress (NO_PROGRESS), it drops to BASE and goes back to the tactic on the next decision, and each return counts as a new tactic. A stuck local mob can fire a PREDICTOR_<TACTIC> handler around 30 times a minute. Do not put effects that must not repeat in such a handler.

Example

A boss that keeps its classic slam only while ThePredict is not in control, shows an aura during one tactic, re-decides when it is hit and roars when it starts retreating.

plugins/MythicMobs/Mobs/VocabularyGuardian.ymlYAML
VocabularyGuardian:
  Type: ZOMBIE
  Display: 'Vocabulary Guardian'
  Health: 100
  Predictor: true
  Options:
    FollowRange: 32
    Despawn: false
  Skills:
  - skill{s=GuardianSlam} @target ~onTimer:60
  - skill{s=GuardianDefendAura} @self ~onTimer:20
  - predictordecide @self ~onDamaged
  - sound{s=entity.warden.roar} @self ~onSignal:PREDICTOR_RETREAT_AND_DEFEND
  - message{m="<caster.predictor.tactic> (<caster.predictor.confidence>)"} @PlayersInRadius{r=16} ~onTimer:40
plugins/MythicMobs/Skills/VocabularyGuardian.ymlYAML
GuardianSlam:
  Conditions:
  - predictorcontrol false
  Skills:
  - damage{a=6} @target
GuardianDefendAura:
  Conditions:
  - predictortactic{t=retreat_and_defend} true
  Skills:
  - effect:particles{p=crit;a=10} @self
GuardianShield:
  Intention: SUSTAIN, SELF, WHEN_SELF_LOW_HEALTH
  Cooldown: 5
  Skills:
  - heal{a=6} @self
plugins/MythicMobs/AIConfig/Profiles/vocabulary_guardian.ymlYAML
schemaVersion: 2
vocabulary_guardian:
  MythicID: VocabularyGuardian
  Objective: Survive while defeating the current target
  Choices:
    shield: { MythicID: GuardianShield, RequiresTarget: false }
  Tactics:
    approach: { Movement: APPROACH, Priority: 60 }
    retreat_and_defend: { Movement: RETREAT, Choice: shield, Priority: 90 }
    hold: { Movement: HOLD, Priority: 10 }
  Contexts:
    low_health_phase: { Priority: 90, Tactics: [retreat_and_defend] }

GuardianSlam only hits while ThePredict is not in control, so its damage never stacks on top of the tactics; GuardianDefendAura only shows during retreat_and_defend; predictordecide brings the next decision forward when the mob takes damage; the roar plays when retreat_and_defend starts. The particles and the sound are the author's choice, not ThePredict's.

Editor support

Editors that check MythicMobs names may flag predictor* as unknown. With the MythicScribe extension for VS Code, declare these files under MythicScribe.customDatasets in your settings.json ("source": "File", one entry with "elementType": "Condition" and one with "elementType": "Mechanic"). Placeholders need no entry.

thepredict-conditions.jsonJSON
[
  {"name": ["predictorcontrol"], "description": "True while ThePredict controls the mob (level JEV, ALTERNATIVE or LOCAL, not expired).", "attributes": []},
  {"name": ["predictormove"], "description": "True while ThePredict controls the mob and asks for this movement: APPROACH, KEEP_DISTANCE, RETREAT, HOLD, FLANK or NONE, any case.", "attributes": [{"name": ["m", "movement"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictortactic"], "description": "True while ThePredict controls the mob with this tactic.", "attributes": [{"name": ["t", "tactic"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictorstance"], "description": "True when the mob's published stance is one of the listed names (neutral, pressing, guarded, evasive, windup, recovery, staggered; comma-separated, any case), or when the list includes enraged and the mob is enraged.", "attributes": [{"name": ["s", "stance"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictorzone", "predictorzonefact"], "description": "True while ThePredict controls the mob and the zone publishes this terrain fact (see Zones & terrain).", "attributes": [{"name": ["fact", "f"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictorrole"], "description": "True while ThePredict controls the mob and the group gave it this role (pressure, flank, ranged, support, control, guard, reserve).", "attributes": [{"name": ["role", "r"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictorplan"], "description": "True while ThePredict controls the mob and its group follows this plan (press_main_target, surround_target, split_targets, screen_the_leader, harass_from_range, fall_back_and_regroup, search_last_known).", "attributes": [{"name": ["plan", "p"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictortoken"], "description": "True while ThePredict controls the mob and it holds an attack token of this pool (melee or ranged) on its target.", "attributes": [{"name": ["pool"], "type": "String", "description": "", "default_value": ""}]},
  {"name": ["predictorpattern"], "description": "True while ThePredict controls the mob and its current target has this pattern active (see Patterns).", "attributes": [{"name": ["pattern", "p"], "type": "String", "description": "", "default_value": ""}]}
]
thepredict-mechanics.jsonJSON
[
  {"name": ["predictordecide"], "description": "A mechanic, not a condition.", "attributes": []}
]

For a plain word list, the names are the conditions above, the mechanic predictordecide, and the keys Predictor, PredictorTraining, PredictorDifficulty, PredictorEntropy and Intention with the primitives of Skills & intents.

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.