← Okami Discord Webhook · All mods

Okami Discord Webhook

Relay Arma Reforger events to Discord with per-event files, payload mode selection, and multi-webhook routing.

Okami Squadron emblem

Overview

Okami Discord Webhook sends Arma Reforger server events to your Discord server using configurable webhooks. Each event type can use a different webhook URL, so you can split traffic across channels-for example a dedicated killfeed channel, a general activity channel, and an admin channel.

This includes:

  • Per-event config files
  • Editable payload style per event (embed or raw or custom_json)
  • Dedicated server scenario start/end notifications
  • Server name in embed footer by default

This page is the canonical reference for all shipped config files and keys.

Warnings

  • If you are migrating from legacy config, review the migration notes and verify each event file after first boot.
  • Only global chat is relayed (channelId 0).

Requirements

  • Arma Reforger 1.6+
  • Mod loaded on the server (server-side event hooks)
  • One or more Discord webhook URLs (create under channel Settings -> Integrations -> Webhooks)
  • No external mod dependencies

Configuration

On first run, the mod creates:

Profile/OkamiDiscordWebhook/

With the following structure:

OkamiDiscordWebhook/
  Webhooks.json
  settings.json
  events/
    examples/
      payload_embed.example.json
      payload_raw.example.json
      payload_custom_json.example.json
    player_connected/player_connected.json
    player_disconnected/player_disconnected.json
    player_killed/player_killed.json
    friendly_fire/friendly_fire.json
    chat/chat.json
    admin_role_changed/admin_role_changed.json
    admin_moderation/admin_moderation.json
    vehicle_destroyed/vehicle_destroyed.json
    objective_state_changed/objective_state_changed.json
    server_started/server_started.json
    server_stopped/server_stopped.json

An example copy of this full structure is included in the repository at:

scripts/examples/OkamiDiscordWebhook/

The live mod also auto-generates payload examples in events/examples/ so server owners can reference all three payload formats directly in their profile config folder.

Edit this file while the server is stopped, then restart so changes apply.

Legacy Migration

If an old legacy config exists at Profile/JemsireDiscordWebhook/settings.json, the mod attempts a one-time migration into the new file layout on first load of the new system.

Migrated fields:

  • webhooks
  • eventPlayerKilled
  • eventPlayerConnected
  • eventPlayerDisconnected
  • eventChat

Not migrated (legacy did not contain equivalents):

  • serverName
  • New friendly_fire event file
  • New server_started / server_stopped event files
  • New payload template fields (payloadType, embed/raw templates/colors/footer flag)

Main Files

Webhooks.json

Stores reusable webhook targets.

{
  "webhooks": [
    { "id": "general", "url": "" },
    { "id": "admin", "url": "" },
    { "id": "killfeed", "url": "" }
  ],
}

settings.json

Global settings shared by all events.

{
  "settings": {
    "serverName": ""
  }
}
  • serverName: Used in embed footer when includeServerNameInFooter is enabled for an event.

Event File Schema

Each event file uses:

{
  "event": {
    "webhookId": "general",
    "enabled": true,
    "payload": {
      "type": "embed",
      "embed": {
        "title": "Event",
        "descriptionTemplate": "{MESSAGE}",
        "color": 3447003,
        "useFactionColor": false,
        "includeServerNameInFooter": true
      }
    }
  }
}

Key meanings:

  • webhookId: Must match an id in Webhooks.json.
  • enabled: Enables/disables this event.
  • includeFriendlyAITeamKills: Friendly-fire only. When true, player-on-friendly-AI teamkills are posted; when false, only PvP teamkills are posted.
  • payload.type: Selects payload mode: embed, raw, custom_json.
  • payload.embed: Settings used when type is embed.
  • payload.embed.useFactionColor: When true, chat embeds can derive color from sender faction (fallback is payload.embed.color).
  • payload.raw: Settings used when type is raw.
  • payload.custom: Settings used when type is custom_json.

