A community-made standard for Deadlock mods

Your Deadlock mods could work together. They could survive game updates.

UI mods for Deadlock break all the time. Two mods clash, or a game update breaks one of them. This annoyed me so much that I made Modbox, which builds mods from .patch files. But I cannot keep re-making other people's mods as .patch files by myself. The fix must come from mod makers and mod managers, through one shared standard. Before you is a technical solution, and the only unsolved part is community adoption.

— @rszyma, maker of Modbox

Meet DiffMod: a set of rules for mod makers and mod managers. If they follow the rules, your mods will break far less often.

“Is it compatible with that other mod?” With DiffMod, usually yes.

“Did the update break my mod?” With DiffMod, usually not.

Both happen a lot with:

You cannot use DiffMod yet. The rules are new. No mod manager reads the notes yet, and mod makers do not add them yet.

The method already works. Modbox, the first tool that follows the rules, uses the same kind of note for several example mods. It makes the mods you pick work together. After a game update, it often fixes them with no help from the mod maker. But Modbox is not a mod manager: it cannot fix the mods you use today.

See how you can help

Why mods break today

Think of the game as a book. Each page holds the lines that draw one part of your screen. A mod wants to change one line, but today it must swap the whole page. Then two things go wrong:

DiffMod fixes both issues

How it works:

  1. A mod brings a small note that lists only the lines it changes.
  2. Your import it to a mod manager that knows how to use these notes.
  3. It writes the lines from every note onto that page. The game gets one finished page.

Example: two mods want the same page

Today

Page from Mod ABIG health barmapshop button
Page from Mod Bhealth barsquare mapshop button
You getBIG health barsquare mapshop button

The game takes only one of the two pages. The big health bar is gone.

With DiffMod

Game pagehealth barmapshop button
Mod A notemake the health bar big
Mod B notemake the map square
You getBIG health barsquare mapshop button

One page with both changes. Both mods work.

Show me a real note

The note is a small file next to the mod file:

  • pak50_dir.vpk the mod, the same as today
  • pak50_dir.vpk.patch the note, this is new

This is the whole note. The green line is what the mod adds.

pak50_dir.vpk.patch
# title: Compact HUD
--- a/panorama/layout/hud.xml
+++ b/panorama/layout/hud.xml
@@ -2,6 +2,7 @@
<styles>
<include src="s2r://panorama/styles/hud.vcss_c" />
<include src="s2r://panorama/styles/hud_common.vcss_c" />
+ <include src="s2r://panorama/styles/compact_hud/main.vcss_c" />
</styles>

Example: the game gets an update

Today

The mod still swaps in its old page. The new page from the update never shows.

What the update adds is gone. Your screen can break.

With DiffMod

Your mod manager takes the new page from the update and writes the note onto it.

You keep the update, and you keep the mod.

No clash and no update? Then your mod manager leaves your mods as they are.

What you get

If mod makers and mod managers follow the rules, everyone benefits. Find your group.

If you play with mods

  • Mods that work together.
  • Fewer broken mods after an update.
  • A way to see what a mod changes before you add it.
  • You add mods the same way as today.
  • No mod manager? Mods work the same as today.

More for players

If you make mods

  • Fewer "your mod broke my game" messages.
  • Less panic after each game update.
  • Faster fixes. The note shows the exact spot.
  • The same work as today, plus one small note.

More for mod makers

If you make a mod manager

  • An answer to "Is it compatible?" before the player starts the game.
  • Clashes that your app can merge by itself.
  • After an update, a list of the mods that need a fix.
  • Mods with no note load the same as today.

More for mod manager makers

What it does not fix (yet)

DiffMod is not magic. Open a line to read more.

common nowExisting mods that come without attached notes

DiffMod helps only if your mods come with notes AND your mod manager supports reading the notes. A mod with no note works exactly as it does today: no better, no worse. That is why your message to mod makers counts.

sometimesAn update that changes the exact spot a mod changes

Today a mod can break each time an update touches its page. With DiffMod, breakages are far less likely to happen than usual .vpk collisions. Still, DiffMod collisions are possible in two cases:

  1. A Valve update completely changes the internal layout (e.g. a Source engine bump).
  2. Two DiffMods change the exact same spot.
rareTwo mods that fight over the exact same spot

Today two mods clash if they touch the same page. With DiffMod they clash only if they change the same spot, such as one health bar that both mods resize. Then you pick one.

not coveredMods that swap pictures, skins or sounds

Version 1 of the rules covers mods that move, resize, restyle, add or hide things on your screen, such as the HUD, the shop and the menus. Those clash the most, because they all change the same few pages. The note does not cover pictures (such as icons and portraits), skins, models or sounds. Those mostly swap things of their own, so they rarely clash.

Complex mods that change many things still get the help. Take a mod that changes your HUD and also swaps models, textures or sounds. It comes the same way: the mod plus a note. The note covers the HUD changes, so those get the full help. The models, textures and sounds work as they do today. Nothing gets worse.

not yetGames other than Deadlock

Version 1 of the rules is for Deadlock. The same rules can grow to other Source 2 games later, such as CS2 and Dota 2.

Make it real

Players get none of this until mod makers add notes and mod managers read them. Pick your part.

You play with mods?

Ask your mod makers for it.

Copy the message

You make mods?

Add one small note to your mod.

See how

You make a mod manager?

Teach your app to read the notes.

See what to build

Want DiffMod to happen?

Star it on GitHub. Each star shows mod makers and mod manager makers that people want this.

Star on GitHub

The rules are open. Read them. They belong to diffmod, a group on GitHub. We invite mod makers and mod manager makers to join it.

Questions or ideas? Ask on GitHub. Found a mistake in the rules? Report it. Want the news? Join the Discord.