Help with editing CIV4BuildingInfos!

AarontheBaron

Chieftain
Joined
Dec 4, 2012
Messages
13
I'm currently stuck on a modification, and would appreciate some advice! :)

I understand XML to a degree, and basically what I'm trying to do is edit the number of prerequisite buildings for a Great Wonder. The iBuildingClassAnyNeededCount is set to 6, and I wish to change the value to 5. However, when I make the edit, save the file and load up the game, it crashes. Am I missing a step here? I've scoured the forums and cannot see anything obvious I'm doing incorrectly or am missing.

Again, any help would be highly appreciated!

PS. The edits I am making are to a mod, not the base game.
 
What does the crash look like? The game just quits silently, or is there an error message? When exactly does it happen? When you load the mod?

Just to help isolate the cause, if you revert the change, does the game no longer crash?

Which editor are you using? The game requires Windows line endings but some editors do Linux line endings by default.
 
Hey Leoreth [huge admirer of RFC DoC here! :D],

There is an error message (quite a few actually). The first is the XML Load Error (see screenshot below), and then I'm hit with "Load XML call failed for Buildings/CIV4BuildingInfos.xml." and then a tonne of XML errors regarding info classes being incorrect (see second screenshot), despite only editing a single value. For reference, the building the second error refers to is not the building which I edited - the XML error flags for multiple buildings. These errors all occur when I load the mod up.

If I revert the change, the error persists. I have to copy and paste the CIV4BuildingInfos.xml file from the original/downloaded mod to get it to work again. I assume I'm missing a step, or something else happens to the file whenever I make the edit, but I'm still a novice so am having difficulty troubleshooting.

I'm on Windows and am using Microsoft XML Notepad.

Thanks for getting back to me on this!

XML Load Error.png
Info Class XML.png
 
Looks like your editor inserted some garbage at the start of the file, possibly BOM. Perhaps try a different editor?
This worked! Thank you!! *Note to self: do not use Microsoft XML*.

Now hopefully, I can enjoy the scenarios playing your wonderful mod!

PS. I hope you don't mind me making the edit - I didn't want to use the world builder...
 
Notepad++ is always a safe and convenient (and free) choice for editing any mod files on Windows.
 
Back
Top Bottom