seed is required for proc gen maps, which is what I would be testing on. not going to bother with custom maps
Grid results not correct
nivexseed is required for proc gen maps, which is what I would be testing on. not going to bother with custom maps
"+server.level" "Procedural Map" "+server.seed" "1289294200" "+server.worldsize" "4000"
This needed a -1.
I'll keep poking about looking for others that dont need it
I've been trying to get this fixed with Inbound for a while now, but haven't been able to. I'm going to file a bug report, but this seems like the best place to post this info.
-----
There are two problems with the grids currently:
1. The actual grid squares are not the same size on every map, and there's no good way of calculating them
2. The visual grid in the in-game map is not accurate
When looking at the map in-game, the grid squares are always 146.3 in size. In reality, they vary. This is why the labels overlap, to the point of some maps being off by an entire row. They all get pushed down one when this happens, which is why the -1 is necessary for some map sizes. A0 is actually A1, etc.
Take the default map size (4500), for example: [image]
You can see there are 31 labeled X columns and 30 labeled Z rows. In reality, there are 31 of each. The grid is a square, so these should always be the same number. You can verify this with (TerrainMeta.Position.x, TerrainMeta.Position.z), which will give you the grid's starting point at the bottom left.
With this you can get all four corners of the actual grid: [image]
You can verify that this is the edge by using TerrainMeta.OutOfBounds(player.transform.position), which returns true immediately beyond these corners.
This is also exactly where the top grid labels cut off: [image]
This is roughly what the actual 4500 grid looks like: [image]
The square size for these is about 145.2
For a 1000 map, it's about 142.9: [image]
Interestingly, the mobile app shows the accurate grid: [image]
As you can see, there's a missing row in-game, the others have been pushed down, and the cut off grid labels once again line up with the actual edge of the grid.
Unfortunately, this is something Facepunch will have to fix. The simplest way would be to make the in-game grid match the one in the mobile app. However, this still leaves us with the issue of different grid square sizes for each map size and no good way of calculating them. If they could add a variable for grid square size and/or number of columns/rows, that would solve this issue. A better way would be to make all grid squares the same size and make sure everything is lined up accurately in the map. Either one is better than what we have now.
I think they'll have to fix this eventually, because they've attempted to add a grid formula of their own for use with phones (PhoneController.PositionToGridCoord), which doesn't work for the reasons listed above.
Hopefully they care enough to fix it, because the grid system is extremely useful, and a lot of plugins rely on it.
thanks for this thorough investigation.
Did this one ever get picked up by Facepunch?
XibalbusDid this one ever get picked up by Facepunch?
Nope. I reported it a couple times, but got no response. My solution was to just add a manual 'grid offset' option, for those who need it. Most standard map sizes (aside from 3500) require the -1, so I left that default in my plugins.
- 1
- 2