
Tuneups
Speed fixes for other mods. Adventure Backpacks: its backpack check runs thousands of times a frame; this makes it skip normal objects. Same answers, nothing saved.Tuneups
Speed fixes for other mods. Each fix only switches on when the other mod's code is exactly what the fix was made for, gives exactly the same answers, and never saves or changes anything.
Adventure Backpacks: a faster backpack check
Adventure Backpacks (2.2.10) checks whether an object is one of its backpacks every time the game asks "is this PC in charge of this object?". It does that by reading the object's name, and the game asks that question constantly: at our base, about 6,600 times a frame. Each name read also leaves a little garbage behind for the game to clean up.
Measured at our base (1 player, 144 creatures, about 6,000 building pieces), the check alone cost 3.2 to 4.3 ms of every frame (out of about 28 ms, or 36 FPS) across four test runs. On top of that, the game ran a full memory clean-up 83 times in 2 minutes, a small hitch each time, and all those name reads add to what it has to clean up.
The fix: a backpack never has network data of its own (Adventure Backpacks stops its network setup on purpose). So any object that does have network data can't be a backpack, and it skips the name check. Objects without network data still get Adventure Backpacks' own check, unchanged.
Is it safe?
- Same answers. For every object the game gets the same answer as with Adventure Backpacks alone. Only the work to get there is skipped.
- Nothing is saved or changed. No world data, no backpack contents, no inventory. Backpacks open, carry, upgrade and save exactly as before.
- It checks before it starts. When the game starts, Tuneups reads Adventure Backpacks' check and its network setup skip. It only switches on if both are exactly the ones this fix was made for. If Adventure Backpacks updates and changes them, the fix does nothing and says so in the log.
- It watches while it runs. Every backpack Adventure Backpacks makes is looked at. If one ever has network data, the fix switches itself off at once and Adventure Backpacks' own check is back.
- Easy to undo. Turn it off in the settings (works while you play), or remove the mod. Nothing stays behind.
- Doesn't need to match between players. It only changes how fast your own game answers, so players with and without it can play together.
Settings (anwo.Tuneups.cfg)
| Setting | Default | What it does |
|---|---|---|
| 1 - Adventure Backpacks | ||
| Faster backpack check | true | Objects with network data skip Adventure Backpacks' backpack name check (can be turned on and off while you play) |
Check that it works
BepInEx/LogOutput.log says Adventure Backpacks fix on when the game starts. If it isn't used, the log says why (for example, Adventure Backpacks isn't installed, or its check has changed).
Compatibility
Works with Adventure Backpacks 2.2.10. With any other version, the fix only switches on if that version's check is still the same; otherwise it does nothing. Without Adventure Backpacks it does nothing at all.
About this mod
Written with Claude (Anthropic's AI model) for a two-player server, and tagged AI Generated on Thunderstore. Built for Valheim 1.0.17 (Deep North) and BepInEx 5.4.2351. The slow check belongs to Adventure Backpacks, and this mod is only a stopgap until it's fixed there.
Found a bug or a clash with another mod? Report it on the mod's Thunderstore page and include your BepInEx/LogOutput.log.