You are viewing a potentially older version of this package. View all versions.
warpalicious-DiscordTools-1.4.1 icon

DiscordTools

Client/server tools for collecting full Valheim client logs on a dedicated server.

Date uploaded 19 hours ago
Version 1.4.1
Download link warpalicious-DiscordTools-1.4.1.zip
Downloads 51
Dependency string warpalicious-DiscordTools-1.4.1

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333

README

DiscordTools

A BepInEx client/server mod for collecting full client LogOutput.log files on a dedicated Valheim server.

Features

  • Server command:
    client-logs {playerNameOrSteamID}
    
  • Client uploads on logout.
  • Client attempts upload on normal quit.
  • Full log file is gzip-compressed before transfer.
  • Server stores logs by player name and stable player ID for later lookup.
  • Server writes JSON metadata and lookup indexes.
  • Server uploads received logs as .log files to any compatible Discord bot API when configured.

Discord linking, creative inventory, creative biome override, and siege portal client bridge behavior live in PraetorisClient.

How to use

  • Requires a Discord bot with a compatible upload API if you want logs posted to Discord.
  • Install DiscordTools on the dedicated server and on every client that should be able to send logs.
  • Set DISCORDTOOLS_BOT_API_URL and DISCORDTOOLS_BOT_API_KEY on the dedicated server.
  • Start the server and have the player join.
  • Run client-logs {playerNameOrSteamID} on the server to request that player's log.
  • Logs are saved on the server disk and, when configured, sent to Discord as a .log attachment.

Server Storage

Logs are stored under BepInEx/client-logs by default:

client-logs/
  players/{playerName}_{playerId}/
    player.json
    latest.json
    logs/{yyyy-MM}/
      {timestamp}_{reason}_{playerName}_LogOutput.log.gz
      {timestamp}_{reason}_{playerName}_LogOutput.json
  index/
    players.json
    recent.json
  incoming/
  bot-upload-failed/

Build

dotnet build DiscordTools.csproj

The built DLL is written to bin/Debug/DiscordTools.dll.

Configuration

The plugin GUID is warpalicious.DiscordTools. Configure the generated file:

BepInEx/config/warpalicious.DiscordTools.cfg

Clients do not need the bot URL or API key. Keep bot credentials server-only.

Preferred dedicated-server setup:

export DISCORDTOOLS_BOT_API_URL="https://your-bot-host.example.com/api/client-log"
export DISCORDTOOLS_BOT_API_KEY="shared-secret"

The BepInEx config can also be used for private dedicated-server installs, but do not ship a config containing ApiKey to clients:

[BotApi]
PostToBotApi = true
ApiUrl = https://your-bot-host.example.com/api/client-log
ApiKey = shared-secret

Fresh installs default ApiUrl and ApiKey to empty values.

Archived logs are retained for 30 days by default. To keep logs forever, set RetentionDays to 0.

CHANGELOG

Version Update Notes
1.4.1 - Fixes disconnect logout handling so client log upload attempts do not repeatedly re-enter Valheim logout
- Keeps logout-triggered log upload attempts enabled while allowing vanilla disconnect and quit flows to continue
1.4.0 - Removed Discord link, creative inventory, creative biome, and siege portal bridge behavior now provided by PraetorisClient
- Kept client log requests, logout/quit uploads, server archive storage, and bot API uploads
1.3.2 - Rebuilt DiscordTools from merged main for the siege portal bridge and creative biome override release
1.3.1 - Added creative biome override RPC for server-side creative zones
1.3.0 - Added creative inventory RPC for server-side tools that need a trusted client inventory count
- Added optional item-entry details for player inventory and Shudnal ExtraSlots inventories
1.2.0 - Added in-game !link CODE support for linking a Valheim player to a Discord user
- Added server-side link API posting with player ID, player name, endpoint, and platform display name
- Added server-only link API URL configuration and environment variable support
1.1.0 - Store new client log archives in folders named with both player name and stable player ID
- Added folder-aware metadata and indexes for players with multiple character names
- Preserved legacy players/{playerId} index paths when old archives exist
- Updated bot upload metadata to include the archive folder path
1.0.0 - Initial release
- Added server command to request a connected player's full BepInEx log
- Added client log upload on logout and quit
- Added server-side archive organized by player ID and month
- Added optional Discord bot API upload with server-only credentials