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

[Vanilla] My unique district won't replace the original district.

Discussion in 'Mod Creation Help' started by Falk Bruskeland, Jun 26, 2018.

  1. Falk Bruskeland

    Falk Bruskeland Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    When I research the required technology, I can build the original and the replacement. It also looks like it is tagged like a trait, and not a district, because in Civilpedia it shows it as a trait and not as a district.

    XML:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Gerudo_Bazaar -->
    <!-- Author: Falk -->
    <!-- DateCreated: 6/25/2018 7:55:30 PM -->
    <GameData>
        <Types>
            <Row Type="DISTRICT_BAZAAR" Kind="KIND_DISTRICT"/>
        </Types>
        
        <DistrictReplaces>
            <Row CivUniqueDistrictType="DISTRICT_BAZAAR" ReplacesDistrictType="DISTRICT_COMMERCIAL_HUB"/>
        </DistrictReplaces>
        
        <Districts>
            <Row DistrictType="DISTRICT_BAZAAR" Name="LOC_DISTRICT_BAZAAR_NAME" Description="LOC_DISTRICT_BAZAAR_DESCRIPTION" PrereqTech="TECH_CURRENCY" PlunderType="PLUNDER_GOLD" PlunderAmount="50" AdvisorType="ADVISOR_GENERIC" Cost="54" CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH" CostProgressionParam1="40" RequiresPlacement="true" RequiresPopulation="true" Aqueduct="false" NoAdjacentCity="false" InternalOnly="false" ZOC="false" CaptureRemovesBuildings="false" CaptureRemovesCityDefenses="false" MilitaryDomain="NO_DOMAIN" TravelTime="3" CityStrengthModifier="2"/>
        </Districts>
    
        <District_Adjacencies>
            <Row DistrictType="DISTRICT_BAZAAR" YieldChangeId="River_Gold"/>
            <Row DistrictType="DISTRICT_BAZAAR" YieldChangeId="Harbor_Gold"/>
            <Row DistrictType="DISTRICT_BAZAAR" YieldChangeId="RoyalDock_Gold"/>
            <Row DistrictType="DISTRICT_BAZAAR" YieldChangeId="District_Gold"/>
            <Row DistrictType="DISTRICT_BAZAAR" YieldChangeId="Oasis_Gold"/>
            <Row DistrictType="DISTRICT_BAZAAR" YieldChangeId="Oasis_Food"/>
        </District_Adjacencies>
    
        <Adjacency_YieldChanges>
            <Row ID="Oasis_Gold" Description="LOC_DISTRICT_FOREST_FAITH" YieldType="YIELD_GOLD" YieldChange="2" TilesRequired="1" AdjacentFeature="FEATURE_OASIS"/>
            <Row ID="Oasis_Food" Description="LOC_DISTRICT_FOREST_FAITH" YieldType="YIELD_FOOD" YieldChange="1" TilesRequired="1" AdjacentFeature="FEATURE_OASIS"/>
        </Adjacency_YieldChanges>
    
        <District_GreatPersonPoints>
            <Row DistrictType="DISTRICT_BAZAAR" GreatPersonClassType="GREAT_PERSON_CLASS_MERCHANT" PointsPerTurn="1"/>
        </District_GreatPersonPoints>
        
        <District_TradeRouteYields>
            <Row DistrictType="DISTRICT_BAZAAR" YieldType="YIELD_PRODUCTION" YieldChangeAsOrigin="0" YieldChangeAsDomesticDestination="1" YieldChangeAsInternationalDestination="0"/>
            <Row DistrictType="DISTRICT_BAZAAR" YieldType="YIELD_GOLD" YieldChangeAsOrigin="0" YieldChangeAsDomesticDestination="0" YieldChangeAsInternationalDestination="3"/>
        </District_TradeRouteYields>
    
        <District_CitizenYieldChanges>
            <Row DistrictType="DISTRICT_BAZAAR" YieldType="YIELD_GOLD" YieldChange="4"/>
        </District_CitizenYieldChanges>
    
        <DistrictModifiers>
            <Row>
                <DistrictType>DISTRICT_BAZAAR</DistrictType>
                <ModifierId>COMMERCIAL_HUB_TRADE_ROUTE_CAPACITY</ModifierId>
            </Row>
        </DistrictModifiers>
        
    </GameData>
    
    This is my civilization code:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <GameData>
        <Types>
            <Row Type="CIVILIZATION_FELINE" Kind="KIND_CIVILIZATION" />
            <Row Type="TRAIT_CIVILIZATION_DISTRICT_BAZAAR" Kind="KIND_TRAIT" />
            <Row Type="TRAIT_CIVILIZATION_UNIT_FEB_WARRIOR" Kind="KIND_TRAIT" />
            <Row Type="TRAIT_CIVILIZATION_CIVTRAIT_FEB_VOE" Kind="KIND_TRAIT" />
        </Types>
        
        <Civilizations>
            <Row>
                <CivilizationType>CIVILIZATION_FELINE</CivilizationType>
                <Name>LOC_CIVILIZATION_FELINE_NAME</Name>
                <Description>LOC_CIVILIZATION_FELINE_DESCRIPTION</Description>
                <Adjective>LOC_CIVILIZATION_FELINE_ADJECTIVE</Adjective>
                <StartingCivilizationLevelType>CIVILIZATION_LEVEL_FULL_CIV</StartingCivilizationLevelType>
            </Row>
        </Civilizations>
    
        <CivilizationLeaders>
            <Row CivilizationType="CIVILIZATION_FELINE" LeaderType="LEADER_JASPER_KITTY" CapitalName="LOC_CIVLIZATION_FELINE_CITY_1" />
        </CivilizationLeaders>
    
        <CivilizationCitizenNames>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_MALE_1" Female="0"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_MALE_2" Female="0"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_MALE_3" Female="0"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_MALE_4" Female="0"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_FEMALE_1" Female="1"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_FEMALE_2" Female="1"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_FEMALE_3" Female="1"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_FEMALE_4" Female="1"/>
            <Row CivilizationType="CIVILIZATION_FELINE" CitizenName="LOC_CITIZEN_FELINE_FEMALE_5" Female="1"/>
        </CivilizationCitizenNames>
    
        <CivilizationInfo>
            <Row CivilizationType="CIVILIZATION_FELINE" Header="LOC_CIVINFO_BINOMIAL_NAME" Caption="LOC_CIVINFO_FELIS_CATUS" />
        </CivilizationInfo>
    
        <CivilizationTraits>
            <Row CivilizationType="CIVILIZATION_FELINE" TraitType="TRAIT_CIVILIZATION_CIVTRAIT_FEB_VOE" />
            <Row CivilizationType="CIVILIZATION_FELINE" TraitType="TRAIT_CIVILIZATION_UNIT_FEB_WARRIOR" />
            <Row CivilizationType="CIVILIZATION_FELINE" TraitType="TRAIT_CIVILIZATION_DISTRICT_BAZAAR" />
        </CivilizationTraits>
    
        <Traits>
            <Row TraitType="TRAIT_CIVILIZATION_CIVTRAIT_FEB_VOE" Name="LOC_TRAIT_CIVILIZATION_FEB_VOE_NAME" Description="LOC_TRAIT_CIVILIZATION_FEB_VOE_DESCRIPTION" />
            <Row TraitType="TRAIT_CIVILIZATION_UNIT_FEB_WARRIOR" Name="LOC_UNIT_FEB_WARRIOR_NAME" Description="LOC_UNIT_FEB_WARRIOR_DESCRIPTION" />
            <Row TraitType="TRAIT_CIVILIZATION_DISTRICT_BAZAAR" Name="LOC_DISTRICT_BAZAAR_NAME" Description="LOC_DISTRICT_BAZAAR_DESCRIPTION" />
        </Traits>
    
        <CityNames>
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_1" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_2" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_3" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_4" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_5" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_6" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_7" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_8" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_9" />
            <Row CivilizationType="CIVILIZATION_FELINE" CityName="LOC_CIVLIZATION_FELINE_CITY_10" />
        </CityNames>
    
        <StartBiasTerrains>
            <Row CivilizationType="CIVILIZATION_FELINE" TerrainType="TERRAIN_DESERT" Tier="1"/>
        </StartBiasTerrains>
    
        <StartBiasFeatures>
            <Row CivilizationType="CIVILIZATION_FELINE" FeatureType="FEATURE_OASIS" Tier="2"/>
        </StartBiasFeatures>
        
    </GameData>
    
     
  2. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,965
    Location:
    Illinois, USA
    Your new district is not assigned to a trait, so anyone can build it. See the royal dockyard
    Code:
    <Row DistrictType="DISTRICT_ROYAL_NAVY_DOCKYARD" Name="LOC_DISTRICT_ROYAL_NAVY_DOCKYARD_NAME"
          Description="LOC_DISTRICT_ROYAL_NAVY_DOCKYARD_DESCRIPTION" PrereqTech="TECH_CELESTIAL_NAVIGATION"
          PlunderType="PLUNDER_GOLD" PlunderAmount="50" AdvisorType="ADVISOR_GENERIC" Cost="27"
          CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH" CostProgressionParam1="40"
          RequiresPlacement="true" RequiresPopulation="true" Coast="true" Aqueduct="false" FreeEmbark="true" NoAdjacentCity="false"
          AdjacentToLand="true" InternalOnly="false" ZOC="false" TradeEmbark="true" CaptureRemovesBuildings="false"
          CaptureRemovesCityDefenses="false" MilitaryDomain="DOMAIN_SEA" TravelTime="2" CityStrengthModifier="2"
           TraitType="TRAIT_CIVILIZATION_ROYAL_NAVY_DOCKYARD"/>
    It is the TraitType that tells the game for whom to apply the district as a unique replacement. The defined trait is then assigned to a leader or a civilization. All unique replacements work in this way, whether districts, buildings, or units.
     
  3. Falk Bruskeland

    Falk Bruskeland Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Thanks! It works, but it's invisible. Do I have to give it a tag? I just want the normal Commercial Hub model.
     
  4. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,965
    Location:
    Illinois, USA
    You'll have to look in the tutorials & etc sub-forum for any tutorials on graphics and getting districts and such to show on the map. There are also some threads already existent in this "Help" sub-forum on issues related to map animations and 3d map graphics.
     
  5. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,300
    Location:
    Portugal
    If you only want to copy it out you are missing ardefs, you have to copy from commercial hub artdef.
     

Share This Page