LeeS
Imperator
One issue I did finally run into last night are two traits that weren't working -- or at least I'm not aware of how it works.
These are:
Trait_YieldChangesPerTradePartner
Trait_YieldChangesIncomingTradeRoute
Both of those are used by the Moroccan Civ trait "Gateway to Africa" which adds what I assume are inherent bonuses to trade routes. I added those to provide an extra 3 Gold both ways, but when I tested with a Caravan going both ways between my City and an AI city, neither of us seemed to gain any extra Gold; Total Gold was around 2 GPT (really early-game.)
Not sure what's going on there.
Did you establish a trade route with a major player or a city-state? There seem to be a lot of exceptions regarding how trade-routes with city-states work as opposed to major players. Could also be, as Whoward69 put it, the "spaghetti" effect.
Also, with the hidden building being in its own buildingclass, do I need to add code to prevent anyone else from acquiring this? It should be unbuildable with a cost of -1, but I'm not sure if I need to go ahead and override or set its defaultbuilding to nothing.
Cost=-1 and Faithcost=-1 should lock out any civ being able to construct a building in the "normal" way.
I usually include HurryModifier=-1 as an extra safety measure, but I'm not sure it's strictly necessary. I just assumed I would need it the first time I tried a hidden and /or dummy building, and since it was in there after I got everything to work I have always left it there since I always adhere to the "if it ain't broke..." approach.
And completely hiding a building with XML-only relies on GreatWorkCount=-1 as you suspected. But of course as you firgured out, it only works for BNW. Irkalla discovered this code loophole -- he put up a tutorial on it some time back.