ThePredictdocs v0.0.1 RC

Combat systems

How a fight runs

Encounters, intents, the fallback chain, decision cadence and the per-tick layer that reacts between two decisions.

Encounters

Bound mobs that fight the same targets form one encounter. An encounter sends at most one request per heartbeat (decision.encounterHeartbeatTicks, 20 ticks), with one question per mob, or sooner when something relevant happens: a contingency fires, the situation changes, or a skill runs predictordecide. A boss with three adds costs one request per heartbeat, not four.

  • A mob never joins an encounter that lists it as a participant: two ThePredict mobs fighting each other form two encounters, each with its own point of view.
  • Two groups that start fighting apart and later meet stay two encounters, with two requests.
  • An encounter carries at most 16 participants per capture, players and entities together.

Two layers

LayerRhythmWhat it does
Reactive, localevery observationIntervalTicks (2 ticks), plus the per-tick layerKeeps the current intent, re-checks reach and conditions before each skill, fires skills as they become ready, and switches at once to an alternative or a contingency it already received.
Deliberative, Jevonce per encounter heartbeat, or soonerPicks the tactic among the candidates the engine prepared. Never blocks the server.

The life of an intent

  1. Adopted. An answer is adopted when its confidence reaches Timing.MinimumConfidence (0.45 by default) and, to replace the current tactic, beats it by Timing.SwitchMargin (0.15). After decision.lowConfidenceStreakForLocal low-confidence answers in a row the mob drops to its local planner (LOW_CONFIDENCE).
  2. Held. An adopted tactic is kept at least profileDefaults.minimumDecisionIntervalTicks (20 ticks).
  3. Renewed or expired. An intent is valid for profileDefaults.maximumIntentDurationTicks (40 ticks) unless renewed. Without a replacement it expires (EXPIRED).

Each request can also carry decision.contingenciesPerMob "what if" questions per mob (for example "if your health becomes critical"). If that situation happens, the mob switches to the stored answer without waiting for a new request.

An answer that arrives too late (decision.maxDecisionAgeMillis), after the mob changed target, after a reload, or from another model is discarded; /thepredict status counts each reason under discards.

Target changes. When MythicMobs changes the mob's target, the decision in flight is dropped and the mob plays at level 4 until the next capture of its encounter: 2 to 4 ticks usually, about 22 at most.

Retreats are shared. An encounter allows max(1, members / 3) simultaneous retreats; another mob asked to retreat falls back with RETREAT_LIMIT.

The fallback chain

LevelShown asWho decidesTypical cause of a drop
1JEVJev's answer.—
2ALTERNATIVEThe next valid option, or a contingency, of the same answer.The chosen tactic stopped being valid.
3LOCALThe profile: active context, DirectTactic, priority. No network, no cost.No key, service paused, no budget, low confidence.
4BASEThe mob's base AI. ThePredict does not control it.No eligible tactic, no progress, session reloaded, internal error.

Placeholders show the level as jev, alternative, local or base (<caster.predictor.level>). Every drop has a reason, listed in Troubleshooting.

Cadence

Timing.Cadence sets how often the mob asks:

CadenceIntent lengthCost
reactive (default)Short (Timing.IntentHorizon, 10 ticks), extended while nothing changes; reactive questions at most every Timing.ReactiveInterval (6 ticks).More questions. With the shipped request caps, the worst case is about one such encounter per world and up to about 0.95 USD per mob-hour.
standardThe usual intent length. IntentHorizon is ignored with a warning.The saving mode: about five encounters per world fit the same caps.

These are ceilings set by the request caps, not server measurements. See Jev connection for the budget keys.

The per-tick layer

Between two decisions, the per-tick layer carries out the intent Jev chose. It never changes the tactic, the level or the deadline, except to extend a reactive intent (same tactic, longer deadline, no new question).

ModeWhat it adds
castsFires skills the moment they are ready.
reactions (default)Also reacts within ticks to openings and danger (table below), and times hits so they land.
fullAlso short micro-movements (circle, step aside, step in, back off).

The global mode is decision.tickLayer.mode; a profile's Timing.TickLayer may ask for less, never more (it warns and uses the global one, and so does an overlay). The layer has its own budgets under decision.tickLayer.*, and casting is never delayed when it degrades under load.

Reactions

A reaction arms a preference for a few ticks: the next skill fired is one that suits the moment. Timing.Reactions picks the bands that are evaluated (all, survival or none), Reactions.Ahead the bands tried before the tactic's own skill (survival and opportunity by default), and Timing.ReactionDelay how long a trigger must hold first.

ReactionBandTriggers whenWhat it prefers
EVADE_CRITICALsurvivalHealth is critical and the target is in melee. Survival preference and, in FULL, a backstep.A skill whose role is ESCAPE, DEFENSE or SUSTAIN. An ESCAPE skill may fire with any movement except APPROACH.
DODGE_SHOTsurvivalA shot is incoming or drawn. Movement only; not evaluated in REACTIONS.Movement only (no cast); needs TickLayer: full.
PUNISH_CONSUMINGopportunityThe target is consuming. Opportunity preference and, in FULL, an enter.INTERRUPT, GAP_CLOSE or DAMAGE. A GAP_CLOSE may also fire with HOLD or NONE.
PUNISH_RECHARGEopportunityA player is recharging an attack inside the inner band.A MELEE damage or finisher skill. Players only: theirs is the only attack recharge that can be read.
RESPECT_SHIELDopportunityThe target is blocking and the movement is not a flank.CONTROL, or a skill that ignores shields, instead of hitting a raised shield.
FINISHopportunityThe target is critical. A finisher is preferred.A FINISHER.
SPACE_OUTspacingOpen space after a cast. Movement only; not evaluated in REACTIONS.Movement only; needs TickLayer: full.
EDGE_DANGERsurvivalThe mob stands on a lethal edge. Movement only; not evaluated in REACTIONS.Movement only (a step away from the edge); needs TickLayer: full.
HAZARD_PUSH changing soonopportunityAn entity can be pushed into a hazard. Off unless the profile exploits that push.A pushing skill toward the hazard. Masked at every pressure rung in this build: it only arms with Entropy against players, with a zone mode of guard or full.
EXPLOIT_PATTERNopportunityA perceived enemy pattern. Last opportunity reaction. Armed only in bias or full by the exploit policy.The counter to a detected enemy pattern. Only in bias or full pattern modes.

Movement-only reactions need full. Against players, the reaction delay also respects the difficulty preset's reaction floor (see Difficulty).

Micro-movements

Only with full. The Paper goal thepredict:micro (priority 3) circles, steps aside, steps in or steps back toward short destinations computed with the pathfinder. It hovers around players only, and never asks for a path against air or after a hit it just took. Paper evaluates goals every 2 ticks, so a reaction can reach the legs 0 to 2 ticks later.

Impulses are yours. Leaps, dashes and knockbacks are your skills (leap, velocity and the other MythicMobs mechanics). ThePredict never calls setVelocity or applies knockback itself.

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.