Disabling a Unit - HandAxe (need help)

Sailor Clueless

Chieftain
Joined
Dec 20, 2017
Messages
16
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.
 

Attachments

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>
 
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>
 
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.
 
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.


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.
 
Back
Top Bottom