In FFP the city's "base yield rate" is overridden in the Python. Because of this, things like specialists that change the base yield rate end up being ignored. When a specialist is added to a city it modifies the various yield rates as appropriate for its type, but the changes are then wiped out by the Python which sets it to what it wants it to be every turn.
This should not affect anything that is a commerce (credits, research, influence, espionage), just the yields (food, production, and commerce).
You can fix this by adjusting the Python to take the specialists into account.
In FinalFrontierEvents.py there is a function called updatePlotYield. At the end of this function is a loop over the 3 yield types where it sets the base yield rate for each. Inside that loop you could add the yield from specialists for that yield type by looping over all the specialist types, multiplying the number of free specialists of that type by the amount of yield they give for that player.
OK, so this is (I think - not tested) the code for the adjusted loop, new code in bold dark red text:
Code:for iYieldLoop in range(3): [B][COLOR="DarkRed"]// G-E: Add in the effects of free specialists for iSpecialist in range(gc.getNumSpecialistInfos()): aiSystemYield[iYieldLoop] += pPlayer.specialistYield (iSpecialist, iYieldLoop) * pCity.getFreeSpecialistCount(iSpecialist)[/COLOR][/B] pCity.setBaseYieldRate(iYieldLoop, aiSystemYield[iYieldLoop]) printd(" Setting City Base Yield %d to %d" %(iYieldLoop, aiSystemYield[iYieldLoop]))
That should get the free specialists adding their yields into the totals. It should also cover any settled great people since they should also be in the list of specialist types. Give it a try and let me know.
The "//" to start the comment should be "#". (Oops, wrong language.)
if (iOwner != -1):
if (pPlot.getFeatureType() == self.iFeatureIDSolarSystem):
pPlayer = gc.getPlayer(iOwner)
pSystem = getSystemAt(pPlot.getX(), pPlot.getY()) #FFPBUG
aiSystemYield = [0,0,0]
iLunarBase = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getCivilizationBuildings(gc.getInfoTypeForString("BUILDINGCLASS_LUNAR_BASE")) # This civ's lunar base
printd("Updating Yield for %s" %(pCity.getName()))
#Final Frontier Plus:
# These numbers are calculated in the DLL for buildings, traits, trait/trade routes, and trade routes
# I originally wanted to set this value there and then just add the planet stuff here, but that didn't work because of the Forge...
if pCity.getFoodOverride() != 0:
aiSystemYield[0] += pCity.getFoodOverride()
if pCity.getProductionOverride() != 0:
aiSystemYield[1] += pCity.getProductionOverride()
if pCity.getGoldOverride() != 0:
aiSystemYield[2] += pCity.getGoldOverride()
printd(" Food override = %d" % (aiSystemYield[0]))
printd(" Production override = %d" % (aiSystemYield[1]))
printd(" Commerce override = %d" % (aiSystemYield[2]))
#Planet yield stuff, does have to be done manually (unlike everything else...)
for iPlanetLoop in range(pSystem.getNumPlanets()):
pPlanet = pSystem.getPlanetByIndex(iPlanetLoop)
printd(" Planet at Ring ID %d" %(pPlanet.getOrbitRing()))
for iYieldLoop in range(3):
if ((iYieldLoop == 0) and pPlanet.isHasBuilding(iLunarBase)): # CP - 0 == food; lunar base adjustment
iPop = min((pPlanet.getPopulationLimit(iOwner) - 1), pPlanet.getPopulation())
else:
iPop = pPlanet.getPopulation()
iValue = (pPlanet.getTotalYield(iOwner, iYieldLoop) * iPop)
aiSystemYield[iYieldLoop] += iValue
printd(" Yield %d Value: %d" %(iYieldLoop, iValue))
for iYieldLoop in range(3):
# G-E: Add in the effects of free specialists
for iSpecialist in range(gc.getNumSpecialistInfos()):
aiSystemYield[iYieldLoop] += pPlayer.specialistYield (iSpecialist, iYieldLoop) * pCity.getFreeSpecialistCount(iSpecialist)
pCity.setBaseYieldRate(iYieldLoop, aiSystemYield[iYieldLoop])
printd(" Setting City Base Yield %d to %d" %(iYieldLoop, aiSystemYield[iYieldLoop]))
I didn't even notice that the error was not in that code - I just assumed the error was the one I knew about in the code I posted.
It is talking about an error occurring in calculateScore, which is in FinalFrontierGameUtils.py.
Do you have Python error pop-up enabled? Or error logging? If you have the pop-ups you should be getting at least one each time that error happens - this can be handy to have. If you have error logging enabled then there should be a PythonErr.log file in the My Games/Beyond the Sword/Logs folder with the text of the Python errors in it. Either of these could point to to the line (give or take 1) of Python that has the problem.
The calculateScore function prints some things into PythonDbg.log. You can check to see what, if anything, is making it into there. The last thing that function does before returning the score is some printing and there are several others. If any of that output is missing you know that the error happened after the last thign printed but before or during the first line of output that is missing.
As a big fan of Birth of the Federation, i specially bought civ4 on steam to be able to play this.
I am however unable to capture any cities.
Killing the defending ships is no problem, but actually moving a ship on the city tile and capturing does not work.
Is there some ruleset to this that I am missing?
so knighthawke i see you found a fix for the event bug and specialist thing. could you please post what you did so others can fix it? this mod desnt seem to hae been updated with your input yet so it would be nice to have a fix.
I missed that, I got the itch to play it again, if I can recreate it I will post it here. I will need to play with the game and find the errors again. I know one problem was I saved a file under the wrong extension after fixing something. Sorry for the slight delay.And message me with any bug fixes too, I'll add them to the official release.
Btw, thanks for playing this mod guys, I'm hoping when civ6 comes out to do a new star trek mod for that.
The code provided in the first post provided by God-Emperor added into that file fixes the issue, Use notepad ++ and make sure to change the // into a #, don't add in the BBcode for the color, make sure the existing line in that range below is still there and unchanged.so Knighthawke i see you found a fix for the event bug and specialist thing. could you please post what you did so others can fix it? this mod desnt seem to have been updated with your input yet so it would be nice to have a fix.