New modder – need help getting started

Lesten

Chieftain
Joined
Jan 23, 2013
Messages
17
Hello.

I'm trying to learn how to create mods. It's not going so well, so I thought I'd ask here for some help getting started. I'm having trouble getting anything at all to work. I suppose I'm doing the coding wrong.
To my knowledge I'm not attempting to do things that are overly complicated, so rather than you pointing out my embarrassing mistakes I'd very much appreciate it if someone who can do this in their sleep could show me what the code should look like and how to get the mod to work.

Let's say, as an example, that I want to make the following changes:

1. give Monuments +10 Culture, but if the city has a Granary I want the monument to only give +2 Culture.

2. remove the Granary's Food bonus for tiles with Wheat, Bananas and Deer.

3. reduce the Scout's movement speed to 1, but get it back up to 2 when The Wheel is discovered.

4. change the construction time and research time for the Quick speed to 30 and 150 respectively (instead of 67). (I know how to edit the file, but how do I get it to work in a mod?)

... and lastly ...

5. would it be possible to gather all entries about World Wonders in a completely new xml file and then just have that file override all other entries? (Just so it's easier to get an overview of them.) Could someone show me what such an entry would look like with, let's say the Pyramids but with the two free workers removed from the effect?

I know I'm asking a lot here, but I wouldn't be bothering you all with it unless I was stumped.
Thanks in advance!
 
(I know how to edit the file, but how do I get it to work in a mod?)
Are you editing the files in "Civ 5/Assets" directly? If so, that isn't what you're suppose to do. What you're suppose to do is write separate files that change (via updates, inserts, deletes) the baseline "Civ 5/Assets" files.
--------------------
As for the list of effects, most are doable, some will only require XML changes while others will require some Lua.

4. change the construction time and research time for the Quick speed to 30 and 150 respectively (instead of 67)
Code:
<GameSpeeds>
  <Update>
    <Set ResearchPercent="30" ConstructPercent="150" />
    <Where Type="GAMESPEED_QUICK" />
  </Update>
</GameSpeeds>

2. remove the Granary's Food bonus for tiles with Wheat, Bananas and Deer.
Code:
<Building_ResourceYieldChanges>
  <Delete BuildingType="BUILDING_GRANARY" />
</Building_ResourceYieldChanges>

The others would require a bit of Lua.
 
What you're suppose to do is write separate files that change (via updates, inserts, deletes) the baseline "Civ 5/Assets" files.
Well yes, that's what I'm trying to do and I suck at it :)

Anyway, with the help of Machiavelli's reply and some other helpful posts I found around here, I managed to get parts of the mod working... kind of. I'm gonna stay away from lua though, 'cause that stuff is way over my head.

Code:
<GameSpeeds>
  <Update>
    <Set ResearchPercent="30" ConstructPercent="150" />
    <Where Type="GAMESPEED_QUICK" />
  </Update>
</GameSpeeds>
This works. Thanks :goodjob:

Code:
<Building_ResourceYieldChanges>
  <Delete BuildingType="BUILDING_GRANARY" />
</Building_ResourceYieldChanges>
This didn't work however, not at all sure why (granted I did try it on the University instead: tried to remove the science bonus from jungle tiles, but it didn't work). I figured the principle was the same, but maybe not?

I have three xml-files in my mod: one for the game speed, one for units and one for buildings. The gamespeed and unit ones seem to be working, but not the building one. I'm sure there's a mistake in the code somewhere, but I don't get what it is (yes, the file is activated by the mod it says). Should there be "updates" rather than "rows" somewhere? Seems like NONE of the changes in this xml works. What am I doing wrong?

