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 | 3 months ago |
| Version | 0.1.7 |
| Download link | VitByr-VBNetTweaks-0.1.7.zip |
| Downloads | 30 |
| Dependency string | VitByr-VBNetTweaks-0.1.7 |
This mod requires the following mods to function
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.2333ValheimModding-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.1README
Русский
📋 Общая информация
VBNetTweaks — это комплексный мод для оптимизации сетевой игры в Valheim. Мод разработан для улучшения производительности как на сервере, так и на клиенте, уменьшения лагов и дерганий, оптимизации сетевого трафика и синхронизации игроков.
- Обратная связь - связаться со мной можно через пинг меня "VitByr" в таких дискорд-серверах: Valheim Modding, Odin Plus, Valheim (официальный IronGate).
Версия: 0.1.7
🎯 Основные функции
1. Оптимизация сети и ZDO
- Приоритизация ZDO объектов — игроки, корабли с игроками, мобы и важные объекты получают более высокий приоритет при отправке
- Лимитирование ZDO — ограничение количества отправляемых ZDO за тик (до 350)
- Троттлинг дальних ZDO — снижение частоты обновления объектов за пределами указанной дистанции
- Кэширование расстояний — предотвращение повторных вычислений дистанции
2. Синхронизация игроков
- Сглаживание движений — интерполяция позиций удаленных игроков для устранения рывков
- Предикшен — прогнозирование движений игроков между сетевыми обновлениями для более плавного отображения
- Приоритет обновлений — повышение частоты обновления позиций игроков на сервере
3. Синхронизация кораблей
- Отслеживание игроков на кораблях — определение, какие игроки находятся на корабле
- Коррекция позиций — сглаживание позиций игроков относительно движущегося корабля
- Синхронизация прикрепления — корректная синхронизация игроков, сидящих на стульях или управляющих кораблем
- Сглаживание движения кораблей — интерполяция движения кораблей для удаленных клиентов
4. Оптимизация AI
- LOD для AI — снижение частоты обновления AI для существ, находящихся далеко от игроков
- Экономия ресурсов сервера — уменьшение нагрузки на CPU за счет редкого обновления дальних мобов
5. Сетевые оптимизации
- Адаптивный троттлинг — динамическое изменение интервала отправки данных на основе пинга клиентов
- Батчинг RPC — объединение множества мелких RPC вызовов в один пакет
- Оптимизация Steam — увеличение лимитов скорости отправки Steam (SendRate)
- Сжатие данных — опциональное сжатие сетевых пакетов (Deflate/Zstd)
6. Оптимизация памяти
- Пул объектов — переиспользование списков и ZPackage для уменьшения аллокаций
- Кэш игроков — централизованное хранение данных об игроках для быстрого доступа
7. Управление событиями и спавном
- Учет всех игроков — исправление механик, которые раньше учитывали только локального игрока (события, спавн монстров)
🔧 Что можно настроить
Настройки сети (сервер + клиент)
| Настройка | Описание | По умолчанию |
|---|---|---|
EnableCompression |
Включить сжатие сетевых пакетов | true |
CompressionAlgorithm |
Алгоритм сжатия: Deflate или Zstd | Deflate |
EnableSteamSendRateOverride |
Применять настройки скорости отправки Steam | true |
SteamSendRateMinKB |
Минимальная скорость отправки (КБ/с) | 256 |
SteamSendRateMaxKB |
Максимальная скорость отправки (КБ/с) | 1024 |
SteamSendBufferSize |
Размер буфера отправки Steam (байт) | 100 000 000 |
Настройки сервера (только для сервера)
| Настройка | Описание | По умолчанию |
|---|---|---|
EnableNetSync |
Включить новую систему синхронизации | true |
SendInterval |
Интервал отправки данных (секунды) | 0.05 |
PeersPerUpdate |
Количество пиров для обработки за апдейт | 20 |
EnableZDOThrottling |
Снижать частоту обновления для дальних ZDO | true |
ZDOThrottleDistance |
Дистанция троттлинга ZDO (метры) | 500 |
EnablePlayerPositionBoost |
Повысить приоритет обновления позиций игроков | true |
PositionUpdateMultiplier |
Множитель приоритета синхронизации игроков | 2.5 |
Настройки AI (только для сервера)
| Настройка | Описание | По умолчанию |
|---|---|---|
EnableAILOD |
Уменьшать частоту обновления AI для дальних существ | true |
AILODNearDistance |
Дистанция полной скорости AI (метры) | 100 |
AILODFarDistance |
Дистанция замедления AI (метры) | 300 |
AILODThrottleFactor |
Коэффициент замедления для дальнего AI | 0.5 |
Настройки клиента
| Настройка | Описание | По умолчанию |
|---|---|---|
EnableClientInterpolation |
Сглаживать движения других игроков | true |
EnableClientPrediction |
Прогнозировать движения игроков | true |
Отладка
| Настройка | Описание | По умолчанию |
|---|---|---|
DebugEnabled |
Включить отладочный вывод | false |
VerboseLogging |
Подробное логирование | false |
🛡️ С чем помогает бороться
На сервере:
- Высокая нагрузка CPU — оптимизация AI и ZDO снижает нагрузку
- Перегрузка сети — троттлинг дальних объектов и батчинг RPC уменьшают трафик
- Задержки при большом количестве игроков — адаптивный троттлинг подстраивается под пинг
На клиенте:
- Дерганья игроков — интерполяция и предикшен создают плавное движение
- Дерганья на кораблях — специальная синхронизация для кораблей
- Лаги при движении корабля — сглаживание позиций корабля
- Проблемы с синхронизацией сидящих на стульях — RPC синхронизация прикрепления
Общие проблемы:
- Потеря пакетов — адаптивный троттлинг и батчинг уменьшают влияние
- Фризы при загрузке зон — оптимизированное удаление объектов
- Утечки памяти — пулы объектов предотвращают лишние аллокации
📊 Производительность
- Мониторинг времени выполнения — отслеживание медленных операций (>10ms)
- Сбор статистики — усредненные показатели производительности
- Очистка пулов при смене сцены для предотвращения утечек
🔌 Совместимость
- Работает как на выделенном сервере, так и на клиенте
- Серверные настройки автоматически синхронизируются с клиентами
- Корректная работа с другими модами благодаря грамотным Harmony патчам
🚀 Рекомендации
Для оптимальной работы рекомендуется:
- На сервере с большим количеством игроков включить
EnableAILODиEnableZDOThrottling - Для слабых интернет-соединений увеличить
SteamSendRateMinKB - При проблемах с памятью убедиться, что
EnableNetworkCompressionвключен - Для отладки включить
DebugEnabledи проанализировать логи PerformanceMonitor'а
Мод значительно улучшает сетевой опыт в Valheim, делая игру более плавной и отзывчивой как на мощных серверах, так и на слабых клиентах!
English
📋 Overview
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.
- Feedback - you can contact me by pinging me "VitByr" in such discord servers: Valheim Modding, Odin Plus, Valheim (official IronGate).
Version: 0.1.5
🎯 Core Features
1. Network & ZDO Optimization
- ZDO Object Prioritization — players, ships with players, mobs, and important objects receive higher send priority
- ZDO Limiting — caps ZDOs sent per tick (up to 350)
- Distant ZDO Throttling — reduces update frequency for objects beyond specified distance
- Distance Caching — prevents redundant distance calculations
2. Player Synchronization
- Movement Smoothing — interpolates remote player positions to eliminate stuttering
- Prediction — extrapolates player movement between network updates for smoother visuals
- Update Priority — increases player position update frequency on the server
3. Ship Synchronization
- Player Tracking on Ships — detects which players are aboard ships
- Position Correction — smooths player positions relative to moving ships
- Attachment Sync — properly synchronizes players sitting on chairs or controlling ships
- Ship Movement Smoothing — interpolates ship movement for remote clients
4. AI Optimization
- AI LOD — reduces update frequency for creatures far from players
- Server CPU Savings — lowers server load by throttling distant mobs
5. Network Optimizations
- Adaptive Throttling — dynamically adjusts send intervals based on client ping
- RPC Batching — combines multiple small RPC calls into single packets
- Steam Optimization — increases Steam send rate limits
- Data Compression — optional network packet compression (Deflate/Zstd)
6. Memory Optimization
- Object Pooling — reuses lists and ZPackages to reduce allocations
- Player Cache — centralized player data storage for fast access
7. Event & Spawn Management
- Multi-Player Awareness — fixes mechanics that previously only considered the local player (events, monster spawning)
🔧 Configurable Options
Network Settings (Server + Client)
| Setting | Description | Default |
|---|---|---|
EnableCompression |
Enable network packet compression | true |
CompressionAlgorithm |
Compression algorithm: Deflate or Zstd | Deflate |
EnableSteamSendRateOverride |
Apply Steam send rate settings | true |
SteamSendRateMinKB |
Minimum send rate (KB/s) | 256 |
SteamSendRateMaxKB |
Maximum send rate (KB/s) | 1024 |
SteamSendBufferSize |
Steam send buffer size (bytes) | 100,000,000 |
Server Settings (Server Only)
| Setting | Description | Default |
|---|---|---|
EnableNetSync |
Enable new synchronization system | true |
SendInterval |
Data send interval (seconds) | 0.05 |
PeersPerUpdate |
Peers processed per update | 20 |
EnableZDOThrottling |
Reduce update frequency for distant ZDOs | true |
ZDOThrottleDistance |
ZDO throttling distance (meters) | 500 |
EnablePlayerPositionBoost |
Boost player position update priority | true |
PositionUpdateMultiplier |
Player sync priority multiplier | 2.5 |
AI Settings (Server Only)
| Setting | Description | Default |
|---|---|---|
EnableAILOD |
Reduce AI update frequency for distant creatures | true |
AILODNearDistance |
Full-speed AI distance (meters) | 100 |
AILODFarDistance |
AI throttling distance (meters) | 300 |
AILODThrottleFactor |
Distant AI slowdown factor | 0.5 |
Client Settings
| Setting | Description | Default |
|---|---|---|
EnableClientInterpolation |
Smooth other players' movement | true |
EnableClientPrediction |
Predict player movement | true |
Debug Settings
| Setting | Description | Default |
|---|---|---|
DebugEnabled |
Enable debug output | false |
VerboseLogging |
Detailed logging | false |
🛡️ Problems Solved
On the Server:
- High CPU Load — AI and ZDO optimizations reduce server load
- Network Congestion — distant object throttling and RPC batching decrease traffic
- Lag with Many Players — adaptive throttling adjusts to ping
On the Client:
- Player Stuttering — interpolation and prediction create smooth movement
- Ship-Related Stuttering — specialized ship synchronization
- Ship Movement Lag — smooths ship positions
- Seated Player Sync Issues — RPC-based attachment synchronization
General Issues:
- Packet Loss — adaptive throttling and batching minimize impact
- Zone Loading Freezes — optimized object removal
- Memory Leaks — object pools prevent excessive allocations
📊 Performance
- Execution Time Monitoring — tracks slow operations (>10ms)
- Statistics Collection — averages performance metrics
- Pool Clearing — prevents memory leaks on scene changes
🔌 Compatibility
- Works on both dedicated servers and clients
- Server settings automatically sync with clients
- Compatible with other mods thanks to proper Harmony patching
🚀 Recommendations
For optimal performance:
- On servers with many players, enable
EnableAILODandEnableZDOThrottling - For poor internet connections, increase
SteamSendRateMinKB - If experiencing memory issues, ensure
EnableNetworkCompressionis enabled - For debugging, enable
DebugEnabledand analyze PerformanceMonitor logs
This mod significantly improves Valheim's multiplayer experience, making gameplay smoother and more responsive on both powerful servers and weaker clients!
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