1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. We have selected the winners of the Old World random draw and competition. For the winning entries, please check this thread.
    Dismiss Notice

[NFP] Sumerian warcarts not affected by matterhorn

Discussion in 'Civ6 - Bug Reports' started by Bibor, Jul 4, 2020.

  1. Bibor

    Bibor Doomsday Machine

    Joined:
    Jun 6, 2004
    Messages:
    3,021
    Gender:
    Male
    Location:
    Zagreb, Croatia
    As per title, passing warcarts don’t get the bonus.
     
  2. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,832
    Gender:
    Male
    Location:
    Warsaw
    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');
     
    Noble Zarkon and Pfeffersack like this.
  3. Bibor

    Bibor Doomsday Machine

    Joined:
    Jun 6, 2004
    Messages:
    3,021
    Gender:
    Male
    Location:
    Zagreb, Croatia
    Okay, and where do I i insert that fix? :)
     
  4. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am. Moderator

    Joined:
    Apr 10, 2014
    Messages:
    3,623
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    In a mod.
    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');
    
     
    cholsy likes this.
  5. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,832
    Gender:
    Male
    Location:
    Warsaw
    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.
     
  6. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am. Moderator

    Joined:
    Apr 10, 2014
    Messages:
    3,623
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    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: Jul 5, 2020
    FearSunn likes this.
  7. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,832
    Gender:
    Male
    Location:
    Warsaw
  8. Venemar

    Venemar Chieftain

    Joined:
    Feb 21, 2021
    Messages:
    8
    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.
     
  9. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am. Moderator

    Joined:
    Apr 10, 2014
    Messages:
    3,623
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    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.
     
  10. Venemar

    Venemar Chieftain

    Joined:
    Feb 21, 2021
    Messages:
    8
    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>
     
  11. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am. Moderator

    Joined:
    Apr 10, 2014
    Messages:
    3,623
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    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>
    
     
  12. Venemar

    Venemar Chieftain

    Joined:
    Feb 21, 2021
    Messages:
    8
    That worked! Thank you very much.
     
  13. WarDuck

    WarDuck Chieftain

    Joined:
    Oct 19, 2018
    Messages:
    4
    @Venemar You should post your mod in the Steam Workshop!
     
  14. WishIWasWobbles

    WishIWasWobbles Chieftain

    Joined:
    Sep 2, 2021
    Messages:
    1
    the_sun and Laurana Kanan like this.

Share This Page