Modular FFXIV data toolkit written in rust.

Related tags

GUI ffxiv
Overview

ironworks

ironworks

Modular FFXIV data toolkit written in rust.

Crates.io docs.rs

ironworks is pre-1.0, and as such its API should be considered unstable. Breaking API changes will be published on new minor versions.


To minimise unused code & dependencies, ironworks is split into a number of discrete features. No features are enabled by default - pick the ones you want to use!

Feature Description
excel Read data from Excel databases.
ffxiv Bindings for using ironworks with FFXIV.
sqpack Navigate and extract files from the SqPack package format.

Additionally, file type readers are opt-in. The feature modules above will automatically enable the file types they need, however if you need additional file types for bespoke purposes, they can be enabled manually. File type features are named by the file's extension, i.e. exl for .exl files.

Getting started

[dependencies]
ironworks = {version = "0.3.0", features = ["excel", "ffxiv", "sqpack"]}
use ironworks::{excel::Excel, ffxiv, file::exl, sqpack::SqPack, Error, Ironworks};

fn main() -> Result<(), Error> {
  // Build the core ironworks instance. Additional resources can be registered
  // for more complicated file layouts.
  let ironworks = Ironworks::new()
    .resource(SqPack::new(ffxiv::FsResource::search().unwrap()));

  // Read out files as raw bytes or structured data.
  let bytes = ironworks.file::<Vec<u8>>("exd/root.exl")?;
  let list = ironworks.file::<exl::ExcelList>("exd/root.exl")?;

  // Read fields out of excel.
	let excel = Excel::new(&ironworks, ffxiv::Mapper::new());
  let field = excel.sheet("Item")?.row(37362)?.field(0)?;

  Ok(())
}

Using generated sheets from Excel

In addition to reading individual fields as shown above, it's possible to read entire rows at a time into a struct. To faciliate this, generated sheet definitions are available as a git dependency.

Warning: The data used to generate these structs does not provide any stability guarantees whatsoever. As such, any update to sheet structs should be considered as a semver-major update.

[dependencies]
# ...
ironworks_sheets = {git = "https://github.com/ackwell/ironworks", branch = "sheets/saint-coinach"}
// ...
use ironworks_sheets::{for_type, sheet};

fn main() -> Result<(), Error> {
  // ...
  let field = excel.sheet(for_type::<sheet::Item>())?.row(37362)?.singular;
  // ...
}
Comments
  • Asserting on reading valid .tex file

    Asserting on reading valid .tex file

    Encountered when trying to extract every file in the game (lmao).

    use ironworks::{ffxiv, sqpack::SqPack, Ironworks};
    use std::path::Path;
    
    fn main() {
        let game_path = Path::new("G:/Steam/steamapps/common/FINAL FANTASY XIV Online");
        let ironworks = Ironworks::new().resource(SqPack::new(ffxiv::FsResource::at(game_path)));
        let file = ironworks
            .file::<Vec<u8>>("chara/monster/m0023/obj/body/b0003/texture/v01_m0023b0003_s.tex");
    
        println!("{:#?}", file);
    }
    
    thread 'main' panicked at 'assertion failed: `(left == right)`
      left: `16000`,
     right: `6`: Block info and header decompressed size differs.', C:\Users\Julian\.cargo\registry\src\github.com-1ecc6299db9ec823\ironworks-0.3.1\src\sqpack\file.rs:55:5
    
    opened by NotNite 4
  • Column filter structure

    Column filter structure

    Sheet endpoints would benefit from a query argument(s) to control the columns that will be returned in the response. While the query arguments are necessarily strings, they should be parsed into some form of structured representation that can be "walked" alongside the schema.

    Open questions:

    • [ ] Schema package has some need for column specifiers on references, is this something relevant to that? It likely isn't relevant - reference specifiers are naturally single-column targets, while column filtering must target 0-to-many. Search filter specifiers will probably be more appropriate for this.
    opened by ackwell 1
  • Panic on reading RSF'd file

    Panic on reading RSF'd file

    use std::path::Path;
    
    use ironworks::{ffxiv, sqpack::SqPack, Ironworks};
    
    fn main() {
        let game_path = Path::new("G:/Steam/steamapps/common/FINAL FANTASY XIV Online");
        let mut ironworks = Ironworks::new();
        ironworks.add_resource(SqPack::new(ffxiv::FsResource::at(game_path)));
    
        ironworks.file::<Vec<u8>>("chara/monster/m0678/obj/body/b0001/texture/v01_m0678b0001_b_d.tex");
    }
    
    opened by NotNite 1
  • panic on reading common/font/ChnAXIS_360.fdt

    panic on reading common/font/ChnAXIS_360.fdt

    thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', C:\Users\Julian\.cargo\git\checkouts\ironworks-836e4c5d0f0f4516\ed0af56\ironworks\src\sqpack\block\stream.rs:62:25

    opened by NotNite 0
  • Configuration

    Configuration

    Currently, most configuration is hardcoded in inappropriate locations. Look into building config file(s) for storing and allowing user configuration. Ideally, environment variables would also be read.

    As of last look, the crates config and figment look like close contenders for this functionality.

    opened by ackwell 0
  • String values

    String values

    SeString payloads hold a lot of metadata around character levels and suchforth, especially in tooltips.

    With some additional payload handling in ironworks (TODO: make an issue over there), ref. sestring, it should be possible to expose a structured response schema for the payloads.

    opened by ackwell 0
  • Reference metadata

    Reference metadata

    Current sheet handling only fetches direct data and references. There's quite a lot of value in being able to backtrack up a reference, however there's no target->source information in the data itself.

    For a given schema version, it should be viable to walk the schema looking for references, and proactively build a list of references in an external store for each relevant game version, that can be used to resolve backreferences.

    opened by ackwell 0
  • GraqhQL

    GraqhQL

    GQL is a very strong contender for a non-REST API surface, at least for sheets. There's a few stumbling blocks to implementing it, primarily centered around the effectively dynamic nature of the sheet schema at runtime - many (rust) GQL libraries expect a singular static schema.

    One of the best bets as of last look into this was juniper, which a community member built an example dynamic schema builder for here.

    Further research is required.


    async-graphql has very recently landed dynamic schema generation, and looks like it'll be included in an upcoming v5 of the library.

    opened by ackwell 0
  • Search filters

    Search filters

    Search will need per-column explicit value filtering, i.e. numeric range checks and so on. Given search indices are decoupled from sheet schemas, and hence do not resolve any references, this will be a bit fiddly.

    If the column filters are built to be sufficiently structured, it will likely be possible to trace a set of filters to the leaf fields, and then walk back up with a search at each reference to find matches.

    Likely lots of optimisation opportunities on that.

    Search field specifier can probably share some concept or implementation with reference targeting in schemas.

    opened by ackwell 0
