Please a little help about .xml files management

10lire

Prince
Joined
Mar 5, 2003
Messages
304
Location
Milan, Italy, EU
I can load my games no more!!!!

What i have done:
1) I have modified some .xml files (i have renamed the original files appending ".ORIG" at the filenames). These are the files:
- [Civilization IV folder]\Beyond the Sword\Assets\XML\Text\CIV4GameText_Objects_BTS.xml
- [Civilization IV folder]\Assets\XML\Text\CIV4GameTextInfos_Cities.xml
- [Civilization IV folder]\Assets\XML\Text\CIV4GameTextInfos_Objects.xml

2) I have started two new games; all is well; i like the text entries i have modified!

3) I have downloaded three other games from this forum.

4) I have assumed that Civ program doesn't load these three games because of the modified files (i have assumed Civ returns to me the message: "The save file you have selected is protected to ensure that the assets in your mod folder have not be changed" ); so i have restored the original files.

5) I have played the dowloaded games; ok, fine..

6) I want to play my original games; i restore the "modified" configuration as at point 1) and here's the problem: Civ returns to me the message "The save file you have selected is protected bla bla bla..." !!!! Same problem with my second game.

7) I make a test: i try to play the downloaded games (with modified files): they work !!!!!

8) I make a second test: i restore the "original" configuration, try to load the downloaded games, they work (as expected); i try to load my two games, they don't work.

I don't understand what is happened. The downloaded games work with both configurations, but now i can't MY games. :confused: :confused: :confused: :confused:
Thanks in advance for your answers..
 
Hmm, I'm not an expert on this, but you might have a caching problem. Open your ini file, there should be two options to clear data out of the cache on program startup. Make sure that this data gets cleared.

Also, why did you play your own games with protected assets checked? As far as I can tell, there's little reason to do that unless you want to compare your score with those of other people, but that doesn't make sense anyway when you mod your game?

Also, why have you modified the original files instead of making a mod? I think making a mod would have been safer, and wouldn't have required the file renaming and backuping hassle.
 
You should never, ever alter the original files. Copy them them over to your MyGames/.../Custom Assets folder and make your changes there. You're just asking for trouble changing the originals, as you have discovered. Your best option now is to reinstall the game and start over making your changes.
 
This should be in the Creation & Customisation section.
 
Open your ini file, there should be two options to clear data out of the cache on program startup.

Hmm, i've tried all the combination with those two options in the .ini file.. no changes..

Also, why did you play your own games with protected assets checked?

Sorry.. i don't know what are talking about.. i don't know what a "protected asset" is.. I simply have modified some .xml files.. some city names.. some wrong italian entries..

why have you modified the original files instead of making a mod?

Because i didn't know that RENAMING a .xml file and then "rollback" was so problematic...

Your best option now is to reinstall the game and start over making your changes.

DO I MUST REINSTALL BTS because i have renamed some files? :eek: :eek:
.. this is INCREDIBLE!!!!!!! :mad: :mad:
 
Would be easier to reinstall BtS. It wont take more than 10 minutes. And then make a mod instead of changing core xml files. There are guides somewhere on the forum that explains how to do this.
 
Hmm, i've tried all the combination with those two options in the .ini file.. no changes..

Okay, then it's not a cache problem. Pity, because this would have been an easy solution.

Sorry.. i don't know what are talking about.. i don't know what a "protected asset" is.. I simply have modified some .xml files.. some city names.. some wrong italian entries..

When you start a new game, there's an option to "lock modified assets". This option is intended to prevent cheating in competitive games where many players play the same save. In such a competition, you could theoretically cheat by modding your game in a way that gives you advantages. To make this impossible, the save game can be told to remember the mods (and individual files and their contents) which were active when it was created. You can only load such a save when you have *exactly* the same files (with exactly the same contents) active. This is a working protection against cheating in such competitive games.

When you get the message "The save file you have selected is protected to ensure that the assets in your mod folder have not be changed", then your save game has been protected this way. Note that there are also some mods (like the HoF mod) that automatically set this option, so you might be unaware that it's on.

