I am having an issue where the annoucment will say, for example '... event has opened at S21'
... but it's actually in S20.
Each annoucment is off by one grid. Any ideas?
I am having an issue where the annoucment will say, for example '... event has opened at S21'
... but it's actually in S20.
Each annoucment is off by one grid. Any ideas?
Thank Nivex, at least I know now its not something I've done with config.
Another quick query - is it possibe to change the [XXm] on the Vendor title for event on the map? I'd like to change it to [XXmins] or something similar, as people confuse this for METERS when its MINUTES.
Most plugins use a scaling factor of 150 to divide game coordinates into grid tags. The scaling factor is actually closer to 145.
Note: The 145 value was accurate prior to the new map generator going live. I haven't confirmed that 145 is still valid.
I think the actual grid size is 146.3fWhiteDragon
Most plugins use a scaling factor of 150 to divide game coordinates into grid tags. The scaling factor is actually closer to 145.
Note: The 145 value was accurate prior to the new map generator going live. I haven't confirmed that 145 is still valid.
private string GetGridString(Vector3 position)
{
int maxGridSize = Mathf.FloorToInt(World.Size / 146.3f) - 1;
int xGrid = Mathf.Clamp(Mathf.FloorToInt((position.x + (World.Size / 2f)) / 146.3f), 0, maxGridSize);
string extraA = string.Empty;
if (xGrid > 26) extraA = $"{(char) ('A' + (xGrid / 26 - 1))}";
return $"{extraA}{(char) ('A' + xGrid % 26)}{Mathf.Clamp(maxGridSize - Mathf.FloorToInt((position.z + (World.Size / 2f)) / 146.3f), 0, maxGridSize).ToString()}";
}