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

Unique Building Won't Show Up in Game

Discussion in 'Civ5 - Creation & Customization' started by Balllistic, Aug 19, 2015.

  1. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    Hello! I've got a very frustrating problem that I've been trying to solve for several hours now. The unique building I want for my civilization is a replacement for the ancient era walls, and I can't get it to show up in game.

    Code
    Civilization
    Code:
    <GameData>
    	<Civilizations>
    		<Row>
    			<Type>CIVILIZATION_TRUMP</Type>
    			<Description>TXT_KEY_CIV_TRUMP_DESC</Description>
    			<ShortDescription>TXT_KEY_CIV_TRUMP_SHORT_DESC</ShortDescription>
    			<Adjective>TXT_KEY_CIV_TRUMP_ADJECTIVE</Adjective>
    			<Civilopedia>TXT_KEY_CIV_TRUMP_PEDIA</Civilopedia>
    			<CivilopediaTag>TXT_KEY_CIV5_TRUMP</CivilopediaTag>
    			<DefaultPlayerColor>PLAYERCOLOR_DARK_YELLOW</DefaultPlayerColor>
    			<ArtDefineTag>ART_DEF_CIVILIZATION_TRUMP</ArtDefineTag>
    			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
    			<PortraitIndex>1</PortraitIndex>
    			<IconAtlas>CIV_COLOR_ATLAS_LEGENDS</IconAtlas>
    			<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
    			<MapImage>MapTrump512.dds</MapImage>
    			<ArtStyleSuffix>_EURO</ArtStyleSuffix>
    			<ArtStylePrefix>EUROPEAN </ArtStylePrefix>
    			<DawnOfManQuote>TXT_KEY_CIV5_DAWN_TRUMP_TEXT</DawnOfManQuote>
    			<DawnOfManImage>DOM_Trump.dds</DawnOfManImage>
    			<DawnOfManAudio></DawnOfManAudio>
    			<Playable>true</Playable>
    			<AIPlayable>true</AIPlayable>
    		</Row>
    	</Civilizations>
    	<Civilization_CityNames>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPCITY</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPTOWN</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPVILLE</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPINGTON</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPSGLORIOUSHAIR</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPSFURIOUSSCREAM</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPSDISARMINGWORDS</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPSPOWERFULPOSTURE</CityName>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<CityName>TXT_KEY_CITY_NAME_TRUMPSCITYOFGOLD</CityName>
    		</Row>
    	</Civilization_CityNames>
    	<Civilization_FreeBuildingClasses>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
    		</Row>
    	</Civilization_FreeBuildingClasses>
    	<Civilization_FreeTechs>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<TechType>TECH_AGRICULTURE</TechType>
    		</Row>
    	</Civilization_FreeTechs>
    	<Civilization_FreeUnits>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
    			<Count>1</Count>
    			<UnitAIType>UNITAI_SETTLE</UnitAIType>
    		</Row>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<UnitClassType>UNITCLASS_WORKER</UnitClassType>
    			<Count>1</Count>
    			<UnitAIType>UNITAI_WORKER</UnitAIType>
    		</Row>
    	</Civilization_FreeUnits>
    	<Civilization_Leaders>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<LeaderheadType>LEADER_TRUMP</LeaderheadType>
    		</Row>
    	</Civilization_Leaders>
    	<Civilization_UnitClassOverrides>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<UnitClassType>UNITCLASS_INFANTRY</UnitClassType>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    		</Row>
    	</Civilization_UnitClassOverrides>
    	<Civilization_BuildingClassOverrides>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<BuildingClassType>BUILDINGCLASS_WALLS</BuildingClassType>
    			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
    		</Row>
    	</Civilization_BuildingClassOverrides>
    	<Civilization_Start_Region_Priority>
    		<Row>
    			<CivilizationType>CIVILIZATION_TRUMP</CivilizationType>
    			<RegionType>REGION_GRASS</RegionType>
    		</Row>
    	</Civilization_Start_Region_Priority>
    </GameData>
    Building
    Code:
    <GameData>
    	<Buildings>
    		<Row>
    			<Type>BUILDING_BORDER_WALL</Type>
    			<BuildingClass>BUILDINGCLASS_WALLS</BuildingClass>
    			<Cost>80</Cost>
    			<GoldMaintainence>2</GoldMaintainence>
    			<PrereqTech>TECH_CONSTRUCTION</PrereqTech>
    			<Description>TXT_KEY_BUILDING_BORDER_WALL</Description>
    			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_BORDERWALL_TEXT</Civilopedia>
    			<Strategy>TXT_KEY_BUILDING_BORDER_WALL_STRATEGY</Strategy>
    			<Help>TEXT_KEY_BUILDING_BUILDING_BORDER_WALL_HELP</Help>
    			<ArtDefineTag>ART_DEF_BUILDING_WALLS</ArtDefineTag>
    			<MinAreaSize>-1</MinAreaSize>
    			<ConquestProb>66</ConquestProb>
    			<HurryCostModifier>0</HurryCostModifier>
    			<IconAtlas>BW_ATLAS_1</IconAtlas>
    			<PortraitIndex>32</PortraitIndex>
    			<AllowsRangeStrike>true</AllowsRangeStrike>
    			<Defense>400</Defense>
    			<CityWall>true</CityWall>
    			<ExtraCityHitPoints>50</ExtraCityHitPoints>
    		</Row>
    	</Buildings>
    	<Building_Flavor>
    		<Row>
    			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
    			<FlavorType>FLAVOR_CITY_DEFENSE</FlavorType>
    			<Flavor>50</Flavor>
    		</Row>
    	</Building_Flavor>
    	<Building_YieldChanges>
    		<Row>
    			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
    			<YeildType>YEILD_HAPPINESS</YeildType>
    			<Yeild>2</Yeild>
    		</Row>
    		<Row>
    			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
    			<YeildType>YEILD_CULTURE</YeildType>
    			<Yeild>-1</Yeild>
    		</Row>
    	</Building_YieldChanges>
    </GameData>
    Building Classes
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Created by ModBuddy on 8/19/2015 7:41:27 PM -->
    <GameData>
    	<BuildingClasses>
    		<Row>
    			<Type>BUILDINGCLASS_BORDER_WALL</Type>
    			<DefaultBuilding>BUILDING_BORDER_WALL</DefaultBuilding>
    			<Description>TXT_KEY_BUILDING_BORDER_WALL</Description>
    		</Row>
    	</BuildingClasses>
    </GameData>
    I managed to get the unique unit to work fine, but the building simply will not show up not matter what I do. Right now the only effect this is having on the game is that it removes the normal wall building from the masonry tech, instead of replacing it.

    I did make sure to add all the appropriate files to the actions part in properties, set to update database when mod activates.

    If anyone could look through this and possibly help me out or spot an error I would be very appreciative.
     
  2. AW Arcaeca

    AW Arcaeca Deus Vult

    Joined:
    Mar 10, 2013
    Messages:
    2,969
    Gender:
    Male
    Location:
    Operation Padlock ground zero
    This sticks out to me:
    Code:
    <Row>
    			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
    			[B][COLOR="Red"]<YeildType>YEILD_CULTURE</YeildType>
    			<Yeild>-1</Yeild>[/COLOR][/B]
    		</Row>
    Misspellings will cause the game to dump the entire file - hence, as far as the game is concerned, the building doesn't exist, and so it can't show up.

    Also, it's not actually breaking your code, but that new buildingclass is completely unnecessary since it's not being used anywhere. Although I worry what it will do to have a buildingclass whose default building is a building of another buildingclass...

    Nonetheless, there could still be many more errors or such, so it would be 3459% more helpful to us if you attached your mod and checked your logs.

    Cue LeeS to show up and explain that part, because I'm too lazy to track down some internal links right now. :p
     
  3. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,124
    Location:
    Illinois, USA
    @AW, :lol:

    1. There is no such thing as YIELD_HAPPINESS. Even with the correction to the spelling of "YIELD", HAPPINESS is not a yield. To make a building add happiness, you need this:
      Spoiler :
      Code:
      <GameData>
      	<Buildings>
      		<Row>
      			<Type>BUILDING_BORDER_WALL</Type>
      			<BuildingClass>BUILDINGCLASS_WALLS</BuildingClass>
      			<Cost>80</Cost>
      			<GoldMaintainence>2</GoldMaintainence>
      			<PrereqTech>TECH_CONSTRUCTION</PrereqTech>
      			<Description>TXT_KEY_BUILDING_BORDER_WALL</Description>
      			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_BORDERWALL_TEXT</Civilopedia>
      			<Strategy>TXT_KEY_BUILDING_BORDER_WALL_STRATEGY</Strategy>
      			<Help>TEXT_KEY_BUILDING_BUILDING_BORDER_WALL_HELP</Help>
      			<ArtDefineTag>ART_DEF_BUILDING_WALLS</ArtDefineTag>
      			<MinAreaSize>-1</MinAreaSize>
      			<ConquestProb>66</ConquestProb>
      			<HurryCostModifier>0</HurryCostModifier>
      			<IconAtlas>BW_ATLAS_1</IconAtlas>
      			<PortraitIndex>32</PortraitIndex>
      			<AllowsRangeStrike>true</AllowsRangeStrike>
      			<Defense>400</Defense>
      			<CityWall>true</CityWall>
      			<ExtraCityHitPoints>50</ExtraCityHitPoints>
      			[color="blue"]<Happiness>2</Happiness>[/color]
      
      		</Row>
      	</Buildings>
      	<Building_Flavor>
      		<Row>
      			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
      			<FlavorType>FLAVOR_CITY_DEFENSE</FlavorType>
      			<Flavor>50</Flavor>
      		</Row>
      	</Building_Flavor>
      	<Building_YieldChanges>
      		<Row>
      			<BuildingType>BUILDING_BORDER_WALL</BuildingType>
      			[color="blue"]<YieldType>YIELD_CULTURE</YieldType>
      			<Yield>-1</Yield>[/color]
      		</Row>
      	</Building_YieldChanges>
      </GameData>
    2. Once those are fixed there is still this:
      Spoiler :
      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <!-- Created by ModBuddy on 8/19/2015 7:41:27 PM -->
      <GameData>
      	<BuildingClasses>
      		<Row>
      			<Type>BUILDINGCLASS_BORDER_WALL</Type>
      			<DefaultBuilding>BUILDING_BORDER_WALL</DefaultBuilding>
      			<Description>TXT_KEY_BUILDING_BORDER_WALL</Description>
      		</Row>
      	</BuildingClasses>
      </GameData>
      • Which will cause instant Crash to Desktop once you press the "Start Game" button on the game setup menu because you cannot have the same building assigned to two different building-classes, which is what your code is trying to do.
      • In the definition of BUILDINGCLASS_BORDER_WALL you are stating that BUILDING_BORDER_WALL belongs to BUILDINGCLASS_BORDER_WALL, while in the definition of BUILDING_BORDER_WALL you are stating it belongs to BUILDINGCLASS_WALLS
      • BUILDINGCLASS_WALLS is the correct usage, and you do not even need nor want the definition of BUILDINGCLASS_BORDER_WALL because that definition with the <BuildingClasses> table is actually counter-productive.
      • Delete the entire code:
        Code:
        <BuildingClasses>
        	<Row>
        		<Type>BUILDINGCLASS_BORDER_WALL</Type>
        		<DefaultBuilding>BUILDING_BORDER_WALL</DefaultBuilding>
        		<Description>TXT_KEY_BUILDING_BORDER_WALL</Description>
        	</Row>
        </BuildingClasses>
    The reason you did not get a Crash before was that your building was failing entirely so the game only saw the definition of the BuildingClass and not the conflicting definition of the Building by the time you got to the game setup menu

    Logs: whoward69's enable error logging tutorial
     
  4. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    I went ahead and corrected that spelling error. Thanks for pointing it out. I also commented out the new building class.

    Unfortunately, its still not working, so here's the mod as you suggested. Also, what are these logs you speak of? I'll gladly post them if you tell me where to find them.

    Dropbox: https://www.dropbox.com/sh/10ab3yr220kdh6y/AADJXukTCmjdUSOyWinFnIHRa?dl=0

    EDIT: @LeeS
    I'm glad the problem is so obvious. Thanks for looking at it.
     
  5. DarkScythe

    DarkScythe Hunkalicious Holo

    Joined:
    May 6, 2014
    Messages:
    804
    I like how that's basically reserving this, so I don't have to answer it. :p
     
  6. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,124
    Location:
    Illinois, USA
  7. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    I fixed the happiness thing and deleted the buildingclasses.xml file, but it still isn't working. As before, the original wall building is removed from the tech tree and its not replaced anywhere. It must be a problem with something else. I posted the whole mod on my previous post if someone could look at it. Thanks a lot for the help. :)

    EDIT: Here are the logs.

    Database.log
    Spoiler :
    [45329.116]
    -- SQLite Memory Statistics --
    Memory Usage:
    [Cur] [Max]
    Malloc: 6225656 75786832
    PageCache: 6 12
    LookAside: 0 0
    Scratch: 0 1

    Static Buffer Overflows:
    [TooLarge] [NoSpace]
    PageCache: 5810616 62881896
    Scratch: 0 0

    Largest Allocations:
    Malloc: 262144
    PageCache: 1172
    Scratch: 6640

    Prepared Statements:
    Current: 6
    ------------------------------
    [45356.276] table Buildings has no column named GoldMaintainence
    [45356.276] In Query - insert into Buildings('Type', 'BuildingClass', 'Cost', 'GoldMaintainence', 'PrereqTech', 'Description', 'Civilopedia', 'Strategy', 'Help', 'ArtDefineTag', 'MinAreaSize', 'ConquestProb', 'HurryCostModifier', 'IconAtlas', 'PortraitIndex', 'AllowsRangeStrike', 'Defense', 'CityWall', 'ExtraCityHitPoints', 'Happiness') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
    [45356.276] In XMLSerializer while updating table Buildings from file XML/Buildings/CIV5Buildings.xml.
    [45356.900] Validating Foreign Key Constraints...
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45356.900] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [45357.197] Invalid Reference on Civilization_BuildingClassOverrides.BuildingType - "BUILDING_BORDER_WALL" does not exist in Buildings
    [45358.335] Invalid Reference on Units.Civilopedia - "TXT_KEY_CIV5_INFANTRY_TEXT" does not exist in Language_en_US
    [45358.367] Invalid Reference on Unit_AITypes.UnitType - "UNIT_GBORDER_PATROL" does not exist in Units
    [45358.881] Failed Validation.
    [45359.225]
    -- SQLite Memory Statistics --
    Memory Usage:
    [Cur] [Max]
    Malloc: 6322992 75786832
    PageCache: 7 13
    LookAside: 0 0
    Scratch: 0 1

    Static Buffer Overflows:
    [TooLarge] [NoSpace]
    PageCache: 5903520 62881896
    Scratch: 0 0

    Largest Allocations:
    Malloc: 262144
    PageCache: 1172
    Scratch: 6640

    Prepared Statements:
    Current: 8
    ------------------------------


    xml.log
    Spoiler :
    [45324.483] **** Validating Game Database *****
    [45326.449] Performing Localization Checks
    [45326.449] Checking Tag Format...
    [45326.449] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
    [45326.464] Validating UnitGameplay2DScripts
    [45326.464] Missing Entry for UNIT_BARBARIAN_HORSEMAN
    [45326.464] **** VALIDATION FAILED *****
    [45326.464] Validation Took 1.977596 seconds
    [45326.792] **** Validating Prefetch Process *****
    [45326.792] **** Validation Success *****
    [45326.792] SetGlobalActionInfo
    [45326.792]
    -- SQLite Memory Statistics --
    Memory Usage:
    [Cur] [Max]
    Malloc: 6224480 75786832
    PageCache: 6 12
    LookAside: 0 0
    Scratch: 0 1

    Static Buffer Overflows:
    [TooLarge] [NoSpace]
    PageCache: 5809440 62881896
    Scratch: 0 0

    Largest Allocations:
    Malloc: 262144
    PageCache: 1172
    Scratch: 6640

    Prepared Statements:
    Current: 6
    ------------------------------
    [45326.808] **** Validating Game Database *****
    [45328.773] Performing Localization Checks
    [45328.773] Checking Tag Format...
    [45328.773] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
    [45328.789] Validating UnitGameplay2DScripts
    [45328.789] Missing Entry for UNIT_BARBARIAN_HORSEMAN
    [45328.789] **** VALIDATION FAILED *****
    [45328.789] Validation Took 1.977512 seconds
    [45329.116] **** Validating Prefetch Process *****
    [45329.116] **** Validation Success *****
    [45329.116] SetGlobalActionInfo
    [45329.116]
    -- SQLite Memory Statistics --
    Memory Usage:
    [Cur] [Max]
    Malloc: 6225656 75786832
    PageCache: 6 12
    LookAside: 0 0
    Scratch: 0 1

    Static Buffer Overflows:
    [TooLarge] [NoSpace]
    PageCache: 5810616 62881896
    Scratch: 0 0

    Largest Allocations:
    Malloc: 262144
    PageCache: 1172
    Scratch: 6640

    Prepared Statements:
    Current: 6
    ------------------------------
    [45356.900] **** Validating Game Database *****
    [45358.881] Performing Localization Checks
    [45358.881] Checking Tag Format...
    [45358.881] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
    [45358.897] Validating UnitGameplay2DScripts
    [45358.897] Missing Entry for UNIT_BARBARIAN_HORSEMAN
    [45358.897] Missing Entry for UNIT_BORDER_PATROL
    [45358.897] **** VALIDATION FAILED *****
    [45358.897] Validation Took 1.996561 seconds
    [45359.225] **** Validating Prefetch Process *****
    [45359.225] **** Validation Success *****
    [45359.225] SetGlobalActionInfo
    [45359.225]
    -- SQLite Memory Statistics --
    Memory Usage:
    [Cur] [Max]
    Malloc: 6322992 75786832
    PageCache: 7 13
    LookAside: 0 0
    Scratch: 0 1

    Static Buffer Overflows:
    [TooLarge] [NoSpace]
    PageCache: 5903520 62881896
    Scratch: 0 0

    Largest Allocations:
    Malloc: 262144
    PageCache: 1172
    Scratch: 6640

    Prepared Statements:
    Current: 8
    ------------------------------


    lua.log
    Spoiler :
    [45306.153] Initializing Lua 5.1.4
    [45345.949] InstalledPanel: Refreshing Mods
    [45345.949] InstalledPanel: GetModBrowserListings()
    [45345.965] InstalledPanel: Refreshing Mods
    [45345.965] InstalledPanel: GetModBrowserListings()
    [45351.877] InstalledPanel: Refreshing Mods
    [45351.877] InstalledPanel: GetModBrowserListings()
    [45354.389] InstalledPanel: Refreshing Mods
    [45354.389] InstalledPanel: GetModBrowserListings()
     
  8. AW Arcaeca

    AW Arcaeca Deus Vult

    Joined:
    Mar 10, 2013
    Messages:
    2,969
    Gender:
    Male
    Location:
    Operation Padlock ground zero
    Oh, well there's your problem - the file has no UpdateDatabase entry. So not only would the game have dumped the file, but you didn't give it the chance - the game has no idea the file even exists!

    That debugging magic tidbit brought to you by the .modinfo file, which is a large part of why we ask people to attach mods - so we can see the ModBuddy file load attributes you set.
     
  9. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,124
    Location:
    Illinois, USA
    whoward69's zip your mods and attach tutorial

    Please put it into a form where the entire mod can be downloaded together and can be placed into the game's MODS folder on our end. (you need to zip the entire folder of the mod and upload it here or elsewhere as a zipped folder)
     
  10. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    Can you explain a bit more? Not sure how to fix this. I was pretty sure that I had a update database thing for it. This is my current actions tab.

    Spoiler :


    Also, I attached the mod in zipped form to this post.
     
  11. AW Arcaeca

    AW Arcaeca Deus Vult

    Joined:
    Mar 10, 2013
    Messages:
    2,969
    Gender:
    Male
    Location:
    Operation Padlock ground zero
    It looks like you fixed it in this attachment. But it wasn't given an entry in the other attached mod's modinfo, from the dropbox link in post #4.

    At any rate, the database log gives us a new clue:
    Code:
    [45356.276] table Buildings has no column named GoldMaintainence
    [45356.276] In Query - insert into Buildings('Type', 'BuildingClass', 'Cost', 'GoldMaintainence', 'PrereqTech', 'Description', 'Civilopedia', 'Strategy', 'Help', 'ArtDefineTag', 'MinAreaSize', 'ConquestProb', 'HurryCostModifier', 'IconAtlas', 'PortraitIndex', 'AllowsRangeStrike', 'Defense', 'CityWall', 'ExtraCityHitPoints', 'Happiness') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
    [45356.276] In XMLSerializer while updating table Buildings from file XML/Buildings/CIV5Buildings.xml.
    You misspelled "maintenance". I also seem to have a lot of trouble spelling maintenance; thank heavens for this forum's autocorrect. :lol:
    Except when autocorrect sucks
    This will cause the game engine to suffer a cyberstroke and subsequently lose all feeling in your XML file. (I hope that offended no one)
     
  12. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,124
    Location:
    Illinois, USA
    1. These don't need nor want ImportIntoVFS being set to "true" in ModBUddy:
      Code:
          <File md5="DFDFDC94602C51E1E339B638B94FD24B" import="1">XML/Civilizations/CIV5Traits.xml</File>
          <File md5="895D03316986E4BD3865A7394826443F" import="1">XML/GameInfo/CIV5IconTextureAtlases.xml</File>
          <File md5="D383BCEE75C86D6AF1CE988DB3D29FB9" import="1">XML/GameInfo/CivTrump.xml</File>
          <File md5="45390079F3DB6228104FF0C07769C813" import="1">XML/Leaders/CIV5Leader_Trump.xml</File>
          <File md5="5CEAA240FC2A7B2FDDB8FD6295B0F403" import="1">XML/NewText/GameText.xml</File>
      whoward69's what ModBuddy setting for what file types tutorial
    2. This is why we enable error logging:
      Code:
      [989992.015] table Buildings has no column named GoldMaintainence
      [989992.015] In Query - insert into Buildings('Type', 'BuildingClass', 'Cost', 'GoldMaintainence', 'PrereqTech', 'Description', 'Civilopedia', 'Strategy', 'Help', 'ArtDefineTag', 'MinAreaSize', 'ConquestProb', 'HurryCostModifier', 'IconAtlas', 'PortraitIndex', 'AllowsRangeStrike', 'Defense', 'CityWall', 'ExtraCityHitPoints', 'Happiness') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
      [989992.015] In XMLSerializer while updating table Buildings from file XML/Buildings/CIV5Buildings.xml.
      These error reports were sent to the Database.log, and tell me that you have mis-spelled GoldMaintenance. This, as with the previous mis-spelling, will cause the entire file to be discarded by the game.
      • There may be more mis-spellings in your file
      • the game will only try "reading" an individual file into the game until it hits a fatal error such as this, then it will make the error report and discard attempting to load any part of such a file.
      • If there are two or more fatal errors within the same file, you will only get the error report for the 1st one encountered. This does not mean there are not more errors.
      • Fixiing the 1st of multiple fatal errors within the same file will allow the game to find the next fatal error within the file, and the cause will then be reported into the Database.log
      • It is better, though, to try to hunt down these typos before you try to retest your mod.
      • These are the valid names of all columns within the <Buildings> table as they must be spelled:
        Spoiler :
        Code:
        	<Table name="Buildings">
        		<Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
        		<Column name="Type" type="text" notnull="true" unique="true"/>
        		<Column name="Description" type="text" reference="Language_en_US(Tag)"/>
        		<Column name="Civilopedia" type="text" reference="Language_en_US(Tag)"/>
        		<Column name="Strategy" type="text" reference="Language_en_US(Tag)"/>
        		<Column name="Help" type="text" reference="Language_en_US(Tag)"/>
        		<Column name="ThemingBonusHelp" type="text" reference="Language_en_US(Tag)"/>
        		<Column name="Quote" type="text" reference="Language_en_US(Tag)"/>
        		<Column name="GoldMaintenance" type="integer" default="0"/>
        		<Column name="MutuallyExclusiveGroup" type="integer" default="-1"/>
        		<Column name="TeamShare" type="boolean" default="false"/>
        		<Column name="Water" type="boolean" default="false"/>
        		<Column name="River" type="boolean" default="false"/>
        		<Column name="FreshWater" type="boolean" default="false"/>
        		<Column name="Mountain" type="boolean" default="false"/>
        		<Column name="NearbyMountainRequired" type="boolean" default="false"/>
        		<Column name="Hill" type="boolean" default="false"/>
        		<Column name="Flat" type="boolean" default="false"/>
        		<Column name="FoundsReligion" type="boolean" default="false"/>
        		<Column name="IsReligious" type="boolean" default="false"/>
        		<Column name="BorderObstacle" type="boolean" default="false"/>
        		<Column name="PlayerBorderObstacle" type="boolean" default="false"/>
        		<Column name="Capital" type="boolean" default="false"/>
        		<Column name="GoldenAge" type="boolean" default="false"/>
        		<Column name="MapCentering" type="boolean" default="false"/>
        		<Column name="NeverCapture" type="boolean" default="false"/>
        		<Column name="NukeImmune" type="boolean" default="false"/>
        		<Column name="AllowsWaterRoutes" type="boolean" default="false"/>
        		<Column name="ExtraLuxuries" type="boolean" default="false"/>
        		<Column name="DiplomaticVoting" type="boolean" default="false"/>
        		<Column name="AffectSpiesNow" type="boolean" default="false"/>
        		<Column name="NullifyInfluenceModifier" type="boolean" default="false"/>
        		<Column name="Cost" type="integer" default="0"/>
        		<Column name="FaithCost" type="integer" default="0"/>
        		<Column name="LeagueCost" type="integer" default="0"/>
        		<Column name="UnlockedByBelief" type="boolean" default="0"/>
        		<Column name="UnlockedByLeague" type="boolean" default="false"/>
        		<Column name="HolyCity" type="boolean" default="0"/>
        		<Column name="NumCityCostMod" type="integer" default="0"/>
        		<Column name="HurryCostModifier" type="integer" default="0"/>
        		<Column name="MinAreaSize" type="integer" default="0"/>
        		<Column name="ConquestProb" type="integer" default="0"/>
        		<Column name="CitiesPrereq" type="integer" default="0"/>
        		<Column name="LevelPrereq" type="integer" default="0"/>
        		<Column name="CultureRateModifier" type="integer" default="0"/>
        		<Column name="GlobalCultureRateModifier" type="integer" default="0"/>
        		<Column name="GreatPeopleRateModifier" type="integer" default="0"/>
        		<Column name="GlobalGreatPeopleRateModifier" type="integer" default="0"/>
        		<Column name="GreatGeneralRateModifier" type="integer" default="0"/>
        		<Column name="GreatPersonExpendGold" type="integer" default="0"/>
        		<Column name="GoldenAgeModifier" type="integer" default="0"/>
        		<Column name="UnitUpgradeCostMod" type="integer" default="0"/>
        		<Column name="Experience" type="integer" default="0"/>
        		<Column name="GlobalExperience" type="integer" default="0"/>
        		<Column name="FoodKept" type="integer" default="0"/>
        		<Column name="Airlift" type="boolean" default="0"/>
        		<Column name="AirModifier" type="integer" default="0"/>
        		<Column name="NukeModifier" type="integer" default="0"/>
        		<Column name="NukeExplosionRand" type="integer" default="0"/>
        		<Column name="HealRateChange" type="integer" default="0"/>
        		<Column name="Happiness" type="integer" default="0"/>
        		<Column name="UnmoddedHappiness" type="integer" default="0"/>
        		<Column name="UnhappinessModifier" type="integer" default="0"/>
        		<Column name="HappinessPerCity" type="integer" default="0"/>
        		<Column name="HappinessPerXPolicies" type="integer" default="0"/>
        		<Column name="CityCountUnhappinessMod" type="integer" default="0"/>
        		<Column name="NoOccupiedUnhappiness" type="boolean" default="false"/>
        		<Column name="WorkerSpeedModifier" type="integer" default="0"/>
        		<Column name="MilitaryProductionModifier" type="integer" default="0"/>
        		<Column name="SpaceProductionModifier" type="integer" default="0"/>
        		<Column name="GlobalSpaceProductionModifier" type="integer" default="0"/>
        		<Column name="BuildingProductionModifier" type="integer" default="0"/>
        		<Column name="WonderProductionModifier" type="integer" default="0"/>
        		<Column name="CityConnectionTradeRouteModifier" type="integer" default="0"/>
        		<Column name="CapturePlunderModifier" type="integer" default="0"/>
        		<Column name="PolicyCostModifier" type="integer" default="0"/>
        		<Column name="PlotCultureCostModifier" type="integer" default="0"/>
        		<Column name="GlobalPlotCultureCostModifier" type="integer" default="0"/>
        		<Column name="PlotBuyCostModifier" type="integer" default="0"/>
        		<Column name="GlobalPlotBuyCostModifier" type="integer" default="0"/>
        		<Column name="GlobalPopulationChange" type="integer" default="0"/>
        		<Column name="TechShare" type="integer" default="0"/>
        		<Column name="FreeTechs" type="integer" default="0"/>
        		<Column name="FreePolicies" type="integer" default="0"/>
        		<Column name="FreeGreatPeople" type="integer" default="0"/>
        		<Column name="MedianTechPercentChange" type="integer" default="0"/>
        		<Column name="Gold" type="integer" default="0"/>
        		<Column name="AllowsRangeStrike" type="boolean" default="false"/>
        		<Column name="Espionage" type="boolean" default="false"/>
        		<Column name="AllowsFoodTradeRoutes" type="boolean" default="false"/>
        		<Column name="AllowsProductionTradeRoutes" type="boolean" default="false"/>
        		<Column name="Defense" type="integer" default="0"/>
        		<Column name="ExtraCityHitPoints" type="integer" default="0"/>
        		<Column name="GlobalDefenseMod" type="integer" default="0"/>
        		<Column name="MinorFriendshipChange" type="integer" default="0"/>
        		<Column name="VictoryPoints" type="integer" default="0"/>
        		<Column name="ExtraMissionarySpreads" type="integer" default="0"/>
        		<Column name="ReligiousPressureModifier" type="integer" default="0"/>
        		<Column name="EspionageModifier" type="integer" default="0"/>
        		<Column name="GlobalEspionageModifier" type="integer" default="0"/>
        		<Column name="ExtraSpies" type="integer" default="0"/>
        		<Column name="SpyRankChange" type="integer" default="0"/>
        		<Column name="InstantSpyRankChange" type="integer" default="0"/>
        		<Column name="TradeRouteRecipientBonus" type="integer" default="0"/>
        		<Column name="TradeRouteTargetBonus" type="integer" default="0"/>
        		<Column name="NumTradeRouteBonus" type="integer" default="0"/>
        		<Column name="LandmarksTourismPercent" type="integer" default="0"/>
        		<Column name="InstantMilitaryIncrease" type="integer" default="0"/>
        		<Column name="GreatWorksTourismModifier" type="integer" default="0"/>
        		<Column name="XBuiltTriggersIdeologyChoice" type="integer" default="0"/>
        		<Column name="TradeRouteSeaDistanceModifier" type="integer" default="0"/>
        		<Column name="TradeRouteSeaGoldBonus" type="integer" default="0"/>
        		<Column name="TradeRouteLandDistanceModifier" type="integer" default="0"/>
        		<Column name="TradeRouteLandGoldBonus" type="integer" default="0"/>
        		<Column name="CityStateTradeRouteProductionModifier" type="integer" default="0"/>
        		<Column name="GreatScientistBeakerModifier" type="integer" default="0"/>
        		<Column name="BuildingClass" type="text" reference="BuildingClasses(Type)" default="NULL"/>
        		<Column name="ArtDefineTag" type="text" default="NULL"/>
        		<Column name="NearbyTerrainRequired" type="text" reference="Terrains(Type)" default="NULL"/>
        		<Column name="ProhibitedCityTerrain" type="text" reference="Terrains(Type)" default="NULL"/>
        		<Column name="VictoryPrereq" type="text" reference="Victories(Type)" default="NULL"/>
        		<Column name="FreeStartEra" type="text" reference="Eras(Type)" default="NULL"/>
        		<Column name="MaxStartEra" type="text" reference="Eras(Type)" default="NULL"/>
        		<Column name="ObsoleteTech" type="text" reference="Technologies(Type)" default="NULL"/>
        		<Column name="EnhancedYieldTech" type="text" reference="Technologies(Type)" default="NULL"/>
        		<Column name="TechEnhancedTourism" type="integer" default="0"/>
        		<Column name="FreeBuilding" type="text" reference="BuildingClasses(Type)" default="NULL"/>
        		<Column name="FreeBuildingThisCity" type="text" reference="BuildingClasses(Type)" default="NULL"/>
        		<Column name="FreePromotion" type="text" reference="UnitPromotions(Type)" default="NULL"/>
        		<Column name="TrainedFreePromotion" type="text" reference="UnitPromotions(Type)" default="NULL"/>
        		<Column name="FreePromotionRemoved" type="text" reference="UnitPromotions(Type)" default="NULL"/>
        		<Column name="ReplacementBuildingClass" type="text" reference="BuildingClasses(Type)" default="NULL"/>
        		<Column name="PrereqTech" type="text" reference="Technologies(Type)" default="NULL"/>
        		<Column name="PolicyBranchType" type="text" reference="PolicyBranchTypes(Type)" default="NULL"/>
        		<Column name="SpecialistType" type="text" reference="Specialists(Type)" default="NULL"/>
        		<Column name="SpecialistCount" type="integer" default="0"/>
        		<Column name="GreatWorkSlotType" type="text" reference="GreatWorkSlots(Type)" default="NULL"/>
        		<Column name="FreeGreatWork" type="text" reference="GreatWorks(Type)" default="NULL"/>
        		<Column name="GreatWorkCount" type="integer" default="0"/>
        		<Column name="SpecialistExtraCulture" type="integer" default="0"/>
        		<Column name="GreatPeopleRateChange" type="integer" default="0"/>
        		<Column name="ExtraLeagueVotes" type="integer" default="0"/>
        		<Column name="CityWall" type="boolean" default="false"/>
        		<Column name="DisplayPosition" type="integer" default="0"/>
        		<Column name="PortraitIndex" type="integer" default="-1"/>
        		<Column name="WonderSplashImage" type="text" default="NULL"/>
        		<Column name="WonderSplashAnchor" type="text" default="R,T"/>
        		<Column name="WonderSplashAudio" type="text"/>
        		<Column name="IconAtlas" type="text" default="NULL" reference="IconTextureAtlases(Atlas)"/>
        		<Column name="ArtInfoCulturalVariation" type="boolean" default="false"/>
        		<Column name="ArtInfoEraVariation" type="boolean" default="false"/>
        		<Column name="ArtInfoRandomVariation" type="boolean" default="false"/>
        	</Table>
    3. This error in the Database.log file:
      Code:
      [989996.343] Invalid Reference on Units.Civilopedia - "TXT_KEY_CIV5_INFANTRY_TEXT" does not exist in Language_en_US
      Stems from this code in your CIV5Units.xml file:
      Code:
      <Civilopedia>TXT_KEY_CIV5_INFANTRY_TEXT</Civilopedia>
      While it is fine to re-use the same text key references as are used by a standard unit (ie, the game does not care how many times <Civilopedia>TXT_KEY_CIV5_INDUSTRIAL_INFANTRY_TEXT</Civilopedia> is used in the game) it does need a valid reference to a TXT_KEY name. And you have not defined that TXT_KEY in the <Language_en_US> table within GameText.xml
     
  13. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    Thanks so much for you help! I finally managed to fix it by continually restarting it and checking the log for errors and fixing them. Still a total noob programmer so I totally forgot about the debug log. In the end it was pretty much just a bunch of mispellings and similar errors. Thanks again!:)
     

Share This Page