> For the complete documentation index, see [llms.txt](https://docs.ragnasync.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ragnasync.com/event-logs/mob-death-log.md).

# Mob Deaths

Logs monster kills (MVPs, mini-bosses) to Discord

Announce MVP and boss kills to your Discord server. Great for tracking who's hunting bosses and celebrating big kills with your community.

## Action

`mob_death`

## When It's Used

This script triggers automatically when:

* A player kills a monster matching the configured type
* Mob death logging is enabled in channels.conf

## Why Use It

* **Track MVP hunters** - See who's farming bosses
* **Community engagement** - Celebrate big kills together
* **Server activity** - Know when MVPs are being hunted
* **Detect issues** - Spot suspicious kill patterns

## Server Configuration

In `conf/channels.conf`, add these settings in the `discord: { }` block:

```
// Mob death logging
ragnasync_mob_death_log_enabled: true
ragnasync_mob_death_log_channel_id: "1234567890123456789"
ragnasync_mob_death_log_types: "mvp,miniboss"
```

| Setting                              | Type   | Default | Description                             |
| ------------------------------------ | ------ | ------- | --------------------------------------- |
| `ragnasync_mob_death_log_enabled`    | bool   | `false` | Enable mob death logging                |
| `ragnasync_mob_death_log_channel_id` | string | `""`    | Discord channel for announcements       |
| `ragnasync_mob_death_log_types`      | string | `"all"` | Which monsters to log (comma-separated) |

### Monster Types

This filter takes a **comma-separated, case-insensitive** list of mob classes.

| Token      | What Gets Logged                                                         |
| ---------- | ------------------------------------------------------------------------ |
| `all`      | Every mob class (default)                                                |
| `normal`   | Regular mobs — **very spammy**, logs every kill across your whole server |
| `miniboss` | Mini-boss monsters                                                       |
| `mvp`      | MVPs                                                                     |

**Multiple types:** `"mvp,miniboss"`, `"mvp,miniboss,normal"`, etc.

{% hint style="warning" %}
Unknown tokens (e.g. item categories like `"card"` or `"weapon"`) are rejected with a `[Warning]: Unknown mob type '...'` line at map-server startup. If **every** token in your list is invalid, the filter falls back to "log everything" — so a typo or a wrong token list can silently produce a firehose of logs. Check your map-server startup log if a new filter seems to be ignoring you.
{% endhint %}

## Message Format

When a player kills an MVP, Discord shows a formatted log:

```
🔹 Monster Log:   | 2000001 | 150001  | PlayerName       | Baphomet        | 14:30:25 |
```

Format: `Account ID | Char ID | Character Name | Monster Name | Time`

## Data Fields

| Field         | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| `player_name` | string | Character who killed the monster |
| `mob_name`    | string | Monster name                     |
| `mob_id`      | int    | Monster ID                       |
| `account_id`  | int    | Player's account ID              |
| `char_id`     | int    | Player's character ID            |
| `channel`     | string | Discord channel ID               |

## Examples

### MVP-Only Announcements

Log only MVP kills to a public channel:

```
ragnasync_mob_death_log_enabled: true
ragnasync_mob_death_log_channel_id: "1234567890123456789"
ragnasync_mob_death_log_types: "mvp"
```

### Include Mini-Bosses

For more comprehensive boss tracking:

```
ragnasync_mob_death_log_enabled: true
ragnasync_mob_death_log_channel_id: "1234567890123456789"
ragnasync_mob_death_log_types: "mvp,miniboss"
```

### Staff Monitoring Channel

Send to a private channel for staff review:

```
ragnasync_mob_death_log_enabled: true
ragnasync_mob_death_log_channel_id: "9999999999999999999"  // #staff-logs
ragnasync_mob_death_log_types: "mvp"
```

## Custom Messages

Want to customize how these messages look? Head to the **Message Routes** page on your dashboard, set the format to **Custom Message**, and compose your own template using `{{placeholder}}` syntax.

**Example template:**

```
:trophy: {{player_name}} defeated {{mob_name}}!
```

**Available placeholders for this event:**

| Placeholder        | Example                          |
| ------------------ | -------------------------------- |
| `{{player_name}}`  | Marky                            |
| `{{mob_name}}`     | Poring                           |
| `{{mob_id}}`       | 1002                             |
| `{{src_template}}` | :trophy: \[Marky] killed Poring! |

{% hint style="info" %}
`{{src_template}}` contains the pre-formatted message from your game server's `[template: ...]` field. If your server doesn't send one, it resolves to empty. See [Message Templates](/ragnascript/message-templates.md) for details.
{% endhint %}

See [Message Routing](/ragnascript/message-routing.md) for more about formats, conditions, and multi-channel routing.

## Related

* [Mob Item Drop Log](/event-logs/drops/mob-item-drop-log.md) - Log rare drops from monster kills
* [Homunculus Item Drop Log](/event-logs/drops/hom-item-drop-log.md) - Log drops from homunculus kills
* [Mercenary Item Drop Log](/event-logs/drops/merc-item-drop-log.md) - Log drops from mercenary kills
