A hook for Project Zomboid that intercepts files access for savegames and puts them in an SQLite DB instead.

ZomboidDB

This project consists of a library and patcher that results in file calls for your savegame(s) being transparently intercepted and redirected into a single, easy to manage SQLite database.

This is currently just a technical preview, only 64-bit Windows is supported but Linux will be added as this might prove handy for server administrators.

Why?

Project Zomboid produces an inordinate number of .bin files which is a bit irritating when copying/deleting save folders when you want to backup your games.

Additionally, SQLite has support for "snapshots" - this is currently just a technical preview, but the first feature that will be added is configurable snapshot periods.

Usage

There are two files: ZomboidPatcher.exe and Zomboidhook.dll

ZomboidPatcher

This program takes a single argument - namely the path to ProjectZomboid64.exe and modifies it to load ZomboidHook.dll. You can drag-and-drop the game EXE onto the patcher and it'll do it. nothing will be displayed - look at the last-modified time in Windows File Explorer to see if it did it.

Goes without saying; if Project Zomboid gets updated and they change the EXE, you'll need to repatch it. You'll know this is the case because it will either complain your saves are broken or, if there are still old files, then the corresponding state of the save.

ZomboidHook

This is the hook. Drop it into the game folder after patching and your game is good to go.

Current Functionality

Right now, only .bin files are intercepted so a few other bits of the savegame are left directly on-disk; this is partially because ProjectZomboid itself uses SQLite for a few things (yet, not map chunks, Java API issues perhaps) and data tends to get memmapped which, whilst this could also be faked, would suck out performance and is thus undesirable.

Existing save games are transparently migrated into the database, however, it's incremental insofar as file migration only occurrs when the game requests a particular one. Later I may add behaviour to fully migrate - at the moment though, this is the safest option as it means that you can always "undo" this by simply restoring the original ProjectZomboid64.exe file in your game folder.

Future Functionality

First

The first planned item will be to implement SQLite snapshots along with code to pull in the few bits of other non-intercepted data that's still sitting on the filesystem. The SQLite used by the game (such as players.db will be directly mounted into SQLite and pulled across into the main file)

Second

A GUI tool to assist with patching and managing the SQLite snapshots for resetting back to whichever snapshot you want.

For Developers

