DP Crosschat+DiscordBot — ArkApi plugin v2.0
=============================================

WHAT'S IN HERE
--------------
  DiscordBridge\        <- copy this WHOLE FOLDER onto each ARK server
      DiscordBridge.dll     compiled plugin (x64)
      PluginInfo.json       plugin metadata (v2.0)
      config.json           the file you edit
      example.config.json   same fields, with a comment explaining each one
      INSTALL.md            full install guide + troubleshooting
      README.md             what the plugin does


INSTALL IN 3 STEPS
------------------
1. Copy the DiscordBridge folder into, on each server:

       <server>\ShooterGame\Binaries\Win64\ArkApi\Plugins\

   You should end up with:
       ...\ArkApi\Plugins\DiscordBridge\DiscordBridge.dll

   The folder AND the dll must both stay named "DiscordBridge".

2. Edit config.json — normally only two fields:

       BridgeUrl   http://127.0.0.1:8765     (same PC as the bot)
                   http://<bot-PC-IP>:8765   (different PC)
       ApiKey      leave blank unless the bot has a bridge API key set,
                   in which case it must match exactly

   You do NOT need to set MapId — v2.0 detects the map by itself, so the
   same config works on every server in the cluster.

3. Restart the map. The ArkApi log should show:
       Loaded plugin DiscordBridge ... Map=<auto-detect>
       DiscordBridge detected map 'Ragnarok' -> MapId 'ragnarok'


*** IMPORTANT: TWO SERVERS OF THE SAME MAP ***
----------------------------------------------
If you run two copies of one map (e.g. Rag-PVE and Rag-PVP), you MUST set
MapId manually on each, or the bot cannot tell them apart:

  - cross-chat between those two servers stops working
  - their player lists merge in the status embed

Give each its own plugin folder and a distinct MapId:

  Ragnarok PVE ->  "MapId": "ragnarok-pve"
  Ragnarok PVP ->  "MapId": "ragnarok-pvp"

Then add matching entries in the bot's config, using "name" for the pretty
label players and Discord actually see:

  { "mapId": "ragnarok-pve", "rconPort": 27020, "name": "Rag-PVE" }
  { "mapId": "ragnarok-pvp", "rconPort": 27021, "name": "Rag-PVP" }

The bot now warns you at startup if it spots two maps sharing an id.


SERVER REQUIREMENTS
-------------------
  - ArkApi installed (log shows "API was successfully loaded")
  - Microsoft Visual C++ 2015-2022 x64 Redistributable
    (the dll needs VCRUNTIME140.dll / MSVCP140.dll)

See DiscordBridge\INSTALL.md for troubleshooting.
