Skip to main content

Overview

This document provides a comprehensive reference of file paths and directory structures for Civilization VII modding. Understanding these paths is essential for creating, organizing, and implementing mods effectively. The information here covers the base game structure, mod organization patterns, and key file locations by category.

Game Installation Directories

Civilization VII uses two main directory locations:

Game Resources Directory (Read-Only)

This is where the base game files are installed and contains all game assets, modules, and definitions: macOS:
Windows:

Game Data Directory (User-Writable)

This is where user-specific data including saves, logs, and installed mods are stored: macOS:
Windows:
For the remainder of this document, we’ll use platform-independent path references. When you see:
  • <GAME_RESOURCES> - This refers to the game resources directory
  • <GAME_DATA> - This refers to the game data directory

Base Game Structure

The Civilization VII installation follows a modular structure, with the game itself organized as a collection of modules:

User Data Structure

The user data directory contains user-specific files:

Base-Standard Module Structure

The base-standard module contains the core definitions and systems that all other modules depend on:

Age Modules Structure

Each Age module follows a similar structure, containing content specific to that historical period:

DLC Module Structure

Official DLC follows this general structure:

User Mod Directory Structure

When creating a mod, follow this recommended structure to ensure compatibility and organization:

Leader Mod Directory Structure

For mods that add new leaders, use this structure:

Civilization Mod Directory Structure

For mods that add new civilizations, use this structure:

TypeScript Modding Tools Output Structure

When using the TypeScript Modding Tools, the output structure follows a more specific organization based on element types:
This structure is directly compatible with the game’s mod loading system and can be copied to the game’s Mods directory.

Key File Locations By Category

Database Schema Files

Definition Files

Civilization Files

Leader Files

Unit Files

Building and Improvement Files

Technology and Civic Tree Files

Localization Files

Log Files

Installing Mods

Mods should be installed in the user’s mod directory: macOS:
Windows:
After building your mod, copy the entire mod folder to this location. The mod will be available in the Mod menu when you start the game.

Mod Organization Best Practices

File Naming Conventions

  1. Use Descriptive Names: Name files to clearly indicate their contents and purpose
  2. Use Lowercase: Keep filenames lowercase for consistency with game files
  3. Use Underscores: Separate words with underscores (e.g., roman_legion.xml)
  4. Include Mod Prefix: Prefix filenames with your mod ID to avoid conflicts
  5. Keep Extensions Consistent: Use .xml for data files, .sql for database files

Directory Organization

  1. Group by Element Type: Organize files by game element type (civilizations, leaders, units, etc.)
  2. Separate Assets: Keep assets (icons, textures) in their own directories
  3. Age-Specific Content: If creating content for multiple Ages, consider organizing by Age

Cross-Module References

When referencing files across different modules, use these path patterns:
  1. Same Module References: ./file.xml (relative to current directory)
  2. Base Game References: Use platform-independent paths with the fs:// protocol: fs://game/modules/module-name/path/to/file.xml
  3. External Asset References: fs://game/assets/path/to/asset

Conclusion

Understanding the file organization of Civilization VII is critical for creating well-structured mods that integrate properly with the game. By following the patterns established in the base game and organizing your mod files according to these best practices, you can create mods that are easier to maintain, troubleshoot, and share with the community. For additional information on specific modding tasks, please refer to the other documents in the modding documentation set.