The application is compiled with Clang 14 on Windows. I have no idea if MSVC can compile it. Code is all C++20 and CMake is used to build it. Pull requests are welcome. I'm very much meaning to add tests and do additional cleanup, if you'd like to do it for me, go for it. Recommended strategy would be to create an executable that the patcher runs on (it'll take any EXE and make it require ZomboidHook.dll) and call Windows API functions, validating that the results match what's expected.

Setting up Appveyor for CI would also be a good idea.

Building

It's a simple CMake project - just download CMake and run the GUI tool if command lines aren't your thing.

Similar Resources

Verneuil is a VFS extension for SQLite that asynchronously replicates databases to S3-compatible blob stores.

Verneuil is a VFS extension for SQLite that asynchronously replicates databases to S3-compatible blob stores.

Verneuil: streaming replication for sqlite Verneuil1 [vɛʁnœj] is a VFS (OS abstraction layer) for sqlite that accesses local database files like the d

Dec 21, 2022

C++ ORM for SQLite

Hiberlite ORM C++ object-relational mapping with API inspired by the awesome Boost.Serialization - that means almost no API to learn. Usage Just compi

Dec 28, 2022

The C++14 wrapper around sqlite library

sqlite modern cpp wrapper This library is a lightweight modern wrapper around sqlite C api . #includeiostream #include sqlite_modern_cpp.h using n

Dec 29, 2022

Unofficial git mirror of SQLite sources (see link for build instructions)

SQLite Source Repository This repository contains the complete source code for the SQLite database engine. Some test scripts are also included. Howeve

Dec 25, 2022

Lightweight C++ wrapper for SQLite

NLDatabase Lightweight C++ wrapper for SQLite. Requirements C++11 compiler SQLite 3 Usage Let's open a database file and read some rows: #include "NLD

Sep 20, 2019

Writing a sqlite clone from scratch in C++

如何用C++实现一个简易数据库 基于cstack/db_tutorial C语言版本 KCNyu 2022/2/2 作为笔者写的第一个系列型教程,还是选择基于前人的教程经验以及添加一些自己个人的探索。也许有很多纰漏之处,希望大家指正。 1. 数据库是什么? 数据库是“按照数据结构来组织、存储和管理数

Dec 27, 2022

ESE is an embedded / ISAM-based database engine, that provides rudimentary table and indexed access.

Extensible-Storage-Engine A Non-SQL Database Engine The Extensible Storage Engine (ESE) is one of those rare codebases having proven to have a more th

Dec 22, 2022

SOCI - The C++ Database Access Library

Originally, SOCI was developed by Maciej Sobczak at CERN as abstraction layer for Oracle, a Simple Oracle Call Interface. Later, several database backends have been developed for SOCI, thus the long name has lost its practicality. Currently, if you like, SOCI may stand for Simple Open (Database) Call Interface or something similar.

Jan 9, 2023

Tntdb is a c++-class-library for easy access to databases

Tntdb is a c++-class-library for easy access to databases

Aug 1, 2022
Related tags
React-native-quick-sqlite - ⚡️ The fastest SQLite implementation for react-native.
React-native-quick-sqlite - ⚡️ The fastest SQLite implementation for react-native.

React Native Quick SQLite The **fastest** SQLite implementation for react-native. Copy typeORM patch-package from example dir npm i react-nati

Dec 30, 2022
SpDB is a data integration tool designed to organize scientific data from different sources under the same namespace according to a global schema and to provide access to them in a unified form (views)

SpDB is a data integration tool designed to organize scientific data from different sources under the same namespace according to a global schema and to provide access to them in a unified form (views). Its main purpose is to provide a unified data access interface for complex scientific computations in order to enable the interaction and integration between different programs and databases.

Jun 22, 2022
A friendly and lightweight C++ database library for MySQL, PostgreSQL, SQLite and ODBC.

QTL QTL is a C ++ library for accessing SQL databases and currently supports MySQL, SQLite, PostgreSQL and ODBC. QTL is a lightweight library that con

Dec 12, 2022
An SQLite binding for node.js with built-in encryption, focused on simplicity and (async) performance

Description An SQLite (more accurately SQLite3MultipleCiphers) binding for node.js focused on simplicity and (async) performance. When dealing with en

May 15, 2022
Fork of sqlite4java with updated SQLite and very basic compiler hardening enabled.

Download latest version: sqlite4java-392 with SQLite 3.8.7, Windows/Linux/Mac OS X/Android binaries OSGi bundle 1.0.392 with sqlite4java-392 Files for

Oct 26, 2022
Serverless SQLite database read from and write to Object Storage Service, run on FaaS platform.

serverless-sqlite Serverless SQLite database read from and write to Object Storage Service, run on FaaS platform. NOTES: This repository is still in t

May 12, 2022
❤️ SQLite ORM light header only library for modern C++
❤️ SQLite ORM light header only library for modern C++

SQLite ORM SQLite ORM light header only library for modern C++ Status Branch Travis Appveyor master dev Advantages No raw string queries Intuitive syn

Dec 30, 2022
SQLean: all the missing SQLite functions

SQLite has very few functions compared to other DBMS. SQLite authors see this as a feature rather than a bug, because SQLite has extension mechanism in place.

Jan 8, 2023
Yet another SQLite wrapper for Nim

Yet another SQLite wrapper for Nim Features: Design for ARC/ORC, you don’t need to close the connection manually Use importdb macro to create helper f

Jan 4, 2023
An updated fork of sqlite_protobuf, a SQLite extension for extracting values from serialized Protobuf messages.

This fork of sqlite_protobuf fixes some issues (e.g., #15) and removes the test suite that we do not use. It also comes with proto_table, a C library

Oct 19, 2022