Quantcast
Download
(5 Kb)
Download
Updated: 07-19-16 09:38 PM
Pictures
File Info
Compatibility:
Legion Pre-Patch (7.0.3)
Updated:07-19-16 09:38 PM
Created:06-07-14 09:21 AM
Downloads:1,800
Favorites:13
MD5:
Categories:Unit Mods, Graphic UI Mods
7.0.3

Crosshairs

Version: 0.3
by: semlar [More]

Adds an animated crosshair to your target's nameplate for better visibility.

Removed leftover cvar script for locking the camera to your target.
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
0
34kB
semlar
06-07-14 09:21 AM


Post A Reply Comment Options
Unread 08-23-16, 04:32 AM  
Warstryke
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Thanks Semlar, that worked perfectly

I'm running 2560x1440 btw, not sure why it gave me errors.

Thanks for all your work, it's a very handy AddOn.
Last edited by Warstryke : 08-23-16 at 04:34 AM.
Report comment to moderator  
Reply With Quote
Unread 08-22-16, 05:43 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 991
File comments: 178
Uploads: 24
Originally Posted by Warstryke
Getting the following errors with the latest version.

Code:
2x Crosshairs\Crosshairs-0.3.lua:245: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:245: in function `?'
Crosshairs\Crosshairs-0.3.lua:272: in function <Crosshairs\Crosshairs.lua:272>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
Code:
37x Crosshairs\Crosshairs-0.3.lua:249: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:249: in function `?'
Crosshairs\Crosshairs-0.3.lua:276: in function <Crosshairs\Crosshairs.lua:276>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
This error appears to be from playing the game at a resolution that it doesn't support. The addon needs to know your resolution to prevent its lines from being anti-aliased and changing their widths (pixel perfect stuff).

You can disable this feature by going to the bottom of Crosshairs.lua and removing or commenting out these 2 lines, and that should stop the errors (alternatively just pick a resolution from the dropdown menu in the interface options).
Lua Code:
  1. f:RegisterEvent('DISPLAY_SIZE_CHANGED')
  2. f:RegisterEvent('PLAYER_LOGIN')
Report comment to moderator  
Reply With Quote
Unread 08-22-16, 05:28 PM  
Warstryke
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Getting the following errors with the latest version.

