Giter VIP home page Giter VIP logo

wfcache-api's Introduction

wfcache-api

wfcache-api is a Rust application that allows you to read and extract data from Warframe's cache files programmatically.

Demo

Dependencies

This binary depends on Oodle for decompression. You will need to install the shared library, to do so follow the instructions here: https://github.com/sehnryr/get-oodle-lib

API support

  • list files and directories
  • move around directories
  • extract a specific file (see supported formats below)
  • extract a directory and all its files and subdirectories recursively
  • find files or directories by name (case-sensitive)

Shell ergonomics

  • path completion
  • run commands from outside the shell (e.g. wfcache-api -c "ls /Lotus" [arg ...])

Environment variables

  • RUST_LOG: set the log level (e.g. RUST_LOG=wfcache_api=debug)

Supported formats

  • *.png Images (Exported as DDS)
  • *.wav Audio (Exported as either WAV or Opus)
  • *.fbx 3D models

wfcache-api's People

Contributors

sehnryr avatar

Stargazers

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

Watchers

 avatar

wfcache-api's Issues

Bug: The offsets in the header are sometimes wrong

Right now, the extraction method implemented follows the specifications shown in #1. But for some files, the offset is wrong by some small amount of bytes, which ultimately make the extraction fail.

For example, the main texture of /Lotus/Weapons/Grineer/Pistols/GrineerLightPistol/GrineerLightPistolPS4_d.png should have an offset of 34081 bytes in the F cache but really have 34079, so 2 bytes less.

One workaround should be to decompress the whole file and get the subset starting from the end of the size of the main texture. This unfortunately increases the complexity of the extraction.

Windows compile fails

Windows 10 (22H2)
Visual Studio 2022 (MSVC)

Below is the error log:

The following warnings were emitted during compilation:

warning: cl : Command line error D8021 : invalid numeric argument '/Wno-unused-variable'

error: failed to run custom build command for `oozle v0.1.2`

Caused by:
  process didn't exit successfully: `D:\Puxtril\Downloads\wfcache-api\target\release\build\oozle-915d229dccf5720d\build-script-build` (exit code: 1)
  --- stdout
  cargo:CXXBRIDGE_PREFIX=oozle
  cargo:CXXBRIDGE_DIR0=D:\Puxtril\Downloads\wfcache-api\target\release\build\oozle-014570076d07ecba\out\cxxbridge\include
  cargo:CXXBRIDGE_DIR1=D:\Puxtril\Downloads\wfcache-api\target\release\build\oozle-014570076d07ecba\out\cxxbridge\crate
  TARGET = Some("x86_64-pc-windows-msvc")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-pc-windows-msvc")
  cargo:rerun-if-env-changed=CXX_x86_64-pc-windows-msvc
  CXX_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXX_x86_64_pc_windows_msvc
  CXX_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-pc-windows-msvc
  CXXFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_pc_windows_msvc
  CXXFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  DEBUG = Some("false")
  running: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "D:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\cxxbridge\\include" "-I" "D:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\cxxbridge\\crate" "-W4" "-Wno-unused-variable" "-Wno-unused-parameter" "-FoD:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\753954aebaed1264-lib.rs.o" "-c" "D:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\cxxbridge\\sources\\oozle\\src\\lib.rs.cc"
  cargo:warning=cl : Command line error D8021 : invalid numeric argument '/Wno-unused-variable'
  exit code: 2

  --- stderr

  CXX include path:
    D:\Puxtril\Downloads\wfcache-api\target\release\build\oozle-014570076d07ecba\out\cxxbridge\include
    D:\Puxtril\Downloads\wfcache-api\target\release\build\oozle-014570076d07ecba\out\cxxbridge\crate


  error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "D:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\cxxbridge\\include" "-I" "D:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\cxxbridge\\crate" "-W4" "-Wno-unused-variable" "-Wno-unused-parameter" "-FoD:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\753954aebaed1264-lib.rs.o" "-c" "D:\\Puxtril\\Downloads\\wfcache-api\\target\\release\\build\\oozle-014570076d07ecba\\out\\cxxbridge\\sources\\oozle\\src\\lib.rs.cc" with args "cl.exe" did not execute successfully (status code exit code: 2).


warning: build failed, waiting for other jobs to finish...
error: failed to compile `wfcache-api v0.9.0 (D:\Puxtril\Downloads\wfcache-api)`, intermediate artifacts can be found at `D:\Puxtril\Downloads\wfcache-api\target`

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.