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

clamlol

Chieftain
Joined
Feb 10, 2022
Messages
24
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?
 
Back
Top Bottom