#game-assets #world #metadata #extract #parser #utility #warships

bin+lib wowsunpack

Utility for interacting with World of Warships game assets

12 unstable releases (3 breaking)

0.4.0 Nov 10, 2024
0.3.0 Sep 4, 2024
0.2.3 Sep 3, 2024
0.2.2 Aug 27, 2024
0.1.3 Jun 4, 2023

#1454 in Parser implementations

Download history 484/week @ 2024-08-26 340/week @ 2024-09-02 26/week @ 2024-09-09 72/week @ 2024-09-16 22/week @ 2024-09-23 58/week @ 2024-09-30 66/week @ 2024-11-04 192/week @ 2024-11-11 51/week @ 2024-11-18 15/week @ 2024-11-25 53/week @ 2024-12-02

377 downloads per month
Used in wows_replays

MIT license

145KB
3.5K SLoC

wowsunpack

A utility for unpacking World of Warships game assets.

crates.io docs.rs

Installation

Head over to the Releases page to grab the latest precompiled binary.

If you wish to install manually (building from crates.io source):

$ cargo install --force wowsunpack

Features

  • Directly read and convert GameParams.data to JSON
  • Dump IDX file resource metadata to a serialized format (JSON or CSV)
  • Extract game assets using glob file patterns
  • Core logic can be used as a library by other applications

Planned:

  • Parsing assets.bin
  • C FFI
  • Refactoring of library APIs

Usage

Usage: wowsunpack [OPTIONS] <COMMAND>

Commands:
  extract      Extract files to an output directory
  metadata     Write meta information about the game assets to the specified output file. This may be useful for diffing contents between builds at a glance. Output data includes file name, size, CRC32, unpacked size, compression info, and a flag indicating if the file is a directory
  game-params  Special command for directly reading the `content/GameParams.data` file, converting it to JSON, and writing to the specified output file path
  help         Print this message or the help of the given subcommand(s)

Options:
  -p, --pkg-dir <PKG_DIR>      Directory where pkg files are located. If not provided, this will default relative to the given idx directory as "../../../../res_packages"
  -i, --idx-files <IDX_FILES>  .idx file(s) or their containing directory
  -h, --help                   Print help
  -V, --version                Print version

Motivation

World of Warships game files are packed in two custom file formats -- .idx files and .pkg files. .idx files contain serialized resource and volume (.pkg) metadata. There exists an official utility provided by the game developer, Wargaming, but has the following drawbacks compared to this utility:

  • Is not open-source
  • This utility's backing library can be easily adopted into other applications that would like to directly read game data
  • Slower (~2x using the CLI tool, ~6x using the GUI)
  • Does not expose meta information about the resources
  • Does not expose data in a machine-serializable format

The first two points are the big motivator for development of this utility. Applications like minimap_renderer depend on game assets and reading these assets isn't easily automated with today's tools.

Dependencies

~6.5–9MB
~153K SLoC