Coder Social home page Coder Social logo

libxivdat's Introduction

libxivdat

Crates.io Doc.rs Apache-2.0 Build Status

A library for working with Final Fantasy XIV .DAT files. These files store client-side game config including macros, hotkeys, and ui settings.

This is still a work in progress and support for all DAT files is incomplete. See future plans for more info.

Minimum Supported Rust Version

This library has been tested against Rust >=1.52.0. Earlier versions may work, but use at your own risk.

CI builds are run against current stable and nightly at time of build.

DATFile

DATFile provides a common, low-level method of working with binary DAT files. DATFile emulates Rust's std lib File but reads and writes only from the inner content block of .DAT files, automatically handling header updates, padding, and masking as necessary.

High Level Modules

Higher-level support for specific file types is implemented on a type-by-type basis as optional features. See the chart below for more information and feature names.

High level modules allow working with DAT files at a resource level (ie, Macros or Gearsets) as opposed to working with raw byte streams from DATFile.

DAT Data Content

Most DAT files (excluding those marked as "Unique" in the support table), share a common file structure consisting of a header, content block, and footer.

Internally, some DAT file content blocks use a variable-length data structure referred to as a section in this library. A section consists of a single UTF-8 char type tag, u16le size, and a null-terminated UTF-8 string. A single resource (ie, a macro) is then comprised of a repeating pattern of sections. A toolkit for working with sections is provided in the section submodule.

Other DAT files use fixed-size resource blocks, with each resource immediately following the last. These are referred to as "Block DATs" below.

Plaintext DAT Files

Some DAT files (namely COMMON.DAT, CONTROL0.DAT, and CONTROL1.DAT) are actually just UTF-8 plaintext and do not share a common format with the binary DAT files.

Support for working with plaintext DATs may happen at some future point, but isn't currently a priority.

Unique Binary DAT Files

Two binary file types (ADDON.DAT and FFXIV_CHARA_XX.DAT files) do not use the common shared structure of other DAT files. Support for these files is not currently planned.

Future Plans

The goal of this library is to fully abstract the data structures of DAT files and create high-level, resource-based interfaces for each file type that operate on resources (ie, macros or gearsets) rather than raw byte streams. Each file has its own internal data types, so these layers will be implemented one at a time as optional features.

My focus with this libary is mainly on macros, gearsets, and ui config. High level support for other DAT types will liklely be a long time coming unless you build it yourself.

DAT Type Support

Symbol Description
โœ… Full support
๐ŸŒ€ Partial support
โŒ No support
File Contains Type DATFile Read/Write High Level Module
ACQ.DAT Recent /tell history Section โœ… ๐ŸŒ€ - section
ADDON.DAT ? Unique โŒ โŒ
COMMON.DAT Character configuration Plaintext โŒ โŒ
CONTROL0.DAT Gamepad control config Plaintext โŒ โŒ
CONTROL1.DAT Keyboard/mouse control config Plaintext โŒ โŒ
FFXIV_CHARA_XX.DAT Character appearance presets Unique โŒ โŒ
GEARSET.DAT Gearsets Block โœ… โŒ
GS.DAT Gold Saucer config (Triad decks) Block โœ… โŒ
HOTBAR.DAT Hotbar layouts Block โœ… โŒ
ITEMFDR.DAT "Search for item" indexing? Block โœ… โŒ
ITEMODR.DAT Item order in bags Block โœ… โŒ
KEYBIND.DAT Keybinds Section โœ… ๐ŸŒ€ - section
LOGFLTR.DAT Chat log filters? Block โœ… โŒ
MACRO.DAT Character-specific macros Section โœ… โœ… - macro
MACROSYS.DAT System-wide macros Section โœ… โœ… - macro
UISAVE.DAT UI config Block โœ… โŒ

Special Thanks

EmperorArthur/FFXIV_Settings was my jumping off point for research when developing this library.

Contributing

Contributions are always welcomed. Please ensure code passes cargo test --all-features, cargo clippy --all-features, and rustfmt -v --check **/*.rs before making pull requests.

libxivdat's People

Contributors

carriejv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.