ToFu Virtual Storage
ToFu Virtual Storage This mod adds some new barrels to DayZ which store items outside the DayZ database to increase server performance. This release is a first beta, so use it accordingly with caution. On my live server, virtual storage has been in use for a long time with no significant bugs. There are 16 different labeled barrels in total. Each barrel has an inventory size of 500 slots. Once a barrel is closed,… (more)
ToFu Virtual Storage This mod adds some new barrels to DayZ which store items outside the DayZ database to increase server performance. This release is a first beta, so use it accordingly with caution. On my live server, virtual storage has been in use for a long time with no significant bugs. There are 16 different labeled barrels in total. Each barrel has an inventory size of 500 slots. Once a barrel is closed, the contents are saved to a file in the "profiles/ToFuVStorage" folder. You can not attach the barrel to slot. You can transport the barrel if it is closed. You can put it in your inventory if it is closed and empty. Types can be found in the mod folder. Thanks to inkihh for adding autoclose function! Advantages: Significant performance gain (server FPS) on a server with many bases with many storage containers. Lag is reduced when approaching a base since the items do not have to be sent to the client. The server will start faster on a reboot What you should consider: The barrels can't store items with special properties (notes, car keys,...). See Blacklist for more info. By saving the items, they are virtually non-existent for DayZ, accordingly they are no longer taken into account by the CE system (so be careful with items that should be rare or only available in a certain quantity). Meat will not rot in the barrels when they are closed. This mod might be usefull for you: If you run a PvE Server and have lots of players hoarding items. Have Lag on clients when players drive/fly and approach a base. Blacklist: A config file is automatically created in the folder "profiles/ToFuVStorage" at the first start. By default, the keys of Trader Mod & MuchCarKey, Notes and Vanilla Meat are blacklisted. If you as admin want to forbid a certain item to save, just add it to the blacklist. If a certain item from another mod should cause problems, just add it to the blacklist. Always include the base class tofu_vstorage_barrel in the blacklist to prevent putting barrel into barrel Knows Issues: When running Trader Mod from Doc Jones, you need also TraderFixesAndFeatures from Helkhiana New features Mar 2025: Sound fix for 1.27 Support for MuchCarKey. Auto delete of unused storage files at startup. removed VPP Admintools dependency. Quantum barrel was removed due to abuse potential experimental support for RAG_Baseitems new settings in config: "DisableVirtualSorageRAG": [ "only for experimental RAG Base Items Addon ( https://steamcommunity.com/sharedfiles/filedetails/?id=3283198847 )", "some_rag_base_item_class_to_not_virtualize" ] "WhipeItemsOnRestore": [ "item_classname_that_will_be_wiped_on_restore" ] "dupe_prevent_seconds": 0 <- allow open/close barrel each x seconds "dupe_check_startup": 1 <- scanns the map for duped items on ground each restart and prints it to script.log "remove_duped_barrels": 0 <- will auto delete found duped barrels at startup if above setting is 1 "remove_all_duped_items": 0 <- will auto delete ANY DUPED ITEM on ground at startup (USE CAREFULLY!) If you like this mod and find it usefull, i would really thank you if you would spend me a coffee at https://www.paypal.com/donate?hosted_button_id=BJU4538MP6Z9W New features Feb 2023: Auto close of barrels at server restart and runtime (times can be set in config). Auto close will only close the barrel if no player is around. Personal Quantum (Express) barrel bound to players steamid. Once placed, this Barrel can only be opend / closed by the player who placed the barrel. Who ownes that barrel (and administrators set in config) can unclaim it. People can place multible barrels and when opened each barrel will load personal content. Due to prevent dupelication of items, once a barrel is opend no other barrel owned by the player will load the content. WARNING, the mechanism is: open -> load content -> delete personal safe file; close -> save content to personal file. Flowing scenario will lead to item loss: Two Quantum barrels A & B owned by same player. Open A (load, delete file) -> open B (nothing loaded, barrel B is empty) -> close A (content safed to file) -> close B (empty content saved to file, items lost) If you like this mod and find it usefull, i would really thank you if you would spend me a coffee at https://www.paypal.com/donate?hosted_button_id=BJU4538MP6Z9W !!! Issues with barrels not covered by a flag? change your types to this (example for tofu_vstorage_barrel_ammo): <type name="tofu_vstorage_barrel_ammo"> <nominal>0</nominal> <lifetime>3888000</lifetime> <restock>0</restock> <min>0</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="1" count_in_hoarder="0" count_in_map="1" count_in_player="1" crafted="0" deloot="0"/> <category name="tools"/> <tag name="floor"/> <usage name="Industrial"/> <usage name="Farm"/> </type> Repacking or reuploading to the Steam Workshop is NOT ALLOWED. DO NOT ASK FOR PERMISSION, YOU WILL NOT GET ONE. This item is not authorized for posting on Steam, except under the Steam account https://steamcommunity.com/profiles/76561198009118169
No file I/O on hot paths, no timers created per event, no per-player-per-frame hooks.
Every server-visible override preserves its chain.
less than 0.001% of each server frame at 100 players (0.001 ms/s). Counts hook dispatch and timers only, not what the hooks do inside. Methodology.
Structural load of the 328 scripted mods analyzed, lightest on the left. This mod's bar is lit; 32 others share it. Ranked list.
Event hooks carry 99% of this mod's structural load. 0.001 ms/s in all.
4 hooks · 0.00079 ms/s
1 hook · 0.000002 ms/s
| Event hooksrun when something happens: an inventory move, a hit, an action | 4 hooks | 0.00079 ms/s | 99% | Clothing.CanLoadItemIntoCargo, Clothing.CanPutInCargo, Clothing.CanReceiveItemIntoCargo and 1 more |
| Lifecycle hooksrun when an entity is created, loaded or deleted | 1 hook | 0.000002 ms/s | 0.3% | MissionServer.OnInit |
Counts how often each hook is dispatched and how many timers stay alive, not what the code inside does. Some rates are order-of-magnitude estimates; the methodology lists which.
Where this mod runs often
Hooks on per-frame and high-rate surfaces, with what their bodies call. Body work, not the hook itself, is what costs frame time.
Other findings
super() only on some paths · 4 · warning
- Clothing.CanLoadItemIntoCargo returns true without consulting super.CanLoadItemIntoCargo() on some paths — vanilla's conditions and every earlier-loaded mod's vetoes are bypassed there.
tofu_vstorage_2.pbo::scripts\4_world\modded_Clothing_Base.c:22 - Clothing.CanPutInCargo returns true without consulting super.CanPutInCargo() on some paths — vanilla's conditions and every earlier-loaded mod's vetoes are bypassed there.
tofu_vstorage_2.pbo::scripts\4_world\modded_Clothing_Base.c:4 - Clothing.CanReceiveItemIntoCargo returns true without consulting super.CanReceiveItemIntoCargo() on some paths — vanilla's conditions and every earlier-loaded mod's vetoes are bypassed there.
tofu_vstorage_2.pbo::scripts\4_world\modded_Clothing_Base.c:12 - ItemBase.CanReceiveItemIntoCargo calls super.CanReceiveItemIntoCargo() only on some paths — on the others the chain below this mod is dropped.
tofu_vstorage_2.pbo::scripts\4_world\modded_itembase.c:3
- Clothing.CanLoadItemIntoCargo returns true without consulting super.CanLoadItemIntoCargo() on some paths — vanilla's conditions and every earlier-loaded mod's vetoes are bypassed there.
Checks answered without super() · 1 · warning
- PokeHolesBarrel.CanDo returns its own answer without consulting super.CanDo() — vanilla's conditions on this check, and those of every earlier-loaded mod, no longer apply. Intended when a mod owns the rule outright; otherwise it is how another mod's restriction quietly stops working.
tofu_vstorage_2.pbo::scripts\4_world\modded_pokeholesbarrel.c:3
- PokeHolesBarrel.CanDo returns its own answer without consulting super.CanDo() — vanilla's conditions on this check, and those of every earlier-loaded mod, no longer apply. Intended when a mod owns the rule outright; otherwise it is how another mod's restriction quietly stops working.
Which vanilla methods the mod hooks, which of them drop the chain, how often each hook fires, and which risky calls sit inside hot hooks.
How long hook bodies take, network cost, or engine-side load. Measured across live fleets, most server lag comes from the engine and world state, not mod script chains — a light footprint does not clear a mod of lag, and a heavy one does not convict it. Methodology.
Everything else
All 7 overrides
Surface is the dispatch tier the rubric can price (— = unpriced); server is whether the override exists on a dedicated server; super() shows whether the vanilla chain is preserved on a server.
| method | surface | server | super() | where |
|---|---|---|---|---|
ActionConstructor.RegisterActions |
— | yes | ✓ | tofu_vstorage_2.pbo::scripts\4_world\actionconstructor.c:3 |
Clothing.CanPutInCargo |
T2 | yes | conditional | tofu_vstorage_2.pbo::scripts\4_world\modded_Clothing_Base.c:4 |
Clothing.CanReceiveItemIntoCargo |
T2 | yes | conditional | tofu_vstorage_2.pbo::scripts\4_world\modded_Clothing_Base.c:12 |
Clothing.CanLoadItemIntoCargo |
T2 | yes | conditional | tofu_vstorage_2.pbo::scripts\4_world\modded_Clothing_Base.c:22 |
ItemBase.CanReceiveItemIntoCargo |
T2 | yes | conditional | tofu_vstorage_2.pbo::scripts\4_world\modded_itembase.c:3 |
MissionServer.OnInit |
T3 | yes | ✓ | tofu_vstorage_2.pbo::scripts\5_mission\missionserver.c:176 |
PokeHolesBarrel.CanDo |
— | yes | ✗ none | tofu_vstorage_2.pbo::scripts\4_world\modded_pokeholesbarrel.c:3 |
Dispatch surfaces and timers the grade prices
| surface | tier | rate (Hz) | rate source | ms/s |
|---|---|---|---|---|
Clothing.CanPutInCargo | T2 | 8.0 | placeholder | 0.0002 |
Clothing.CanReceiveItemIntoCargo | T2 | 8.0 | placeholder | 0.0002 |
Clothing.CanLoadItemIntoCargo | T2 | 8.0 | placeholder | 0.0002 |
ItemBase.CanReceiveItemIntoCargo | T2 | 8.0 | placeholder | 0.0002 |
MissionServer.OnInit | T3 | 0.1 | placeholder | 0.0000 |
Includes 0.001 ms/s from placeholder-rated surfaces.
Load-order constraints (CfgPatches)
What each PBO declares: its addon identity and the addons it requires to be loaded first (requiredAddons). A partial load-order signal from the mod's own metadata.
tofu_preloader.pbo
tofu_preloaderrequiredVersion 0.1 — requiresDZ_Data,DZ_Scripts
tofu_vstorage_2.pbo
ToFuVStorage— requiresDZ_Data,DZ_Scripts,JM_CF_Scripts,tofu_preloader
census 1.1 · findings 1.1 · hash fad4f39a45236d56