[BTS] Mod crashing at the start of Atomic Era

sleepground123

Chieftain
Joined
Nov 28, 2020
Messages
46
I made a mod that includes many new technologies. In this mod, I removed Modern Era and replaced it with Atomic and Information Eras. But when I researched first Atomic tech, the game crashed to desktop. I don't know what is the problem that caused the game to crash. I did not have any error messages before the crash.

Here are my mod file and Industrial Era(several turns before the crash) save file.
 

Attachments

  • Civ4 Deluxe.zip
    898.1 KB · Views: 32
  • ModSave.CivBeyondSwordSave
    249.3 KB · Views: 30
Last edited:
Adding/Removing eras might cause errors because you will need to change all the techs that have the tag ERA_MODERN, also Units and Buildings that have the tag ERA_MODERN. So make sure there are no other modern era tags, if you removed the Modern Era completely.
 
I made sure that I completely removed the Modern Era. In fact, if ERA_MODERN tag was remaining, there were error messages. However, there are currently no error messages.
 
According to Eras.xml file, there are some other files that use era tags (ERA_###):
  • Civ4BuildingInfos(Used for start eras that the building can be constructed)
  • Civ4TechInfos(Obvious)
  • Civ4LeaderHeadInfos(Background music)
  • Civ4CityLSystem(3D Modeling based on era)
  • Civ4PlotLSystem(Same as above)
Are there others that I miss?
I replaced ERA_MODERN with DX_ERA_ATOMIC in all of these files.
 
Do you use Total Commander? It can search for expressions/words in all files in all subfolders of a folder. Use Alt+F7. Go to the main folder of your mod and search for ERA_MODERN. It will find every instance in every file.
 
Maybe some XML files from Vanilla or Warlords are causing the problems. Not all required XML files are in the BTS XML folder. Only XML files that have been changed since Vanilla or Warlords are present in the BTS XML folder. The game loads in the XML in this order: Mod - BTS - Warlords - Vanilla. With that I mean that it tries to load the XML file from the mod first. If that file isn't present (because you didn't include it because you didn't make any changes in it) it will try to load it from the BTS XML folder. If BTS also doesn't have it, that in tries to load it from the Warlords XML folder and then the Vanilla XML folder.

I did a quick search and found that in Vanilla XML, there Interface\CIV4ThroneRoomStyleInfos.xml, which also contains ERA_MODERN. As BTS does not have this file, the one from Vanilla is loaded. Copy this one to your mod and replace ERA_MODERN with your new era.
 
I just changed Civ4ThroneRoomStyleInfos.xml. I think that it was the issue because the game could not find arts for Atomic Era. But what does that file do?
 
But what does that file do?

It has to do with the Throne Room which is an unfinished and unused feature. It was supposed to be something like Palace upgrades in Civ3 (and Throne Room in Civ2 and Palace upgrades in Civ1 if I am not mistaken). There is a way to access it in the debug mode.
 
I've run the mod in the debugger and found a cycle in your tech tree:
Fiber Optics <-> Information Lifestyle​
The AI code for choosing tech paths looks at most one era ahead, I think that's why the crash doesn't occur until the Atomic era.
(It also seems that BUILDING_INSTRUMENT WORKSHOP in Civ4BuildingClassInfos.xml misses an underscore.)
 
Top Bottom