stingo
Chieftain
In handicap xml there is a parameter called iStartingLocationPercent. The value is low for Settler difficulty and high for Diety. According to logic in CvGame::assignStartingPlots it makes it so that human player can get preference to choose starting location. The lower the parameter the high priority player gets. This is expected, however later in code it essentially removes this advantage and gives random spot to the human player... In the
line 959 in CvGame.cpp it passes True to the function, which makes choosing plot random instead of the best one. It seems to be a bug or possibly disabled intentionally. I think correctly it should pass False instead of True for human player in this line (959) if we want to utilize the effect of iStartingLocationPercent parameter instead of complete randomness. GET_PLAYER((PlayerTypes)iI).setStartingPlot(GET_PLAYER((PlayerTypes)iI).findStartingPlot(), true);
agree or I am missing something?
Edit: There is more to this. The last loop in assignStartingPlots does not make sense. All plots have been assigned earlier but it does it again and also reset to be random for human player again. The entire implementation of assigning plots is terrible. Also this kind of code makes me wonder ...
bValid = true;
if (bValid)
{
iBestValue = iValue;
pBestPlot = pLoopPlot;
}
line 959 in CvGame.cpp it passes True to the function, which makes choosing plot random instead of the best one. It seems to be a bug or possibly disabled intentionally. I think correctly it should pass False instead of True for human player in this line (959) if we want to utilize the effect of iStartingLocationPercent parameter instead of complete randomness. GET_PLAYER((PlayerTypes)iI).setStartingPlot(GET_PLAYER((PlayerTypes)iI).findStartingPlot(), true);
agree or I am missing something?
Edit: There is more to this. The last loop in assignStartingPlots does not make sense. All plots have been assigned earlier but it does it again and also reset to be random for human player again. The entire implementation of assigning plots is terrible. Also this kind of code makes me wonder ...
bValid = true;
if (bValid)
{
iBestValue = iValue;
pBestPlot = pLoopPlot;
}