<Nexus>
Traveler of the Multiverse
Found it meanwhile
<TerrainArtInfo>
<Type>ART_DEF_TERRAIN_COAST</Type>
<Path>Art/Terrain/Textures/CoastBLEND.dds</Path>
<Grid>Art/Terrain/Textures/CoastGRIDS.dds</Grid>
<Detail>Art/Terrain/Textures/CoastDetail.dds</Detail>
<Button>,Art/Interface/Buttons/BaseTerrain_TerrainFeatures_Atlas.dds,1,1</Button>
<LayerOrder>50</LayerOrder>
<TerrainGroup>TERRAIN_GROUP_COAST</TerrainGroup>
<TextureBlend01>1,180 5,270 9,180 13,270 17,180 21,270 26,270</TextureBlend01>
<TextureBlend02>1,270 5,0 9,270 13,0 17,270 21,0 26,0</TextureBlend02>
<TextureBlend04>1,0 5,90 9,0 13,90 17,0 21,90 26,90</TextureBlend04>
<TextureBlend08>1,90 5,180 9,90 13,180 17,90 21,180 26,180</TextureBlend08>
<TextureBlend03>3,0 7,180 11,0 15,180 19,0 23,180 27,0 31,180</TextureBlend03>
<TextureBlend06>3,90 7,270 11,90 15,270 19,90 23,270 27,90 31,270</TextureBlend06>
<TextureBlend12>3,180 7,0 11,180 15,0 19,180 23,0 27,180 31,0</TextureBlend12>
<TextureBlend09>3,270 7,90 11,270 15,90 19,270 23,90 27,270 31,90</TextureBlend09>
<TextureBlend07>4,0 8,270 12,0 16,270 20,0 24,270 28,0 32,270</TextureBlend07>
<TextureBlend14>4,90 8,0 12,90 16,0 20,90 24,0 28,90 32,0</TextureBlend14>
<TextureBlend13>4,180 8,90 12,180 16,90 20,180 24,90 28,180 32,90</TextureBlend13>
<TextureBlend11>4,270 8,180 12,270 16,180 20,270 24,180 28,270 32,180</TextureBlend11>
<TextureBlend10>2,0 6,90 10,0 14,90 18,0 22,90 </TextureBlend10>
<TextureBlend05>2,90 6,0 10,90 14,0 18,90 22,0 </TextureBlend05>
<TextureBlend15>29,0 </TextureBlend15>
</TerrainArtInfo>
<TerrainArtInfo>
<Type>ART_DEF_TERRAIN_RIVER</Type>
<Path>Art/Terrain/Textures/RiverBLEND.dds</Path>
<Grid>Art/Terrain/Textures/RiverGrids.dds</Grid>
<Detail>Art/Terrain/Textures/RiverDetail.dds</Detail>
<Button>,Art/Interface/Buttons/BaseTerrain/Coast.dds,Art/Interface/Buttons/BaseTerrain_TerrainFeatures_Atlas.dds,1,1</Button>
<LayerOrder>50</LayerOrder>
<AlphaShader>0</AlphaShader>
<TextureBlend01>1,180 5,270 9,180 13,270 17,180 21,270 26,270</TextureBlend01>
<TextureBlend02>1,270 5,0 9,270 13,0 17,270 21,0 26,0</TextureBlend02>
<TextureBlend04>1,0 5,90 9,0 13,90 17,0 21,90 26,90</TextureBlend04>
<TextureBlend08>1,90 5,180 9,90 13,180 17,90 21,180 26,180</TextureBlend08>
<TextureBlend03>3,0 7,180 11,0 15,180 19,0 23,180 27,0 31,180</TextureBlend03>
<TextureBlend06>3,90 7,270 11,90 15,270 19,90 23,270 27,90 31,270</TextureBlend06>
<TextureBlend12>3,180 7,0 11,180 15,0 19,180 23,0 27,180 31,0</TextureBlend12>
<TextureBlend09>3,270 7,90 11,270 15,90 19,270 23,90 27,270 31,90</TextureBlend09>
<TextureBlend07>4,0 8,270 12,0 16,270 20,0 24,270 28,0 32,270</TextureBlend07>
<TextureBlend14>4,90 8,0 12,90 16,0 20,90 24,0 28,90 32,0</TextureBlend14>
<TextureBlend13>4,180 8,90 12,180 16,90 20,180 24,90 28,180 32,90</TextureBlend13>
<TextureBlend11>4,270 8,180 12,270 16,180 20,270 24,180 28,270 32,180</TextureBlend11>
<TextureBlend10>2,0 6,90 10,0 14,90 18,0 22,90 </TextureBlend10>
<TextureBlend05>2,90 6,0 10,90 14,0 18,90 22,0 </TextureBlend05>
<TextureBlend15>29,0 </TextureBlend15>
</TerrainArtInfo>
The answer to that one lies in CvUnit::canMoveInto() and Cvplot::movementCost(). Both are performance critical meaning the decision to be to use whatever will be expected to perform the best. No, I did not examine those two functions closely enough to provide an answer right now. We might also consider proposal 270, which has to do with boosting performance of canMoveInto() by building a cache in each unit and plot.He had also added a Terrain "River Ford".
Not sure if we should use this or if it should better be a TerrainFeature.
That was my initial idea too.Maybe we should really try to create new "normal Terrain graphics" for Large Rivers instead.
Using "Coast Terrain graphics" and trying to adapt them might be a start.
void CvMapGenerator::setPlotTypes(const int* paiPlotTypes)
{
CvPlot* pLoopPlot;
int iNumPlots;
iNumPlots = GC.getMapINLINE().numPlotsINLINE();
for (int iI = 0; iI < iNumPlots; iI++)
{
gDLL->callUpdater();
GC.getMapINLINE().plotByIndexINLINE(iI)->setPlotType(((PlotTypes)(paiPlotTypes[iI])), false, false);
}
GC.getMapINLINE().recalculateAreas();
for (int iI = 0; iI < iNumPlots; iI++)
{
gDLL->callUpdater();
pLoopPlot = GC.getMapINLINE().plotByIndexINLINE(iI);
if (pLoopPlot->isWater())
{
if (pLoopPlot->isAdjacentToLand())
{
pLoopPlot->setTerrainType(((TerrainTypes)(GC.getDefineINT("SHALLOW_WATER_TERRAIN"))), false, false);
}
else
{
pLoopPlot->setTerrainType(((TerrainTypes)(GC.getDefineINT("DEEP_WATER_TERRAIN"))), false, false);
}
}
}
}
<Define>
<DefineName>LARGE_RIVER_TERRAIN</DefineName>
<DefineTextVal>TERRAIN_LARGE_RIVER</DefineTextVal>
</Define>
Thinking about this, I will say it should likely be a feature. The reason is we can make promotions provide half movement cost in certain features (used for forests). By making "River Ford" a feature, we can make a promotion, which makes a unit twice as fast when crossing rivers. If we should do it is another question as it's related to game balance, but for now I think we should stick to the technical solution, which allows the creation of the promotion.He had also added a Terrain "River Ford".
Not sure if we should use this or if it should better be a TerrainFeature.
We could also create promotions with Combat Modifiers or whatever.By making "River Ford" a feature, we can make a promotion, which makes a unit twice as fast when crossing rivers.
What if two large rivers join into one? That means at least one plot with three neighboring LR plots.There are actually only a couple for possibilities for identifiying "Large Rivers" by its adjacent plots.
(But again, as written above, I need to check more conditions.)
The center is always Middle (on Keypad: 5).
The possibilities below that I need to check for the the adjacent plots:
If there are more than those 2 (of those) adjacent plots being Water, it is not a Large River Plot anymore.
- N+S (on Keypad: 8+2) --> River flows straight vertical
- W + E (on Keypad: 4+6) --> River flows straight horizontal
- S+E (on Keypad: 2+6) --> River makes an South-East turn
- S+W (on Keypad: 2+4) --> River makes an South-West turn
- N+E (on Keypad: 8+6) --> River makes an North-East turn
- N+W (on Keypad: 8+4) --> River makes an South-West turn
(It is already a Plot in a small lake or at the coast or in the ocean.)