AsgardXIV/calyx
A Zig library for interacting with FFXIV game data.
A Zig library for interacting with game files from Final Fantasy XIV.
It aims to offer features and functionality available in other languages to interact with FFXIV to Zig developers.
Calyx is still very early in development and the API surface is not stable. Contributions are appreciated.
zig fetch --save git+https://github.com/AsgardXIV/calyx
const calyx_dependency = b.dependency("calyx", .{
.target = target,
.optimize = optimize,
});
exe_mod.addImport("calyx", calyx_dependency.module("calyx"));
// Init Calyx
const calyx = @import("calyx");
const game = try calyx.GameData.init(allocator, .{});
defer game.deinit();
// Read a game file
const swine_head_model = try game.getFileContents(allocator, "chara/equipment/e6023/model/c0101e6023_met.mdl");
defer allocator.free(swine_head_model);
try std.io.getStdOut().writer().print("Swine Head model length: {d} bytes\n", .{swine_head_model.len});
// Read from Excel
const sheet = try game.getSheet("Item");
const wind_up_raha = try sheet.getRow(23992);
const wind_up_raha_name = try wind_up_raha.getRowColumnValue(9);
try std.io.getStdOut().writer().print("Item Name: {s}\n", .{wind_up_raha_name.string});
Some development requires a locally installed copy of FFXIV. You should set the FFXIV_GAME_PATH
environment variable so Calyx can discover the location.
zig build sample
zig build test
zig build integrationTest
zig build docs
Not using Zig?
Calyx is frequently based on the work done by other projects, particularly those listed in the Alternatives
section.