#network-protocol #wot #toolkit #network #wargaming #world-of-tanks #networking #protocol #bigworld #core-engine

wg-toolkit

Toolkit for various binary and text formats distributed by Wargaming.net (BigWorld, Core engine)

4 releases

0.2.0 Oct 25, 2022
0.1.2 Feb 15, 2022
0.1.1 Feb 13, 2022
0.1.0 Feb 13, 2022

#157 in Games

31 downloads per month
Used in wg-toolkit-cli

MIT license

155KB
3K SLoC

WG Toolkit

Toolkit crate providing various implementations for codecs distributed by Wargaming.net. These codecs are part of the Core engine (previously known as BigWorld) notably used by World of Tanks. This crate also provides an implementation of the network protocol.

Library

  • Crate page
  • Crate documentation
  • Packed XML codec
    • Deserialization
    • Serialization
  • Tank model codec
    • Deserialization of visual tree
    • Deserialization of vertices/indices
  • Compiled space codec (WIP)
    • Deserialization of some sections
      • BWTB (header table)
      • BWST (string table)
      • BWT2 (terrain2)
      • BWSG (static geometry)
      • BWCS (compiled space settings)
      • BWAL (asset list)
  • Network protocol (WIP, feature network)
    • Packets encoding and decoding (partial flags support)
    • Appending elements to bundles
    • Assemble received packet in bundles
    • Iterate elements in a bundle
  • PLANNED Game's resource file system (automatic opening of packages)

CLI

  • Crate page
  • Packed XML
    • Deserialization and display
    • Value editing (string, integer, boolean, float)

Contributing guidelines

When contributing to the code base, some rules should be followed:

  1. Each major feature should have its own directory module;
  2. Each side-feature, used internally by core features should be located under util module in its own file module.
  3. When working on a custom reader and/or writer, but only implement one of the two, please anticipate how your module would be built with both implemented;
  4. Catch all errors and forward them toward the public interface;
  5. Custom error types should all be defined using thiserror::Error derivation;
  6. When working on a custom reader and/or writer that doesn't provide lazy read/write operations, please make simple public functions that directly output, like from_reader(reader: impl Read) or to_writer(writer: impl Write).

Credits

Thanks to SkepticalFox for wot-space.bin-utils python library, which directly inspired this crate.

Thanks to SkaceKamen for wot-model-converter python library, for its open-source work on processed model file format.


lib.rs:

Toolkit for various binary and text formats distributed by Wargaming.net (BigWorld, Core engine).

Credits to SkepticalFox for its work on compiled spaces: https://bitbucket.org/SkepticalFox/wot-space.bin-utils/src/master/

Credits to SkaceKamen for its work on compiled model: https://github.com/SkaceKamen/wot-model-converter

Dependencies

~2.8–7.5MB
~154K SLoC