Skip to content

Home

Reloaded-II Virtual File System


🎈 Let's screw with binaries 🎈

A framework for creating virtual files at runtime.

About The Project

The Reloaded Virtual File System (VFS) is an invisible helper that sits between your games and the files they use. It allows your games to 'see' and open files that aren't really 'there'; keeping your game folder unmodified.

flowchart LR

    p[Game] -- Open File --> vfs[Reloaded VFS]
    vfs -- Open Different File --> of[Operating System]

The VFS sits in the middle and does some magic 😇.

classDiagram    

    class `Mod Folder`
    `Mod Folder` : data3.pak

    class `Mod 2 Folder`
    `Mod 2 Folder` : data4.pak

    class `Real Game Folder`
    `Real Game Folder` : data1.pak
    `Real Game Folder` : data2.pak
    `Real Game Folder` : game.exe

    class `Virtual Game Folder [What Game Sees]`
    `Virtual Game Folder [What Game Sees]` : data1.pak
    `Virtual Game Folder [What Game Sees]` : data2.pak
    `Virtual Game Folder [What Game Sees]` : data3.pak
    `Virtual Game Folder [What Game Sees]` : data4.pak
    `Virtual Game Folder [What Game Sees]` : game.exe

    `Mod Folder` --|> `Virtual Game Folder [What Game Sees]`
    `Mod 2 Folder` --|> `Virtual Game Folder [What Game Sees]`
    `Real Game Folder` --|> `Virtual Game Folder [What Game Sees]`

Usage Guide

You place files in a folder, and game can 'magically' see them.
Please see Usage section for more details.

Performance Impact

The Reloaded VFS is optimized for file open operations, with a negligible performance difference compared to not using VFS. In a test with opening+closing 21,000 files (+70,000 virtualized), the difference was only ~41ms (~3%) or less than 2 microseconds per file.

// All tests done in separate processes for accuracy.
|                           Method |    Mean |    Error |   StdDev | Ratio |
|--------------------------------- |--------:|---------:|---------:|------:|
|           OpenAllHandles_WithVfs | 1.650 s | 0.0102 s | 0.0095 s |  1.03 |
| OpenAllHandles_WithVfs_Optimized | 1.643 s | 0.0145 s | 0.0135 s |  1.03 |
|        OpenAllHandles_WithoutVfs | 1.602 s | 0.0128 s | 0.0120 s |  1.00 |

In real-world "cold-start" scenarios, this difference is effectively 0%.
For more benchmarks, please see the Benchmarks page.

How to Contribute (Wiki)

Credits, Attributions