ThePredictdocs v0.0.1 RC

Combat systems

Groups

parts changing soon

How several ThePredict mobs that fight the same targets share attack slots, roles, positions and a plan.

When two or more bound mobs fight the same targets, they form one encounter: one request to Jev per heartbeat for the whole group. Group coordination sits on top of that encounter. It spaces out the hits on each player and, in the top mode, lets Jev pick a plan for the whole squad, with roles and positions for its members.

A lone mob has no group step: everything on this page needs at least two members in the encounter.

Note Encounters are sides

Mobs of the same side join one encounter; their participants are the other side. Two ThePredict mobs that fight each other form two encounters, each with its own request. Two groups that start fighting far apart and later meet stay two encounters. See Targets, participants & threat for how sides are decided.

Modes

ModeWhat it adds
offNo group step and no attack limits.
fairAttack tokens and impact spacing on each target (the shipped default).
coordinateMeant to add a group plan, roles and position slots. In this build a plan is only adopted together with the group plan question of full, so coordinate works like fair.
fullfair, plus the group plan question: the leader's request asks Jev to choose a plan, and with the plan come roles and position slots.

group.mode in config.yml sets the ceiling for the whole server. A profile's Group.Mode can only lower it: a higher value loads with the warning is above Group.Mode and uses the minimum and uses the global mode.

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

Note What needs full

A group gets a plan, roles and position slots only in full, with a leader, and when the leader's Group.Questions asks the plan question (plan_and_leader, the default, or plan_only). Everything else on this page that mentions a plan, a role or a slot depends on that.

Fairness limits

Changing soon

The fairness rules toward players will be replaced by intelligence levels in an upcoming release. This section documents how the current build works.

In every mode except off, a damaging cast must hold an attack token on its target before it fires. Only damaging casts ask: a heal, an escape or a defense without damage never waits.

  • Two pools. Melee, cone, area-around-self and self deliveries (and the vanilla hit) use the melee pool. Projectile, hitscan and area-at-target deliveries use the ranged pool. A skill without an Intention line counts as ranged.
  • Caps per target. At most group.maxMeleeAttackersPerPlayer melee weight and group.maxRangedAttackersPerPlayer ranged weight hold tokens on one target at the same time. Each member uses its Group.Weight (1 by default; give a big boss 2 or more so it fills the cap alone).
  • Impact spacing. Two impacts on the same target land at least group.minImpactGapTicks apart (never below 4 ticks). Heavy and severe impacts keep group.bigImpactSpacingTicks of space around them (never below 8).
  • Tells. At most group.maxMediumTellsPerPlayer MEDIUM tells are open on one target, a second medium tell cannot ask for a different answer, and nothing medium or harder opens while a heavy tell is open.
  • First-hand sight. A member that does not see the target itself (it only knows where the target is through its allies) cannot land a MEDIUM or harder hit.
  • An exit. Position slots never fill the group.exitSectorDegrees sector behind the target (never below 60°), so there is always a way out.
  • Pressure. Against players, the difficulty controller's pressure rung can make the melee cap and the impact gap stricter: the lowest rungs allow one melee attacker and wider gaps.

A refused cast is not lost: the skill waits and tries again. An unused token goes back after group.tokenIdleTimeoutTicks, and a member whose score beats the holder's by group.stealMarginMillis can take it over.

Against non-player targets the limits only record, unless the profile sets Group.AgainstEntities to fair. While Entropy is on they only record too.

Leader and squads

A group has a leader only when at least one member's profile sets Group.LeaderPriority above 0 or names a Group.Squad. The leader is chosen in this order:

  1. The highest LeaderPriority.
  2. Then the member whose squad has the most members in the encounter.
  3. Then the healthiest member.

Squads come from the declared Group.Squad names first; then a member whose summons fight in the same encounter heads a squad with them. At most group.maxSquads squads are kept per encounter; the members of any further squad count as having no squad.

When the leader dies, Group.OnLeaderDeath decides: succeed elects a new leader at once; break breaks the group for group.brokenTicks, with no plan and no roles until it reforms. The leader's own impact slot is reserved group.leaderReserveTicks ahead, so its big hit is not crowded out.

Plans, roles and slots

When the leader's request carries the group plan question, the group follows a plan. The question offers up to group.maxPlanCandidates of the plans the group can follow, at most one per family (attack, protect, retreat, search), and the first candidate is always the local plan, press_main_target. The group adopts that local plan at once and switches to Jev's pick when the answer arrives. A plan holds at least group.minPlanTicks and expires after group.planHorizonTicks. /thepredict inspect <mob> group shows whether the plan came from Jev or was chosen locally.

PlanWhat the group doesOffered when
press_main_targetEveryone presses the main target.Always (two or more members).
surround_targetMembers take position slots around the target.Always (two or more members).
split_targetsMembers split between targets.Three or more members.
screen_the_leaderThe squad screens the leader.The group has a leader.
harass_from_rangeRanged members harass while the others hold.A member has a ranged damaging skill.
fall_back_and_regroupThe group falls back toward the leader in two waves.The group has a leader or a member with a support skill.
search_last_knownLook for a lost target at its last known position. ThePredict moves nobody for it: your skills react to predictorplan{p=search_last_known} or PREDICTOR_PLAN_SEARCH_LAST_KNOWN.No member sees its target now, and one saw it at most group.lkpForgetTicks ago.

