-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting FAQ
This page covers common issues encountered when modding Civilization VII and their solutions.
Before diving into specific issues, check these first:
-
Check Database.log - Located at
%LOCALAPPDATA%\Firaxis Games\Sid Meier's Civilization VII\Logs\Database.log -
Enable debugging - Set
EnableDebugPanels 1in AppOptions.txt - Validate XML - Use an XML validator to check for syntax errors
- Start a new game - Some changes require a fresh save
| Cause | Solution |
|---|---|
| Wrong folder location | Place mod in %LOCALAPPDATA%\Firaxis Games\Sid Meier's Civilization VII\Mods\
|
| Missing .modinfo file | Every mod folder needs a modname.modinfo file |
| Invalid XML syntax | Check for unclosed tags, missing quotes, or encoding issues |
| Wrong xmlns | Use xmlns="ModInfo" in the Mod element |
| Cause | Solution |
|---|---|
| Wrong scope | Use scope="game" for gameplay, scope="shell" for menus |
| Criteria not met | Check ActionCriteria - is the age correct? |
| File paths wrong | Paths are relative to mod folder, case-sensitive |
| Missing file extension | Include .xml or .sql in Item paths |
Example of correct structure:
<ActionGroups>
<ActionGroup id="my-content" scope="game" criteria="my-criteria">
<Actions>
<UpdateDatabase>
<Item>data/changes.xml</Item> <!-- Correct -->
</UpdateDatabase>
</Actions>
</ActionGroup>
</ActionGroups>| Cause | Solution |
|---|---|
| Missing Types entry | Register in Types table with correct Kind |
| No tech unlock | Add ProgressionTreeNodeUnlocks entry |
| Wrong age | Check ActionCriteria matches the age you're playing |
| Missing shell scope | Civs/Leaders need both shell and game scope |
Checklist for new content:
- Type registered in
Typestable - Main definition table populated (Units, Civilizations, etc.)
- Localization text added
- Tech/civic unlock configured
- ActionCriteria matches target age
| Cause | Solution |
|---|---|
| Wrong ModifierId | Ensure ModifierId matches exactly (case-sensitive) |
| Missing EntityModifier link | Link via TraitModifiers, TraditionModifiers, etc. |
| Requirements not met | Check OwnerRequirementSetId and SubjectRequirementSetId |
| Wrong collection | Verify collection targets the right entities |
Common modifier linking tables:
<TraitModifiers>
<Row TraitType="TRAIT_MY_ABILITY" ModifierId="MY_MODIFIER"/>
</TraitModifiers>
<TraditionModifiers>
<Row TraditionType="TRADITION_MY_POLICY" ModifierId="MY_MODIFIER"/>
</TraditionModifiers>
<UnitAbilityModifiers>
<Row UnitAbilityType="ABILITY_MY_ABILITY" ModifierId="MY_MODIFIER"/>
</UnitAbilityModifiers>
<ConstructibleModifiers>
<Row ConstructibleType="BUILDING_MY_BUILDING" ModifierId="MY_MODIFIER"/>
</ConstructibleModifiers>| Cause | Solution |
|---|---|
| Missing localization | Add entry to LocalizedText table |
| Wrong Language | Use Language="en_US" for English |
| Tag mismatch | LOC_ key must match exactly (case-sensitive) |
| UpdateText missing | Add <UpdateText> action in modinfo |
Correct localization format:
<LocalizedText>
<Row Tag="LOC_MY_TEXT_KEY" Language="en_US">
<Text>My text content here</Text>
</Row>
</LocalizedText>| Cause | Solution |
|---|---|
| Wrong path | Use fs://game/{mod-id}/{path} format |
| Missing atlas | Define IconTextureAtlases entries |
| Wrong size | Create 50px and 38px versions |
| UpdateIcons missing | Add <UpdateIcons> action in modinfo |
This is expected behavior. Add separate ActionGroups for each age:
<ActionCriteria>
<Criteria id="antiquity">
<AgeInUse>AGE_ANTIQUITY</AgeInUse>
</Criteria>
<Criteria id="exploration">
<AgeInUse>AGE_EXPLORATION</AgeInUse>
</Criteria>
<Criteria id="modern">
<AgeInUse>AGE_MODERN</AgeInUse>
</Criteria>
</ActionCriteria>Add the AGELESS tag to make content persist:
<TypeTags>
<Row Type="UNIT_MY_UNIT" Tag="AGELESS"/>
</TypeTags>Civs need to load in shell scope for the setup screen:
<ActionGroup id="shell-content" scope="shell" criteria="always">
<Actions>
<UpdateDatabase>
<Item>data/civilizations.xml</Item>
</UpdateDatabase>
</Actions>
</ActionGroup>The referenced type doesn't exist or hasn't been loaded yet.
Solutions:
- Check spelling (case-sensitive)
- Ensure the type is defined in
Typestable - Increase
LoadOrderif depending on other mods
A required reference is missing.
Common causes:
- Unit references non-existent UnitMovementClass
- Building references non-existent prerequisite
- Modifier references undefined RequirementSet
Trying to create something that already exists.
Solutions:
- Use
UPDATESQL instead ofINSERT - Choose a unique Type name
- Use
DELETEfirst if replacing
Use <GameEffects xmlns="GameEffects"> for:
- Creating new modifiers
- Defining requirement sets
- Simplified modifier syntax
<GameEffects xmlns="GameEffects">
<Modifier id="MY_MOD" collection="COLLECTION_OWNER" effect="EFFECT_CITY_ADJUST_YIELD">
<Argument name="YieldType">YIELD_FOOD</Argument>
<Argument name="Amount">2</Argument>
</Modifier>
</GameEffects>Use <Database> for:
- All table operations (Types, Units, Buildings, etc.)
- Linking modifiers to entities
- Any non-modifier data
<Database>
<Types>
<Row Type="UNIT_MY_UNIT" Kind="KIND_UNIT"/>
</Types>
</Database>Never mix them in the same file!
| Cause | Solution |
|---|---|
| Large images | Compress textures, use DDS format |
| Too many modifiers | Combine similar modifiers where possible |
| Inefficient requirements | Use simpler requirement types |
| Cause | Solution |
|---|---|
| Invalid XML | Validate all XML files |
| Circular dependencies | Check mod dependencies for loops |
| Memory issues | Reduce texture sizes |
Add to AppOptions.txt:
CopyDatabasesToDisk 1
EnableTuner 1
EnableDebugPanels 1
UIDebugger 1
UIFileWatcher 1
Key log files in %LOCALAPPDATA%\Firaxis Games\Sid Meier's Civilization VII\Logs\:
| File | Contents |
|---|---|
Database.log |
Database errors and warnings |
Modding.log |
Mod loading information |
Lua.log |
Script errors (now JavaScript in Civ VII) |
With CopyDatabasesToDisk 1, SQLite files are exported to the debug folder. Use a SQLite browser to inspect:
-
DebugGameplay.sqlite- Active game data -
DebugConfiguration.sqlite- Game setup data
The FireTuner tool (in Development Tools) allows:
- Live database queries
- Console commands
- Game state inspection
No. Civilization VII uses JavaScript for scripting. See JavaScript Overview.
Use AlwaysMet criteria or create separate ActionGroups for each age:
<Criteria id="always">
<AlwaysMet></AlwaysMet>
</Criteria>- Shell scope: Loads for game setup menus (civ/leader selection)
- Game scope: Loads during active gameplay
Civilizations and Leaders need both scopes to appear in setup AND work in-game.
Use SQL UPDATE statements:
UPDATE Units SET BaseMoves = 3 WHERE UnitType = 'UNIT_WARRIOR';Or use XML DELETE and INSERT:
<Units>
<Delete UnitType="UNIT_WARRIOR"/>
<Row UnitType="UNIT_WARRIOR" BaseMoves="3" .../>
</Units>In the Development Tools folder:
Steam\steamapps\common\Sid Meier's Civilization VII Development Tools\
Look for mods prefixed with fxs- (e.g., fxs-new-policies, fxs-new-narrative-events).
- Enable
UIFileWatcher 1for live UI reloading - Use FireTuner for database queries
- Export database with
CopyDatabasesToDisk 1 - Start new games - saved games cache some data
- Official Documentation: In Development Tools folder
-
Game Files: Study existing content in
Base/modules/ -
Example Mods: Look at
fxs-*mods in Dev Tools
| Platform | Path |
|---|---|
| Windows | %LOCALAPPDATA%\Firaxis Games\Sid Meier's Civilization VII\Logs\ |
| macOS | ~/Library/Application Support/Civilization VII/Logs/ |
| Linux | ~/My Games/Sid Meier's Civilization VII/Logs/ |