> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/data/plugins/bridge.md).

# Bridge

GameServer side of the Bridge add-on - which events are exported to BridgeServer

The GameServer half of the Bridge add-on. It watches gameplay outcomes and pushes them to [BridgeServer](/docs/bridgeserver/bridgeserver.md), which stores them, streams them, and announces them in Discord.

{% hint style="info" %}
Bridge is a paid add-on. The `axiom-bridge` module must be on your license or this plugin stays inert regardless of what this file says, and BridgeServer refuses to start.
{% endhint %}

## File Location

```
Data/Plugins/Bridge/Config.xml
```

Loaded once at GameServer startup. If the file is missing, the plugin runs with its defaults (enabled, `127.0.0.1:55980`).

## Schema

```xml
<Bridge Enabled="1" Host="127.0.0.1" Port="55980" Key=""
        ChatExport="1" ConsoleLog="0" MobKillExport="0"/>
```

## Attributes

| Attribute       | Type                    | Default     | Effect                                                                                                                          |
| --------------- | ----------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `Enabled`       | 0/1                     | `1`         | Master toggle. `0` = nothing is exported and no connection is made                                                              |
| `Host`          | hostname/IP             | `127.0.0.1` | Where BridgeServer is listening                                                                                                 |
| `Port`          | int                     | `55980`     | BridgeServer's ingest port. Must match `IngestPortTCP` in [BridgeServer.ini](/docs/bridgeserver/bridgeserver-ini.md)            |
| `Key`           | string (up to 32 chars) | empty       | Shared key presented when connecting. Must match `SharedKey` in BridgeServer.ini. Empty on both sides = any GameServer accepted |
| `ChatExport`    | 0/1                     | `1`         | `1` = public chat messages are exported. Global `/post` messages are always exported                                            |
| `ConsoleLog`    | 0/1                     | `0`         | `1` = echo login/logout to the GameServer console. Debug aid                                                                    |
| `MobKillExport` | 0/1                     | `0`         | `1` = export **every** monster kill. This is a firehose; boss kills are exported separately regardless                          |

## Boss classes

Boss kills are filtered by the shared list in `Data\Plugins\BossClasses.xml` (used by the Bridge exporter and the Achievement plugin alike). This file has no boss list of its own.

```xml
<BossClasses>
    <Boss Class="43"  Comment="Golden Budge Dragon"/>
    <Boss Class="275" Comment="Kundun (Kalima 7)"/>
</BossClasses>
```

Empty or missing file = no boss-kill events anywhere. Class numbers come from [Monster.xml](/docs/data/monster/monster.md). The shipped file lists every Season 6 golden (43, 53, 54, 78-83, 493-502), the invasion bosses (42 Red Dragon, 55 Death King, 135 White Wizard, 476 Cursed Santa, 561 Medusa) and the world bosses (275 Kundun, 295 Erohim, 349 Balgass, 361 Nightmare, 364 Maya, 459 Selupan, 77 Phoenix of Darkness).

## What Gets Exported

| Category         | Events                                                                                                                                 |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Combat           | Player kills, boss kills, all monster kills (opt-in)                                                                                   |
| Loot and economy | Rare drops (excellent, ancient or socketed ground drops), personal shop sales, sell-post listings, completed trades, chaos mix results |
| Progression      | Resets, grand resets, master resets, level ups                                                                                         |
| Events           | Blood Castle, Devil Square, Chaos Castle, invasions and Castle Siege starting and ending, plus winners                                 |
| Social           | Global `/post` messages, public chat (opt-in), logins and logouts                                                                      |
| Gauges           | Online count total and per map every 30 seconds, event schedule with countdowns every 60 seconds                                       |

## Important Behavior

* **The game is never made to wait.** Events are handed off and the GameServer moves on immediately. If BridgeServer is down, restarting, or slow, the GameServer keeps running at full speed and drops its own pending events rather than stalling.
* **Events produced while BridgeServer is unreachable are lost.** The connection retries on its own, but there is no backlog replay - a Bridge outage is a gap in the feed, never a gap in the game.
* **The GameServer connects outward.** BridgeServer never opens a connection into your game network.
* **Rare drops are ground drops only**, filtered to excellent, ancient or socketed items - a full loot log is not exported.
* **Chat volume.** `ChatExport="1"` sends every public chat line. On a busy server this dwarfs everything else in the history store; `/post` alone is usually what you want relayed.
* **Restart after changing this file.** It is read at startup.

## Common Issues

* **No events arrive** - `Enabled="0"`, BridgeServer is not running, or `Host`/`Port` do not match `IngestPortTCP`
* **BridgeServer logs a rejected connection** - `Key` here and `SharedKey` in BridgeServer.ini differ; they must be identical (or empty on both sides)
* **No boss announcements** - `Data\Plugins\BossClasses.xml` is missing or empty, or the class numbers do not match the monsters actually spawned on your server
* **Discord is drowning in messages** - `MobKillExport="1"` or `ChatExport="1"`, or `DiscordRelayAll=1` in BridgeServer.ini
* **The plugin never loads and nothing is logged** - the `axiom-bridge` module is not on your license; that is a silent skip by design
