[BNW] Can't load modded save unless AffectsSavedGames is disabled

clamlol

Chieftain
Joined
Feb 10, 2022
Messages
25
I am at the point where my mod works just as I want it to, but with one major issue: I can't load any save I make with the mod unless I disable AffectsSavedGames in my modinfo. I can save a game, and then immediately try to load that save, and it will not let me- it will say I am not using the mods required to load it. Since my mod adds units, buildings and terrain features, I will need to get this problem solved if I ever want to distribute it.

All my logs look fine, with the exception of Database.log, which has some lines like

Code:
[16.825] UNIQUE constraint failed: ArtDefine_StrategicView.StrategicViewType, ArtDefine_StrategicView.TileType
[16.825] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[17.839] no such table: ContentPackage.LocalizedText
[17.839] no such table: ContentPackage.LocalizedText
[17.839] no such table: ContentPackage.LocalizedText
[18.139] UNIQUE constraint failed: ArtDefine_StrategicView.StrategicViewType, ArtDefine_StrategicView.TileType
[18.139] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[18.292] no such table: ContentPackage.LocalizedText
[18.293] no such table: ContentPackage.LocalizedText
[18.293] no such table: ContentPackage.LocalizedText

This may be related to the two dummy features I'm adding:

XML:
<?xml version="1.0" encoding="utf-8"?>
<GameData>
    <Features>
        <Row>
            <Type>FEATURE_PETRAS_BLESSING</Type>
            <Description>TXT_KEY_FEATURE_PETRAS_BLESSING</Description>
            <Civilopedia>TXT_KEY_FEATURE_PETRAS_BLESSING_HELP</Civilopedia>
            <ArtDefineTag>ART_DEF_FEATURE_NONE</ArtDefineTag>
            <Movement>1</Movement>
            <AddsFreshWater>false</AddsFreshWater>
            <AppearanceProbability>500</AppearanceProbability>
            <Defense>0</Defense>
            <InfluenceCost>0</InfluenceCost>
            <NoCoast>false</NoCoast>
            <NoImprovement>false</NoImprovement>
            <NoRiver>true</NoRiver>
            <NoAdjacent>false</NoAdjacent>
            <RequiresFlatlands>true</RequiresFlatlands>
            <WorldSoundscapeAudioScript>ASSS_AMBIENCE_DESERT</WorldSoundscapeAudioScript>
            <EffectTypeTag>SAND</EffectTypeTag>
            <PortraitIndex>0</PortraitIndex>
            <IconAtlas>NEW_TERRAIN_ATLAS_DLC</IconAtlas>
        </Row>
        <Row>
            <Type>FEATURE_AURORA_POWER</Type>
            <Description>TXT_KEY_FEATURE_AURORA_POWER</Description>
            <Civilopedia>TXT_KEY_FEATURE_AURORA_POWER_HELP</Civilopedia>
            <ArtDefineTag>ART_DEF_FEATURE_NONE</ArtDefineTag>
            <Movement>1</Movement>
            <AddsFreshWater>false</AddsFreshWater>
            <AppearanceProbability>500</AppearanceProbability>
            <Defense>0</Defense>
            <InfluenceCost>0</InfluenceCost>
            <NoCoast>false</NoCoast>
            <NoImprovement>false</NoImprovement>
            <NoRiver>false</NoRiver>
            <NoAdjacent>false</NoAdjacent>
            <RequiresFlatlands>false</RequiresFlatlands>
            <WorldSoundscapeAudioScript>ASSS_AMBIENCE_TUNDRA</WorldSoundscapeAudioScript>
            <EffectTypeTag>DIRT</EffectTypeTag>
            <PortraitIndex>16</PortraitIndex>
            <IconAtlas>TERRAIN_ATLAS</IconAtlas>
        </Row>
    </Features>
    <Feature_HillsYieldChanges>
        <Row>
            <FeatureType>FEATURE_AURORA_POWER</FeatureType>
            <YieldType>YIELD_FOOD</YieldType>
            <Yield>-1</Yield>
        </Row>
        <Row>
            <FeatureType>FEATURE_AURORA_POWER</FeatureType>
            <YieldType>YIELD_PRODUCTION</YieldType>
            <Yield>1</Yield>
        </Row>
    </Feature_HillsYieldChanges>
</GameData>

I've tried doing various things in place of ART_DEF_FEATURE_NONE, but the result is always the same. I don't know if this is what's causing my saves to be unloadable, but it's my only lead right now.

Has anyone run into this problem before? If so, how did you solve it?
 
are you saying you can start a new game but not load it again after you save it? are you making changes to your mod in between saves?
 
Setting up a game works fine, and playing it produces no errors in any log other than the ones in my previous post. But when I save the game and try to load the save – either immediately after saving, after quitting to the main menu first, or after relaunching Civ – the Load Game button is unclickable, with the hover message saying not all mods required by the saved game are installed. This happens even when my mod is the only one active.
 
Last edited:
Back
Top Bottom