Since it is a scenario, it may be an issue with the scenario.
In the worldbuilder save each city has a section from a BeginCity through EndCity in the plot data where it is located. One of the values in the city data should be a "BuildingPlanetRing" value. That may be set to a planet that is not inside the initial cultural boundaries (i.e. > 3 since they start at 1 and the first 3 are what you should have access to before the first border pop).
Edit: I finally laoded v4 and checked the Galaxy scenario. The Borg homeworld has no "buildingPlanetRing" value specified. In fact, none of them do. I don't know what that means, as far as where the buildings will go... I also don't remember where it will put the buildings that are specified in the scenario file since no "Planet*BuildingType" values are specified either. As I recall, the scenarios use an older worldbuilder format that didn't specify any of that stuff. I loaded the Galaxy scenario and selected the Borg - sure enough, I have no idea which planet (if any) the building I chose is being built on.
It seems to me that in the CvFinalFrontierEvents.py's onGameStart function there should be something to set the current build planet. In the case where it is not a scenario this gets set - except that it is a scenario. I would suggest an addition to the code in the "else:" section for when it is a scenario, like so
Code:
# Add Buildings in WBS to Home Planet of Star System
for iPlayerLoop in range(gc.getMAX_CIV_PLAYERS()):
pPlayer = gc.getPlayer(iPlayerLoop)
for iCityLoop in range(pPlayer.getNumCities()):
pCity = pPlayer.getCity(iCityLoop)
pSystem = self.getSystemAt(pCity.getX(), pCity.getY())
iBestPlanet = getBestPlanetInSystem(pSystem)
pPlanet = pSystem.getPlanetByIndex(iBestPlanet)
[COLOR="Purple"] # Set the default selected & building planet to the best one
pSystem.setSelectedPlanet(pPlanet.getOrbitRing())
pSystem.setBuildingPlanetRing(pPlanet.getOrbitRing())[/COLOR]
By the way - the indentation in that file is a mix of spaces and tabs. It is much much better to stick to tabs since that is what it uses originally and if you are not very careful the indentation will not work correctly to delimit the start end end of code sections if you mix spaces in with the tabs.
When messing with this I found a bug. If you are not set up to see the Python error pop-up you won't notice this and it will have no serious effect (it is the last thing in the function so when it fails nothing that should happen in other cases gets skipped).
The Python error:
Code:
Traceback (most recent call last):
File "CvEventInterface", line 19, in onEvent
File "CvEventManager", line 187, in handleEvent
File "CvFinalFrontierEvents", line 1668, in onPlotRevealed
AttributeError: 'NoneType' object has no attribute 'getTargetWormholeType'
(Line numbers are in a file with my above modification for setting selected and built planet.)
The issue is that most plots don't have a feature, yet the code attempts to identify a wormhole plot by checking the plot's feature to see if it has a target wormhole type. Since most plots don't have a feature, this attempts to run the "getTargetWormholeType()" method of a non-existent feature object. It should instead check to see if there is a feature before trying that.
Original:
Code:
elif ((gc.getFeatureInfo(iFeature)).getTargetWormholeType() != -1):
if (not Tutorial.isWormhole()):
CyCamera().JustLookAtPlot(pPlot)
CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_PING'), pPlot.getPoint())
self.addPopup(localText.getText("TXT_KEY_ST_TUTORIAL_WORMHOLE_TITLE", ()), localText.getText("TXT_KEY_ST_TUTORIAL_WORMHOLE", ()))
Tutorial.setWormhole(1)
New:
Code:
elif (iFeature != -1):
if ((gc.getFeatureInfo(iFeature)).getTargetWormholeType() != -1):
if (not Tutorial.isWormhole()):
CyCamera().JustLookAtPlot(pPlot)
CyEngine().triggerEffect(gc.getInfoTypeForString('EFFECT_PING'), pPlot.getPoint())
self.addPopup(localText.getText("TXT_KEY_ST_TUTORIAL_WORMHOLE_TITLE", ()), localText.getText("TXT_KEY_ST_TUTORIAL_WORMHOLE", ()))
Tutorial.setWormhole(1)
Running a few turns after that, I saw only one minor thing: the hover text for the Palace does not indicate that it gives +2 population for the planet it is on. You can set this via the Help tag for the building.