Building doesn't appear ingame

Kobra

Chieftain
Joined
Jan 23, 2004
Messages
50
Location
France
Hi everyone,

I just start modding with Civ V. For the beginning, I decided to create a building : the slave market. The mod is correctly generated by ModBuddy, correctly loaded by Civ V and ... there isn't any slave market in the game ! Neither in the techtree nor in the civilopedia. It must be very simple but I'm a newbie. :D Here is the XML file :

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 19/04/2016 13:43:38 -->
<GameData>
	<!-- FICHIER IMAGE -->
	<IconTextureAtlases>
		<Row>
			<Atlas>PERSO_BUILDINGS</Atlas>
			<IconSize>256</IconSize>
			<Filename>Art/PersoBuildings256.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PERSO_BUILDINGS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Art/PersoBuildings128.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PERSO_BUILDINGS</Atlas>
			<IconSize>64</IconSize>
			<Filename>ART/PersoBuildings.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>PERSO_BUILDINGS</Atlas>
			<IconSize>45</IconSize>
			<Filename>ART/PersoBuildings.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
	</IconTextureAtlases>
	<!-- BATIMENT -->
	<Buildings>
	  <Type>BUILDING_SLAVERY</Type>
	  <BuildingClass>BUILDINGCLASS_SLAVERY</BuildingClass>
	  <Cost>180</Cost>
	  <Help>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Help>
	  <Description>TXT_KEY_BUILDING_SLAVERY</Description>
	  <Civilopedia>TXT_KEY_PEDIA_BUILDING_SLAVERY</Civilopedia>
	  <Strategy>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Strategy>
	  <ArtDefineTag>ART_DEF_BUILDING_BANK</ArtDefineTag>
	  <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
	  <SpecialistCount>1</SpecialistCount>
	  <MinAreaSize>-1</MinAreaSize>
	  <ConquestProb>50</ConquestProb>
	  <HurryCostModifier>25</HurryCostModifier>
	  <IconAtlas>PERSO_BUILDINGS</IconAtlas>
	  <PortraitIndex>0</PortraitIndex>
  </Buildings>
	<!--<Building_ClassesNeededInCity>
		<Row>
			<BuildingType>BUILDING_SLAVERY</BuildingType>
			<BuildingClassType>BUILDINGCLASS_MARKET</BuildingClassType>
		</Row>
	</Building_ClassesNeededInCity>-->
	<!-- BONUS FIXES DU BATIMENT -->
	<Building_YieldChanges>
		<Row>
			<BuildingType>BUILDING_SLAVERY</BuildingType>
			<YieldType>YIELD_PRODUCTION</YieldType>
			<Yield>2</Yield>
		</Row>
	</Building_YieldChanges>
	<!-- BONUS PROPORTIONNELS DU BATIMENT -->
	<Building_YieldModifiers>
		<Row>
			<BuildingType>BUILDING_SLAVERY</BuildingType>
			<YieldType>YIELD_GOLD</YieldType>
			<Yield>25</Yield>
		</Row>
	</Building_YieldModifiers>
	<!-- CLASSES DE BATIMENTS -->
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_SLAVERY</Type>
			<DefaultBuilding>BUILDING_SLAVERY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_SLAVERY</Description>
		</Row>
	</BuildingClasses>
	<!-- MESSAGES -->
	<Language_FR_FR>
		<Row Tag="TXT_KEY_BUILDING_SLAVERY">
			<Text>Marché aux esclaves|Marchés aux esclaves</Text>
			<Gender>masculine</Gender>
			<Plurality>1|2</Plurality>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_SLAVERY_STRATEGY">
			<Text>Le marché aux esclaves accroît la production et l'or généré par votre ville.</Text>
		</Row>
		<Row Tag="TXT_KEY_PEDIA_BUILDING_SLAVERY">
			<Text>L'esclavage était monnaie courante durant l'antiquité et rares sont les peuples à ne pas l'avoir pratiqué. Le commerce des esclaves était souvent lucratif et permettait aux empires d'accroître leur production.</Text>
		</Row>
	</Language_FR_FR>
  
</GameData>

