Overview
This document examines implementation patterns from both official DLC content and community-created mods for Civilization VII. Understanding these patterns is essential for creating well-structured, compatible mods that integrate properly with the game’s Age system and follow best practices.Official DLC Structure
Official DLCs follow a consistent organizational pattern that provides valuable insights for modders:Dual-Folder Approach
Official DLCs use a dual-folder architecture:- Main content folder (e.g.,
<GAME_RESOURCES>/DLC/nepal/,<GAME_RESOURCES>/DLC/carthage/,<GAME_RESOURCES>/DLC/great-britain/): Contains the actual gameplay content, assets, and definitions - Shell folder (e.g.,
<GAME_RESOURCES>/DLC/nepal-shell/,<GAME_RESOURCES>/DLC/carthage-shell/): Contains metadata, dependencies, and integration information
Content Organization
DLCs are primarily organized by civilization/leader rather than by content type, reflecting the game’s design focus on these elements as the central organizing principle. Each DLC typically includes:- Civilization definitions
- Leader definitions
- Unique units
- Unique infrastructure
- Unique abilities
- Traditions
- Age-specific content integration
- Localization data
DLC Types
The official DLCs demonstrate several content categories:- Civilization/Leader Packs: Complete civilizations with their associated leaders (e.g., Nepal, Great Britain)
- Natural Wonder Packs: New natural wonders with their effects and placement rules (e.g., Mountain Natural Wonders)
- Alternate Leader Versions: Variations of existing leaders with different abilities (e.g., alternate versions of Napoleon)
Community Mod Example: Scythia Civilization
The Scythia mod by Izica represents an excellent example of community modding that follows best practices:Folder Structure
Modinfo File
The central.modinfo file defines:
- Mod metadata (name, author, version)
- Dependencies on other mods or base game content
- Load order requirements
- Compatibility information
- File references for all included content
Self-Contained Approach
The Scythia mod demonstrates a self-contained approach where all necessary content is included within the mod, minimizing dependencies on other mods and reducing potential conflicts.Integration with the Age System
Civilization VII’s Age system presents unique challenges and opportunities for modders:Age Assignment
Content must be properly assigned to specific Ages:- Civilization Assignment: Civilizations are tied to specific Ages (Antiquity, Exploration, or Modern)
- Leader Compatibility: Leaders can work across Ages but may have Age-specific bonuses
- Units and Buildings: Must be assigned to appropriate Ages or marked as “Ageless”
Cross-Age Persistence
Several mechanisms allow content to persist across Ages:- Traditions: Unlocked through unique Civic trees, these persist as policies across Ages
- Ageless Infrastructure: Unique buildings and improvements can be marked as “Ageless” to remain relevant
- Commander Units: Can persist with their attributes across Age transitions
Age Transition Handling
Mods should properly handle Age transitions by:- Defining which elements carry over to new Ages
- Specifying how deprecated elements are handled (conversion, removal, etc.)
- Supporting Golden Age and Dark Age legacies where appropriate
Localization Implementation
Effective localization ensures mods are accessible to players worldwide:Localization Files
Localization is implemented through:- Text definition files with language-specific variants
- Key-based reference system for all text content
- Support for multiple languages within the same mod
String References
Text strings should be referenced consistently using the pattern:Rich Text Support
Localization can leverage rich text formatting including:- Color coding
- Icons
- Formatting (bold, italic)
- Variables for dynamic content
Best Practices Derived from Existing Mods
Analysis of official DLCs and community mods reveals several best practices:Structural Best Practices
- Modular Design: Organize content into logical folders based on content type
- Self-Contained Implementation: Include all required assets and definitions
- Clear Naming Conventions: Use consistent, descriptive naming patterns with prefixes
- Dependency Management: Explicitly define dependencies and load order requirements
Content Best Practices
- Age Compatibility: Properly assign content to appropriate Ages
- Balanced Mechanics: Design units, buildings, and abilities with game balance in mind
- Historical Accuracy: Where possible, align implementation with historical context
- Tradition Design: Create meaningful, balanced traditions that persist across Ages
- Cross-Age Strategy: Consider how your mod impacts gameplay across multiple Ages
Technical Best Practices
- Asset Optimization: Minimize file sizes for graphics and audio
- Comprehensive Localization: Support multiple languages where possible
- XML Validation: Ensure all XML files are well-formed and valid
- Error Handling: Include fallback behavior for potentially missing content
- Documentation: Include clear documentation within the mod files
Modding Tools Usage
The TypeScript-based modding toolkit offers several advantages:- Abstracts XML manipulation
- Provides standardized generation of mod files
- Reduces common errors through templates
- Streamlines the creation of complex content types
- GitHub Repository: izica/civ7-modding-tools
- CivFanatics Forum Thread: Modding tools(framework) written on typescript
Additional Resources
- For base game architecture, see Civ7 Modding Architecture
- For file path references, see Civ7 File Paths Reference
- For creating civilizations, see General: Creating Civilizations
- For the TypeScript modding tools, see TypeScript Modding Tools