VoiceOfUnreason
Deity
- Joined
- Dec 5, 2005
- Messages
- 3,663
Note: I discovered this in BTS 3.13, but it appears to be present in all versions, and has been for some time. Moderator, please move this report if it is more appropriate to another forum.
The BonusBalancer.normalizeAddExtras method in CvMapGeneratorUtil.py places the strategic resources by scanning the plots in a predictable order.
As a result, players who are familiar with the order that the plots are scanned can anticipate the precise location of those resources before they are revealed.
The most straight forward method for eliminating the problem is to random.shuffle(plots) after the array of plots is constructed, but before iterating through them.
The BonusBalancer.normalizeAddExtras method in CvMapGeneratorUtil.py places the strategic resources by scanning the plots in a predictable order.
As a result, players who are familiar with the order that the plots are scanned can anticipate the precise location of those resources before they are revealed.
The most straight forward method for eliminating the problem is to random.shuffle(plots) after the array of plots is constructed, but before iterating through them.
Code:
plots = [] # build a list of the plots near the starting plot
for dx in range(-5,6):
for dy in range(-5,6):
x,y = startx+dx, starty+dy
pLoopPlot = self.map.plot(x,y)
if not pLoopPlot.isNone():
plots.append(pLoopPlot)
resources_placed = []
for pass_num in range(4):
bIgnoreUniqueRange = pass_num >= 1
bIgnoreOneArea = pass_num >= 2
bIgnoreAdjacent = pass_num >= 3
for bonus in range(self.gc.getNumBonusInfos()):
type_string = self.gc.getBonusInfo(bonus).getType()
if (type_string not in resources_placed) and (type_string in self.resourcesToBalance):
for (pLoopPlot) in plots: