Skip to content

Pack editor ​

/whm pack opens an editor for everything in the pack folder: rules, templates and settings & locks.

WhoSingle player with cheats, or operators (permission level 2) on a server with What Hit Me? 2.x
Opened by/whm pack, or the Pack editor... button in the settings screen
Server-authoritativeThe client only sends edits. The server checks them, writes the JSON file, reloads the pack at once and sends the new state to everyone, so every player gets the change without /whm reload.
SavingRules: when you press Done, press Enter in a one-line field, or select another entry / tab / category. Settings and Templates tabs: at once.
Backup and undoBefore a file changes, its previous version is copied to config/whathitme/.backup/<time>/. The 60 newest backup folders are kept. Undo restores the files of your last change: 30 steps per player, kept until the server stops (personal mode: 30 steps while the screen is open).
VersionsEvery supported version and loader: Forge 1.7.10 - 26.3, Fabric 1.14 - 26.3, NeoForge 1.20.1 - 26.3. Clients of 1.7.10 / 1.8.9 are not told their operator level, so /whm pack asks the server first.

The top left switches between Pack (the modpack, operators) and Personal (your own entries). Pack mode has three tabs: Rules, Templates, Settings.

Rules tab ​

The Rules tab: category tree, the rules of a category and the selected rule with two columns

  • Categories (left): every JSON file of the pack folder is a category, sub-folders are groups. #n is the position in the load order; the checkbox switches a category on or off; ✎ marks a memo; red ! marks a file with a syntax error (shown, not editable). Rules registered by scripts appear under Scripts (read-only).
  • Rules (middle): the rules of the selected category, with search, + Add and ↑ / ↓. The list order is the priority. Each row shows the match key and the name ([1?] = the rule has a condition); while you type or pick a match key the row follows at once.
  • Rule (right): the form of the selected rule with Done, Revert, Delete and Move to... (another category).
  • In windows narrower than 400 GUI pixels (large GUI scale, old versions) the three parts are shown one at a time with a < button to go back.

The rule form ​

From top to bottom:

  1. Rule on - off keeps the rule in the file but does not use it.
  2. Match key with Pick... (pickers).
  3. Conditions (optional): + Condition... opens the condition picker, + Type one adds an empty line; each line has ✕. Lists "If (all of these)", "Any (at least one)", "Unless (none of these)".
  4. Actions: without conditions one column; with a condition two columns, Conditions met and Conditions not met (stacked in narrow windows). Each has name, tip, death message, ignore (not set / yes / no), hide checkboxes, and commands with once per player and cooldown.
  5. Memo - your note, never shown to players.
  6. Preview - "For this hit it becomes:" (below).

Long texts wrap and the fields grow, so a long tip or death message is always fully visible. Up / Down move between the lines of a wrapped field.

A rule without conditions: one column

Adding a rule: + Add, a mob from the picker with the Hostile filter, a condition, the met and not met columns, Done

Pickers ​

Pick... opens the match-key builder with four lists the server sends:

ListFilters
Damage ids (registries, the scanner, recorded deaths)Fire, Magic, Explosion, Projectile, Bypasses armor
Mobs (every registered entity)Boss, Hostile, Neutral, Passive
Items (every item of every mod)Weapon, Armor, Tool, Food, Block
Dimensions (every level the server has, also ones nobody visited; 1.12.2 and older: registered dimension ids)

Every list has a search field and an All mods filter. Clicking a row fills that part of the key (damage id, @entity, @item:, @dim:); *, mod:* and mob:* insert wildcards (what each button writes: Wildcards: where to click). Result shows the finished match key.

The mob list with the Boss filter

The item list with the Weapon filter

The damage id list with the Fire filter

The dimension list

Condition picker ​

The condition picker: prefixes on the left, the advancements of the server on the right

The condition prefixes with the values the server can list: advancements, scoreboard objectives, tags of online players, script conditions, and for quest mods what their API offers (FTB Quests chapters and quests with their titles, Game Stages known stages, Better Questing quests with their names, Heracles quests with their titles). Greyed prefixes are not available on this server (mod missing / version). not (!) negates; for score: choose the comparison and the number; All of / Any of / None of chooses the list. Any value can also be typed. See conditions.

