[NFP] Sumerian warcarts not affected by matterhorn

It's because War-Cart is not registered to any TypeTag class that Alpine Training supports.
Here's the fix, tested.
INSERT OR IGNORE INTO TypeTags (Type, Tag) VALUES ('UNIT_SUMERIAN_WAR_CART', 'CLASS_HEAVY_CAVALRY');
 
It's because War-Cart is not registered to any TypeTag class that Alpine Training supports.
Here's the fix, tested.
INSERT OR IGNORE INTO TypeTags (Type, Tag) VALUES ('UNIT_SUMERIAN_WAR_CART', 'CLASS_HEAVY_CAVALRY');

Okay, and where do I i insert that fix? :)
 
Okay, and where do I i insert that fix? :)
In a mod.
It's because War-Cart is not registered to any TypeTag class that Alpine Training supports.
Another way around it would be to attach CLASS_HEAVY_CHARIOT or CLASS_WAR_CART to ABILITY_ALPINE_TRAINING.
Code:
INSERT OR REPLACE INTO TypeTags
       (Type,                      Tag)
VALUES ('ABILITY_ALPINE_TRAINING', 'CLASS_HEAVY_CHARIOT');
 
Another way around it would be to attach CLASS_HEAVY_CHARIOT or CLASS_WAR_CART to ABILITY_ALPINE_TRAINING.
Code:
INSERT OR REPLACE INTO TypeTags
       (Type,                      Tag)
VALUES ('ABILITY_ALPINE_TRAINING', 'CLASS_HEAVY_CHARIOT');
Also possible, even considered that option too, but I think Alpine training has all lines covered ok, so there is no need to add a new one.
I find rather those heavy chariot and war cart tags to be some some sort of weird exceptions. And since War Cart is clearly a heavy cavalry line, then it is more logical to add it there.
 
Also possible, even considered that option too, but I think Alpine training has all lines covered ok, so there is no need to add a new one.
I find rather those heavy chariot and war cart tags to be some some sort of weird exceptions. And since War Cart is clearly a heavy cavalry line, then it is more logical to add it there.
Except, by giving the War Cart the Heavy Cavalry tag, you'd make it vulnerable to Anti-Cav units & also less effective against cities. That takes away two of it's most powerful abilities. I think just attaching one of it's current tags to the ability would be much cleaner w/o adding unintentional effects.
Just as an aside, there's also the CLASS_LIGHT_CHARIOT that's not attached to the ability either.
 
Last edited:
I'm basically clueless with Civ modding, but I would really like to implement this fix for myself. (I also would like it to work for Egypt's chariot archer)

Using modbuddy I built a new Empty GS mod, added new item database (sql) and pasted the code:

INSERT OR REPLACE INTO TypeTags
(Type, Tag)
VALUES ('ABILITY_ALPINE_TRAINING', 'CLASS_HEAVY_CHARIOT');

Hit build, made sure mod was active and tested it out in a duel map. Each troop type I sent by Matterhorn got the ability added correctly except for the war-cart.

I'm guessing the above code assumed a certain level of competence and I missed some basic steps. I would really appreciate if someone could walk me through what I've done incorrectly.

Also, if there is a way to implement this mod to work on current saves as well that would be appreciated. I really don't want to restart my game. Thank you in advance.
 
Nothing is wrong with your code. Without looking at your mod it's likely either you have some kind of error in your modinfo, and/or you need a LoadOrder for your UpdateDatabase action.

As far as implementing it in a save game, the only way it could possibly apply is if you add the code to another mod's file that was already loaded as part of that game's setup. Although, that method doesn't always work with every change, it's worth a shot. Otherwise, there's no way to add a new mod to the game's database for an existing save game.
 
Nothing is wrong with your code. Without looking at your mod it's likely either you have some kind of error in your modinfo, or you need a LoadOrder for your UpdateDatabase action.

As far as implementing it in a save game, the only way it could possibly apply is if you add the code to another mod's file that was already loaded as part of that game's setup. Although, that method doesn't always work with every change, it's worth a shot. Otherwise, there's no way to add a new mod to the game's database for an existing save game.

Here is the modinfo:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="1c17b4b4-f486-4cb1-9857-76e0732ce8fd" version="1">
<Properties>
<Name>Wart-Cart Matterhorn bonus</Name>
<Description>Matterhorn Natural Wonder bonus now correctly affects the Sumer War-Cart.
Land combat units who move next to the Matterhorn ignore Hills for the rest of the game and gain +3 Strength Combat Strength when fighting in hills</Description>
<Created>1613938597</Created>
<Teaser>Matterhorn Natural Wonder bonus now correctly affects the Sumer War-Cart.
Land combat units who move next to the Matterhorn</Teaser>
<Authors>Ven</Authors>
<SpecialThanks>Infixo @civfanatics</SpecialThanks>
<CompatibleVersions>1.2,2.0</CompatibleVersions>
</Properties>
<Files>
<File>GameData1.sql</File>
</Files>
</Mod>
 
You're missing an UpdateDatabase action. Try this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="1c17b4b4-f486-4cb1-9857-76e0732ce8fd" version="1">
    <Properties>
        <Name>Wart-Cart Matterhorn bonus</Name>
        <Teaser>Matterhorn Natural Wonder bonus now correctly affects the Sumer War-Cart. Land combat units who move next to the Matterhorn</Teaser>
        <Description>Matterhorn Natural Wonder bonus now correctly affects the Sumer War-Cart. Land combat units who move next to the Matterhorn ignore Hills for the rest of the game and gain +3 Strength Combat Strength when fighting in hills</Description>
        <Authors>Ven</Authors>
        <SpecialThanks>Infixo @civfanatics</SpecialThanks>
        <CompatibleVersions>1.2,2.0</CompatibleVersions>
    </Properties>
    <InGameActions>
        <UpdateDatabase id="Ven_Matterhorn_UpdateDatabase">
            <Properties>
                <LoadOrder>500</LoadOrder>
            </Properties>
            <File>GameData1.sql</File>
        </UpdateDatabase>
    </InGameActions>
    <Files>
        <File>GameData1.sql</File>
    </Files>
</Mod>
 
Except, by giving the War Cart the Heavy Cavalry tag, you'd make it vulnerable to Anti-Cav units & also less effective against cities. That takes away two of it's most powerful abilities. I think just attaching one of it's current tags to the ability would be much cleaner w/o adding unintentional effects.
Just as an aside, there's also the CLASS_LIGHT_CHARIOT that's not attached to the ability either.
I get the Anti-cavalry part but why would the Heavy Cavalry tag make War-carts less effective against cities?
 
Top Bottom