You are viewing a potentially older version of this package. View all versions.
Ashr4f-ModBlocker-1.1.2 icon

ModBlocker

Preloader patcher that prevents blocklisted mods from loading. Lets modpack maintainers remotely disable a mod for all players via a one-line config update.

Date uploaded 3 days ago
Version 1.1.2
Download link Ashr4f-ModBlocker-1.1.2.zip
Downloads 3
Dependency string Ashr4f-ModBlocker-1.1.2

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

ModBlocker

A BepInEx 5 preloader patcher for Valheim (and other BepInEx games) that prevents blocklisted mods from loading — without uninstalling them.

Why?

Modpack maintainers have no way to remove a mod from players' machines: updating a modpack installs new dependencies but never uninstalls dropped ones. ModBlocker fixes that. Ship it in your modpack with its config file, and removing a mod for every player becomes a one-line config change in your next pack update.

How it works

At game startup — before the BepInEx chainloader scans plugins — ModBlocker reads BepInEx/config/modblocker.cfg and renames the DLLs of blocklisted mods to .dll.blocked. Blocked mods simply do not exist as far as the game is concerned. Removing an entry restores the DLLs on the next launch. Nothing is ever deleted.

Config: BepInEx/config/modblocker.cfg

Comma-separated entries. Two formats are supported, matching is case-insensitive:

[Blocklist]
Mods = SomeAuthor-SomeMod, SomeOldPlugin.dll

Editing in-game

The companion plugin ModBlockerUI exposes the blocklist as a text field in the ConfigurationManager window (F1). Changes are saved instantly and applied on the next launch (blocking happens before plugins load, by design).

A log of every block/re-enable action is written to BepInEx/ModBlocker.log.

Warnings

  • Do not block a library other mods depend on (e.g. Jotunn) — dependents will error.
  • Blocking a content mod (items/creatures) has the same effect on an existing world as uninstalling it: its objects will be missing while blocked.

Building from source

cd src
dotnet build -c Release

Patcher: dotnet build srcsrc/bin/Release/net472/ModBlocker.dllBepInEx/patchers/ Plugin: dotnet build src/Pluginsrc/Plugin/bin/Release/net472/ModBlockerUI.dllBepInEx/plugins/

CHANGELOG

Changelog

1.0.0

  • Initial release: folder-name and DLL-name blocklist, automatic re-enable, action log.

1.1.0

  • Normalized matching (lowercase + trim) for 100% reliable entries.
  • New config format Mods = a, b, c (legacy one-per-line still supported).
  • Companion plugin ModBlockerUI: edit the blocklist in-game via ConfigurationManager (F1); applies on next launch.

1.1.1

  • Self-protection: ModBlocker ignores blocklist entries targeting its own components (and auto-restores them if previously blocked).

1.1.2

  • Multi-line config description, neutral example in docs.

1.2.0

  • Core protection: BepInEx and Jotunn can never be blocked.
  • Cascade blocking: blocking a mod automatically blocks every mod that depends on it (recursively), logged as 'Also blocked: X (depends on Y)'. Removing the entry restores the whole chain.

1.3.0

  • Server enforcement via ServerSync (credits: blaxxun): the server's blocklist is pushed to all clients (applies on their next launch), and players without ModBlocker are kicked on connect (ModRequired).
  • The effective blocklist is mirrored to modblocker.server; the preloader merges it with the local list.