[R&F] How is river flow and direction indicated in a map script?

Craig_Sutter

Deity
Joined
Aug 13, 2002
Messages
2,769
Location
Calgary, Canada
I am relatively new to Civ 6 modding. I was quite familiar with Civ V and am now trying to move some of my Civ V maps to Civ 6.

I have been using some of the utilities provided by modders to translate my maps to Civ V and it has worked very well for the most part... however, I am having a problem with rivers.

While the rivers show up quite well in worldbuilder, many of them do not show up in game. I suspect that this may be because the river flows of hexsides may be going opposite directions or there is some sort of conflicts with the direction of flow. In game, where there should be rivers, there are instead what I think are river sources at the hex corners.

So, I need to look at the flow and direction of the river hexsides to determine if this is what is happening. i have tried to redo the rivers in worldbuilder, but I am still getting the same problem, so I figure I will alter the mapscript directly.

Can someone help me by indicating where the riversides are shown in the entry for a hex? A typical entry goes thus:

MapToConvert[21][1]={"TERRAIN_DESERT_HILLS",-1,"CONTINENT_OCEANIA",{{0,-1},{0,-1},{0,-1}},{-1,1},{0,0,0}}

Now, I do not know which part of the entry would indicate a river (I do not even know if this hex has such an entry). Is it the {0,0,0} part (which I take to mean there is no river? If so, how is the hex side and direction of flow indicated?

Much appreciated... I will have many other questions, I think, as I move forward on my map conversions.
 
For Civ6 import code:
Code:
MapToConvert[x][y] = {civ6TerrainType, civ6FeatureTypes, civ6ContinentType, {{IsNEOfRiver, RiverSWFlowDirection}, {IsWOfRiver, RiverEFlowDirection}, {IsNWOfRiver, RiverSEFlowDirection}}, {Civ6ResourceType, num}, {IsNEOfCliff, IsWOfCliff, IsNWOfCliff} }

For Civ5 import code:
Code:
MapToConvert[x][y] = {civ5TerrainType, civ5PlotTypes, civ5FeatureTypes, civ5ContinentType, {{IsNEOfRiver, RiverSWFlowDirection}, {IsWOfRiver, RiverEFlowDirection}, {IsNWOfRiver, RiverSEFlowDirection}}, {Civ5ResourceType, num} }
 
For Civ6 import code:
Code:
MapToConvert[x][y] = {civ6TerrainType, civ6FeatureTypes, civ6ContinentType, {{IsNEOfRiver, RiverSWFlowDirection}, {IsWOfRiver, RiverEFlowDirection}, {IsNWOfRiver, RiverSEFlowDirection}}, {Civ6ResourceType, num}, {IsNEOfCliff, IsWOfCliff, IsNWOfCliff} }

Is it compatible with Vanilla?
 
This code is used by the YnAMP mod to store map data, it's not part of the base game.

If you're asking about YnAMP compatibility with the vanilla game, yes it is.
 
Back
Top Bottom