In this post I’ll try to explain in detail what our file builder is, why you need it, and how to build a patch for your updater.
The builder is a program that prepares files so the updater can work with them. Preparation happens in a few main stages:
- Reading information about files and folders.
- Syncing with a previously created patch.
- Building the file map for the updater.
- Removing files from the patch that aren’t part of it.
- Packing every file individually.

Gathering Information
To guarantee that files are correctly downloaded during an update, the builder collects information about each file, including its name, size and, most importantly, its hash sum.
A hash sum is a unique identifier for a file, calculated using a mathematical algorithm based on the data it contains. Right now we use the CRC32 algorithm, for speed and efficiency when collecting information. Any change to a file will change its hash sum, even if the size stays the same.
Example of a line with file information, where 4144 is the size in bytes and dbc44dcf is the hash sum: L2.ini 4144 dbc44dcf
Synchronization
If you’ve already created a patch for your client, don’t rush to delete it. Our builder has a synchronization system that compares the previous patch against the new files. The magic happens after comparing the new patch’s virtual file tree against the previously created patch’s file map (UpdateInfo.xml). The sync result is shown on the virtual file tree using color indicators:


- Green — new file.
- Blue — modified file.
- Black — untouched file.
- Red — deleted file.
Building
The build starts by turning the virtual file tree into a flat test file in xml format — let’s call it the update’s file map. This file contains all the information the updater will need for a successful update. More on that in the post about the Updater.

After that, files that are no longer part of the new patch get deleted first. Finally, each file is packed into an archive using the Zip algorithm with the best compression setting.
So How Do You Use It?
Launch UpdateBuilder.exe. On the left side, select or drag in the folder with the new patch. Once selected, it’ll start loading file information. Detailed info on what’s happening is written to the logging window.

After the virtual file map is built, it’s time to pick the folder to save the patch result to. If you’ve already built a patch before, pick the same folder to sync the files. If this is your first patch, pick an empty folder.

Once syncing is done, we have full information about the files — what’s next? Now we can move on to configuring the file update parameters. Our system has two types of parameters:
- Whether the file participates in the quick (critical) check.
- Whether the file needs to be checked for size and hash sum during an update.
Each of these parameters has its own toggle per file. The same toggles on folders change all their dependent items.

More on Quick and Critical Updates
When packing a single patch, you can specify which files, out of all of them, need to be updated during a quick check in the updater. And here we give you full flexibility — you can build a simple patch with just the system folder added to the quick check, or build the whole game client and mark the patch’s files for a quick update. That way you can distribute and update the entire game for your users. On the updater side, you can build this into different quick-update and full-update buttons, as well as running a quick update automatically on updater startup.

More on Size and Hash Checks
All settings are enabled by default.
Once everything’s synced and configured, all that’s left is to click “Start Packing” and run the build. All the info shows up in the log too, and the results folder opens automatically.

All that’s left is to copy the files to the host and send me the link.
Wrapping Up
Just a reminder that the builder’s source code is publicly available on GitHub — I’d be glad to see any activity there.
That’s all for now, thanks for reading! Now you know a bit about how to build an L2 updater and how our Lineage 2 (and other) patch file builder works. Hope that answers your questions, but if not — welcome to reach out via the contact form.