JediClemente
Prince
This idea was originally mentioned in some discussion about RFC:Antiquity, and has the modmod in mind, that's why I post it here.
Typically, you can define the minimal distance between cities in GlobalDefines.xml. Both RFC and RFCE set that value to "1".
Now for RFC:Antiquity, all regions shouldn't have the same concentration of cities (Greece and the Levant should have a lot in a few plots; the far extenses of the Roman and Persian empires should have very few).
So I want 3 different "minimal distances" of 1, 2 and 3 for different regions of the map.
I look at Python and it doesn't seem like it can be done there. In the SDK? Yes. There are two instances in the C++ code where the variable from GlobalDefines.xml is read. I probed this for RFCE:
3 minimal distance for Northwestern Africa, 2 for Russia and 1 for the rest of the map.
You just have to look for this line
And change it in CvPlayer.cpp
and in CvDLLWidgetData.cpp:
It's quite simple. I've tested it, and it works!
Don't know if the idea can be applied to RFCE or regular RFC, but I'll certainly try to use it for RFC:A if everyone's OK with that.
Typically, you can define the minimal distance between cities in GlobalDefines.xml. Both RFC and RFCE set that value to "1".
Now for RFC:Antiquity, all regions shouldn't have the same concentration of cities (Greece and the Levant should have a lot in a few plots; the far extenses of the Roman and Persian empires should have very few).
So I want 3 different "minimal distances" of 1, 2 and 3 for different regions of the map.
I look at Python and it doesn't seem like it can be done there. In the SDK? Yes. There are two instances in the C++ code where the variable from GlobalDefines.xml is read. I probed this for RFCE:
3 minimal distance for Northwestern Africa, 2 for Russia and 1 for the rest of the map.
You just have to look for this line
Code:
iRange = GC.getMIN_CITY_RANGE();
And change it in CvPlayer.cpp
Code:
// JediClemente start **
// dynamic CITY_RANGE (that is, allowed distance between cities dependant on position)
// will take the mininum from GlobalDefines.xml
// point is to have some places in the map crowded with cities and others not so much
if(pPlot->getX_INLINE() < 46 && pPlot->getY_INLINE() < 22){ // Northwestern Africa will have as few cities as possible
iRange = GC.getMIN_CITY_RANGE() + 2;
}
else if(pPlot->getX_INLINE() > 77 && pPlot->getY_INLINE() > 48){ // Russia will have less than normal
iRange = GC.getMIN_CITY_RANGE() + 1;
}
else{ // the usual for the rest of the map
iRange = GC.getMIN_CITY_RANGE();
}
// JediClemente end **
// original line here:
//iRange = GC.getMIN_CITY_RANGE();
and in CvDLLWidgetData.cpp:
Code:
// JediClemente start **
// dynamic CITY_RANGE (that is, allowed distance between cities dependant on position)
// will take the mininum from GlobalDefines.xml
// point is to have some places in the map crowded with cities and others not so much
if(pMissionPlot->getX_INLINE() < 46 && pMissionPlot->getY_INLINE() < 22){ // Northwestern Africa will have as few cities as possible
iRange = GC.getMIN_CITY_RANGE() + 2;
}
else if(pMissionPlot->getX_INLINE() > 77 && pMissionPlot->getY_INLINE() > 48){ // Russia will have less than normal
iRange = GC.getMIN_CITY_RANGE() + 1;
}
else{ // the usual for the rest of the map
iRange = GC.getMIN_CITY_RANGE();
}
// JediClemente end **
// original line here:
//iRange = GC.getMIN_CITY_RANGE();
It's quite simple. I've tested it, and it works!
Don't know if the idea can be applied to RFCE or regular RFC, but I'll certainly try to use it for RFC:A if everyone's OK with that.