While there is a plan, each member gets a role. ThePredict reads what a profile can do from its choices and their Intention lines, and gives each member the role that suits it best, among the roles its Group.Roles allows (all of them when the list is empty; reserve is always possible). Roles are reassigned when the plan or the members change and every group.replanPeriodTicks; changing a member's role costs group.roleSwitchMarginMillis, so roles do not flicker.

RoleWhat the member doesThe profile can fill it when
pressureCloses to melee and keeps the target busy.It has a melee or cone damaging skill (or a vanilla hit) and an APPROACH tactic.
flankTakes a position outside the target's shield and strikes from the side.It has melee damage, an APPROACH and a FLANK tactic, or any GAP_CLOSE skill.
rangedStays in the distance band and shoots.It has a PROJECTILE, HITSCAN or AREA_AT_TARGET damaging skill and a KEEP_DISTANCE or HOLD tactic.
supportPrefers a skill that can help an ally.It has a SUSTAIN or BUFF skill that can reach allies (see Choices.<id>.TargetsAllies).
controlPrefers control while another member holds melee.It has a CONTROL, DEBUFF or INTERRUPT skill.
guardStands between the leader and the biggest threat.Always.
reserveHolds no job and waits for an opening.Always.

Members may also get a position slot around the target (the angle they should attack from), outside the exit sector.

Note search_last_known and PlanQuestion

The search_last_known plan is offered only while no member sees its target and one saw it at most group.lkpForgetTicks ago. ThePredict moves nobody for it: hook your skills to predictorplan{p=search_last_known} or to its signal. Group.PlanQuestion has no effect in this build: the plan question goes in every request that carries it, and every_heartbeat logs a warning when the profile loads.

Questions to Jev

In full mode, with a leader, the leader's profile decides with Group.Questions which questions the encounter's request carries:

ValueThe request carries
plan_and_leaderThe group plan question and the leader's own tactic question. The default for the leader in full.
plan_onlyOnly the group plan question.
leader_onlyOnly the leader's tactic question, and no plan.
membersOne tactic question per member and no plan question, as in fair and coordinate.

A member that is not asked still appears in the fight state Jev reads, and plays locally (following its role when the group has a plan). Without a leader there is no plan question and every member is asked.

Tip Mind the budget

One question per member adds up quickly. For five members the local encoder measured about 22 200 characters per request with members, and about 7 000 with plan_and_leader (roughly 2 700 to 4 700 tokens). Prefer Timing.Cadence: standard on group bosses that run in full. See Jev connection for costs and limits.

Vocabulary

Your skills can react to the group's decisions. Like every control condition, these are false at BASE and when the intent expires, even if the mob still holds its role, plan or token.

ConditionArgumentsTrue while
predictorrolerole or r: pressure, flank, ranged, support, control, guard, reserveThePredict controls the mob and the group gave it that role
predictorplanplan or p: a plan name from the table aboveThePredict controls the mob and its group follows that plan
predictortokenpool: melee or rangedThePredict controls the mob and it holds a token of that pool

Placeholders: <caster.predictor.role>, <caster.predictor.plan>, <caster.predictor.token> (melee, ranged, both or none), <caster.predictor.slot> and <caster.predictor.squad> (squad size). Each shows none when there is nothing to show. See MythicMobs vocabulary for the full list.

Signals are sent only to a mob that has a matching ~onSignal:<NAME> handler (or a generic ~onSignal). ThePredict adds no effect of its own: what happens is up to your skills.

Role signals. PREDICTOR_ROLE_<ROLE> when the mob's role changes, at most once every 5 seconds per mob:

PREDICTOR_ROLE_PRESSURE PREDICTOR_ROLE_FLANK PREDICTOR_ROLE_RANGED PREDICTOR_ROLE_SUPPORT PREDICTOR_ROLE_CONTROL PREDICTOR_ROLE_GUARD PREDICTOR_ROLE_RESERVE

Plan signals. PREDICTOR_PLAN_<PLAN> to every member when the group adopts a new plan:

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

plugins/MythicMobs/Mobs/SquadBrute.yml (excerpt)YAML
SquadBrute:
  Skills:
  - skill{s=BruteFlankCharge} @target ~onTimer:20 ?predictorrole{role=flank}
  - setvariable{var=caster.plan;value=surround;type=STRING} @self ~onSignal:PREDICTOR_PLAN_SURROUND_TARGET

The syntax of these group conditions and signals inside author skills has not been verified on a live server yet.

The Group section of a profile

AIConfig/Profiles/warden_squad.yml (excerpt)YAML
  Group:
    Mode: full
    Squad: wardens
    LeaderPriority: 80
    Weight: 2
    Questions: plan_and_leader
    OnLeaderDeath: succeed
    AgainstEntities: free

Group.Mode: full only takes effect when the global group.mode is full too. Every key is listed with its default and range in the Profile reference, and the global limits in the config.yml reference.

Note Global keys not read yet

group.idleWarnTicks, group.maxFacts, group.factOnTicks and group.factOffTicks are accepted and validated, but this build does not read them: no group fact is sent to Jev yet. A value other than the shipped one logs a warning at startup.

Inspect a member

/thepredict inspect <nearest|uuid> group adds one line per field: membershipEpoch, planEpoch, stale, state (the group mode in use), leader, squad, role, slot, plan, origin (jev, local or none), seesTarget, tokens, player and table. The exact in-game text has not 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.