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

[BNW] Unique Buildings not showing for Custom Civilization/Not showing leaders below Custom Leader

Discussion in 'Civ5 - Creation & Customization' started by Unendingfear, Aug 21, 2019.

  1. Unendingfear

    Unendingfear Chieftain

    Joined:
    Dec 28, 2010
    Messages:
    34
    Location:
    Nowhere
    So, I'm sure you've had tens of dozens of threads like these before, but I'm a novice modder trying my hand at making a custom civilization. I've managed to figure everything else out so far, the funky way of doing icons, custom units, all that sort of stuff. I find myself at an impasse right now though. I've been over my code for the past couple days, comparing it against tutorials and other custom civilization mods. The first issue I'm having is that I can't quite seem to get the custom buildings to show up, either in the civilopedia, the start up menu, or under the modded ingame editor screen. The custom unit I did for the civilization shows up under all three and functions as desired in game, for reference. In case it's not totally apparent from the code, one building is supposed to be a replacement nuclear plant that doesn't require uranium. The second is a buffed palace replacement. The second issue I've been having is that on the Game Setup screen (simple, not advanced), when I go to select a civilization all the leaders alphabetically underneath my custom leader don't show up. Under the advanced set up screen they show up fine, but the simple only shows up to my custom leader.

    I've attached a zipped version of the built mod. I tried checking my database logs but I couldn't really make sense of what it said. Nonetheless, I've attached it as well. Any help, tips, or pointers are greatly appreciated.
     

    Attached Files:

  2. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,085
    Location:
    Illinois, USA
    From Database.log:
    Code:
    [206620.203] table Buildings has no column named Culture
    You are attempting to use a column that is only valid in Vanilla and is illegal in Gods & Kings and Brave New World. This causes the game to ignore the entire contents of file XML/Buildings/CIV5Buildings.xml within your mod. this has a cascading effect of causing a malfunction of the game's set-up menus with the exact results you are seeing. If a civilization does not have at least two unique components successfully added into the game's database, you always get the error you are seeing in the set-up menus.

    Code:
    		<Row>
    			<Type>BUILDING_AM_PALACE</Type>
    			<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
    			<Cost>0</Cost>
    			<Help>TXT_KEY_BUILDING_PALACE_HELP</Help>
    			<Description>TXT_KEY_BUILDING_AM_PALACE</Description>
    			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_AMPALACE_TEXT</Civilopedia>
    			<Strategy>TXT_KEY_BUILDING_AM_PALACE_STRATEGY</Strategy>
    			<ArtDefineTag>PALACE</ArtDefineTag>
    			<Capital>true</Capital>
    			<NukeImmune>true</NukeImmune>
    			<MinAreaSize>-1</MinAreaSize>
    --->			<Culture>1</Culture>
    			<Defense>250</Defense>
    			<ArtInfoCulturalVariation>true</ArtInfoCulturalVariation>
    			<DisplayPosition>32</DisplayPosition>
    			<NeverCapture>true</NeverCapture>
    			<IconAtlas>CIV_COLOR_ATLAS_LEGENDS</IconAtlas>
    			<PortraitIndex>2</PortraitIndex>
    		</Row>
    	</Buildings>
    In order to add Culture to a building in G&K and BNW you need to use table <Building_YieldChanges> with a <YieldType> designation of "YIELD_CULTURE"

    Also, your palace has no great work of art slot, which is standard for BNW.
    Code:
    		<Row>
    			<Type>BUILDING_PALACE</Type>
    			<BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
    			<Cost>0</Cost>
    			<Help>TXT_KEY_BUILDING_PALACE_HELP</Help>
    			<Description>TXT_KEY_BUILDING_PALACE</Description>
    			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_PALACE_TEXT</Civilopedia>
    			<Strategy>TXT_KEY_BUILDING_PALACE_STRATEGY</Strategy>
    			<ArtDefineTag>PALACE</ArtDefineTag>
    			<Capital>true</Capital>
    			<NukeImmune>true</NukeImmune>
    			<MinAreaSize>-1</MinAreaSize>
    			<Defense>250</Defense>
    			<ArtInfoCulturalVariation>true</ArtInfoCulturalVariation>
    			<DisplayPosition>32</DisplayPosition>
    			<GreatWorkSlotType>GREAT_WORK_SLOT_ART_ARTIFACT</GreatWorkSlotType>
    			<GreatWorkCount>1</GreatWorkCount>
    			<NeverCapture>true</NeverCapture>
    			<IconAtlas>BW_ATLAS_1</IconAtlas>
    			<PortraitIndex>19</PortraitIndex>
    		</Row>
    ----------------------------

    You've forgotten to complete editing in this file: You're referring to your new leader trait once and elsewhere two existing traits
    Code:
    <GameData>
    	<Traits>
    		<Row>
    			<Type>TRAIT_NUCLEAR_FURY</Type>
    			<Description>TXT_KEY_TRAIT_NUCLEAR_FURY</Description>
    			<ShortDescription>TXT_KEY_TRAIT_NUCLEAR_FURY_SHORT</ShortDescription>
    			<RazeSpeedModifier>100</RazeSpeedModifier>
    		</Row>
    	</Traits>
    	<Trait_ResourceQuantityModifiers>
    		<Row>
    			<TraitType>TRAIT_STRATEGIC_RICHES</TraitType>
    			<ResourceType>RESOURCE_URANIUM</ResourceType>
    			<ResourceQuantityModifier>100</ResourceQuantityModifier>
    		</Row>
    		<Row>
    			<TraitType>TRAIT_LAND_TRADE_GOLD</TraitType>
    			<ResourceType>RESOURCE_ALUMINUM</ResourceType>
    			<ResourceQuantityModifier>100</ResourceQuantityModifier>
    		</Row>
    	</Trait_ResourceQuantityModifiers>
    </GameData>
    ----------------------------------------

    <Atlas>CIV_COLOR_ATLAS_LEGENDS</Atlas>

    Every new modder uses this Atlas "name", with ensuing confusion when more than two such mods are enabled at the same time. Only one such atlas can exist at the same time within the game, so all such mods will use the first Atlas with the same name that gets added to the game's database. However if all the art dds file-names are the same, such as <Filename>CivSymbolsColorLegends256.dds</Filename>, then the final mod to load will be the one whose artwork gets used for that Atlas.

    Make a more-unique name for your Atlas and DDS files.

    ---------------------------------------

    See this tutorial: whoward69's what ModBuddy setting for what file types tutorial

    You have a few minor mistakes in your file usages.
     
    Unendingfear likes this.
  3. Unendingfear

    Unendingfear Chieftain

    Joined:
    Dec 28, 2010
    Messages:
    34
    Location:
    Nowhere
    Thanks for the really detailed response! I appreciate your help.

    I went through the mod and adjusted just about everything you mentioned. I only personally found one file usage error and that was with the AM_Scene.xml file. I didn't see any other file types - that the tutorial mentioned - needing to be changed. Is that something that the database can help point out? I'm not a 100% sure how to read everything in it.

    Again though, many thanks for the assistance.
     

    Attached Files:

    Last edited: Aug 23, 2019

Share This Page