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

Question about modding and units.

Discussion in 'Civ4 - General Discussions' started by Immortal Ace, Aug 21, 2010.

  1. Immortal Ace

    Immortal Ace Prince

    Joined:
    Mar 25, 2006
    Messages:
    366
    Location:
    Kissimmee, Florida
    Will there be any consequences of removing units from the Civ4UnitInfos.XML?

    Basically, I'm trying to delete units so I can enjoy a WWII scenario for myself. In order to do so, I'm trying to delete modern units from the game. If I do so, will the game crash or no?

    I am aware that I can set a unit's cost to -1 and prevent them from being built except that if I go that route older units can be upgraded to a unit I had set to -1.

    Lets say I removed mechanized infantry by setting its cost to -1. It prevents them from being built but then you could just make an infantry and upgrade it to a mechanized infantry.

    Any suggestions?
     
  2. Jerrymander

    Jerrymander Epistemologist

    Joined:
    Mar 21, 2007
    Messages:
    2,630
    Location:
    Hallways of Always
    Go ahead and remove the units. But set it up as a mod so you don't edit the original files; load it up and see if it crashes. This would also probably be better posted in the Creation and Customization subforum.
     
  3. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    First, if you remove a unit you should remove all other references to it in the unit infos file - those would be in the units that can upgrade to that unit type.

    Also, units can be referenced in other files. For example the UUs in the civilization infos (one late UU is America's Navy Seal, so if you remove that unit you should also remove it from the civilization info) and events (there are events that happen for aircraft carriers and fighters, I'm not sure about other later units - I think there is one that can happen for helicopters).

    If you remove a unit you should search the XML and Python folders for files that include the UNITCLASS_x and UNIT_y values for the unit to see if there is anything else you need to adjust, and maybe the UNITCOMBAT_z for units with unit combats that don't exist in the part you are keeping (like UNITCOMBAT_HELICOPTER, perhaps). Any that appear elsewhere would require modifying those "elsewhere" places to avoid problems.
     

Share This Page