Modern cross-platform HiveExt replacement for Arma 2: Operation Arrowhead with Lua scripting and SQL. For those who need more than the standard: no recompilation, independent component updates, extended analytics and external system integration.
- Copy
Osmia/and_start_server.cmdto Arma 2 OA root. - Copy
HiveExt.dll(forwarder) andOsmia.dllto your @mod folder. - Install
32-bitODBC driver (PostgreSQL, MySQL, MariaDB, etc.). - Fill in
Osmia/Osmia.ini. SetTypeto the driver name from your DB documentation. - Run
_start_server.cmd.
[Database]
Type = PostgreSQL Unicode ; ODBC driver name
Host = 127.0.0.1 ; database host
Port = 5432 ; database port
Name = dayz ; database name
Username = postgres ; database user
Password = yourpassword ; database password
[Logger]
Level = info ; trace / debug / info / warning / error / fatal
ConsoleLevel = info ; trace / debug / info / warning / error / fatal, default = Level
Async = false ; async logging
SeparateConsole = false ; open separate console window (Windows only)| Function | Description | Returns |
|---|---|---|
db.query(sql) |
Run a SELECT, get all rows at once | table of rows, each row is {field=value, ...} |
db.execute(sql) |
Run INSERT / UPDATE / DELETE | bool |
db.executeBatch({sql1, sql2, ...}) |
Run multiple statements in one transaction | bool |
db.transaction(fn) |
Call fn() inside BEGIN/COMMIT, auto-rollback on error |
bool |
db.queryAsync(sql) |
Start a query on a background thread | token (uint32) |
db.queryStatus(token) |
Check async query state | 0=pending, 1=ready, -1=error |
db.queryFetch(token) |
Get next row from async result | table or nil when done |
db.queryClose(token) |
Free async result | bool |
-- sync
local rows = db.query("SELECT * FROM Player_DATA WHERE PlayerUID = '123'")
for _, row in ipairs(rows) do
log.info(row["PlayerName"])
end
-- async
local token = db.queryAsync("SELECT * FROM Object_DATA WHERE Instance = 1")
-- next frame
if db.queryStatus(token) == 1 then
local row = db.queryFetch(token)
db.queryClose(token)
endGame logic is defined in osmia_sql.lua. Call format: CHILD:NNN:params.
- Visual Studio 2022 (v143, x86/Win32), C++20
- vcpkg:
lua[cpp]:x86-windows,detours:x86-windows-static - Open
Source/Osmia.sln, buildRelease|Win32
- GCC 15+ / Clang, CMake 3.20+, C++20
- ODBC:
unixodbc-dev - Lua:
liblua5.4-devor via vcpkg cmake -B build && cmake --build build
Linux build compiles cleanly but has not been tested in production.
And... thank you for choosing me 🐝