Spoiler :
Code:
<GameData>
	<!-- BUILDING GENERAL CHANGES -->
	<Buildings>
		<Update>
			<Where Type="BUILDING_AIRPORT" />
			<Set GoldMaintenance="4" />
		</Update>
	</Buildings>
	<!-- BUILDING FEATURE YIELD CHANGES -->
	<Building_FeatureYieldChanges>
		<Delete BuildingType="BUILDING_UNIVERSITY" />
	</Building_FeatureYieldChanges>
	<!-- YIELD CHANGES -->
	<Building_YieldChanges>
		<Row>
			<BuildingType>BUILDING_UNIVERSITY</BuildingType>
			<YieldType>YIELD_SCIENCE</YieldType>
			<Yield>1</Yield>
		</Row>
	</Building_YieldChanges>
	<!-- BUILDING RESOURCE REQUIREMENTS -->
	<Building_ResourceQuantityRequirements>
		<Row>
			<Type>BUILDING_ARMORY</Type>
			<ResourceType>RESOURCE_IRON</ResourceType>
		</Row>
		<Row>
			<Type>BUILDING_AIRPORT</Type>
			<ResourceType>RESOURCE_OIL</ResourceType>
		</Row>
	</Building_ResourceQuantityRequirements>
	<!-- PREREQUISITE BUILDINGS -->
	<Building_ClassesNeededInCity>
		<Delete BuildingType="BUILDING_OPERA_HOUSE" />
		<Delete BuildingType="BUILDING_AMPHITHEATER" />
		<Delete BuildingType="BUILDING_THEATRE" />
		<Delete BuildingType="BUILDING_ARSENAL" />
		<Update>
			<Where BuildingType="BUILDING_PUBLIC_SCHOOL" />
			<Set BuildingClassType="BUILDINGCLASS_LIBRARY" />
		</Update>
		<Update>
			<Where BuildingType="BUILDING_LABORATORY" />
			<Set BuildingClassType="BUILDINGCLASS_UNIVERSITY" />
		</Update>
	</Building_ClassesNeededInCity>
</GameData>

Another thing I'm struggling with is how to edit these codes via a mod:
Spoiler :
Code:
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>180</MonthIncrement>
			<TurnsPerIncrement>100</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>300</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>170</TurnsPerIncrement>
		</Row>
How do I make an update to that? Say I want to double the number of turns per increment AND the number of months per turn.
 
This didn't work however, not at all sure why (granted I did try it on the University instead: tried to remove the science bonus from jungle tiles, but it didn't work). I figured the principle was the same, but maybe not?
In principle it's the same idea, yes, but in this case Universities don't apply an extra yield to a resource, but rather a feature (jungles). So instead of Building_ResourceYieldChanges you need to use the table Building_FeatureYieldChanges.
Another thing I'm struggling with is how to edit these codes via a mod:
Spoiler :
Code:
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>180</MonthIncrement>
			<TurnsPerIncrement>100</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>300</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>170</TurnsPerIncrement>
		</Row>
How do I make an update to that? Say I want to double the number of turns per increment AND the number of months per turn.
A couple of different ways; the easiest (IMO) is this:
Code:
<GameData>
	<GameSpeeds>
		<Update>
			<Where GameSpeedType="GAMESPEED_MARATHON"/>
			<Set MonthIncrement="360" TurnsPerIncrement="200"/>
		</Update>
	</GameSpeeds>
</GameData>
BTW I don't know what you're trying to accomplish with the code you posted above, since it will create 3 new gamespeeds all called Marathon that all have different, well, speeds. Stack that with the existing Marathon speed and you have 4 speeds called marathon that all do different things... we're looking at a 116% chance of a crash here.
 
In principle it's the same idea, yes, but in this case Universities don't apply an extra yield to a resource, but rather a feature (jungles). So instead of Building_ResourceYieldChanges you need to use the table Building_FeatureYieldChanges.
That's the code I used, but it still didn't work :confused: It's in the code in my last post.

BTW I don't know what you're trying to accomplish with the code you posted above, since it will create 3 new gamespeeds all called Marathon that all have different, well, speeds. Stack that with the existing Marathon speed and you have 4 speeds called marathon that all do different things... we're looking at a 116% chance of a crash here.
But that's what it looks like in the gamespeed file, it's not something I've done myself. And I've actually edited the file directly and it worked, but I don't know how to get it to work in a mod file.

