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

Limiting a unit to a group of players

Discussion in 'Civ4 - Creation & Customization' started by Asjo, Nov 24, 2007.

  1. Asjo

    Asjo Warlord

    Joined:
    Jan 23, 2006
    Messages:
    115
    I added a new naval unit and allowed all players to make this and I thought it would add to overall versatility. However, the AI used the unit more than I liked, and for most civilizations I prefered to see other units used.

    Therefore, I would like to make this unit available only to a handful of nations. Normally, I've just been doing unit replacements, which is quite simple (and the game has examples of that when you begin). I imagined that maybe setting all values in CIV4UnitClassInfos to 0 and then adding the unit for a specific civilization would do the trick. However, when I think about it, setting the values to 0 would mean that even those given the unit specifically would not be able to build it.

    Could I just delete the unit class from CIV4UnitClassInfos or what options do I have?
     
  2. CXDamian

    CXDamian sub-Chieftain

    Joined:
    Dec 18, 2005
    Messages:
    110
    Location:
    KS
    Two ways to do it,

    1. Leave CIV4UnitClassInfos.xml as is, then in CIV4CivilizationInfos.xml: add the following under <Units> for all civs you don't want to use:
    Code:
    <Unit>
      <UnitClassType>UNITCLASS_TUGBOAT</UnitClassType>
      <UnitType>NONE</UnitType>
    </Unit>
    2. Change CIV4UnitClassInfos.xml for your unit: Change <DefaultUnit> to NONE.
    repeat above CIV4CivilizationInfos edit, except do it only for the civs you want to have access to the unit. Change <UnitType> to UNIT_TUGBOAT
     

Share This Page