Owner
Saxon Landers
Press buttons, get code.
Saxon Landers
Cross-platform GUI toolkit written in Rust

Tuix is a cross-platform GUI toolkit written in Rust. The driving principle behind tuix is to be a self-contained, small-as-possible, but still fast,

George Atkinson 166 Dec 13, 2022
The Rust UI-Toolkit.

The Orbital Widget Toolkit is a cross-platform (G)UI toolkit for building scalable user interfaces with the programming language Rust. It's based on t

Redox OS 3.7k Jan 1, 2023
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`

Improved User Interface A cross-platform UI toolkit for Rust based on libui iui: ui-sys: iui is a simple (about 4 kLOC of Rust), small (about 800kb, i

Rust Native UI Group 865 Dec 27, 2022
SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

SixtyFPS 5.5k Jan 1, 2023
A Rust binding of the wxWidgets cross platform toolkit.

wxRust master: / mac(0.10): This is a Rust binding for the wxWidgets cross platform toolkit. API wxRust API documentation How it works The wxRust libr

KENZ 129 Jan 4, 2023
A light windows GUI toolkit for rust

Native Windows GUI Welcome to Native Windows GUI (aka NWG). A rust library to develop native GUI applications on the desktop for Microsoft Windows. NW

Gabriel Dube 1.6k Jan 7, 2023
A cross-platform GUI toolkit in Rust

NXUI - Native X UI A cross-platform GUI toolkit in Rust NXUI is a GUI toolkit that calls OS native APIs as much as possible to achieve fast operation.

らて 11 Jun 3, 2022
A graphical user interface toolkit for audio plugins.

HexoTK - A graphic user interface toolkit for audio plugins State of Development Super early! Building cargo run --example demo TODO / Features Every

Weird Constructor 14 Oct 20, 2022
Simplify generating an fltk gui from a data structure

This crate aims to simplify generating gui from a data structure.

fltk-rs 3 Dec 19, 2021
Inspect and recreate in-memory data structures

YClass A program that allows you to inspect and recreate data structures of other processes. Installation To compile YClass you will need Rust. git cl

null 51 Jan 2, 2023
An easy-to-use, 2D GUI library written entirely in Rust.

Conrod An easy-to-use, 2D GUI library written entirely in Rust. Guide What is Conrod? A Brief Summary Screenshots and Videos Feature Overview Availabl

PistonDevelopers 3.3k Jan 1, 2023
Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust

Relm Asynchronous, GTK+-based, GUI library, inspired by Elm, written in Rust. This library is in beta stage: it has not been thoroughly tested and its

null 2.2k Dec 31, 2022
SwiftUI Inspired UI Library written in rust

Mule (Definitely a Work in Progress) The night I started this project I was on the couch drinking a Moscow Mule.

null 40 Jun 22, 2022
A chess engine written from scratch in Rust ♞

Walleye Walleye is a chess engine written completely in rust. Walleye is a UCI-compatible engine written using the classical alpha-beta style AI. It s

Mitchel Paulin 95 Dec 24, 2022
A floating, tag-based window manager written in Rust

worm worm is a floating, tag-based window manager for X11. It is written in the Rust programming language, using the X11RB library. Install cargo buil

null 627 Jan 4, 2023
D3D9 Window overlay written in Rust

win-overlay (-rs) DirectX overlay written in Rust for various projects, wanted to easily create overlays across projects so decided to write my own im

Zor 18 Dec 28, 2022
Highly customizable finder with high performance. Written in Rust and uses GTK

Findex Highly customizable finder with high performance. Written in Rust and uses GTK Installation Automatic Binary Clone from https://aur.archlinux.o

MD Gaziur Rahman Noor 442 Jan 1, 2023
GUI based tool to sort and categorize images written in Rust

ImageSieve GUI based tool to sort out images based on similarity, categorize them according to their creation date and archive them in a target folder

Florian Fetz 67 Dec 14, 2022
A simple note taking application written in Rust and GTK4

Rnote A simple note taking application written in Rust and GTK4. Rnote aims to be a simple but functional note taking application for freehand drawing

Felix Zwettler 3.4k Jan 5, 2023