A little help with modding CIV5Buildings.xml please

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

I've been trying to make a small mod that changes the prereq of the national wonders from having eg. libraries in all cities to having only 5 spread throughout your cities.

Made a small mod (see below) but it doesn't seem to do anything. Oh, and I did remember the onactivate action.

Spoiler :
<GameData>
<Building_PrereqBuildingClasses>
<Update>
<Where BuildingType="BUILDING_HEROIC_EPIC" BuildingClassType="BUILDINGCLASS_BARRACKS" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_NATIONAL_EPIC" BuildingClassType="BUILDINGCLASS_MONUMENT" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_CIRCUS_MAXIMUS" BuildingClassType="BUILDINGCLASS_COLOSSEUM" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_NATIONAL_TREASURY" BuildingClassType="BUILDINGCLASS_MARKET" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_NATIONAL_COLLEGE" BuildingClassType="BUILDINGCLASS_LIBRARY" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_IRONWORKS" BuildingClassType="BUILDINGCLASS_WORKSHOP" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_OXFORD_UNIVERSITY" BuildingClassType="BUILDINGCLASS_UNIVERSITY" />
<Set NumBuildingNeeded="5"/>
</Update>
<Update>
<Where BuildingType="BUILDING_HERMITAGE" BuildingClassType="BUILDINGCLASS_MUSEUM" />
<Set NumBuildingNeeded="5"/>
</Update>
</Building_PrereqBuildingClasses>
</GameData>


Can anyone please give advice??

\Skodkim :)
 
Hmm, well the code is fine, although you only need the buildingtype="whatever", you don't need the buildingclasstype="whatever" since no national wonder requires two types of buildings. Must be something else. Is this your first mod?
 
Hmm, well the code is fine, although you only need the buildingtype="whatever", you don't need the buildingclasstype="whatever" since no national wonder requires two types of buildings. Must be something else. Is this your first mod?

It's acyually my second code of CivV. First one was also very simple - it just altered game speeds a bit.

Thanks for the look.

\Skodkim
 
Aaaah :cry:

I've just spent the last 5 hours trying to get this to work and it just simple doesn't. It all seems so simple but apparently I'm doing something wrong.

As sais before my mod consists of only two xml files modding A) game speeds and B) buildings. A loads fine now but B doesn't. I've tried lots of things so far and none have solved the problem. :(

If theres anyone out there able and willing to help out I'll be very grateful. :)

I've uploaded two recent versions of the mod.

\Skodkim
 
For XML 'Import into VFS' is used to completely replace existing* identically named files. But you are just running update commands.

So I've looked at v4. And I'd say you should disable 'Import into VFS' in mod buddy for both files.

In fact I suggest also renaming them because it is a bit improper to use names already used by Civ 5 itself for files just containing UpdateDatabase instructions.


* In civ 5 itself.
 
For XML 'Import into VFS' is used to completely replace existing* identically named files. But you are just running update commands.

So I've looked at v4. And I'd say you should disable 'Import into VFS' in mod buddy for both files.

In fact I suggest also renaming them because it is a bit improper to use names already used by Civ 5 itself for files just containing UpdateDatabase instructions.


* In civ 5 itself.

Sorry but it still doesn't work.
I A) removed the VFS flags B) renamed the xml-files C) updated the commands to meet the new names.

Furthermore I moved some text comments to a new file and made an update command to go with it.

Still only the first file loads... Not even the text changes are applied.

I uploaded the new mod with the post

\Skodkim
 
This one is really annoying me. Just spent a couple of hours again ewith no luvk.

\Skodkim
 
The building change is being applied. When I load version 5 on a Duel-sized Medieval start, my capital is given a free monument and the mouseover for National Epic says "Monument count still required:4" just as one would expect. Note that this number will scale with map-size though so it isn't always going to be 5.

The text isn't being changed because you have a quoting problem in the text XML:
Code:
		<Update>
			<Set Text="This National Wonder gives all units built in this city the "Morale=""" promotion, increasing their combat strength by +15. It also provides +1 culture. The Heroic Epic can be constructed when a civilization has a barracks in 5 of its cities."/>
			<Where Tag="TXT_KEY_BUILDING_HEROIC_EPIC_STRATEGY"/>
		</Update>
Note all the double-quotes and the extra equals around Morale. If this entry is changed as below, the text changes show up too.
Code:
		<Update>
			<Set Text='This National Wonder gives all units built in this city the "Morale" promotion, increasing their combat strength by +15. It also provides +1 culture. The Heroic Epic can be constructed when a civilization has a barracks in 5 of its cities.'/>
			<Where Tag="TXT_KEY_BUILDING_HEROIC_EPIC_STRATEGY"/>
		</Update>
 
The building change is being applied. When I load version 5 on a Duel-sized Medieval start, my capital is given a free monument and the mouseover for National Epic says "Monument count still required:4" just as one would expect. Note that this number will scale with map-size though so it isn't always going to be 5.

The text isn't being changed because you have a quoting problem in the text XML:
Code:
		<Update>
			<Set Text="This National Wonder gives all units built in this city the "Morale=""" promotion, increasing their combat strength by +15. It also provides +1 culture. The Heroic Epic can be constructed when a civilization has a barracks in 5 of its cities."/>
			<Where Tag="TXT_KEY_BUILDING_HEROIC_EPIC_STRATEGY"/>
		</Update>
Note all the double-quotes and the extra equals around Morale. If this entry is changed as below, the text changes show up too.
Code:
		<Update>
			<Set Text='This National Wonder gives all units built in this city the "Morale" promotion, increasing their combat strength by +15. It also provides +1 culture. The Heroic Epic can be constructed when a civilization has a barracks in 5 of its cities.'/>
			<Where Tag="TXT_KEY_BUILDING_HEROIC_EPIC_STRATEGY"/>
		</Update>

YES - that was it. Thanks you so very much! :goodjob:

\Skodkim
 
Back
Top Bottom