Skip to main content

Module games

Module games 

Source
Expand description

Game-specific configuration and metadata for Total War games.

This module provides comprehensive information about supported Total War games, including file formats, installation locations, and game-specific behaviors.

§Overview

RPFM supports multiple Total War games, each with different:

  • PackFile (PFH) format versions
  • Installation types (Steam/Epic/Wargaming, Windows/Linux)
  • File locations (/data, /content, config paths)
  • Assembly Kit versions and schemas
  • Localization and language support
  • Workshop tags and Steam integration

§Main Types

  • GameInfo: Complete game configuration including paths, versions, and features
  • SupportedGames: Registry of all games supported by RPFM
  • InstallType: Platform and store variant (Steam/Epic/Wargaming, Windows/Linux)
  • InstallData: Installation-specific paths and identifiers
  • Manifest: Game manifest file parser for vanilla PackFile lists
  • PFHFileType: Type of PackFile (Boot, Release, Patch, Mod, Movie)
  • PFHVersion: PackFile format version

§Usage Patterns

§Getting Game Information

use rpfm_lib::games::supported_games::{SupportedGames, KEY_WARHAMMER_3};

let supported_games = SupportedGames::default();
let game = supported_games.game(&KEY_WARHAMMER_3).unwrap();

println!("Game: {}", game.display_name());
println!("Schema: {}", game.schema_file_name());

§Working with Game Paths

let game_path = Path::new("/path/to/game");

// Get various game-specific paths
let data_path = game.data_path(game_path)?;
let content_path = game.content_path(game_path)?;
let local_mods_path = game.local_mods_path(game_path)?;

// Get vanilla PackFiles
let ca_packs = game.ca_packs_paths(game_path)?;

§Detecting Installation Type

let install_type = game.install_type(game_path)?;

match install_type {
    InstallType::WinSteam => println!("Windows Steam version"),
    InstallType::LnxSteam => println!("Linux Steam version"),
    InstallType::WinEpic => println!("Windows Epic version"),
    InstallType::WinWargaming => println!("Windows Wargaming version"),
}

§Submodules

Modules§

manifest
Game manifest file parsing for vanilla PackFile discovery.
pfh_file_type
PackFile type classification for load order control.
pfh_version
PackFile format version identification.
supported_games
Registry of all Total War games supported by RPFM.

Structs§

GameInfo
Complete configuration and metadata for a supported Total War game.
InstallData
Installation-specific paths and identifiers.

Enums§

InstallType
Game installation platform and store variant.
VanillaDBTableNameLogic
Strategy for naming vanilla DB table files.

Constants§

BRAZILIAN
Language code: Brazilian Portuguese
CZECH
Language code: Czech
ENGLISH
Language code: English
FRENCH
Language code: French
GERMAN
Language code: German
ITALIAN
Language code: Italian
KOREAN
Language code: Korean
LUA_AUTOGEN_FOLDER
Local folder name for Lua autogen files
LUA_BRANCH
Git branch name for Lua autogen repository
LUA_REMOTE
Git remote name for Lua autogen repository
LUA_REPO
Git repository URL for Lua autogen type definitions
OLD_AK_BRANCH
Git branch name for old Assembly Kit repository
OLD_AK_REMOTE
Git remote name for old Assembly Kit repository
OLD_AK_REPO
Git repository URL for old (pre-Shogun 2) Assembly Kit files
POLISH
Language code: Polish
RUSSIAN
Language code: Russian
SIMPLIFIED_CHINESE
Language code: Simplified Chinese
SPANISH
Language code: Spanish
TRADITIONAL_CHINESE
Language code: Traditional Chinese
TRANSLATIONS_BRANCH
Git branch name for translations repository
TRANSLATIONS_REMOTE
Git remote name for translations repository
TRANSLATIONS_REPO
Git repository URL for community translation hub
TURKISH
Language code: Turkish