Crate tw_pack_lib

Source
Expand description

A library to create/manipulate Total War PackFiles.

Modern Total War games (since Empire: Total War) have their data packed inside .pack files. This library allows you to open those PackFiles and manipulate them however you want.

Not all Modern Total War games are supported yet. The supported ones are:

  • Warhammer 2.
  • Warhammer.
  • Attila.
  • Rome 2.
  • Arena.

Games that will be supported in the future are:

  • Shogun 2.
  • Napoleon.
  • Empire.
  • Thrones of Brittania.
  • Three Kingdoms.

Keep in mind that this lib only gives you the ability to open and edit PackFiles. If you want to edit the PackedFiles inside (like editing a value in a table), that’s not covered by this lib.

Modules§

error
This module contains all error-related code of the library.

Structs§

PFHFlags
This represents the bitmasks a PackFile can have applied to his type.
PackFile
This struct represents a parsed PackFile.
PackedFile
This struct represents a PackedFile, a File contained inside a PackFile.

Enums§

PFHFileType
This enum represents the Type of a PackFile.
PFHVersion
This enum represents the Version of a PackFile.

Functions§

build_pack_from_filesystem
This function tries to create a PackFile in the filesystem from individual files.
build_pack_from_memory
This function tries to create a PackFile in the filesystem from PackedFiles.
parse_pack
This function tries to create a PackFile struct by parsing a file.