View Feature Request
Changes to maximal visible distance
Feature #: 206
File: CustomCompassPins
Date: 04/26/14 02:05 PM
By: Garkin
Status: Under Review
I was wondering if you can do some changes to maximal visible distance.

This distance looks different on every map - in Cyrodiil you can see compass pins for objects very far away, but in contrast on small maps like dungeons you must be very close to see them.

So, can you multiply this visible distance by some coefficient that depends on map size?

How do I get map size:
Lua Code:
  1. local numTiles = GetMapNumTiles()
  2. local tileSize = ZO_WorldMapContainer1:GetTextureFileDimensions()
  3. local mapSize = numTiles * tileSize
Standard map sizes:
5120 (5x1024) - Cyrodiil
2048 (2x1024) - Zone maps such as Auridon, Stonefalls, Glenumbra...
1536 (3x512) - Starting islands and some towns (Bleakrock Isle)
1280 (5x256) - Towns (Elden Root, ...)
768 (3x256) - Dungeon maps

I came up with this coefficient, but maybe you can find something better:
Lua Code:
  1. distanceCoefficient = 2048/mapSize
This coefficient has to be updated every time you change map. I was playing around and found out that event EVENT_ZONE_CHANGED is triggered before is map is actually changed, so it cannot be used.
I have registered library for EVENT_QUEST_POSITION_REQUEST_COMPLETE and it seems it works as intended.
Also calling self:RefreshPins() from function registered for this event solves issue with compass markers that belongs to different zone.

This is CustomCompassPins.lua with proposed changes: http://pastebin.com/Tx696Rh3

RSS 2.0 Feed for Favorite CommentsNotes Sort Options
By: Shinni - 04/26/14 02:49 PM
ha thanks!
this fixes a a bunch of other problems i had with my harvest addon as well

I'll include these changes.