This is from the actual, unmodded gamespeed file:
Spoiler :
Code:
	<GameSpeed_Turns>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>180</MonthIncrement>
			<TurnsPerIncrement>100</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>300</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>170</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>201</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>129</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>6</MonthIncrement>
			<TurnsPerIncrement>180</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>3</MonthIncrement>
			<TurnsPerIncrement>264</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>1</MonthIncrement>
			<TurnsPerIncrement>156</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>300</MonthIncrement>
			<TurnsPerIncrement>140</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>180</MonthIncrement>
			<TurnsPerIncrement>90</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>40</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>90</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>70</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>100</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>6</MonthIncrement>
			<TurnsPerIncrement>220</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>480</MonthIncrement>
			<TurnsPerIncrement>75</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>300</MonthIncrement>
			<TurnsPerIncrement>60</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>240</MonthIncrement>
			<TurnsPerIncrement>25</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>50</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>60</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>50</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>120</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>6</MonthIncrement>
			<TurnsPerIncrement>60</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>720</MonthIncrement>
			<TurnsPerIncrement>50</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>480</MonthIncrement>
			<TurnsPerIncrement>30</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>360</MonthIncrement>
			<TurnsPerIncrement>20</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>240</MonthIncrement>
			<TurnsPerIncrement>30</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>25</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>40</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>65</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>70</TurnsPerIncrement>
		</Row>
	</GameSpeed_Turns>
 
Say I want to double the number of turns per increment AND the number of months per turn.

I don't know if it's possible with XML, but you can do it easily with SQL:

Code:
UPDATE GameSpeed_Turns
SET MonthIncrement = MonthIncrement * 2, TurnsPerIncrement = TurnsPerIncrement * 2
WHERE GameSpeedType = 'GAMESPEED_MARATHON';

Alternatively, you can just delete the existing content in the GameSpeed_Turns table, and replace it with your content.
 
That's the code I used, but it still didn't work :confused: It's in the code in my last post.
Oops, didn't see that. Well, then this is all the advice I can give you, since it seems to be correct:
whoard69 said:
A SINGLE error in the XML file will invalidate the ENTIRE file, so you MUST look at the complete file and not just a single bit of it.
But that's what it looks like in the gamespeed file, it's not something I've done myself. And I've actually edited the file directly and it worked, but I don't know how to get it to work in a mod file.

This is from the actual, unmodded gamespeed file:
Spoiler :
Code:
	<GameSpeed_Turns>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>180</MonthIncrement>
			<TurnsPerIncrement>100</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>300</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>170</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>201</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>129</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>6</MonthIncrement>
			<TurnsPerIncrement>180</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>3</MonthIncrement>
			<TurnsPerIncrement>264</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
			<MonthIncrement>1</MonthIncrement>
			<TurnsPerIncrement>156</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>300</MonthIncrement>
			<TurnsPerIncrement>140</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>180</MonthIncrement>
			<TurnsPerIncrement>90</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>40</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>90</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>70</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>100</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
			<MonthIncrement>6</MonthIncrement>
			<TurnsPerIncrement>220</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>480</MonthIncrement>
			<TurnsPerIncrement>75</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>300</MonthIncrement>
			<TurnsPerIncrement>60</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>240</MonthIncrement>
			<TurnsPerIncrement>25</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>50</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>60</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>50</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>120</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
			<MonthIncrement>6</MonthIncrement>
			<TurnsPerIncrement>60</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>720</MonthIncrement>
			<TurnsPerIncrement>50</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>480</MonthIncrement>
			<TurnsPerIncrement>30</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>360</MonthIncrement>
			<TurnsPerIncrement>20</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>240</MonthIncrement>
			<TurnsPerIncrement>30</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>120</MonthIncrement>
			<TurnsPerIncrement>25</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>60</MonthIncrement>
			<TurnsPerIncrement>40</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>24</MonthIncrement>
			<TurnsPerIncrement>65</TurnsPerIncrement>
		</Row>
		<Row>
			<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
			<MonthIncrement>12</MonthIncrement>
			<TurnsPerIncrement>70</TurnsPerIncrement>
		</Row>
	</GameSpeed_Turns>
