Dresden
Emperor
- Joined
- Jul 10, 2008
- Messages
- 1,081
Even though the SimCutie color file is no longer in BUG, I still see occasional SGs that report the crash. I have wanted for awhile to make a little utility program that you could just run a save through that would fix the problem but I can't find any documentation on the basics of civ4 save editing and got no response from one of the utility authors whom I PMed for assistance.
However, tonight I was struck with inspiration and decided to write a fix that operated from within the game itself. In this case a custom DLL (based off of Official 3.17) that provides a new function CvGame::fixLog() which is exposed to Python. This function goes through the Replay log and all the player message logs, resetting any out-of-range colors to white. Source is available on request (i.e. I'm too lazy to package and post it until someone actually asks.)
This has worked on a test of ONE broken save since that's all I had handy and I haven't yet gotten confirmation from anyone else, but I feel pertty confident so I'm posting it now.
The save I tested with was from shyuhe-5 and I'm hoping the players there can give me additional confirmation since I posted the (hopefully) fixed save back to their topic.
If someone else has a broken save they'd like fixed, please post it or link it here and I'll run it through. Alternatively if anyone is adventurous enough to want to try the fix themselves this is what you need:
Instructions:
If all goes well, you can resave, quit BTS, and reinstall your old DLL. The save should now be fixed and the problem gone. If I get further positive test feedback I'll probably package it up more nicely and post it somewhere more conspicuous too.
However, tonight I was struck with inspiration and decided to write a fix that operated from within the game itself. In this case a custom DLL (based off of Official 3.17) that provides a new function CvGame::fixLog() which is exposed to Python. This function goes through the Replay log and all the player message logs, resetting any out-of-range colors to white. Source is available on request (i.e. I'm too lazy to package and post it until someone actually asks.)
This has worked on a test of ONE broken save since that's all I had handy and I haven't yet gotten confirmation from anyone else, but I feel pertty confident so I'm posting it now.

If someone else has a broken save they'd like fixed, please post it or link it here and I'll run it through. Alternatively if anyone is adventurous enough to want to try the fix themselves this is what you need:
- BTS version 3.17 installed
- A BTS 3.17 save with the problem that does not have Locked Modified Assets set
- The chipotle setup in your INI so you can access the Python console
- Something that opens RAR files since that's my default compression format
- The DLL attached to this post
- You should also not have the SimCutie CIV4ColorVals.xml file installed since that'd render the fix useless.
Instructions:
- Backup your current CvGameCoreDLL.dll to someplace safe.
- Install the attached DLL to your BTS Assets folder.
- Launch the game and load the problem save.
- Type "~" to launch the Python console; make sure you see the Python version number and ">>" prompt.
- Enter the following into the console and hit enter:
Code:CyGame().fixLog()
- You should see an in-game confirmation message that looks something like this:
- Close the console (with "~" or "`"), cross your fingers, and open the log.
If all goes well, you can resave, quit BTS, and reinstall your old DLL. The save should now be fixed and the problem gone. If I get further positive test feedback I'll probably package it up more nicely and post it somewhere more conspicuous too.