Skip to content

Modpack makers: overview ​

Why include What Hit Me? ​

  • Fewer "what killed me?" questions in your Discord and issue tracker. Players see the attacker, its mod and the damage type themselves.
  • Guide players through your pack's dangers with your own names and tips, matched by damage type, attacker, weapon and dimension.
  • Keep secrets until players earn them: show ??? and no tip until the boss quest is done, unlock armor details or commands with progress.
  • Safe to add late: no dependencies, no world data, no blocks or items, nothing in chat on join. Remove it at any time.
  • MIT license: include it in any pack without asking.

What you can customize ​

GoalToolPage
Give damage a better name, write your own tipsrule actions name, hintNames, tips, ignore & hide
Hide noise (cactus, modded ticks)rule action ignoreNames, tips, ignore & hide
Replace vanilla death messagesrule action deathMessageDeath messages
Run commands when someone diesrule action triggersTriggers
Keep things secret until the player progressesrule conditions, else, hideRules, Conditions
Match by attacker, weapon, dimensionmatch keysMatch keys
Set defaults and lock settingssettingsSettings & locks
Lock commands and personal featureslocksSettings & locks
Unlock settings and commands with progressunlock conditionsSettings & locks
Rewrite the panel, hover, summary, alerts, copy texttemplatesTemplates
Switch template variables offdisabledVariablesSettings & locks
Require the mod on every clientrequireClientModVersions & requireClientMod
Use quest progress (FTB Quests, Better Questing, Heracles, Game Stages)conditionsQuest mods
Drive it from KubeJS / CraftTweaker / MineTweakerscript API 2Script integration
Find every damage id of your packscanner, pickersScanner & /whm test
Edit all of this in game/whm packPack editor

Quick start (5 minutes) ​

  1. Start the game (or server) once with the mod. It creates config/whathitme/pack/ with commented examples.

  2. Die to something in your pack, hover the killing blow and click [Copy ID]. Or open /whm pack, press + Add and Pick... to browse every damage id, mob, item and dimension.

  3. Create config/whathitme/pack/mypack.json (or press Done in the pack editor):

    json
    {
      "rules": [
        { "match": "minecraft:outOfWorld", "then": { "name": "&5The Abyss" } },
        { "match": "mob:minecraft:creeper", "then": { "hint": "Creepers hiss before exploding - sprint away!" } }
      ]
    }
  4. Run /whm reload (op). It reports how many pack files were read and any problem. The pack editor reloads by itself.

  5. Check the result without dying: /whm test mob:minecraft:creeper, or the preview under the rule in the pack editor.

Where values come from ​

Rules (pack files, then scripts): first rule from the top per field
        |  personal names, tips, hidden damage of the player win (unless locked or the rule hides fields)
Templates: personal > pack > built-in (unless the output is locked)
Settings: locked pack value > the player's own value > pack value > built-in default
  • Display switches: an element is shown only when it is on in both the player's file and the world / server file.
  • Automatic tips are shown when no rule sets a tip and the tip is not hidden.

Shipping it in a modpack ​

Ship your config/whathitme/pack/ folder in the client export and the server pack. Do not ship the player files whathitme-client.cfg and whathitme-client-templates.json, or pack updates overwrite your players' own choices. The full list, the export steps and what locks do after release: Shipping your pack.

Translations

Every rule name, tip, death message and template line can be a translation key: lang:mypack.hint.lava. Add the keys to a resource pack (or your pack's KubeJS / resource loader assets) and every player sees their language.

Made by junjun1z. The mods are MIT licensed.