Now, you have a protected save, changed some files, and then tried to rollback so that you could load your save again. And it didn't work. The reason is, obviously, that your rollback was unsuccessful. You didn't manage to recreate the exact situation with which the save game was created, so that the "integrity check" failed. There are several possible reasons for this. I don't know how exactly Civ4 performs the check in question, but (for example) it could be possible that the content of some file did change. Or that a file isn't present now that was present when the save was created (for example a backup copy of one of the changed files that was placed in the Assets folder). Or it could be that one of the files has a different date now than the date it had when the save was created. There are many possibilities.

Keep in mind that the reason for these security checks is to prevent cheating in competitive games, so there's good reason to perform a very *thorough* check that finds every possible "hack".

Because i didn't know that RENAMING a .xml file and then "rollback" was so problematic...

Your assumption was apparently wrong. It would have worked a couple of years ago, when there was less competitive gaming, and when the checks to prevent cheating weren't as evolved as they are today.

Still, the rollback would have worked if you had simply made a copy of your whole folder instead of using renamed backup copies stashed in the same folder. The former method is safe, the latter makes a rollback harder and more error prone.


DO I MUST REINSTALL BTS because i have renamed some files? :eek: :eek:
.. this is INCREDIBLE!!!!!!! :mad: :mad:

Actually, I don't think that a reinstall will let you play your save. But you can try.

However, please calm down a bit. It's important to realize that this is not a fault of the game, but the problem arose from ...

a) your tampering with files in a folder that was important to check the integrity of competitive games

b) your using a save with locked assets when it apparently wasn't necessary

c) your not making a complete backup of the whole folder before tampering with it

Every single one of these points would have prevented the situation you're in now if you had acted differently.

The nice thing about Civ4 is that it provides not only one, but *two* folders specifically for tampering with files in any way you want (these are the Mods folder and the CustomAssets folder), while *still* having the integrity checks necessary to prevent cheating in competitive games. When you choose to tamper with files exactly in the one place where you shouldn't, and ignore the two places that are specifically designed for tampering with files in a safe way, then you're really asking for the trouble you've got now.

Perhaps you've learned a bit and can apply better procedures next time.

I still hope that you can continue to play your game, but remember, you have to recreate the *exact* situation that was present when you created this save, which isn't easy.
 
DO I MUST REINSTALL BTS because i have renamed some files? :eek: :eek:
.. this is INCREDIBLE!!!!!!! :mad: :mad:

No, you have to reinstall BtS because you tampered with the original files. You have no one to blame but yourself. There's a reason why Firaxis provided a Custom Assets folder, make sure you use it next time.
 
Thank you very much everyone, for your strictures too! Now everything is very clearer..
In Civ3, i enjoyed to modify some files to personalize my games.. it was easy to do and easy to understand how to do. I'm talking about text files and graphic files (and about the "Civ3builder" or something like that.. i don't remember the exact name... it was a friendly-user windows-style application).
In civ4 it's very harder to me to understand all that xml stuff and tags and files.. i'm not a programmer, i'm a student in history! And now that i have understood a little bit of how civ4's xml works, i learn that there are rules about files modifications.. Yes, i have no one to blame but myself, but nowhere is written that i must use this "custom asset folder" and that modifying the original files makes my savegames unavaiable..

Obviously, i have reinstalled bts and now i am unable to play my games... :(
 
We live and learn. :)

As I said, it's understandable that you assumed that something you could do without bad consequences in Civ3 would also be possible in Civ4. But as understandable as it is, it's also wrong, and therefore we have to break with some old habits and adapt.

Actually, it's the same like *playing* Civ4: When I started playing Civ4, I assumed it would be very similar to Civ3, so I expanded rapidly ... and immediately crashed my economy and lost my units. However, after I adapted my strategy, I found the early game much more interesting in Civ4.

Likewise, modding for Civ4 is definitely harder to get into than for Civ3 (due to the lack of a user-friendly editor), but once you find your way around, you realize that it's also much more powerful. You can do things in Civ4 modding that Civ3 modders only dreamt of, like totally rewriting the AI, or changing the game into something almost completely different (like some of the BtS scenarios demonstrate). It's definitely harder to learn though. Check the "creation and Customization" section of these forums, there are tutorials and many very helpful people. :)
 
Top Bottom