Only the selected payload subsection is used at runtime.

Template Tokens

These tokens can be used in payload.raw.messageTemplate, payload.custom.jsonTemplate, payload.embed.title, and payload.embed.descriptionTemplate:

  • {MESSAGE}: Final event message text
  • {PLAYER}: Main player (when available)
  • {KILLER}: Killer name (kill events)
  • {SERVER_NAME}: Value from settings.serverName (or fallback)

Event Behavior

EventWhen it firesNotes
Player connectedPlayer finishes joiningMessage sent after a short delay so the player name resolves.
Player disconnectedPlayer leavesSent when player leaves.
Player killedDeath with instigator contextSupports player or AI/environment killer and includes kill context (vehicle or weapon/infantry).
Friendly fireTeamkill detectedAI-victim teamkills are controlled by includeFriendlyAITeamKills (default: true).
ChatNew message on global chat (channelId 0)Includes role/faction tags and can use faction embed color.
Admin role changedRole flags changeFires when a player’s role flags are modified.
Admin moderationModeration disconnectsFires on kick, vote-kick, ban, and temp-ban disconnect reasons.
Vehicle destroyedVehicle entity destroyedFires when a vehicle is destroyed.
Objective / state changedConflict ownership changesFires when a point/base changes owning faction (capture/loss).
Server startedScenario/game startDedicated startup relay event.
Server stoppedScenario/game endDedicated shutdown relay event.

Message text is sanitized for JSON (quotes and newlines are adjusted server-side).

Payload Mode Examples

Raw style

{
  "event": {
    "payload": {
      "type": "raw",
      "raw": {
        "messageTemplate": "SERVER [{SERVER_NAME}] | {MESSAGE}"
      }
    }
  }
}

Embed style

{
  "event": {
    "payload": {
      "type": "embed",
      "embed": {
        "title": "Okami Event",
        "descriptionTemplate": "{MESSAGE}",
        "color": 5763719,
        "useFactionColor": false,
        "includeServerNameInFooter": true
      }
    }
  }
}

Chat with faction color (embed)

{
  "event": {
    "payload": {
      "type": "embed",
      "embed": {
        "title": "Global Chat",
        "descriptionTemplate": "{MESSAGE}",
        "color": 10181046,
        "useFactionColor": true,
        "includeServerNameInFooter": true
      }
    }
  }
}

Full custom JSON style

{
  "event": {
    "payload": {
      "type": "custom_json",
      "custom": {
        "jsonTemplate": "{\"content\":\"[{SERVER_NAME}] {MESSAGE}\",\"username\":\"Okami Relay\",\"embeds\":[{\"title\":\"Relay\",\"description\":\"Player: {PLAYER}\"}]}"
      }
    }
  }
}

Gameplay Notes

  • Events are processed server-side and sent to Discord via HTTPS (standard webhook POST with JSON content).
  • Global chat relay only mirrors the global channel; other channels are ignored.
  • Works with Jemsire Chat Faction Tags for richer faction display in-game; Discord relay already includes faction keys from the faction manager.
  • Keep the game mode component on your game mode prefab so gameplay events are captured.
  • No separate per-scenario script is required for basic usage.

Troubleshooting

IssueWhat to check
Nothing in DiscordCorrect webhook URL, matching webhookId, and event enabled: true.
One event not sendingVerify that specific event JSON file and webhookId.
Footer server name missingEnsure includeServerNameInFooter: true and settings.serverName are set.
Chat not sentOnly global chat (channelId 0) is relayed.
JSON not loadingUse strict JSON only (no comments or trailing commas).
404 or webhook errors from DiscordRegenerate the webhook URL in Discord; URLs are secret-do not share publicly.

Credits

Created by TinyTank800.

Compatibility

  • Arma Reforger 1.6+
  • Works across supported scenarios/game modes with component setup.