Code:
2x Crosshairs\Crosshairs-0.3.lua:245: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:245: in function `?'
Crosshairs\Crosshairs-0.3.lua:272: in function <Crosshairs\Crosshairs.lua:272>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
Code:
37x Crosshairs\Crosshairs-0.3.lua:249: bad argument #1 to 'strmatch' (string expected, got nil)
[C]: in function `strmatch'
Crosshairs\Crosshairs-0.3.lua:249: in function `?'
Crosshairs\Crosshairs-0.3.lua:276: in function <Crosshairs\Crosshairs.lua:276>

Locals:
(*temporary) = nil
(*temporary) = "(%d+)x(%d+)"
(*temporary) = "string expected, got nil"
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 10:05 PM  
SaltyTemplar
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Fixed

I tried your solution and to no avail, but I browsed your code and commented out your function:

function f:PLAYER_STOPPED_MOVING()
SetCVar('CameraLockedTargetFocusing', 1)
end

starting at line 281 and it fixed the issue. Hope this helps others.

It seems that function kept resetting the focus to 1 even when you manually change it to 0.

Edit: I see now that you were saying you fixed in in your new version. so my change might be useless, regardless it will work for other versions! Thank you for the quick response though it helped me find a fix!
Last edited by SaltyTemplar : 07-19-16 at 10:10 PM.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 09:43 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 991
File comments: 178
Uploads: 24
Re: Issue with Crosshair new 7.0.3 update and Action Camera

Originally Posted by SaltyTemplar
Hello semlar,

I updated your addon today and i noticed that now the addon forces the game to have the new ActionCam feature in legion to have its focus set to on. which cause your camera to pan around the current target. With your addon if you disable it manually with /console ActionCam focusOff it will turn it off BUT if you move at all crosshairs resets it back to the focusOn. I verified this was in fact crosshairs by deleting all other addons then disabling crosshairs and could not recreate the issue. I turned crosshairs back on and the issue came back. Just wanted to let your know, and this focus mode of the Action Cam can make people quite motion sick, I sure know i couldnt raid with it.
I'm sorry, I was playing with something on the beta and must not have removed everything from the script when I uploaded it here. I've uploaded a new version without it.

Anyone who had their camera affected by it can disable the cvar by typing /console CameraLockedTargetFocusing 0
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 09:22 PM  
SaltyTemplar
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Issue with Crosshair new 7.0.3 update and Action Camera

Hello semlar,

I updated your addon today and i noticed that now the addon forces the game to have the new ActionCam feature in legion to have its focus set to on. which cause your camera to pan around the current target. With your addon if you disable it manually with /console ActionCam focusOff it will turn it off BUT if you move at all crosshairs resets it back to the focusOn. I verified this was in fact crosshairs by deleting all other addons then disabling crosshairs and could not recreate the issue. I turned crosshairs back on and the issue came back. Just wanted to let your know, and this focus mode of the Action Cam can make people quite motion sick, I sure know i couldnt raid with it.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 02:57 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 991
File comments: 178
Uploads: 24
Originally Posted by MiRai
[color=#e5e5e5]Semlar, I'm getting this error with Crosshairs now that the pre-patch is live
Should work now.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 01:50 PM  
MiRai
A Warpwood Thunder Caller

Forum posts: 93
File comments: 97
Uploads: 0
Semlar, I'm getting this error with Crosshairs now that the pre-patch is live:

Code:
Message: Interface\AddOns\Crosshairs\Crosshairs.lua:67: attempt to call method 'SetChange' (a nil value)
Time: 07/19/16 15:49:01
Count: 1
Stack: Interface\AddOns\Crosshairs\Crosshairs.lua:67: in main chunk


Locals: r = 0
g = 1
b = 0
alpha = 0.5
_ = "Crosshairs"
addon = <table> {
}
f = <unnamed> {
 GetPlateGUID = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1060
 LNR_UnregisterAllCallbacks = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1182
 GetPlateType = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1052
 GetPlateName = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1029
 LNR_RegisterCallback = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1169
 LNR_UnregisterCallback = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1176
 0 = <userdata>
 EachPlateByName = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1148
 GetPlateRegion = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1100
 GetPlateByGUID = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1068
 GetPlateReaction = <function> defined @Interface\AddOns\Crosshairs\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0\LibNameplateRegistry-1.0.lua:1044
}
circle = <unnamed> {
 0 = <userdata>
}
left = <unnamed> {
 0 = <userdata>
}
right = <unnamed> {
 0 = <userdata>
}
top = <unnamed> {
 0 = <userdata>
}
bottom = <unnamed> {
 0 = <userdata>
}
tx = <unnamed> {
 0 = <userdata>
}
ag = <unnamed> {
 0 = <userdata>
}
rotation = <unnamed> {
 0 = <userdata>
}
group = <unnamed> {
 0 = <userdata>
}
alpha = <unnamed> {
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = <unnamed> {
 0 = <userdata>
}
(*temporary) = -1
(*temporary) = "attempt to call method 'SetChange' (a nil value)"

Report comment to moderator  
Reply With Quote
Unread 06-18-16, 01:32 PM  
samvx
A Defias Bandit
 
samvx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 99
Uploads: 5
Originally Posted by semlar
Making it work for your focus target or only friendly or hostile units would require rewriting a significant portion of the addon and I don't have time to design and integrate a configuration panel into it for people to switch between options.
Sound awesome those config options.... maybe this year going to happen?
Report comment to moderator  
Reply With Quote
Unread 10-02-14, 05:32 AM  
b3n9ti
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 61
Uploads: 2
Originally Posted by semlar
...
thanks so much for the reply! too bad there isn't an easier solution :-( would've been so great to keep track of a tank :P
Report comment to moderator  
Reply With Quote
Unread 10-01-14, 03:39 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 991
File comments: 178
Uploads: 24
You would pretty much need a full nameplate addon to accomplish what you're looking to do, and there's a major drawback to hiding the nameplate elements while keeping them active because you can still click on the nameplates but won't be able to see them.

It's possible (although complicated) to make the nameplates non-interactive, but it's all-or-nothing; you can't make friendly nameplates non-interactive while still being able to click on enemy nameplates.

If you only want to show the vertical lines, open Crosshairs.lua and add "left:Hide()" under the "local left" line and "right:Hide()" under the "local right" line near the top of the file. For horizontal lines do the same thing for top/bottom.

Making it work for your focus target or only friendly or hostile units would require rewriting a significant portion of the addon and I don't have time to design and integrate a configuration panel into it for people to switch between options.
Report comment to moderator  
Reply With Quote
Unread 10-01-14, 07:45 AM  
b3n9ti
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 61
Uploads: 2
Originally Posted by semlar
Originally Posted by b3n9ti
any chance on getting it to work for a friendly target whose nameplate is deactivated? like keeping track of a tank for example? =)
No, because it needs the nameplate to figure out where the unit is. You could hide all of the nameplate elements so you couldn't see them, but you'd still have to enable friendly nameplates for the addon to track them.
I apologize in advance for quite a number of questions:

a) any suggestion on how to accomplish that with the blizzard nameplates?

b) should be possible to make it work for 'focus' targets though, when friendly nameplates are enabled, right? ;-)

c) also, is it possible show either the horizontal or vertical line? :P

d) would it be possible to choose if you wanna see it for friendly or/and hostiles? =)
Last edited by b3n9ti : 10-01-14 at 10:57 AM.
Report comment to moderator  
Reply With Quote
Unread 09-30-14, 01:45 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 991
File comments: 178
Uploads: 24
Originally Posted by b3n9ti
any chance on getting it to work for a friendly target whose nameplate is deactivated? like keeping track of a tank for example? =)
No, because it needs the nameplate to figure out where the unit is. You could hide all of the nameplate elements so you couldn't see them, but you'd still have to enable friendly nameplates for the addon to track them.
Last edited by semlar : 09-30-14 at 01:46 PM.
Report comment to moderator  
Reply With Quote
Unread 09-30-14, 01:24 PM  
b3n9ti
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 61
Uploads: 2
any chance on getting it to work for a friendly target whose nameplate is deactivated? like keeping track of a tank for example? =)
Last edited by b3n9ti : 09-30-14 at 01:26 PM.
Report comment to moderator  
Reply With Quote
Unread 07-18-14, 07:09 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 991
File comments: 178
Uploads: 24
Originally Posted by morpheusxeno
I would like to know how I can modify your addon to lower the target to be on the persons head.
To move the crosshairs down relative to the nameplate, you will need to change two lines.

Line 188:
Lua Code:
  1. local x2, y2 = frame2:GetCenter()
Change to this, where "50" is how far down you want it to go
Lua Code:
  1. local x2, y2 = frame2:GetCenter()
  2. y2 = y2 - 50

And line 209:
Lua Code:
  1. local x, y = plate:GetCenter()
Change the same way, just make sure the offset is the same number
Lua Code:
  1. local x, y = plate:GetCenter()
  2. y = y - 50

I can't check in-game right now but I think that should do it. You may need to adjust the offset to get it to look right.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: