Repository navigation
Development Safety and Troubleshooting
RubyLock RPC is designed to be completely non-invasive and VAC-safe:
| Technique | Used by RubyLock RPC? | Details |
|---|---|---|
Read Deadlock's -condebug console text log (game/citadel/console.log) |
Yes (read-only) | Uses standard Source 2 -condebug file logging supported natively by Valve engines. |
Enumerate OS process names (deadlock.exe) |
Yes (read-only) | Uses CreateToolhelp32Snapshot on Windows and /proc/<pid>/comm + cmdline on Linux — never opens a handle to the Deadlock process itself (OpenProcess is never called). |
Process memory reading (ReadProcessMemory / process_vm_readv) |
No | Never reads or inspects Deadlock process memory. |
| DLL injection / hooking / overlay rendering | No | Zero code injection or graphics hooks. |
| Game file modification | No | Never writes to or patches any files inside the Deadlock installation. |
| Network packet capture / MITM | No | Never intercepts Steam or Deadlock game server traffic. |
-
No Personal Discord IDs Stored: Connects directly to whichever local Discord client is running on your machine over local IPC. The built-in
DEFAULT_DISCORD_APP_ID(1566683259763429509) is a public Discord Application ID, not a personal user ID. -
Opt-In Statlocker Button:
presence.show_statlocker_buttondefaults tofalse. Even when your Steam3 account ID ([U:1:<id>]) is parsed locally fromconsole.logto track Hideout party events, no external Statlocker link is published to Discord unless you explicitly enableshow_statlocker_button = true. -
Minimal, Transparent Outbound Network Traffic:
-
https://api.deadlock-api.com/v1/assets/heroes/by-name/<hero>— fetches public hero display names, Hideout flavor text, and portrait image URLs (only whenshow_hero_image = trueand a hero is active). -
https://api.github.com/repos/buntatoes/rubylock-rpc/releases/latest(and GitHub release download hosts inTRUSTED_HOSTS) — checks for updates on startup unless--no-update-checkis passed. - No analytics, telemetry, crash reporting servers, or third-party tracking endpoints exist anywhere in the codebase.
-
-
Ruby 3.2+ (CI runs Ruby 3.4 on both
ubuntu-latestandwindows-latest). Zero external gems required. - Optional C toolchain for building native release packages (
scripts/package.rb):-
Windows native: MSYS2 / RubyInstaller UCRT64
gcc.exe+windres.exe. -
Linux building Linux bundle:
gcc(builds the native ELF wrapperrubylock-rpc; if absent, the.tar.gzstill builds and falls back tobin/rubylock-rpc). -
Linux cross-compiling Windows
.exe:x86_64-w64-mingw32-gcc+x86_64-w64-mingw32-windres.
-
Windows native: MSYS2 / RubyInstaller UCRT64
# 1. Verify Ruby syntax across all source, packaging, and test files
ruby -c bin/rubylock-rpc lib/rubylock_rpc.rb lib/rubylock_rpc/*.rb rubylock-rpc.gemspec scripts/package.rb test/test_rubylock_rpc.rb
# 2. Run the Minitest suite directly
ruby -Ilib:test test/test_rubylock_rpc.rb
# Or via Rake (enables Ruby warnings)
rake testThe Minitest suite (test/test_rubylock_rpc.rb) validates:
- Custom
Toml.parse/Toml.dumpround-tripping onDEFAULT_TOML. -
ConfigManagerschema migration (v4 -> v6), customdiscord_app_id, emptycorner_image, and{var}template substitution. - Hero key normalization (
_v2stripping,hero_prefixing) andHeroCache.static_fallback. - Full
LogWatcher+GameStatestate machine replay (Hideout, hero loading, account ID, party count, queue start/stop,dl_midtown12-player Standard Match inference, hero lock-in, monotonic timer formatting, Post Match). -
DiscordIpcClient.build_activity_payload(hero assets, corner badge suppression, Statlocker button). - Native
ProcessWatcher.process_running?self-detection without spawning subprocesses. -
Updatersemver comparison, platform asset selection,TRUSTED_HOSTSvalidation, and path-traversal-blockingextract_tar_gz. -
Tray::DbusWirebinary encode/decode round-trip of aDBusMenuGetLayoutresponse.
GitHub Actions runs on pushes and pull requests to main across ubuntu-latest and windows-latest with Ruby 3.4:
-
ruby -csyntax verification across all Ruby files. -
ruby -Ilib:test test/test_rubylock_rpc.rb. -
ruby scripts/package.rbpackage build verification.
# Build all available targets for the current host
ruby scripts/package.rb
# Build only the Windows installer: dist/RubyLock-RPC-Setup-v1.3.0-win64.exe
ruby scripts/package.rb --exe
# Build only the Linux release archive: dist/rubylock-rpc-linux-x86_64.tar.gz
ruby scripts/package.rb --linux- Compiles
assets/icon.icointo a COFF resource (windres) and buildsrubylock-rpc.exefrompackaging/host/rubylock_rpc_host.c(-O2 -Wall -Wextra -s -static-libgcc -mwindowswith-ffile-prefix-map). - Packs
rubylock-rpc.exe,LICENSE,README.md,bin/rubylock-rpc,assets/icon.{ico,png}, and alllib/**/*.rbfiles into a binaryRLPCpayload ("RLPC"magic +uint32file count + per-file[path_len, data_len]+ UTF-8 relative path + raw bytes). - Embeds the icon (
1 ICON) andRLPCpayload (101 RCDATA) intopackaging/windows/installer.c, linking-lole32 -lshell32 -luuid -ladvapi32to producedist/RubyLock-RPC-Setup-v1.3.0-win64.exe.
- If
gccis present on Linux, compilespackaging/host/rubylock_rpc_host.cinto a stripped native ELF wrapper (rubylock-rpc) with-ffile-prefix-map. - Normalizes line endings (
\r\n->\n) for.rb,.sh,.desktop, andbin/rubylock-rpc. - Writes
dist/rubylock-rpc-linux-x86_64.tar.gzusing Ruby's built-inZlib::GzipWriterandGem::Package::TarWriter.
-
Verify
-condebugis active: Deadlock only writesgame/citadel/console.logwhen launched with-condebug. Launch through the RubyLock RPC shortcut, userubylock-rpc --launch-with-command -- %command%in Steam Launch Options, or add-condebugto Deadlock's Steam Launch Options manually. -
Check the monitored log path: Open
<data_dir>/logs/rubylock-rpc.log(via tray -> Open Config Folder) and look for[rubylock-rpc] Monitoring: .... If Deadlock is installed in a custom library not listed inlibraryfolders.vdf, setgame_folderunder[general]inconfig.tomlto the directory containinggame/citadel.
- Make sure the desktop Discord app is running (Discord web in a browser does not expose local IPC sockets/pipes).
-
Linux Flatpak / Snap / Vesktop: RubyLock RPC automatically scans
$XDG_RUNTIME_DIR,$TMPDIR,$TMP,$TEMP, and/tmpfor native,app/com.discordapp.Discord,app/dev.vencord.Vesktop, andsnap.discordsockets (discord-ipc-0..9). If Discord runs in a sandboxed Flatpak, verify it is exporting its runtime IPC socket under$XDG_RUNTIME_DIR. - Check that Discord's Settings -> Activity Privacy -> Share your detected activities with others is enabled.
GNOME Shell does not display StatusNotifierItem icons by default. Install and enable the AppIndicator and KStatusNotifierItem Support GNOME Shell extension (included by default on Ubuntu and Pop!_OS). On headless or non-D-Bus sessions, RubyLock RPC logs [tray] No Linux D-Bus session bus detected and continues running normally without a tray icon.
rubylock-rpc.exe looks for rubyw.exe / ruby.exe in <install_dir>\ruby\bin\, your system PATH, and C:\Ruby*-x64\bin\. Install Ruby 3.2+ (x64) from RubyInstaller and re-run the shortcut.
The prebuilt Windows installer is not signed with a commercial Authenticode certificate. Click More info -> Run anyway, or inspect the source code and build the installer locally with ruby scripts/package.rb --exe.
Either right-click/click the system tray icon and uncheck Exit When Game Closes, or set exit_when_game_closes = false in config.toml. When Deadlock closes, RubyLock RPC clears your Discord activity and waits cleanly for the next Deadlock session.
Click Open Config Folder in the system tray menu, or check:
-
Windows installer:
%LOCALAPPDATA%\RubyLock-RPC\(config.tomlandlogs\rubylock-rpc.log) -
Linux installer:
$HOME/.local/share/rubylock-rpc/(or$XDG_CONFIG_HOME/rubylock-rpc/if the app directory is read-only)
- Author: Buntato (buntatoes.dev)
- License: GNU General Public License v3.0 (GPL-3.0)
- Upstream Attribution: RubyLock RPC is a pure-Ruby reimplementation based on the original GPL-3.0 Rust project HeyTariq/deadlock-rpc.
- Disclaimer: Not affiliated with, endorsed by, or connected to Valve Corporation. Deadlock, all hero names, images, and related assets are the property of Valve Corporation. Hero images displayed in Discord are sourced from the community-maintained Deadlock API and remain the property of Valve.
Copyright (c) 2026 Buntato (buntatoes). RubyLock RPC is free software licensed under the GNU General Public License v3.0 (GPL-3.0), based on the upstream GPL-3.0 project HeyTariq/deadlock-rpc. Not affiliated with or endorsed by Valve Corporation.
Getting Started
Core Architecture
- Architecture and Internals
- Deadlock Detection and State Machine
- Discord IPC and Rich Presence
- System Tray and Auto-Updater
Safety, Dev & Support
Links