Overview
This guide provides a comprehensive approach to creating new leaders for Civilization VII. It covers the process from planning through implementation and testing, with practical examples from official DLC and community mods.Prerequisites
Before creating a new leader, ensure you have:- A basic understanding of the Civilization VII modding architecture (see Modding Architecture)
- Familiarity with the database schema for leaders (see Database Schemas)
- Knowledge of how leaders integrate with civilizations (see General: Creating Civilizations)
- The game’s base files for reference
Planning Your Leader
Leader Design Principles
When designing a new leader, consider these key aspects:- Historical Accuracy: Research the historical figure to ensure authentic representation
- Gameplay Niche: Design abilities that offer unique gameplay opportunities
- Synergy with Civilization: Ensure abilities complement the civilization’s strengths
- Age Appropriate: Design abilities that fit the leader’s historical Age
- Balance: Create abilities that are powerful but not game-breaking
- Specialization Category: Determine which gameplay category your leader excels in (Military, Diplomacy, Expansion, Science, Culture, or Economy)
Core Design Elements
Define these essential elements for your leader:- Leader Name: The primary identifier
- Historical Period: The time period when the leader was most influential
- Core Abilities: The unique gameplay advantages
- Diplomatic Agendas: Leaders’ AI behavior and preferences
- Civilization Compatibility: Which civilizations the leader can lead
- Leader Type: Consider whether your leader is a traditional political figure, or represents excellence in other domains like science, philosophy, or human rights
Folder Structure Setup
Organize your leader mod with a clear folder structure:Implementation Process
1. Creating the Modinfo File
The.modinfo file defines your mod’s metadata and structure:
2. Defining Your Leader
Create a file likeleaders/your_leader.xml:
3. Creating Leader Abilities
Define your leader’s unique abilities intraits/your_leader_traits.xml:
4. Creating Leader Agendas
Define your leader’s agenda inagendas/your_leader_agendas.xml:
5. Setting Up Localization
Create localization files intext/your_leader_text.xml:
Advanced Leader Implementations
Creating Leader Personas
Civilization VII allows for implementing multiple personas for the same historical figure, representing different periods or aspects of their life:Age-Specific Leader Features
In Civilization VII, leaders may have different abilities depending on the current Age. You can implement this as follows:Cross-Age Leaders
Some leaders can be designed to span multiple Ages, with special abilities that evolve or change across Ages:Implementing Leader Categories
Civilization VII categorizes leaders into gameplay specializations. Implement this as follows:- LEADER_CATEGORY_MILITARY - For combat-focused leaders
- LEADER_CATEGORY_DIPLOMACY - For leaders focused on international relations
- LEADER_CATEGORY_EXPANSION - For leaders specializing in growth and territory
- LEADER_CATEGORY_SCIENCE - For leaders emphasizing technological advancement
- LEADER_CATEGORY_CULTURE - For leaders with strengths in cultural development
- LEADER_CATEGORY_ECONOMY - For leaders focusing on trade and production
Implementing Leader Diplomacy
Leaders in Civilization VII have unique diplomatic interactions. Implement them as follows:Testing Your Leader
-
Install the Mod:
- Place your mod folder in the Civilization VII mods directory (
<GAME_DATA>/Mods/) - Enable the mod in the game’s mod menu
- Place your mod folder in the Civilization VII mods directory (
-
Initial Testing:
- Start a new game with your leader
- Verify the leader appears with correct name and civilization
- Test unique abilities function as intended
- Observe AI agenda behavior
-
Advanced Testing:
- Test Age transitions to ensure abilities work across Ages
- Test diplomacy and agenda responses
- Test interactions with other leaders
- Verify localization and text appears correctly
-
Troubleshooting Common Issues:
- Missing leader in selection screen: Check leader definition
- Non-functioning abilities: Verify modifier connections
- Missing text: Check localization keys
- Game crashes: Check XML syntax and required fields
Real-World Example: Cyrus of Persia
The official DLC leader Cyrus of Persia demonstrates these principles in action:Basic Structure
Key Implementation Features
- Age Assignment: Positioned in the Antiquity Age
- Leader Ability: “Royal Road” provides movement and gold bonuses to trade routes
- Historical Agenda: “Persian Empire” focuses on territorial expansion
- Civilization Compatibility: Compatible with the Persian civilization
- Age-Specific Bonuses: Different bonuses for Antiquity vs. Exploration Age