Question about basic modding

akbar_rizqi

Chieftain
Joined
May 30, 2014
Messages
22
Location
Melbourne, Australia
Hi.

I need some help. I'm trying to merge some of my mods into one mod to prevent some conflicts from happening. The mod only contains buildings. For some reason the mod doesn't want to load the new buildings. I need help to figure out why.

Here is the file:
https://www.mediafire.com/?r46n2a633duf81b

I've tried the mod on windows 32 bit and mac 64 bit with same result. I've updated the game to the latest version and i have all dlc.

any help would be greatly appreciated.
 
Incorrect for the <Buildings> table:
Code:
<GameData>
	<Buildings>
		<Update>
			<Where [COLOR="Red"]BuildingType[/COLOR]="BUILDING_WALLS"/>
			<Set>
				<Help>TXT_KEY_BUILDING_WALLS_HELP</Help>
			</Set>
		</Update>
needs to be Type

Also, what expansion did you say you had ? Do you have BNW, G&K, or Vanilla ?
If you have BNW the Hotel Building and its associated class are no good because they're already a part of BNW.

The XML file for the buildings is just way too hard to look through for anything else that might be a problem.
 
I spotted a missing </Row> tag in the <Building_ResourceYieldChanges> table:

Code:
<Row>
    <BuildingType>BUILDING_SUPERMARKET</BuildingType>
    <ResourceType>RESOURCE_CITRUS</ResourceType>
    <YieldType>YIELD_FOOD</YieldType>
    <Yield>1</Yield>

<Row>
    <BuildingType>BUILDING_TEXTILEMILL</BuildingType>
    <ResourceType>RESOURCE_SHEEP</ResourceType>
    <YieldType>YIELD_GOLD</YieldType>
    <Yield>1</Yield>
</Row>

Beyond that, it's a lot of code to review. Did you enable logging (http://forums.civfanatics.com/showthread.php?t=487482)? What do the logs tell you?
 
This is what I see in your code for <Building_ResourceQuantity>:

Code:
<Building_ResourceQuantity>
		<Row>
<BuildingType>BUILDING_NUCLEAR_FISSION_REACTOR_PLANT</BuildingType>
			<ResourceType>RESOURCE_URANIUM</ResourceType>
			<Quantity>8</Quantity>
		</Row>
		<Row>
			<BuildingType>BUILDING_STEELMILL</BuildingType>
			<ResourceType>RESOURCE_STEEL</ResourceType>
			<Quantity>3</Quantity>
		</Row>
	</Building_ResourceQuantity>

I don't see a reference to any building granting Iron. Or do you mean the Steelmill is not producing Steel? Dumb question, but had you researched the appropriate tech to allow it?
 
This error showed in the log after play testing:

Invalid Reference on Building_YieldChanges.BuildingType - "BUILDING_INFASTRUCTURE_MODERN" does not exist in Buildings

And this showed in the SDK:

</Building_ResourceYieldChanges> has an extra </Row> tag

No time right now for further testing, but you may want to fix these and try again. Some of the building prerequisites don't seem to be applying (you can build buildings that the tool tips indicate you shouldn't be able to...)

EDIT: One thing O noticed is that the "ITFBuildings" file does not have header information defining the format. Usually there is a line something like <?xml version="1.0" encoding="utf-8"?> at the top. This could be causing the errors, but that is way beyond my depth of knowledge
 
The only thing I see in the logs is that the game doesn't like some of the TXT_KEY_ text descriptions that include capital and lower case letters. If it makes a difference, I also noticed that you don't get a pop-up when meeting a city-state. Sorry, can't help any further.
 
In ITFBuildingsNewText.xml, in the Text entry for Tag TXT_KEY_BUILDING_SMELTER_PEDIA, you have a couple of m-dashes that the game may not like. Change them to double hyphens (--).

EDIT: No, that's not it... But it's definitely related to the buildings.
EDIT #2: Specifically, ITFBuildings.xml.
 
No, other problems occur... I opened it [ITFBuildings.xml] in ModBuddy, and it told me the problem right away. You never closed the <Buildings> with </Buildings>. [EDIT: No, sorry, that was my test mod.]
 
I loaded some more files into ModBuddy and found a few more errors:

ITFBuildingsNewText: It didn't like the "&" sign in the METRO_PEDIA line
ITFBuildingsPolicy: The lines are confusing it, and not commenting them out properly. I recommend taking them out entirely, and commenting out the areas inside the <GameData> tags (or removing the file altogether).
AudioScripts: Everything is commented out, either delete the file or keep <GameData></GameData> tags
 
Top Bottom