Make water cells consistent in size
pryvyd9 opened this issue · comments
Problem
Water cells' size is inconsistent. When creating a map mod from it the unit locators are too scattered or too dense.
As you can see from the generated province/water province maps water has huge cells that I wish I could downsize to regular cell size.
I understand that the use case is very specific but it would be nice to have.
Solution
Add generation option "Consistent cells"
This ocean cell merging is done to reduce resource consumption. You could export the [grid cells] element and read the vertexes from there as a workaround.
I currently read cells from cell geojson. Do vertices from grid cells not match those in geojson?
I currently read cells from cell geojson. Do vertices from grid cells not match those in geojson?
Ocean cells don't. The GeoJson uses the [Pack Cells] element, as far as I can recall. Hence the merged cells.
what do p,v,c stand for in vertices?
{"i": 90,"p": [819,377],"v": [119,111,30],"c": [363,362,402]},
In order:
grid.vertices.p: number[][] - vertices coordinates [x, y], integers
grid.cells.v: number[][] - indexes of vertices of each cell
grid.cells.c: number[][] - indexes of cells adjacent to each cell (neighboring cells)
You can check these at https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Data-model
Thank you! I'll give it a try.
As @DeuzeksMcKinna said, it was done intentionally to save resources. However you can create a fork that wont have it, look at reGraph
function in main.js
, you can remove the restrictions.