Okay, so here is a "beta" of my tradeable unique buildings MOD. I am not including the open source yet (as I just want some of you to test it). The ONLY thing it adds to the game is the ability to trade unique buildings after you research CONSTRUCTION. (I use the word "only" lightly... there were WAY more things to change/add than I thought there would be just to make this possible...) Within the XML files, searching "JDHalfrack" will show you what I added to make the tech requirement for enabling tradeable unique buildings.
Things that still need work:
Unique building values: Right now, the "value" for trading a unique building is equal to the production cost of the building times 37.
Code:
iCost = std::max(0, GC.getBuildingInfo(eUniqueBuilding).getProductionCost());
iValue = (iCost * 37);
We need to find a better value for this. I think it should basically incorporate building specifics like happiness bonuses, health bonuses, production increaes, etc.... So, at some point, I will work on this.
Denying unique building trading: When a team doesn't want to trade a technology, it shows up, but it's red. Usually it says stuff like "We would never trade to you, our worst enemy" or "We aren't ready to start trading this just yet" or something like that. Currently, AI teams will never make a trade impossible. It may still deny a trade because the value isn't good enough, but it won't initially deny a trade.
Overwriting other unique buildings: The way the unique buildings work is based off of "BuildingClassTypes." For example, the Ziggurat replaces the Courthouse because they are both from the same BuildingClassType. So, be aware that if you trade for a unique that is the same BuildingClassType as YOUR unique building, it will be over written. When I first started making this MOD, it was for a bigger MOD I have been working on where each civilization has a unique building that is not based on any other civilization's base BuildingClassType. So, it's not a big deal for me, but it may be an issue for some of you.
Besides that, it's pretty much good to go. Try it out and let me know what you think.
JD