Skip to main content

Module manifest

Module manifest 

Source
Expand description

Game manifest file parsing for vanilla PackFile discovery.

This module handles parsing of the manifest.txt file found in Total War game data directories. The manifest lists all official game files with their sizes, allowing RPFM to identify which PackFiles are vanilla (from Creative Assembly) versus user-created mods.

§Manifest File Format

The manifest.txt is a tab-delimited file in the game’s /data directory:

data/local_en.pack<TAB>12345678
data/units.pack<TAB>98765432<TAB>1

Columns:

  1. Relative path - File path relative to /data directory
  2. Size - File size in bytes
  3. Base game flag (optional, newer games only) - 1 if base game, 0 if DLC

§Usage

The manifest is primarily used to:

  • Identify vanilla PackFiles for loading as game data
  • Distinguish between base game and DLC content
  • Validate file integrity (via size checking)
  • Filter out mod files when building dependency trees

§Fallback Behavior

Not all Total War games have manifest files (Empire, Napoleon don’t). For these games, RPFM falls back to hardcoded lists in the game’s install data.

§Example

use rpfm_lib::games::manifest::Manifest;
use rpfm_lib::games::supported_games::{SupportedGames, KEY_WARHAMMER_3};
use std::path::Path;

let games = SupportedGames::default();
let game = games.game(&KEY_WARHAMMER_3).unwrap();
let game_path = Path::new("/path/to/game");

// Read manifest from game
let manifest = Manifest::read_from_game_path(game, game_path)?;

// Check if a file is listed in manifest
let is_vanilla = manifest.is_path_in_manifest(Path::new("data/local_en.pack"));

Structs§

Manifest
Complete parsed manifest file from a game’s data directory.
ManifestEntry
Single file entry from a game manifest.