With FTB Quests installed: its chapters and quests with their titles

Inline checks ​

Under the match key, while you type, in red: why the key can never match - a part without namespace (a, @zombie: "has no namespace (modid:) and never matches. Did you mean @minecraft:zombie?") or a prefix without value (@item:). Such a key is never saved. The key builder shows the same under its result.

Also under the fields: unknown condition prefixes and wrong score: syntax (refused), conditions of a missing mod or an unregistered script condition (warning, counts as false), a match key that matches no known damage id / mob, unknown or switched-off template variables, "not met" actions on a rule without conditions, and the server's /whm reload warnings for that rule.

Preview ​

The preview at the end of the form: the rule each field comes from and the chat summary

At the end of every rule: As chooses an online player whose progress is used, the field next to it lists conditions to assume, Test runs exactly what /whm test <damage_id> ... --as <player> --assume <condition> prints for the rule's match key: which rule each field comes from, name, tip, triggers, death message and the chat summary. It runs when you select a rule and after every save; it shows the saved rules ("press Done to update it" while you edit).

Categories and folders ​

The buttons under the category tree:

ButtonDoes
+New category: a JSON file in the selected folder
+□New folder (a group in the tree)
✎Rename the category or folder
⇨Move it into another folder
↑ ↓Load earlier / later. Rules of earlier files come first and win.
MMemo of the category
✕Delete (with a backup; Undo restores it). Folders must be empty.

The memo of a category (M); a ✎ in the tree marks categories with a memo

Deleting a rule and getting it back with Undo

The editor writes order, enabled and memo at the top of a file, and memo / enabled inside rules. Keys it does not know are kept. order, enabled and the category memo are written without touching the rest of the text, so comments survive; saving a rule rewrites its file, and hand-written comments in that file are lost - use the memo fields instead.

Templates tab ​

The Templates tab: the five outputs with their source, Edit..., Reset and the lock

One row per output (Hover, Line, Summary, Alert, Copy) with its source ("Pack default from file (n lines)" or "Built-in look"), Edit..., Reset and the lock. Edit... opens the template editor with a live preview for the pack default; Done there saves it (into the last file that has the output, otherwise templates/pack-templates.json). Reset removes the pack default of that output from every pack file. A locked output is read-only in the players' /whm templates.

Settings tab ​

Values and locks of every setting, command locks, personal-feature locks, template output locks and variables, and unlock conditions. See Settings & locks.

The Settings tab

1.3 files ​

When a pack file still has keys of the 1.3 format, a red banner on every tab lists the files and keys (they are not read) with Convert to the 2.0 format and Delete 1.3 entries. See Files in the 1.3 format.

The 1.3 banner

Two editors at once ​

The title shows who else has the editor open. When someone saves, every other editor gets the new state and a notice "name changed file". If you are editing a rule of that file, a red line warns you: pressing Done saves your version (last save wins).

Security ​

Everything is checked on the server: permission (operator / single player owner) for every message, file and folder names (letters, digits, space, - _ . ( ); paths stay inside config/whathitme/pack/, no ..), known sections and value types only, size limits (8000 characters per text, 600 per match key, 512 KB per file, 5000 entries per section, 500 categories). A refused edit leaves the files unchanged and shows the reason in the status line.

Personal mode ​

Personal mode: own names, tips and hidden damage

The same editor for your own entries: Pack editor... in the settings screen (/whm config) when you are not an operator (/whm pack itself is for operators only). One tab, "My names and tips": one entry per match key with name, tip and ignore, the same pickers and the preview. Conditions, death messages, triggers and hide do not exist there. A key that can never match shows why under it while you type, as in pack mode. Entries are saved in your whathitme-client.cfg. Kinds the modpack locked are read-only ("(locked by the modpack)"). Operators switch between Pack and Personal with the tabs at the top left.

Made by junjun1z. The mods are MIT licensed.