Civilization UB: Replace National Wonder?

HowAreYou

Chieftain
Joined
Aug 20, 2012
Messages
14
So I'm trying to replace the Civilization's Palace with a unique building that provides faith, allowing the Civilization to immediately start generating faith, rather than having to research pottery, then build a shrine to gain any faith. However, it would seem the free building provided to the Civilization at the start of the game is required to be a building class rather than just a building. This complicates things, making Unique buildings impossible to start with.

Additionally, replacing a National Wonder seems to me, impossible. Even if I were to replace, say, the Heroic Epic, the Heroic Epic's replacement does not show in game. Is it simply impossible to replace a National Wonder for a single Civilization? Is there any form of work around to this problem?
 
Make the civilization's unique building replace the palace. Therefore, when you grant the palace as the free buildingclass, it switches to the unique building.
 
Make the civilization's unique building replace the palace. Therefore, when you grant the palace as the free buildingclass, it switches to the unique building.

I tried doing exactly that, but for some reason it's impossible to make a National Wonder the unique building. The Palace is no longer buildable for this Civilization, proving that it does indeed recognize that it shouldn't be available for this Civ, but it doesn't want to add its replacement to the game.
 
Then you must have made a mistake in the XML somewhere because it is possible, for all national wonders.
 
Make the civilization's unique building replace the palace. Therefore, when you grant the palace as the free buildingclass, it switches to the unique building.

The start-of-game free buildings don't follow the same logic you'd normally see during gameplay. A lot of things that SHOULD work, don't, because it looks like the engine is doing a single loop through the tables (in order of ID) and assessing whether that building should be placed, before a lot of the things are initialized.

For instance, if you use the FreeStartEra settings in the Buildings table to provide a free building, it will fail some of the time when the building depends on another building. From what I can tell, it comes down entirely to ID numbers; if you decide to make the Colosseum require a Temple, and you start in a later era where both should be awarded, it won't work because the Temple's ID is higher than that of the Colosseum. So presumably it's looping over buildings and saying "Should this building be placed? And if so, are all of its prerequisites in place?" without ever going through the loop again to see if NOW the prerequisites are met.

So I'm not surprised to see that UB replacements for the Palace aren't working at game start. The game's just not that well-coded for anything that substantially deviates from the core game design. Most likely, it's looping through to assign free buildings BEFORE the Civilization values are fully initialized, so the game can't use UBs yet since it won't know what civ each player is.
 
Regardless of what the game should be doing, it seems to be working. It seems using the <culture> tag that was used in vanilla game doesn't work in Gods and Kings. I couldn't tell you why, but yeah.

Everything is in order now.
 
Top Bottom