In the Party and Raid Frames you show OOR for players who are out of range of my character. What value is the distance that is considered "out of range" and which lua file would I need to modify if I wanted to change this value?
BTW, thank for the fantastic interface. Knowing its on your to-do list, I'm looking forward to the time that the characters are sorted in the raid frame is a logical manner.
I've moved this over into the developer chat thread as it's not actually modifying the layout as a customization you can make... it modifying core code and, frankly, really can't be done in a logic sense.
On your action bars there's no "value" for what out of range is, it's actually determined by the Bliz IsActionInRange() API method call which returns true/false for whether or not the action is currently within range of the target.
On the unit frames, that's more complicated. Any unit which is not in the same zone is by definition, out of range. Any unit which is more than 100 yards away is by definition, out of range. After that it turns into black magic and can only be determined by looking to see what spells you have that can be used on the unit and what their min and max ranges are.
If the unit is in range of the usable spell, then we know their distance to be between that min and max. I have to spin the list of spells you know and keep adjusting the min and max to try and narrow down the range and guess because Bliz does not offer a real, discrete, way to determine distance to a unit. So I can only assume the unit is somewhere between the greatest minimum distance that I found a usable spell for and the smallest maximum distance. If I can't find any spell you can use on the unit, I have to assume it's because it is out of range of all of your spells and it gets flagged as out of range. It is not an exact science. but there's still no magic number.
If you look at the code in [ Interface > AddOns > nUI > Units > nUI_UnitStatus.lua ] you'll see on line 233 where I flag the unit as out of range if the distance to the unit is over 40 yards... that's because the only way the distance can be known over 40 yards is if the unit is in a different zone, is not loaded by Bliz (over 100 yards away) or you have no spells that you can use on the unit. If the distance to the unit is less than or equal to 40 yards, it can only be because you have spells you can use on it and therefore it is by definition in range.
What people don't get is that I am, ultimately, an artist at heart. My brush has two colors, 1 and 0, and my canvas is made of silicon.
Through a quick test last night I figured you were using a value around 40 yards for the OOR indicator.
The reason I'm interested is that as a Feral Druid there are rare cases in a raid where I need to do one of a couple of things, i.e. Dispell poisions and curses, battle rez someone or put my Intervate on a caster. All of these feasures have a 30 yard range.
Currently I have Grid that displays when a player is over 30 yards away and if they have a poison, curse or are dead. The unit frames in nUI has the necessary function so I can remove Grid if I can change the range to 30 yards. When I get home I'll modify the lua file you mentioned and hopefully either get rid of Grid or maybe I'll get the addon to intergrate into the info-panel just in case I need it for something else. I prefer to have Omen up while I'm in combat so I done grab aggro from the tank.
It will be interesting to hear if you manage to do this. As Scott said, there isn't really a way to find the distance to a target in WoW. Blizzard removed that for a number of reasons a long time ago. The best you can do is find out if a target is within any spell range as Scott points out.
I wonder how Grid is doing this. Or if it is some magic like Scott's that gives the illusion of knowing the range when all it really knows is that it is within a set of ranges depending on the particular spells your character has.
I would say that Grid has a way to see if the player is within a certain range because I can pick boxes for ranges like 10 yards, 25 yard, 30 yards, etc. What I did was have it display on the second line of center text the range value and I picked the box for 30 yards.