I'm beginning to realize I don't know what I'm doing here :crazyeye: Sorry.
Now that I've actually looked at the file and I'm not spewing out guesses:
Code:
<GameData>
	<GameSpeed_Turns>
		<Update>
			<Where Type="GAMESPEED_MARATHON" MonthIncrement="180" TurnsPerIncrement="100"/>
			<Set MonthIncrement="360" TurnsPerIncrement="200"/>
		</Update>
		<!-- Repeat -->
	</GameSpeed_Turns>
</GameData>
That should work; just make sure to copy it multiple times over, editing the gamespeedtype, monthincrement and turnsperincrement columns appropriately and it should work.

Or alternatively:
Code:
UPDATE GameSpeed_Turns SET MonthIncrement = MonthIncrement * 2;
UPDATE GameSpeed_Turns SET TurnsPerIncrement = TurnsPerIncrement * 2;

Didn't notice we were talking about GameSpeed_Turns and no longer GameSpeeds before, my apologies :blush:
 
Code:
	<Building_ResourceQuantityRequirements>
		<Row>
			<[COLOR="Red"]Type[/COLOR]>BUILDING_ARMORY</[COLOR="red"]Type[/COLOR]>
			<ResourceType>RESOURCE_IRON</ResourceType>
		</Row>
		<Row>
			<[COLOR="red"]Type[/COLOR]>BUILDING_AIRPORT</[COLOR="red"]Type[/COLOR]>
			<ResourceType>RESOURCE_OIL</ResourceType>
		</Row>
	</Building_ResourceQuantityRequirements>
Needs to be BuildingType. This is a serious enough error for the entire file to be discarded by the game.

Also, whatever you are doing to the University needs to be done to the Wat to keep everything in synch.
 
A SINGLE error in the XML file will invalidate the ENTIRE file, so you MUST look at the complete file and not just a single bit of it.
That is actually extremely helpful to know. Now I can at least go through the code step by step and figure out where the problem is.

Code:
<GameData>
	<GameSpeed_Turns>
		<Update>
			<Where Type="GAMESPEED_MARATHON" MonthIncrement="180" TurnsPerIncrement="100"/>
			<Set MonthIncrement="360" TurnsPerIncrement="200"/>
		</Update>
		<!-- Repeat -->
	</GameSpeed_Turns>
</GameData>
That should work; just make sure to copy it multiple times over, editing the gamespeedtype, monthincrement and turnsperincrement columns appropriately and it should work.
Aah, that works. Brilliant! Thanks! :goodjob: (Had to change "Where Type" to "Where GameSpeedType")

Needs to be BuildingType. This is a serious enough error for the entire file to be discarded by the game.
Also, whatever you are doing to the University needs to be done to the Wat to keep everything in synch.
Thanks! That would explain a lot. Gonna check it out asap. And I will try to remember the Wat :)
 
Hey again. Things are going pretty well (things are working now), but I have run in to another problem...

Is it possible to make buildings "incompatible" with each other? For instance, I want to make it so that the Hagia Sophia and the Mosque of Djenne can't be built by the same civilization, or at the very least not in the same city.
 
There's a Buildings column called MutuallyExclusiveGroup (I'll have to check on the exact name, but it's something like that) with the parameter of integer. Add it to both buildings you want and set them to the same value, both, say, 27 for example. Those two buildings can now not be built in the same city. (See the solar plant/nuclear plant XML for an example)
 
I would suggest browsing through LeeS' extensive buildings guide.
He covers basically every possible thing you could do with buildings, including syntax, and examples from the game.

After that, you can probably poke at the stock CIV5Buildings XML file and just look at the schema at the very top for a list of every available column.
 
Top Bottom