Module assembly_data::fdb [−][src]
Expand description
The database (*.fdb
) file format used for the core database (CDClient
)
Among the resource files distributed with the LEGO® Universe game client is a copy of the core database. This database includes information on all zones, objects, components, behaviors, items, loot, currency, missions, scripts, …
This (unpacked) name of this file is /res/CDClient.fdb
. The file uses a custom
database format which is essentially a sorted list of hash maps.
Terminology
- Database: The whole file, a collection of tables
- Table: A collection of rows, implemented as an array of buckets
- Column: A name and default type for the fields in every row
- Bucket: A linked-list of rows for one value of the primary-key hash
- Row: A list of fields, corresponding to the columns of the table definition
- Field: A value with a type marker
File format
The file format is constructed from a bunch of structs made out of 32-bit words that may reference other structs by offset from the start of the file. These structs form a tree without circular references.
These basic structs are implemented in the file
module.
Using this library
You can use the mem
module to load a database from an in-memory buffer:
use assembly_data::fdb::mem::Database;
let file: &[u8] = &[0,0,0,0,8,0,0,0];
let db = Database::new(file);
let tables = db.tables().unwrap();
assert_eq!(0, tables.len());
Modules
Types that are common to most FDB-APIs
The data structures for representing the file/database.
The structures, as they are serialized
General-Purpose file loader
Low-Level API that is suitable for non-little-endian machines
Parse structures from a byte buffer
Query the database
Low-Level reader for FDB files
Read-Only low level access to a database file
SQLite conversions and tooling
Arena-Store & Writer