1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Disabling a Unit - HandAxe (need help)

Discussion in 'Civ5 - Creation & Customization' started by Sailor Clueless, Dec 22, 2017.

  1. Sailor Clueless

    Sailor Clueless Chieftain

    Joined:
    Dec 20, 2017
    Messages:
    3
    Attached here is a copy of an XML mod for disabling a unit in Civ 5. It is based off an outline (instructions, rather) provided by user Nutty in this thread: [https://forums.civfanatics.com/threads/disabling-specific-units-and-technologies.493925/]

    However, when enabled alongside the Community Patch, it does not work as intended (to remove the barbarian hand-axe). Can you help me fix it? Assistance is welcome. As it stands, playing as Germany with the Community Patch is a nerf.
     

    Attached Files:

  2. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    When you renamed the XML file, did you update the .modinfo accordingly in 2 places?

    Note that the Axman is a unique unit for the barbarians, so there's another entry that is not deleted using your XML.

    The Hand-Axe replaces the Chariot Archer, so instead of deleting the entry, we want to blank it out, so the barbarians don't build Chariot Archers instead.
    Code:
        <Civilization_UnitClassOverrides>
            <Update>
                <Where UnitType="UNIT_BARBARIAN_AXMAN" />
                <Set UnitType="" />
            </Update>
        </Civilization_UnitClassOverrides>
     
  3. Sailor Clueless

    Sailor Clueless Chieftain

    Joined:
    Dec 20, 2017
    Messages:
    3
    Are you indicating that I should post the modinfo file? I tried to upload it here but I got an error message saying the extension was not allowed. I will try copy/pasting the contents here as plain text. Also, can you bullet-point the changes I need to make? Thanks again for everything.


    <?xml version="1.0" encoding="utf-8"?>
    <Mod id="14b9e0c9-3943-4b89-8699-55c4975b07ef" version="1">
    <Properties>
    <Name>Example - Removing Hand Axes</Name>
    <Teaser>This example removes the Hand-Axe unit from the game. It completely deletes the H-A entry rather than simply making i</Teaser>
    <Description>This example removes the Hand-Axe unit from the game. It completely deletes the GDR entry rather than simply making it not playable.</Description>
    <Authors>sseckman</Authors>
    <SpecialThanks>Firaxis</SpecialThanks>
    <HideSetupGame>0</HideSetupGame>
    <Homepage>http://www.civilization5.com</Homepage>
    <AffectsSavedGames>1</AffectsSavedGames>
    <MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>1</SupportsMultiplayer>
    <SupportsHotSeat>1</SupportsHotSeat>
    <SupportsMac>1</SupportsMac>
    <ReloadLandmarkSystem>0</ReloadLandmarkSystem>
    <ReloadStrategicViewSystem>0</ReloadStrategicViewSystem>
    <ReloadUnitSystem>0</ReloadUnitSystem>
    </Properties>
    <Dependencies />
    <References />
    <Blocks />
    <Files>
    <File md5="059F6FDC3A1ECA4911CE39C0A6B34ACA" import="0">Example_RemovingGDR.xml</File>
    </Files>
    <Actions>
    <OnModActivated>
    <UpdateDatabase>Example_RemovingGDR.xml</UpdateDatabase>
    </OnModActivated>
    </Actions>
    </Mod>
     
  4. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    The file you posted was titled "Example_RemovingHA.xml". If that's the name of your file, then you need to update the 2 places where Example_RemovingGDR.xml is called out in the .modinfo file to match the name of your new file.

    Code:
        <Files>
            <File import="0">Example_RemovingHA.xml</File>
        </Files>
        <Actions>
            <OnModActivated>
                <UpdateDatabase>Example_RemovingHA.xml</UpdateDatabase>
            </OnModActivated>
        </Actions>
    Also, if you're keeping a copy of sseckman's original mod, it's a good idea to change one or more of the hexadecimal characters to another random hexadecimal character (0-9 or a-f) in the "Mod id" at the top so you don't get a conflict.
     
  5. Sailor Clueless

    Sailor Clueless Chieftain

    Joined:
    Dec 20, 2017
    Messages:
    3

    This seems to have fixed it. Anyone perusing through this thread can consider this to be the conclusion. I will post here again if hand-axes persist in my games. Thank you Nutty.
     

Share This Page