ThePredictdocs v0.0.1 RC

Combat systems

Zones & terrain

parts changing soon

How ThePredict reads the ground around a fight — drops, hazards, cover, height — and what that reading changes.

A zone is ThePredict's map of the ground around one encounter: where the floor is, where a fall or a push would be deadly, where the cover is and who stands higher. It is built off the server thread from chunk snapshots and kept up to date while the fight lasts. What the mob does with it depends on the zone mode.

Modes

ModeWhat it does
offNo zone is built and no decision reads terrain.
observeThe zone is built. Against a player, the push policy and the tell checks apply (see below). The shipped default.
guardobserve, plus the mob refuses unsafe ground.
fullguard, plus terrain facts reach Jev, the predictorzone condition and the <caster.predictor.zone> placeholder.

zone.mode in config.yml sets the ceiling. A profile's Zone.Mode can only lower it: a higher value loads with a warning naming the file and Zone.Mode, and uses the global mode. The effective mode of a mob is the lower of the two.

plugins/MythicMobs/AIConfig/config.ymlYAML
zone:
  mode: full

What the zone reads

  • Size. A square around the fight with a radius of Zone.Radius, or zone.defaultRadiusBlocks when the profile sets none. A mob with an arena (Movement.Arena.Radius) uses the arena radius plus 4 instead. Nothing goes past zone.maxRadiusBlocks. Vertically it reads zone.bandBlocks above and below.
  • Ground. Walkable columns, headroom and drops; a drop is followed down to zone.maxDropScanBlocks.
  • Hazards. Void, lava, fire, campfires and magma, cactus, sweet berry bushes, wither roses, powder snow, pointed dripstone and cobwebs. Water, slime and hay blocks count as soft landings.
  • Shape of the arena. Cover close to the mob, narrow passages, higher ground, how much of the arena sees the sky.

The zone opens with the encounter, is patched as blocks change, and is dropped after zone.idleDropTicks without use. The remaining zone.* keys are budgets that keep the work bounded per tick; see the config.yml reference.

Terrain facts

From the zone, ThePredict derives short facts about each mob. They are sampled every zone.factPeriodTicks, a fact must hold zone.factOnTicks before it turns on and be gone zone.factOffTicks before it turns off, and at most zone.maxFactsPerMob per mob are sent to Jev.

FactTrue whenPhrase Jev reads
edge_behindA lethal push sits behind the mob.“…has a deadly drop or hazard close behind it”
no_safe_retreatThe raw retreat query found nothing.“…has no safe ground to retreat to”
target_high_groundThe target's floor is at least two above the mob.“…stands on higher ground”
high_groundThe mob's floor is at least two above the target.“…stands on higher ground than its target”
cover_nearCover exists within four blocks.“…has cover from its target close by”
narrow_groundClearance at the mob is at most one block.“…is fighting in a narrow passage”
hazard_underfootThe mob's cell is harmful and is not lava.“…stands on harmful ground”
internal onlyThe target stands next to a lethal push. Entities only.“…stands next to a deadly drop or hazard”
enclosedLess than a quarter of the walkable columns see the sky.“…the fight takes place indoors or underground”
hazardous_arenaAt least five percent of the columns are a hazard, a pit or void.“…the arena has hazards such as lava or deadly drops”

Watch out Facts need full

Facts are published only while the effective zone mode is full and the profile keeps Zone.Facts at true. With the shipped observe mode, the predictorzone condition is always false and <caster.predictor.zone> shows none.

Vocabulary

ElementWhat it does
predictorzone{fact=<fact>} (alias predictorzonefact, key fact or f)True while ThePredict controls the mob and the zone publishes that fact. Use the lower-case names from the table above. target_near_drop is not accepted; an unknown name is always false and the load warns predictorzone: fact is not an exposed zone fact; the condition is always false.
<caster.predictor.zone>The published facts, comma-separated (cover_near,narrow_ground), or none.
<caster.predictor.pushdanger>What a push would do to the mob where it stands: none, harm, lethal or unknown. none also when there is no zone.
plugins/MythicMobs/Skills/WardenSkills.yml (excerpt)YAML
WardenBraceSkill:
  Conditions:
  - predictorzone{fact=edge_behind} true
  Skills:
  - setvariable{var=caster.braced;value=1;type=INTEGER} @self

Like the other control conditions, predictorzone is false at BASE and when the intent expires.

Pushes, edges and hazards

Changing soon

Environment exploitation (pushing into lava or off edges, fighting around water and height) will be redefined in an upcoming release. This section documents how the current build works.

Edges. An edge is a drop bigger than zone.maxSafeDropBlocks (with the default of 3, a drop of 4 blocks or more). A push is lethal when it would land in the void, in lava, or in a fall that meets the victim's current health. ThePredict checks where a knockback (zone.knockbackDepthBlocks) or a strong push such as a throw or a leap (zone.strongPushDepthBlocks) would land, reading each skill's push from the skill itself (see Choices.<id>.Displacement).

Pushes against players. From observe up, a lethal push against a player does not fire on sight. It waits, zone.pushDeferTicks at a time, and is skipped after zone.pushDeferMaxTicks, unless it comes behind a HEAVY or SEVERE tell that shows its full minimum and whose answer fits the ground. Pulls, self-moves and pushes that are not lethal always go through. A push stays attributed to the mob that caused it for zone.pushAttributionTicks.

Tells that cannot be answered. Against a player, a tell whose answer does not fit the ground (for example, no room to back off) is not opened. ThePredict retries every zone.answerRetryTicks and drops it after zone.answerMaxWaitTicks.

Guarding the mob (guard and full). The mob refuses unsafe ground: a micro-movement whose destination fails a safe-cell check changes side, a backstep becomes a sidestep, the mob will not step into a lethal push, and with Timing.TickLayer: full it steps away from a lethal edge (the EDGE_DANGER reaction).

Hazard push. Zone.HazardPush: exploit is meant to let a mob push a non-player target into a hazard; it never applies to players. In this build the reaction it enables stays switched off on every pressure rung, so the key has no effect yet.

Entropy. While PredictorEntropy is on and the effective zone mode is guard or full, the limit on lethal pushes against players is lifted. See Difficulty.

The Zone section of a profile

AIConfig/Profiles/warden.yml (excerpt)YAML
  Zone:
    Mode: full
    Radius: 32
    Facts: true
    HazardPush: "off"

Mode and HazardPush accept a bare off too, but quoting it is always safe. Each key is listed with its default and range in the Profile reference.

Commands and limits

  • /thepredict zone (permission thepredict.admin) prints one fixed line in this release: No ready zone. Effective mode is the minimum of zone.mode and Zone.Mode. Permission: thepredict.admin. Neither this command nor inspect shows a mob's zone yet.
  • While records.level is not off, the records add a hazard line when hazard damage follows a mob's push (within zone.pushAttributionTicks) or when a mob hurts itself on a hazard (see Storage & records).
  • ThePredict never changes pathfinding costs: it does not call setPathfindingMalus and writes no zone variables. MythicMobs' own AIPathfindingMalus option and setpathfindingmalus mechanic are untested with ThePredict on a live server.
  • Nothing on this page has been verified on a live server yet.

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.