The dds file (it's a png for the forum)

PersoBuildings256.png

The 4 dds files got the "Import into VFS" option set to true ; in the Actions property menu, I put "OnModActivated > Update Database > My_XML_File" & in the Content property "InGameUIAddin > My_XML_File". All files (XML and DDS) have been added using ModBuddy (not the explorer). Do anyone have an idea ? :confused:

Thanks !
 
Thanks for your answer :

1- The mod is attached :

View attachment Antiquité (v 2).zip

2-Here are the log files (I'm not an expert, but I don't see anything related to my mod) :

XML.log :
Spoiler :
Code:
[23332.648] **** Validating Game Database *****
[23337.172] Performing Localization Checks
[23337.172] Checking Tag Format...
[23337.172] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[23337.234] Validating UnitGameplay2DScripts
[23337.234] Missing Entry for UNIT_BARBARIAN_HORSEMAN
[23337.234] **** VALIDATION FAILED *****
[23337.234] Validation Took 4.578936 seconds
[23338.170] **** Validating Prefetch Process *****
[23338.170] **** Validation Success *****
[23338.170] SetGlobalActionInfo
[23338.170] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		6201656		80339432
PageCache:	6		12
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5784744		66605112
Scratch:	0		0

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

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

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5785920		66605112
Scratch:	0		0

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

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

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5994072		66605112
Scratch:	0		0

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

Prepared Statements:
Current:		12
------------------------------

Database.log
Spoiler :
Code:
[23285.395] columns StrategicViewType, TileType are not unique
[23285.395] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[23301.791] no such table: ContentPackage.LocalizedText
[23304.692] no such table: ContentPackage.LocalizedText
[23314.723] columns StrategicViewType, TileType are not unique
[23314.723] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[23316.798] no such table: ContentPackage.LocalizedText
[23332.679] Validating Foreign Key Constraints...
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23332.679] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23337.172] Failed Validation.
[23338.170] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		6201656		80339432
PageCache:	6		12
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5784744		66605112
Scratch:	0		0

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

Prepared Statements:
Current:		6
------------------------------
[23338.233] Validating Foreign Key Constraints...
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23338.233] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23342.804] Failed Validation.
[23343.802] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		6202832		80339432
PageCache:	6		12
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5785920		66605112
Scratch:	0		0

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

Prepared Statements:
Current:		6
------------------------------
[23421.490] Database::XMLSerializer (XML/Buildings/Slavery.xml): 'Row' or 'Delete' expected, got 'Type'.
[23423.612] Validating Foreign Key Constraints...
[23423.612] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.612] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.612] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.628] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.628] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.628] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.628] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.628] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23423.628] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[23428.198] Failed Validation.
[23429.197] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		6442384		80339432
PageCache:	6		12
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5994072		66605112
Scratch:	0		0

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

Prepared Statements:
Current:		12
------------------------------

3-Previously, the xml file wasn't set as an InGameUIAddin. But the mod didn't work too.
 
From your Database log;

Code:
Database::XMLSerializer (XML/Buildings/Slavery.xml): 'Row' or 'Delete' expected, got 'Type'.

This means you missed adding a <Row> tag. Looking at the original post, in your <Buildings> section:

Spoiler :
Code:
<Buildings>
	  <Type>BUILDING_SLAVERY</Type>
	  <BuildingClass>BUILDINGCLASS_SLAVERY</BuildingClass>
	  <Cost>180</Cost>
	  <Help>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Help>
	  <Description>TXT_KEY_BUILDING_SLAVERY</Description>
	  <Civilopedia>TXT_KEY_PEDIA_BUILDING_SLAVERY</Civilopedia>
	  <Strategy>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Strategy>
	  <ArtDefineTag>ART_DEF_BUILDING_BANK</ArtDefineTag>
	  <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
	  <SpecialistCount>1</SpecialistCount>
	  <MinAreaSize>-1</MinAreaSize>
	  <ConquestProb>50</ConquestProb>
	  <HurryCostModifier>25</HurryCostModifier>
	  <IconAtlas>PERSO_BUILDINGS</IconAtlas>
	  <PortraitIndex>0</PortraitIndex>
  </Buildings>

