Updating PluralRule via Modinfo

Acid.Crash

Chieftain
Joined
Dec 30, 2024
Messages
74
Hi all,
I am trying to update PluralRule via Mod.


My task is to update the following file
Code:
Sid Meier's Civilization VII\Base\Assets\schema\localization\schema-loc-20-languages.sql

INSERT INTO "Languages" VALUES('en_US','LOC_LANGUAGE_EN_US_NAME',null,2);

I need to update the last digit from 2 to 8

Code:
INSERT INTO "Languages" VALUES('en_US','LOC_LANGUAGE_EN_US_NAME',null,8);



Curretly I have the following config.

Code:
modinfo

<?xml version="1.0" encoding="utf-8"?>
<Mod id="acid-crash" version="1"
    xmlns="ModInfo">
    <Properties>
        <Name>test-name</Name>
        <Description>test-descr</Description>
        <Authors>test-author</Authors>
        <Package>MOD</Package>
        <AffectsSavedGames>0</AffectsSavedGames>
    </Properties>
    <Dependencies>
        <Mod id="core" title="LOC_MODULE_CORE_NAME"/>
        <Mod id="base-standard" title="LOC_MODULE_BASE_STANDARD_NAME"/>
    </Dependencies>
    <ActionCriteria>
        <Criteria id="always">
            <AlwaysMet></AlwaysMet>
        </Criteria>
    </ActionCriteria>
<ActionGroups>

    <ActionGroup id="acid-shell-plurality" scope="shell" criteria="always">
                    <Properties>
                <LoadOrder>100</LoadOrder>
            </Properties>
        <Actions>
                <UpdateDatabase>
                    <Item>data/Languages.sql</Item>
                </UpdateDatabase>
        </Actions>
    </ActionGroup>

</ActionGroups>
</Mod>


Code:
data/Languages.sql

UPDATE 'Languages' SET PluralRule = 8 WHERE Locale = 'en_US';


With this setup Modding.log gives the following error

Code:
[2025-03-08 22:02:34]    acid-shell-plurality (UpdateDatabase)
[2025-03-08 22:02:34]    Loading data/Languages.sql
[2025-03-08 22:02:34]    Warning: ModdingUpdateConfigurationDatabase - Error Loading SQL.
[2025-03-08 22:02:34]    ERROR: Modding Framework Apply Actions - Fatal Error when calling Action::Apply. Rollback Required.


Can someone advise what might be causing the issue?
Looks like the origin of this error might be some restriction...
Are there any workarounds for this?
 
Last edited:
I'm by no means an expert, or really anything other than an amateur, but when I look at SQL files in other mods, they all follow the same pattern. Following that, your code could (in my not so professional opinion) be something like
SQL:
INSERT OR REPLACE INTO Languages (Locale, XXX, XXX, PluralRule) VALUES ('en_US','LOC_LANGUAGE_EN_US_NAME',null,8);
You'll obviously have to fill in the two XXX

I've not tried this at all, just deducted it from other examples. I might be seriously wrong about it :)
 
I'm by no means an expert, or really anything other than an amateur, but when I look at SQL files in other mods, they all follow the same pattern. Following that, your code could (in my not so professional opinion) be something like
SQL:
INSERT OR REPLACE INTO Languages (Locale, XXX, XXX, PluralRule) VALUES ('en_US','LOC_LANGUAGE_EN_US_NAME',null,8);
You'll obviously have to fill in the two XXX

I've not tried this at all, just deducted it from other examples. I might be seriously wrong about it :)

Code:
INSERT OR REPLACE INTO Languages (Locale, Name, Collator, PluralRule) VALUES ('en_US','LOC_LANGUAGE_EN_US_NAME',null,8);


No luck.
Retrieved missing XXX from Sid Meier's Civilization VII\Base\Assets\schema\localization\schema-loc-10.sql
 
No luck.
Retrieved missing XXX from Sid Meier's Civilization VII\Base\Assets\schema\localization\schema-loc-10.sql
Well, too bad. I guess you need someone who actually understands this stuff.
 
Back
Top Bottom