Template editor
An in-game screen to write templates with a live preview. It works on every supported version and loader and needs the mod on the client.


Opening it
/whm template- The Templates... button in the settings screen (also from the Forge / NeoForge mods list and Mod Menu)
Step by step
- Pick an output with the tabs at the top: Hover, Line, Summary, Alert, Copy. In single player with cheats there is also Death msgs.
- Edit the lines. Each template line is a single-line text field.
+ Lineadds a line;↑/↓move a line;✕deletes it.- Usual text editing works: cursor, selection, Ctrl+A / C / V / X, Home / End, Backspace / Delete.
- Insert variables from the list on the right. Click a variable to insert it at the cursor. Hover it (or select it) to see a one-line description at the bottom. Variables are grouped: Damage, Damage type, Attacker, Context, Other, and Script (variables registered by scripts on the server, with their description).
- Watch the preview below the lines. It is drawn by the same code as the real output: a tooltip for Hover, a panel line for Line, chat lines for Summary and Alert, a plain text box for Copy. It updates on every keystroke.
- Switch the preview data with Sample death / Latest death: your latest real death, or a built-in sample death.
- Save.
Unknown variables are shown in red in the text field, so typos are easy to spot.
Buttons
| Button | What it does | Available |
|---|---|---|
| Save | Saves to your personal templates (whathitme-client-templates.json) | When the output is not locked |
| Save to pack | Writes config/whathitme/pack/templates/<output>.json | Single player with cheats |
| Reset | Removes your personal template of this output | When the output is not locked |
| Sample death / Latest death | Switches the preview data | Always |
| Close | Leaves the editor | Always |
Opened from the Templates tab of the pack editor (Edit...), it edits the pack default of that output; the buttons are Done (saves the pack default), Sample death / Latest death and Cancel.
The line under the text fields tells you where the shown template comes from: Your personal template, Modpack template, or Built-in output (editing starts from an example).
Locked outputs
If the pack locks an output, the editor shows the pack's template read-only with the note Locked by the modpack (read-only). Save and Reset are disabled.

The screenshot also shows the syntax: fallbacks ({mob_name|unknown}, {attacker_owner|nobody}), decimals ({damage:2}) and the mob_ alias ({mob_name}).
Long lines and switched-off variables
Every line is a wrapping field that grows with its text, so long lines stay readable; Up / Down move inside a wrapped line first, then to the next line. Variables the pack switched off are grey in the variable list, and a line that uses one shows "Switched off by the modpack (renders empty)".
Rules in the preview
When the latest death was changed by a rule, the preview says so, for example progression rule: enforce, attacker, .... Rules are edited in the pack editor; check them with its preview or /whm test --as / --assume.
Workflow for pack makers
Build the templates in a single player test world with cheats, use Save to pack, then copy config/whathitme/pack/templates/ into your pack.
