I found how to fully remove these "yellow" circles.
I have to start from my first error. These circles only looks like "yellow" (
COLOR_YELLOW). The game's colors are summarized in CIV4ColorVals.xml. For COLOR_YELLOW we have
Code:
<ColorVal>
<Type>COLOR_YELLOW</Type>
<fRed>1.00</fRed>
<fGreen>1.00</fGreen>
<fBlue>0.00</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
Now if we open
RGB Color Codes Chart and apply the values from CIV4ColorVals.xml for Red, Green and Blue channels we will see exacly the same color as our "yellow" circles in
my previous post.
Now a simple question: Does it means that these circles are really "COLOR_YELLOW"?
Funny, but correct answer will be NO!
CIV4ColorVals.xml have the
second color that have exactly the same combination of Red, Green and Blue channels. This color is "
COLOR_HIGHLIGHT_TEXT":
Code:
<ColorVal>
<Type>COLOR_HIGHLIGHT_TEXT</Type>
<fRed>1.00</fRed>
<fGreen>1.00</fGreen>
<fBlue>0.00</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
The absolutely similar combination of Red, Green and Blue channels for both COLOR_YELLOW and COLOR_HIGHLIGHT_TEXT means that they looks the same on the screen. Thus, my first error was the
wrong color name.
From this follows my second error in the search of place in source codes responsible for these "yellow" circles. I seached "
COLOR_YELLOW" and found
the wrong place in CvGame.cpp.
The correct place is located also in CvGame.cpp:
Code:
iRange = 4;
for (iDX = -(iRange); iDX <= iRange; iDX++)
{
for (iDY = -(iRange); iDY <= iRange; iDY++)
{
pLoopPlot = plotXY(pHeadSelectedUnit->getX_INLINE(), pHeadSelectedUnit->getY_INLINE(), iDX, iDY);
if (pLoopPlot != NULL)
{
if (pLoopPlot->isVisible(pHeadSelectedUnit->getTeam(), false))
{
if ((pLoopPlot->area() == pHeadSelectedUnit->area()) || pLoopPlot->isAdjacentToArea(pHeadSelectedUnit->area()))
{
if (pHeadSelectedUnit->canFound(pLoopPlot))
{
if (pLoopPlot->isBestAdjacentFound(pHeadSelectedUnit->getOwnerINLINE()))
{
[COLOR="Red"] gDLL->getEngineIFace()->addColoredPlot(pLoopPlot->getX_INLINE(), pLoopPlot->getY_INLINE(), GC.getColorInfo((ColorTypes)GC.getInfoTypeForString("COLOR_HIGHLIGHT_TEXT")).getColor(), PLOT_STYLE_CIRCLE, PLOT_LANDSCAPE_LAYER_RECOMMENDED_PLOTS);[/COLOR]
}
}
if (plotDistance(pHeadSelectedUnit->getX_INLINE(), pHeadSelectedUnit->getY_INLINE(), pLoopPlot->getX_INLINE(), pLoopPlot->getY_INLINE()) <= iRange)
{
if (pLoopPlot->isVisible(pHeadSelectedUnit->getTeam(), false))
{
if (pHeadSelectedUnit->isNoBadGoodies())
{
if (pLoopPlot->isRevealedGoody(pHeadSelectedUnit->getTeam()))
{
gDLL->getEngineIFace()->addColoredPlot(pLoopPlot->getX_INLINE(), pLoopPlot->getY_INLINE(), GC.getColorInfo((ColorTypes)GC.getInfoTypeForString("COLOR_HIGHLIGHT_TEXT")).getColor(), PLOT_STYLE_CIRCLE, PLOT_LANDSCAPE_LAYER_RECOMMENDED_PLOTS);
}
}
}
}
}
}
}
}
}
Now I found the correct place where these "yellow circles" are described. Here our unit is looking for the best place to found a new city.
Few line above I see the condition when these circles can appear:
Code:
else if (pHeadSelectedUnit != NULL)
{
FAssert(getActivePlayer() != NO_PLAYER);
[COLOR="Red"]if (!(GET_PLAYER(getActivePlayer()).isOption(PLAYEROPTION_NO_UNIT_RECOMMENDATIONS)))[/COLOR]
And here the key point:
Code:
if (!(GET_PLAYER(getActivePlayer()).isOption([COLOR="Red"][B]PLAYEROPTION_NO_UNIT_RECOMMENDATIONS[/B][/COLOR])))
Now I go to Options and see that "No Unit Action Recommendations" button is disactivated. This means that "yellow circles" are visible:
When I activate "No Unit Action Recommendations" button, these circles disappear:
Thus, I could fully remove these annoying circles, however the problem with threshold still actial, especially when I radically change each tile productivity.
I have been thinking a bit about those circles. I think the real solution is to modify the threshold. Either the threshold should be set in XML where modders can change the value until "it feels right" or it could be some advanced calculation where the map is analysed and calculates the needed threshold, which will place circles on X% of the plots.
Just disabling the GUI for it is removing the symptom of the problem rather than the real problem. Humans can figure out to ignore the circles, but the AI can't. This mean the real problem will be AI starting to place cities a lot worse than it used to.