ThePredictdocs v0.0.1 RC

Administration

Profile overlays

Change a few keys of an author's profile from the server side, without touching the author's file, and undo it with one command.

An overlay lets an administrator retune a profile on one server (calmer cadence, a lower zone mode, a smaller zone) without editing the author's file. ThePredict never writes the author's profile: the profile a mob uses becomes the author's profile plus the overlay, and removing the overlay brings the author's version back.

Each overlay belongs to exactly one profile. Nothing is ever applied on its own: autoconfig.autoApply only accepts "off".

The proposal file

A proposal is a plain text file you write under plugins/ThePredict/autoconfig/, one key=value per line. Lines starting with # are comments.

plugins/ThePredict/autoconfig/thepredict_guardian.txtText
# Calmer guardian on the survival server
profile=thepredict_guardian
base=<fingerprint of the author's profile>
Timing.Cadence=standard
Zone.Mode=guard
Zone.Radius=32
LineMeaning
profile=<id>The profile ID the overlay belongs to. Without it, the file name without its extension is used.
base=<fingerprint>Fingerprint of the author's profile the proposal was written for. Required by apply.
pin=<key>Leaves that key out: the author's value is kept.
<key>=<value>A profile key and its new value.

To get the fingerprint, leave base= out and run apply once: the refusal OVERLAY_STALE prints the fingerprint of the profile as it is now (... (base <fingerprint>)). Copy it into the file and apply again.

Keys an overlay can set

KeyNotes
Timing.Cadencereactive or standard.
Timing.TickLayercasts, reactions or full. Above decision.tickLayer.mode it is lowered to the global mode, like a profile's, with a warning.
Timing.Reactionsall, survival or none.
Timing.ReactiveInterval4 to 20 ticks.
Zone.ModeCan only lower zone.mode, and cannot be off.
Zone.Radius8 to 64 blocks.
Group.ModeCan only lower group.mode, and cannot be off.
Patterns.ModeCan only lower patterns.mode.
Decision.Pruning, Decision.MaxOptions, Decision.CandidateScoring, Decision.DiversityAccepted, but these profile keys have no effect in fights yet (see the Profile reference).

Other keys are ignored. Mode values are read without case, so Zone.Mode=OFF is refused like off.

Commands

All of them need the permission thepredict.autoconfig. The <path> must contain plugins/ThePredict/autoconfig/ and no ..; anything else answers Autoconfig writes only under plugins/ThePredict/autoconfig/.

CommandWhat it does
/thepredict autoconfig or autoconfig statusAnswers autoApply=off.
/thepredict autoconfig import <path>Copies the proposal into autoconfig/inbox/. It changes nothing in fights.
/thepredict autoconfig apply <path>Checks the proposal and writes autoconfig/active/<file name>: first profile= and base=, then the keys that are not pinned. Then it reloads the profile catalog, and live mobs switch to the new profile as after /mm reload.
/thepredict autoconfig show <path>Shows the active copy of that proposal, or none.
/thepredict autoconfig revert <path>Deletes the active copy and reloads the catalog: the author's profile rules again.

The file commands answer queued and report the result when the storage thread finishes. Without the storage writer they answer Autoconfig <action> needs the storage writer.

Console
/thepredict autoconfig apply plugins/ThePredict/autoconfig/thepredict_guardian.txt
/thepredict autoconfig show plugins/ThePredict/autoconfig/thepredict_guardian.txt
/thepredict autoconfig revert plugins/ThePredict/autoconfig/thepredict_guardian.txt

To change the overlay of a profile, revert the old one first, then apply the new proposal.

When apply refuses

apply checks everything a reload would check and writes nothing when it refuses:

RefusalCause
OVERLAY_RAISES_GLOBALA key raises a global mode (Zone.Mode, Group.Mode or Patterns.Mode above zone.mode, group.mode or patterns.mode), or sets Zone.Mode or Group.Mode to off.
OVERLAY_INVALIDA mode is not a mode, base= is missing, a line has no =, or a key cannot be applied to the profile (for example Zone.Radius=100; the reason is given).
OVERLAY_UNREADABLEThe file is larger than 64 KiB.
OVERLAY_UNMATCHEDNo profile read now has that ID.
OVERLAY_STALEbase= is not the fingerprint of the profile read now; the message gives the current one.

On every reload

At startup, on every /mm reload and after each apply or revert, ThePredict reads up to 256 files of at most 64 KiB from autoconfig/active/ and applies each one to its own profile. A key from the overlay wins over the same key of the author's profile. When a file cannot be applied, the author's profile is used and the console warns, naming the file:

WarningCause
OVERLAY_UNMATCHEDNo profile with that ID.
OVERLAY_DUPLICATEAn earlier file already holds the overlay of that profile.
OVERLAY_STALEThe author changed the profile after the overlay was built.
OVERLAY_INVALIDA key does not apply.
OVERLAY_UNREADABLEThe file is unreadable or larger than 64 KiB.

An overlay whose Timing.TickLayer is above decision.tickLayer.mode still applies, lowered to the global mode, and the console warns, for example autoconfig/active/thepredict_guardian.txt: thepredict_guardian: Timing.TickLayer is above the global reactions; using reactions.

When the author edits the profile, its fingerprint changes, the overlay goes stale and the author's version rules again until you write a new proposal.

Note No automatic search yet

The autoconfig.* keys size an offline search for good overlays. That search does not run on the server in this release: proposals are written by hand.

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.