You're missing the <Row> tags, should be:

Spoiler :
Code:
<Buildings>
    <Row>
	  <Type>BUILDING_SLAVERY</Type>
	  <BuildingClass>BUILDINGCLASS_SLAVERY</BuildingClass>
	  <Cost>180</Cost>
	  <Help>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Help>
	  <Description>TXT_KEY_BUILDING_SLAVERY</Description>
	  <Civilopedia>TXT_KEY_PEDIA_BUILDING_SLAVERY</Civilopedia>
	  <Strategy>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Strategy>
	  <ArtDefineTag>ART_DEF_BUILDING_BANK</ArtDefineTag>
	  <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
	  <SpecialistCount>1</SpecialistCount>
	  <MinAreaSize>-1</MinAreaSize>
	  <ConquestProb>50</ConquestProb>
	  <HurryCostModifier>25</HurryCostModifier>
	  <IconAtlas>PERSO_BUILDINGS</IconAtlas>
	  <PortraitIndex>0</PortraitIndex>
    </Row>
</Buildings>

Final note, I didn't load it up in game, so there could be another error.
 
Code:
[23421.490] Database::XMLSerializer (XML/Buildings/Slavery.xml): 'Row' or 'Delete' expected, got 'Type'.
Fatal xml syntax error. Adding the file as an InGameUIAddin isn't going to fix that fatal syntax error. And since xml-code that starts with <GameData> needs to be inserted into the game's Database, adding an InGameUIAddin accomplishes nothing.
Code:
	<Buildings>
	  <Type>BUILDING_SLAVERY</Type>
	  <BuildingClass>BUILDINGCLASS_SLAVERY</BuildingClass>
	  <Cost>180</Cost>
	  <Help>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Help>
	  <Description>TXT_KEY_BUILDING_SLAVERY</Description>
	  <Civilopedia>TXT_KEY_PEDIA_BUILDING_SLAVERY</Civilopedia>
	  <Strategy>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Strategy>
	  <ArtDefineTag>ART_DEF_BUILDING_BANK</ArtDefineTag>
	  <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
	  <SpecialistCount>1</SpecialistCount>
	  <MinAreaSize>-1</MinAreaSize>
	  <ConquestProb>50</ConquestProb>
	  <HurryCostModifier>25</HurryCostModifier>
	  <IconAtlas>PERSO_BUILDINGS</IconAtlas>
	  <PortraitIndex>0</PortraitIndex>
  </Buildings>
You have no row wraps. Correct to the following:
Code:
<Buildings>
	<Row>
	  <Type>BUILDING_SLAVERY</Type>
	  <BuildingClass>BUILDINGCLASS_SLAVERY</BuildingClass>
	  <Cost>180</Cost>
	  <Help>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Help>
	  <Description>TXT_KEY_BUILDING_SLAVERY</Description>
	  <Civilopedia>TXT_KEY_PEDIA_BUILDING_SLAVERY</Civilopedia>
	  <Strategy>TXT_KEY_BUILDING_SLAVERY_STRATEGY</Strategy>
	  <ArtDefineTag>ART_DEF_BUILDING_BANK</ArtDefineTag>
	  <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
	  <SpecialistCount>1</SpecialistCount>
	  <MinAreaSize>-1</MinAreaSize>
	  <ConquestProb>50</ConquestProb>
	  <HurryCostModifier>25</HurryCostModifier>
	  <IconAtlas>PERSO_BUILDINGS</IconAtlas>
	  <PortraitIndex>0</PortraitIndex>
	</Row>
</Buildings>
Note that once you fix this you might encounter other errors in the file. Once the game finds a single fatal error within an xml-file, it ceases reading any part of it, and refuses to add the contents of any part of the file with the fatal syntax error.

edit: thar be :ninja: in these parts!
 
:hmm: I should have seen that mistake. Well ... it works now ! :D I just have one last problem : the 256 pixel DDS works but not the smallest. Any limitations of colours ?

Thanks for all

ps : sorry for my English
 
Back
Top Bottom