We Ship Our UI Through a Subtitle System - Deadworks BlogNeed help with plugins or servers? Join our Discord
ServersBlogDocsGitHubDiscord
We ship our UI through an in-game subtitle system.<br>Upon trying to describe this system to some friends, they thought it must have been some kind of practical joke. However, it is a literal description of the system we have now shipped.<br>Deadworks is the server-side modding framework for Deadlock, the latest online multiplayer game from Valve (creators of Steam, Counter-Strike, Half-Life and Dota 2). The closest comparison for Deadworks is probably SourceMod, the popular modding framework for Source 1 games.<br>Deadworks is an SDK through which server operators can write plugins in C#, run custom servers, alter game behaviour and build entirely new game modes. Deadlock runs on Source 2, so the existing Source 1 modding ecosystem, which is rich and mature, can't simply be carried across. We have had to rebuild much of that specifically for Deadlock.<br>Until recently, one of the most significant omissions was any sort of custom UI within the game.<br>Without it, almost every interaction had to pass through chat commands. Players typed !vote, !help and similar commands, usually followed by more text or a number. Some plugin authors found innovative alternatives. Some placed models in the world and treated damaging them as physical menu options. Civo's server went further, putting speed and a timer above each player's head with CPointWorldText.<br>A timer and speedometer rendered above the player with CPointWorldText.Those solutions are clever, but they are not a substitute for an interface. A game mode eventually needs menus, timers, scoreboards, prompts, buttons and information that can be updated without asking the player to enter another chat command.<br>Deadlock ships with Valve's Panorama UI system, which allows the game's developers to ship a rich UI written in XML/CSS/JS. It would be familiar to a web developer, but it is not built on web standards. Our ultimate goal is to give developers control over custom Panorama UI elements that are server-driven.<br>// Examples from the Panorama documentation.
// Find a panel by ID and change its text<br>$( "#MyLabel" ).text = "hello";
// Create a new panel and load a layout into it<br>var parentPanel = $.GetContextPanel(); // the root panel of the current XML context<br>var newChildPanel = $.CreatePanel( "Panel", parentPanel, "ChildPanelID" );<br>newChildPanel.BLoadLayout( "file://{resources}/layout/new_panel.xml", false, false );The $ object is Valve's panel API: finding panels, creating them and logging all go through it.
class="root_panel"><br>id="HealthLabel" text="0" />
Most fields, though, are set from Valve's C++ code rather than from JavaScript. Panorama scripts are not usually the thing writing a health value; the script or an XML layout makes a panel with an ID and leaves it to the developers on the C++ side to set that HP each frame. The API surface is extremely limited too: really just creating and deleting panels and setting values on them, with very little other access to the game.<br>To give a sense of what is possible with Panorama: Wormy has already built a Minecraft UI with the Deadworks UI mods, crafting grid, inventory and all.<br>fully working Minecraft UI in #deadlock
huge thanks to jonas12294 on discord for writing the UI bridge into the deadworks framework😁 pic.twitter.com/KszGFTr8hF<br>— wormy (@jetsetworm) August 13, 2026
Minecraft Crafting Table fully working in #deadlock pic.twitter.com/hDXhl76ote<br>— wormy (@jetsetworm) August 15, 2026
The client-side boundary<br>We've been thinking about this problem since we started Deadworks six months ago. From the beginning, one of our core principles has been: heavily modded servers, unmodified clients.<br>On the server, we mean that literally: we essentially run an extremely heavily modified Deadlock server. Deadworks itself is a C++ mod that hooks many of the Source 2 engine internals, with the C# SDK built on top.<br>We're happy to extend Deadlock's client as far as Source 2's content addon system will allow us. What we don't want to do is cross the line into modifying the running game client itself, through DLL injection. At that point what we are doing would start to overlap with the techniques used by cheats, and would carry a very real risk of VAC bans (if VAC is enabled for Deadlock, which it currently isn't).<br>A native client DLL would give us clean access to the client's internal systems and much greater control over Panorama. Jonas, the modder behind many of the wacky game mode features on the glutensnake YouTube channel, built a prototype of that approach in a fork, which started to gain some attention in the community and prompted us to find a shippable solution.
Jonas making Bad Apple out of Viscous cubes using Deadworks. Jonas's fork included a DLL that needed to be injected into the game, and gave the Deadworks server a high-bandwidth, multi-directional communication system for modifying...