MagisterCultuum
Great Sage
Rhye used both python and C++
It isn't hard to run a python function that boosts the yields of peaks. All you'd have to do is place something like
in the def onGameStart(self, argsList): define in CvEventManager.py (this code will successfully give all peaks 2 hammers and 1 commerce. I said "like" because you may want different yields)
It might slow the game while loading, but since it is only done once it shouldn't slow things down any more than using the End of Winter option. Actually, it would probably be faster, since there is no random number generation for each plot involved.
If you only wanted one civ (probably Khazad) to get the bonus, things would get a lot more complex. I'm not sure how Rhye did it, since he added things to the DLL and I don't have the C++ source files. I'd probably run code similar the above whenever cultural borders change, boosting peaks in Khazad territory and reducing it elsewhere. Of course, this could really sow things down though, and is probably not the best approach.
You could also tie this to a (probably World) Spell or the completion of a building or Ritual if you prefer, as I did in earlier versions. In this case, you'd probably boost all peaks in the civ's territory at the time.
If you want, you could also place resources, improvements, and roads on the peaks in the same place. (This would probably be done using a random number generator, and either lists or lots of if statements) (I've had some trouble placing roads, but I'm not sure why. If you change the bWater tag for ppeaks to a 0 though, then workers with the ability tom move impassible can build roads there. I'm not sure why this works but improvements don't)
A spell like Delve would work the same way, but would only effect the caster's tile instead of cycling though the entire map. Thus it would be much faster and more efficient. (Although it would need a python prereq to make sure the terrain in a peak)
It isn't hard to run a python function that boosts the yields of peaks. All you'd have to do is place something like
Code:
for i in range (CyMap().numPlots()):
pPlot = CyMap().plotByIndex(i)
if pPlot.isPeak():
CyGame().setPlotExtraYield(pPlot.getX(), pPlot.getY(), YieldTypes.YIELD_PRODUCTION, 2)
CyGame().setPlotExtraYield(pPlot.getX(), pPlot.getY(), YieldTypes.YIELD_COMMERCE, 1)
It might slow the game while loading, but since it is only done once it shouldn't slow things down any more than using the End of Winter option. Actually, it would probably be faster, since there is no random number generation for each plot involved.
If you only wanted one civ (probably Khazad) to get the bonus, things would get a lot more complex. I'm not sure how Rhye did it, since he added things to the DLL and I don't have the C++ source files. I'd probably run code similar the above whenever cultural borders change, boosting peaks in Khazad territory and reducing it elsewhere. Of course, this could really sow things down though, and is probably not the best approach.
You could also tie this to a (probably World) Spell or the completion of a building or Ritual if you prefer, as I did in earlier versions. In this case, you'd probably boost all peaks in the civ's territory at the time.
If you want, you could also place resources, improvements, and roads on the peaks in the same place. (This would probably be done using a random number generator, and either lists or lots of if statements) (I've had some trouble placing roads, but I'm not sure why. If you change the bWater tag for ppeaks to a 0 though, then workers with the ability tom move impassible can build roads there. I'm not sure why this works but improvements don't)
A spell like Delve would work the same way, but would only effect the caster's tile instead of cycling though the entire map. Thus it would be much faster and more efficient. (Although it would need a python prereq to make sure the terrain in a peak)