Giter VIP home page Giter VIP logo

ironworks's People

Contributors

ackwell avatar ff14wed avatar philpax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ironworks's Issues

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.

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

Scalar value semantic metadata

Some scalar fields have additional semantics, i.e. a numeric column can be an icon, which implies a path within the game data to an icon texture, despite no explicit table relation existing for this lookup.

This will require changes to the schema to include a (presumably optional) metadata field on scalars.

Of further note, relationships are technically a scalar in the source sheet, so there may be room to redefine relationships as metadata on a scalar.

Schema updating

Schema provider currently clones StC on first boot and never updates it. Need to add capability to schema module to update the repo, and a regular interval in bm to call it.

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");
}

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

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.

Build fails on latest Rust nightly

cargo 1.75.0-nightly (794d0a825 2023-10-03), rustc 1.75.0-nightly (cae0791da 2023-10-05). After a cargo clean && cargo build:

error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`
   --> C:\Users\Julian\.cargo\registry\src\index.crates.io-6f17d22bba15001f\proc-macro2-1.0.53\src\wrapper.rs:475:33
    |
475 |                 let proc_macro::LineColumn { line, column } = s.start();
    |                                 ^^^^^^^^^^ not found in `proc_macro`
    |
help: consider importing this struct through its public re-export
    |
1   + use crate::LineColumn;
    |
help: if you import `LineColumn`, refer to it directly
    |
475 -                 let proc_macro::LineColumn { line, column } = s.start();
475 +                 let LineColumn { line, column } = s.start();
    |

error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`
   --> C:\Users\Julian\.cargo\registry\src\index.crates.io-6f17d22bba15001f\proc-macro2-1.0.53\src\wrapper.rs:489:33
    |
489 |                 let proc_macro::LineColumn { line, column } = s.end();
    |                                 ^^^^^^^^^^ not found in `proc_macro`
    |
help: consider importing this struct through its public re-export
    |
1   + use crate::LineColumn;
    |
help: if you import `LineColumn`, refer to it directly
    |
489 -                 let proc_macro::LineColumn { line, column } = s.end();
489 +                 let LineColumn { line, column } = s.end();
    |

error[E0635]: unknown feature `proc_macro_span_shrink`
  --> C:\Users\Julian\.cargo\registry\src\index.crates.io-6f17d22bba15001f\proc-macro2-1.0.53\src\lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |

Running cargo update proc-macro2 leads to even more spooky errors, too long to post.

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.

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.