T-hawk
Transcend
I compiled the DLL with the fix. It seemed to work in a quick test. File is here:
http://forums.civfanatics.com/downloads.php?do=file&id=13779
http://forums.civfanatics.com/downloads.php?do=file&id=13779
I compiled the DLL with the fix. It seemed to work in a quick test. File is here:
http://forums.civfanatics.com/downloads.php?do=file&id=13779
def updateStarbaseCulture(self, iPlayer, iX, iY):
# Create culture around unit
for iXLoop in range(iX-2, iX+3):
for iYLoop in range(iY-2, iY+3):
iActiveX = iXLoop
iActiveY = iYLoop
[COLOR="Red"]if (iActiveX < 0):
iActiveX = CyMap().getGridWidth() + iActiveX
if (iActiveY < 0):
iActiveY = CyMap().getGridHeight() + iActiveY[/COLOR]
pLoopPlot = CyMap().plot(iActiveX, iActiveY)
# pPlotLoop = CyMap().plot(iXLoop, iYLoop)
# printd("Setting Player %d as the owner of %d, %d" %(iPlayer, iXLoop, iYLoop))
# Don't override culture that's already here
if (pLoopPlot.getOwner() == -1):
pLoopPlot.setOwnerNoUnitCheck(iPlayer)
def updateStarbaseCulture(self, iPlayer, iX, iY):
# Create culture around unit
for iXLoop in range(iX-2, iX+3):
for iYLoop in range(iY-2, iY+3):
iActiveX = iXLoop
iActiveY = iYLoop
[COLOR="red"]if CyMap().isWrapX():[/COLOR]
if (iActiveX < 0):
iActiveX = CyMap().getGridWidth() + iActiveX
[COLOR="red"]if CyMap().isWrapY():[/COLOR]
if (iActiveY < 0):
iActiveY = CyMap().getGridHeight() + iActiveY
pLoopPlot = CyMap().plot(iActiveX, iActiveY)
# pPlotLoop = CyMap().plot(iXLoop, iYLoop)
# printd("Setting Player %d as the owner of %d, %d" %(iPlayer, iXLoop, iYLoop))
# Don't override culture that's already here
[COLOR="Red"]if not pLoopPlot.isNone():[/COLOR]
if (pLoopPlot.getOwner() == -1):
pLoopPlot.setOwnerNoUnitCheck(iPlayer)
Do i need to put the CPP file in anywhere or do i only need the DLL installed as instructed?I compiled the DLL with the fix. It seemed to work in a quick test. File is here:
http://forums.civfanatics.com/downloads.php?do=file&id=13779
Thanks T-Hawk, incorporated that, now just have to test it.You need just the DLL.
I compiled the DLL with the fix. It seemed to work in a quick test. File is here:
http://forums.civfanatics.com/downloads.php?do=file&id=13779
...so i just have proceeded my game, and amazingly after ~10 turns the old/shorter duration came back.Does the time between turns stay large? I don't know why, but sometimes the time it takes jumps up by a very large amount for a few turns, and then drops back down to more normal times. It does tend to keep increasing as the game goes on, but it is usually a fairly steady increase.
As tested the problem with this suddenly much longer turn/calculation duration also happens with the original DLL/*.py files.In regards to speed: I moved a lot of the callbacks into the DLL, disabled them, and using my modified DLL, I found things were significantly faster. I played a Huge map game and found that while there is still noticeable lag, it's not nearly as bad as Final Frontier used to be on a huge map.
...
I have checked the map with the world builder (before and after the problem appeared the first time) and there is no evident reason for this lag. It's a small map and the last free solar systems has been colonized several turns ago, also there aren't any newly established starbases. Only cultural borders slightly increased....
I imagine that killing an AI player would decrease the lag. It would increase whenever a solar system was colonized, especially by the AI, because now the pickled array for solar systems is storing not just system data but also buildings, and there is now another city that needs updating every turn. The more buildings in a system, the slower things get too.
I think you misunderstood- I didn't make the modified DLL posted in this thread, T-hawk did.
I did, however, create another, unreleased DLL which has allowed me to disable nearly all of the python callbacks which are helping to slow the game down at present (and by disabling them, things speed up). That's what I meant.
szHelpText = localText.getText("TXT_KEY_FF_INTERFACE_PLANET_SELECTION_HELP_0", (iFood, iProduction, iCommerce))
szHelpText = pPlanet.getName() + "\n" + localText.getText("TXT_KEY_FF_INTERFACE_PLANET_SELECTION_HELP_0", (iFood, iProduction, iCommerce))
iValue = (pPlanet.getBaseYield(0) * 2) + pPlanet.getBaseYield(1)
iValue = ( (pPlanet.getBaseYield(0) * 75) + (pPlanet.getBaseYield(1) * 35) + (pPlanet.getBaseYield(2) * 10) )
iValue *= (pPlanet.getPlanetSize() + 4)
# VALUE/ORDER OF PLANETS:
# Planet 3,1,2,2 = 1400 (Earth Mid)
# Planet 2,2,1,3 = 1380 (Yellow Large)
# Planet 2,2,1,2 = 1150 (Yellow Mid)
# Planet 3,1,2,1 = 1120 (Earth Small)
# Planet 2,0,3,3 = 1080 (Sugar Large)
# Planet 1,2,3,3 = 1050 (Copper Large)
# Planet 1,1,6,3 = 1020 (Gold Large)
# Planet 2,0,3,2 = 900 (Sugar Mid)
# Planet 1,2,3,2 = 875 (Copper Mid)
# Planet 1,1,6,2 = 850 (Gold Mid)
# Planet 0,3,3,3 = 810 (Stone Large)
# Planet 0,2,5,3 = 720 (Blue Large)
# Planet 0,3,3,2 = 675 (Stone Mid)
# Planet 0,2,5,2 = 600 (Blue Mid)
iValue = ( (pPlanet.getBaseYield(0) * 150) + (pPlanet.getBaseYield(1) * 35) + (pPlanet.getBaseYield(2) * 10) )
iValue *= (pPlanet.getPlanetSize() + 8)
# VALUE/ORDER OF PLANETS:
# Planet 3,1,2,2 = 4545 (Earth Mid)
# Planet 3,1,2,1 = 4040 (Earth Small)
# Planet 2,2,1,3 = 3800 (Yellow Large)
# Planet 2,2,1,2 = 3420 (Yellow Mid)
# Planet 2,0,3,3 = 3300 (Sugar Large)
# Planet 2,0,3,2 = 2970 (Sugar Mid)
# Planet 1,2,3,3 = 2500 (Copper Large)
# Planet 1,1,6,3 = 2450 (Gold Large)
# Planet 1,2,3,2 = 2250 (Copper Mid)
# Planet 1,1,6,2 = 2205 (Gold Mid)
# Planet 0,3,3,3 = 1350 (Stone Large)
# Planet 0,3,3,2 = 1215 (Stone Mid)
# Planet 0,2,5,3 = 1200 (Blue Large)
# Planet 0,2,5,2 = 1080 (Blue Mid)
# Set the default selected & building planet to the best one
pBestPlanet = pSystem.getPlanetByIndex(getBestPlanetInSystem(pSystem))
pSystem.setSelectedPlanet(pBestPlanet.getOrbitRing())
pSystem.setBuildingPlanetRing(pBestPlanet.getOrbitRing())
I have gotten back into Civ and love the FFmod. However...
At some point in my games (playing at Prince level), all my systems stop accumulating overflow production. I don't think it is related to the Monarchy civic. Thoughts?