👨💻 Up to date Dofus 3 data, in a convenient SQLite database
- Go to the Releases page
- Download the latest
dofus.sqlite
file - That's it! The database is ready to use
Note: This repo contains the extraction code that creates these releases. If you just want the data, you don't need to clone this repository.
Usage with kysely
- Install dependencies
pnpm i kysely better-sqlite3
pnpm i -D kysely-codegen @types/better-sqlite3
- Pull TS types from database
kysely-codegen --dialect sqlite --url /path/to/dofus.sqlite --out-file /path/to/dofus.d.ts
- Enjoy full type-safety
import SQLite from "better-sqlite3";
import { Kysely, SqliteDialect } from "kysely";
import type { DB } from "/path/to/dofus.d.ts";
const database = new SQLite("/path/to/dofus.sqlite");
const dialect = new SqliteDialect({ database });
const db = new Kysely<DB>({ dialect });
const potionRecipes = await db
.selectFrom("Items")
.innerJoin("Recipes", "Recipes.resultId", "Items.id")
.innerJoin("translations", "Items.nameId", "translations.id")
.where("translations.value", "like", "%potion%")
.where("translations.lang", "=", "fr")
.select(["translations.value as name"])
.selectAll(["Recipes"])
.execute();
- pnpm
- Node.js v20
- dotnet v7
pnpm install
Copy the .env.dist file to a .env and fill your Dofus folder path
- First executes
pnpm extract
to get convert game files to readable .json files - Then runs
pnpm db
to generate a .sqlite file from .json files