Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
VBNetTweaks
VBNetTweaks is a comprehensive optimization mod for Valheim's multiplayer experience. Designed to improve performance on both servers and clients, reduce lag and stuttering, optimize network traffic, and enhance player synchronization.
| Date uploaded | a week ago |
| Version | 0.3.0 |
| Download link | VitByr-VBNetTweaks-0.3.0.zip |
| Downloads | 639 |
| Dependency string | VitByr-VBNetTweaks-0.3.0 |
This mod requires the following mods to function
ValheimModding-Jotunn
Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.
Preferred version: 2.26.1denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2333README
Русский
VBNetTweaks — это плагин для Valheim, который значительно улучшает сетевую производительность, синхронизацию объектов и стабильность многопользовательской игры. Мод оптимизирует отправку данных, сжатие трафика, синхронизацию позиций и работу с визуальными эффектами.
1. Оптимизация сетевой синхронизации
Патчит синхронизацию позиций и поворотов объектов:
| Параметр | Vanilla значение | Новое значение | Описание |
|---|---|---|---|
| SmoothPos | 0.2f | 0.22f | Скорость сглаживания позиции (быстрее догоняет) |
| SmoothRot | 0.5f | 0.45f | Скорость сглаживания поворота |
| MicroThreshold | 0.001f | 0.004f | Фильтр микродрожания (уменьшает шум) |
Дополнительно:
- Увеличивает буфер очереди ZDO с 10KB до настраиваемого значения (по умолчанию ~20KB)
- Расширяет время загрузочного экрана после телепортации на 5 секунд (Необходимо для устранения проваливания игроков в текстуры построек при телепорте - актуально для серверов с большим количеством игроков)
2. Синхронизация кораблей
Улучшенная синхронизация движения кораблей для не-владельцев:
- Предсказание позиции корабля на основе скорости
- Адаптивное сглаживание (мягче, если игрок на корабле)
- Форс-коррекция при рассинхроне >2 метров или повороте >15 градусов
- Синхронизация позиции игроков на корабле
3. Оптимизации Steam сокета
Увеличивает пропускную способность Steam Networking:
| Параметр | Vanilla | VBNetTweaks (по умолчанию) | Описание |
|---|---|---|---|
| SendRateMin | 150 KB/s | 256 KB/s | Минимальная скорость отправки |
| SendRateMax | 150 KB/s | 4096 KB/s | Максимальная скорость отправки |
| BufferSize | 260 KB | 100 MB | Размер буфера отправки |
4. Кеш игроков
Оптимизирует доступ к информации об игроках:
- Кеширование списка всех игроков (обновление каждые 0.5 секунд)
- Быстрый поиск игрока по ID
- Отслеживание состояния прикрепления игроков (на корабле/транспорте)
5. Оптимизированная отправка ZDO
Заменяет ванильный метод SendZDOToPeers2 на более эффективный:
- Отправка данных нескольким пирам за один апдейт (vanilla: 1 пир)
- Конфигурируемый интервал отправки (vanilla: 0.05с)
- Обработка ошибок с fallback на ванильный метод
6. Оптимизированное удаление объектов
Улучшает процесс удаления объектов из сцены:
- Использует отметки кадров для быстрого определения объектов на удаление
- Оптимизированная работа со словарями и списками
Основные настройки (ServerConfig.cfg)
[00 - Master]
ModEnabled = true # Включить/выключить мод
[01 - Debug]
DebugEnabled = false # Режим отладки
VerboseLogging = false # Подробное логирование
[02 - Modules]
SteamOptimizations = true # Оптимизации Steam сокета
ShipSync = true # Синхронизация кораблей
[04 - Steam Settings]
MinRateKB = 256 # Мин. скорость Steam (KB/s)
MaxRateKB = 4096 # Макс. скорость Steam (KB/s)
BufferSize = 100000000 # Размер буфера (байт)
[05 - Server Settings]
SendInterval = 0.03 # Интервал отправки (сек)
PeersPerUpdate = 30 # Пиров за апдейт
ZDOQueueLimit = 20480 # Размер буфера ZDO (KB)
Рекомендуемые настройки
| Сценарий | SendInterval | PeersPerUpdate |
|---|---|---|
| Мало игроков (2-5) | 0.05 | 20 |
| Средне (6-15) | 0.03 | 30 |
| Много (16+) | 0.02 | 40-50 |
Доступная статистика (при DebugEnabled = true)
- ZDOs Sent/Recv — количество отправленных/полученных ZDO пакетов
- Active Peers — количество активных пиров с компрессией
- Average operation time — среднее время выполнения операций (ZNet.Update, SendZDOs, RemoveObjects)
Установка
- И на клиент, и на сервер.
Несовместимые моды:
CacoFFF.valheim.LeanNetredseiko.valheim.scenicSearica.Valheim.NetworkTweaksSearica.Valheim.OpenSesameorg.bepinex.plugins.networkCW_Jesse.BetterNetworking
Примечания
- ShipSync: Включает улучшенную синхронизацию кораблей — особенно заметно на лодках при высокой задержке.
- Steam Buffer: Увеличение буфера может потребовать больше оперативной памяти, но значительно улучшает стабильность при большом количестве объектов.
Обратная связь
- Личные сообщения у меня открыты Дискорд
- Либо через пинг VitByr на одном из серверов: Valheim Modding, Odin Plus, Valheim
English
Overview
VBNetTweaks is a Valheim plugin that significantly improves network performance, object synchronization, and multiplayer stability. The mod optimizes data transmission, traffic compression, position synchronization, and visual effects handling.
1. Network Synchronization Optimization
Patches position and rotation synchronization of objects:
| Parameter | Vanilla value | New value | Description |
|---|---|---|---|
| SmoothPos | 0.2f | 0.22f | Position smoothing speed (faster catching up) |
| SmoothRot | 0.5f | 0.45f | Rotation smoothing speed |
| MicroThreshold | 0.001f | 0.004f | Micro-jitter filter (reduces noise) |
Additional features:
- Increases ZDO queue buffer from 10KB to configurable value (default ~20KB)
- Extends loading screen time after teleportation by 5 seconds (Necessary to eliminate players falling through the textures of buildings when teleporting - important for servers with a large number of players)
2. Ship Synchronization
Improved ship movement synchronization for non-owners:
- Position prediction based on velocity
- Adaptive smoothing (softer when player is on ship)
- Force correction when desync >2 meters or rotation >15 degrees
- Player position synchronization on ships
3. Steam Socket Optimizations
Increases Steam Networking throughput:
| Parameter | Vanilla | VBNetTweaks (default) | Description |
|---|---|---|---|
| SendRateMin | 150 KB/s | 256 KB/s | Minimum send rate |
| SendRateMax | 150 KB/s | 4096 KB/s | Maximum send rate |
| BufferSize | 260 KB | 100 MB | Send buffer size |
4. Player Cache
Optimizes access to player information:
- Caching list of all players (updates every 0.5 seconds)
- Fast player lookup by ID
- Tracking player attachment state (on ship/vehicle)
5. Optimized ZDO Transmission
Replaces vanilla SendZDOToPeers2 with more efficient method:
- Sends data to multiple peers per update (vanilla: 1 peer)
- Configurable send interval (vanilla: 0.05s)
- Error handling with fallback to vanilla method
6. Optimized Object Removal
Improves object removal from scene:
- Uses frame markers for quick identification of objects to remove
- Optimized dictionary and list operations
Main Configuration (ServerConfig.cfg)
[00 - Master] ModEnabled = true # Enable/disable mod
[01 - Debug] DebugEnabled = false # Debug mode VerboseLogging = false # Verbose logging
[02 - Modules] SteamOptimizations = true # Steam socket optimizations ShipSync = true # Ship synchronization
[04 - Steam Settings] MinRateKB = 256 # Min Steam rate (KB/s) MaxRateKB = 4096 # Max Steam rate (KB/s) BufferSize = 100000000 # Buffer size (bytes)
[05 - Server Settings] SendInterval = 0.03 # Send interval (seconds) PeersPerUpdate = 30 # Peers per update ZDOQueueLimit = 20480 # ZDO buffer size (KB)
Recommended Settings
| Scenario | SendInterval | PeersPerUpdate |
|---|---|---|
| Few players (2-5) | 0.05 | 20 |
| Medium (6-15) | 0.03 | 30 |
| Many (16+) | 0.02 | 40-50 |
Available Statistics (when DebugEnabled = true)
- ZDOs Sent/Recv — Number of ZDO packets sent/received
- Active Peers — Number of active peers using compression
- Average operation time — Average execution time of operations (ZNet.Update, SendZDOs, RemoveObjects)
Installation
- Install on both client and server.
Incompatible mods:
CacoFFF.valheim.LeanNetredseiko.valheim.scenicSearica.Valheim.NetworkTweaksSearica.Valheim.OpenSesameorg.bepinex.plugins.networkCW_Jesse.BetterNetworking
Notes
- ShipSync: Enables improved ship synchronization — especially noticeable on boats with high latency.
- Steam Buffer: Increasing the buffer may require more RAM, but significantly improves stability with many objects.
Feedback
- Direct messages are open on Discord
- Or via ping @VitByr on one of the servers: Valheim Modding, Odin Plus, Valheim
CHANGELOG
0.3.0
- The compression was completely cut out (either it didn't work or it made it worse)
- Updated patch for Steam
- Fixed the module for synchronization on ships (it should get better at least in half of the cases)
- The description has been corrected for the current version of the mod
0.2.9
- The patch crutch for dummy effects has been removed
- Deleting objects no longer intercepts the vanilla system
- Compression is controlled by a single config, i.e. either to the server +client, or nowhere else.
0.2.8
- The compressor has been redesigned. Now there's only one type. It should work more stably and stop visual dummies appearing.
- The patch for Steam has also been simplified - the error on the Linux servers should be fixed.
0.2.7
- Fixed compressor type synchronization
0.2.6
- The RPCBatcer, ZDOTrotling, and ZoneOwner modules have been removed (essentially useless)
- Steam patches are now being applied correctly
- The configuration is syncing correctly with the server
- ZSTD compression has been removed, as it is poorly compatible with Valheim, especially with mods
- Added Vanilla compression - uses game compression, which is disabled by default
- Added a patch to increase the ZDO buffer
- Added a patch for ZSyncTransform for smoother interpolation (not included in the configuration)
- The configuration settings are selected for the smoothest possible operation, as well as the vanilla values of the game.
0.2.4
- Deleted AILod, MonsterAIPatch, and SupportManager because they are not related to the network component
- Compression has been fixed - now it works both ways on the client and server
0.2.2
- Half of the code has been redesigned
- Almost all checks on the server/client have been removed
- Some default settings have been changed for servers with online 40+
0.2.0
- Split the compression switch. Now the server does compression by default, but the client does not do it by default, because it found that there is a problem with compression on the client (visual effects from status effects remain in the empty place where the mob was. For example, drops of water)
- Added configuration synchronization. The main configuration is client-side. The synced config is located at "BepInEx\config\VitByr\VBNetTweaks"
- The problem for Ubuntu servers should be fixed (from the previous version)
0.1.95
- Adjusting configurations
- Added the ability to disable modules - up to the entire mod. I need to restart the server and client, because I haven't done any synchronization yet.
- A small fix for Spawn and AILod
0.1.9
- cleaned the code from unnecessary comments and put it in order.
- made the compression configuration more convenient for the ConfigurationManager (now you don't need to write in text - there will be a list)
- added several additional checks for more stable operation
0.1.8
- A small patch fix
- Added Owner switching. If the Owner of an area with a bad ping and there is a player with a better ping in that area, then Ownership passes to that player. (Experimental)
- The raid system has been changed. Now several raids are possible at the same time and they are not paused. (Experimental)
- Added a config for setting the compression level
0.1.7
- Add Incompatibility LeanNet
- Add Incompatibility Scenic
- Add Incompatibility NetworkTweaks
- Add Incompatibility OpenSesame
- Add Incompatibility Network
- Add Incompatibility BetterNetworking
- Add new config CompressionLevel
- Add WearNTear Support Patch (Support checks are performed a little less frequently.)
0.1.5.1
- Edit Readme
0.1.5
- Relise