BelegCufea / CompassHUD

A configurable compass strip showing player's heading along with questmarkers including distance and time to arive.
https://www.curseforge.com/wow/addons/compasshud
GNU General Public License v3.0
4 stars 0 forks source link

Suggestion: add pointers to other party members' locations #8

Closed raptormama closed 5 days ago

raptormama commented 3 weeks ago

I am not sure if this is possible with the recent API changes, or if the addon did it at one point and now does not.

If it can be done still outside of the existing minimap, an option to add pointers to party members' locations would be a very handy thing to have.

BelegCufea commented 3 weeks ago

Will have a look.

I am shy introvert solo player of MMO RPG, so ... some group quests will do to test it if I find a way ;-)

raptormama commented 3 weeks ago

As I type this, I am questing along on my own listening to podcasts. It's a nicely peaceful feeling! I sometimes play with my husband, though, and occasionally a few friends.

I think delves may work in the new expansion to test, or perhaps follower dungeons.

BelegCufea commented 3 weeks ago

Hmm, I am afraid that Blizz won't give us any data in instances. Will try though.

I haven't looked into it yet if it is even possible in open world. Was bussy adding narrator voice to DialogueUI :-) I hope the PR I posted is not too messy.

raptormama commented 3 weeks ago

I completely forgot about that! But no worries. It will come if it comes.

I don't use DialogueUI (tried it, but I prefer Immersion), but I have friends who love it.

BelegCufea commented 2 weeks ago

@raptormama Well, I think we are out of luck. Blizz is too secretive about other player information.

The only way I have found is by having every player install some kind of addon (although a simple one, I could even make an option in CompassHUD to do so). This addon would use a communication channel to share their position. This may work with friends or in certain types of guilds...

raptormama commented 2 weeks ago

Would C_Map.GetPlayerMapPosition work? It won't in instances, of course, but getting facing in instances is also not possible, anyway.

BelegCufea commented 2 weeks ago

@raptormama Oh, I see. I thought it only worked for the player. I will test it with partyN and raidN. Thanks for correcting my mistake! 😊

BelegCufea commented 2 weeks ago

OK, seems to work just fine.

Now ... how would you like to display it? dots with name maybe? with 40-raid it will be wild!

raptormama commented 2 weeks ago

Great to hear! I think small dots or arrows may be the best bet, precisely because of the potential crowding.

BelegCufea commented 2 weeks ago
  1. Unfortunately, as we suspected, it won’t work in instances because I can’t retrieve the player’s facing direction using GetPlayerFacing. Also C_Map.GetPlayerMapPosition doesn’t work in instances either. I’ll continue searching for a solution, but I am not very hopeful.
  2. It will take me a while to code this, so please be patient.

Would it be okay if I posted some code in a new branch so you can try it?

raptormama commented 2 weeks ago

Certainly! I'm about to give your heading branch a try, too.

BelegCufea commented 2 weeks ago

@raptormama Just to let you know. I am still thinking how to "best" implement this feature. I think I have a good idea. Now I need to find some time (the new expansion takes all my time away for now :-)

raptormama commented 2 weeks ago

Enjoy! I certainly am.

BelegCufea commented 1 week ago

OK, so. I have made some testing code in party branch.

So, if you will be so kind and try it in different scenarios.

Any suggestion for options is welcome. For now, I am thinking of following: show/hide, throttle interval, pin size and pin vertical alignment. May add choosing pin texture and different textures when in party and in raid. Also, should it hide party members in different zone then player?

raptormama commented 1 week ago

Downloaded to test. It does accurately point to party members in the same zone. However, as you say, it doesn't seem to know what to do when I'm in Azj-Kahet and my party-mate is in Dornogal. I will try to test further later.

If this continues to be iffy, I'd recommend a check box to control whether to show party members not on the same continent. Pointers to those elsewhere should be desaturated (or dimmed, to aid the colourblind) to indicate imprecision.

Note that the Isle of Dorn is actually separate from the rest of Khaz Algar in the same way that Zaralek Caverns is not actually connected to the Dragon Isles. The Coreway and the entrances to the Caverns are hidden loading screens and you'll hit a wall if you transit either too quickly.

I have also found that when a party member leaves, the pointer for them seems to stay displayed, at least when I finished running a few dungeons with two people this afternoon. That's just one test run, though; I'll do some more later on if I can.

GROUP_ROSTER_UPDATE will fire when a party or raid gains or loses members, so it can be used to know when to add or remove pointers.

The options I'd suggest, based on what I tweak in my personal installation, are:

So far, no issues with the pre-set update interval. I have it set to 60 Hz. My monitor can go up to 100, but so far 60 is sufficient. I'm not sure how useful the ability to change group member locations would be.

I hope this is helpful! I know it's a lot.

BelegCufea commented 1 week ago

Thanks a lot.

Will push some commits as I have more code to test.

Have a nice day.

raptormama commented 1 week ago

I think the event fires once a second to check for updates. Seems normal to me.

I'll keep an eye out for possible arrows to use but for now, the ones that exist look good.

Names definitely need to be optional!

I'll install the latest build and let you know if I run into any issues.

BelegCufea commented 1 week ago

Pushed some new code.

Added options to Group tab (moved Profiles to the settings tree). No texture or names yet, though I have few lines of code for names prepared.

Any issues and suggestions are welcomed :-)

raptormama commented 1 week ago

I haven't joined a party since installing the new version, but I do get a Lua error (below).

I also think that for the moment the one thing that should be added is the ability to select pointers for group members, defaulted to the dot that is used now. (And I like that you can manually enter an icon by ID!)

I hope to test in a group later today.

1x CompassHUD/CompassHUD.lua:2489: attempt to index field 'Pointers' (a nil value) [string "@CompassHUD/CompassHUD.lua"]:2489: in function member' [string "@Ace3/AceConfig-3.0-3/AceConfigDialog-3.0-87/AceConfigDialog-3.0.lua"]:215: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:164> [string "@Ace3/AceConfig-3.0-3/AceConfigDialog-3.0-87/AceConfigDialog-3.0.lua"]:1283: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:1113> [string "@Ace3/AceConfig-3.0-3/AceConfigDialog-3.0-87/AceConfigDialog-3.0.lua"]:1642: in functionFeedGroup' [string "@Ace3/AceConfig-3.0-3/AceConfigDialog-3.0-87/AceConfigDialog-3.0.lua"]:1567: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:1551>

[string "@Ace3/AceGUI-3.0-41/AceGUI-3.0.lua"]:66: in function <Ace3/AceGUI-3.0/AceGUI-3.0.lua:64> [string "@Ace3/AceGUI-3.0-41/AceGUI-3.0.lua"]:300: in function Fire' [string "@Ace3/AceGUI-3.0-41/widgets/AceGUIContainer-TreeGroup.lua"]:522: in functionSelect' [string "@Ace3/AceGUI-3.0-41/widgets/AceGUIContainer-TreeGroup.lua"]:530: in function SelectByValue' [string "@Ace3/AceConfig-3.0-3/AceConfigDialog-3.0-87/AceConfigDialog-3.0.lua"]:1738: in functionFeedGroup' [string "@Ace3/AceConfig-3.0-3/AceConfigDialog-3.0-87/AceConfigDialog-3.0.lua"]:1567: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:1551>

[string "@Ace3/AceGUI-3.0-41/AceGUI-3.0.lua"]:66: in function <Ace3/AceGUI-3.0/AceGUI-3.0.lua:64> [string "@Ace3/AceGUI-3.0-41/AceGUI-3.0.lua"]:300: in function Fire' [string "@Ace3/AceGUI-3.0-41/widgets/AceGUIContainer-TabGroup.lua"]:342: in functionSelectTab' [string "@Ace3/AceGUI-3.0-41/widgets/AceGUIContainer-TabGroup.lua"]:200: in function <...Ace3/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua:197>

Locals: info =

{ 1 = "Tabs" 2 = "Pointers" 3 = "Presets" 4 = "PointersPreset" uiType = "dialog" type = "select" options =
{ } option =
{ } uiName = "AceConfigDialog-3.0" 0 = "CompassHUD" appName = "CompassHUD" } (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (*temporary) = "attempt to index field 'Pointers' (a nil value)" Addon =
{ baseName = "CompassHUD" BrokerModule =
{ } modules =
{ } DEBUG =
{ } defaultModuleLibraries =
{ } icon =
{ } name = "CompassHUD" orderedModules =
{ } Defaults =
{ } Options =
{ } hooks =
{ } defaultModuleState = true categoryID = "CompassHUD" db =
{ } enabledState = true CONST =
{ } } questPointers =
{ 0 = "Important" -999 = "Unknown pointer" 7 = "Quest" 1 = "Legendary" 2 = "Campaign" 4 = "Meta" 8 = "Bonus" 101 = "Daily" 9 = "Threat" 103 = "Scheduled" 10 = "WorldQuest" -100 = "User map pin" -200 = "TomTom" 6 = "Questline" 102 = "Weekly" 3 = "Calling" } texturePresets =
{ Classic =
{ } Classic - turn-in =
{ } Classic/Modern =
{ } Modern =
{ } } texturePreset = "Classic" defaultTexturePreset = "Classic" AceConfigRegistry =
{ validated =
{ } tables =
{ } callbacks =
{ } } Const =
{ METADATA =
{ } }

BelegCufea commented 1 week ago

Fixed the pointer presets. Will add some more dots to the selection we already have for pointers and add the same choice for group markers. + custom IDs. I will also add the Edge rotation option, though I will omit the small arrows when Edge rotation is not selected for now (for cluttering reasons). I will also add separate scaling for out of zone markers.

Then I will tackle the names. It may take a while as I will have to encode distance detection for markers to overlap correctly. If it seems to take too long, I may release it without it and add it in some future version.

BTW. Thank you very much for testing!

BelegCufea commented 1 week ago

Needs testing :-)

image

raptormama commented 1 week ago

Tested by joining a raid group for Spawn of Beledar just now. Pops the following til I turn off group markers (rapidly, too):

495x CompassHUD/CompassHUD.lua:2288: attempt to compare number with nil [string "@CompassHUD/CompassHUD.lua"]:2288: in function <CompassHUD/CompassHUD.lua:2271> [string "@CompassHUD/CompassHUD.lua"]:2360: in function <CompassHUD/CompassHUD.lua:2346> [string "@CompassHUD/CompassHUD.lua"]:2377: in function <CompassHUD/CompassHUD.lua:2370>

Locals: (for state) =

{ party3 =
{ } party1 =
{ } party4 =
{ } party2 =
{ } } (for control) = "party3" _ = "party3" v =
{ frame = CompassHUDparty3 { } active = false } shown = false markerRotate = 0 differentZone = true size = 13.824000 (temporary) = nil (temporary) = -1 (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = -1 (temporary) = nil (temporary) = nil (temporary) = -1 (temporary) = -1 (temporary) = -1 (temporary) = "attempt to compare number with nil" player =
{ mapId = 2215 instance = 2601 y = 2253.300049 x = -575.500000 name = "Miravasha" groupType = "party" angle = 4.659078 inInstance = false realm = "Sargeras" } Options =
{ PointerStay = true GroupOffset = 13 Scale = 1.250000 GroupShowRaid = true Minimap =
{ } HeadingBorderThickness = 2 CompassCustomMainSize = 15 CompassCustomSecondaryColor =
{ } HeadingBackgroundColor =
{ } HeadingFontColor =
{ } HeadingTransparency = 1 HeadingDecimals = 0 StayAtlasID = "NPE_ArrowUp" GroupStay = true BorderThickness = 1 CompassCustomSecondarySize = 15.500000 GroupZoneRotate = 0 CompassCustomTicksPosition = "BOTH" HeadingEnabled = true PositionY = 1092.400391 BorderColor =
{ } Interval = 30 HeadingScale = 0.950000 BackgroundColor =
{ } GroupTexture = "PartyMember" CompassCustomDegreesSize = 11 GroupZoneDesaturate = true LineColor =
{ } PositionX = 1108.762695 HeadingPosition = 22 Visibility = "[petbattle] hide; show" HeadingBorderColor =
{ } Strata = "HIGH" CompassCustomDegreesFlags = "OUTLINE" CompassCustomTicksForce = true HeadingFontFlags = "OUTLINE" CompassCustomDegreesFont = "DorisPP" Border = "None" GroupInterval = 6 CompassCustomSecondaryFont = "PT Sans Narrow" HeadingTrueNorth = true PinTexture = "Interface\MainMenuBar\UI-ExhaustionTickNormal" CompassCustomMainFont = "PT Sans Narrow" CompassCustomSecondaryFlags = "OUTLINE" LineThickness = 1 CompassTextureTexture = "Interface\Addons\CompassHUD\Media\CompassHUD" HeadingFontPositionV = -1 CompassCustomDegreesSpan = 15 CompassCustomMainColor =
{ } HorizontalScale = 1.040000 Line = "" CompassCustomDegreesPosition = -5 HeadingBorder = "1 Pixel" HeadingFontSize = 9.500000 VerticalScale = 1.080000 CompassCustomDegreesColor =
{ } LinePosition = 0 GroupZoneTransparency = 0.700000 Degrees = 180 UseCustomCompass = true CompassCustomMainVisible = true GroupShowAllZones = true CompassCustomMainFlags = "OUTLINE" StayArrow = true CompassCustomSecondaryPosition = -3 GroupShowParty = true CompassCustomSecondaryVisible = true Background = "None" CompassCustomDegreesVisible = true Level = 500 Enabled = true HeadingFontPositionH = 0 Debug = false CompassCustomMainPosition = -1 GroupZoneTexture = "PartyMember" GroupZoneScale = 0.800000 Compartment =
{ } PinVisible = true Pointers =
{ } HeadingFont = "DorisPP" Transparency = 1 HeadingBackground = "None" GroupScale = 0.650000 GroupRotate = 0 Lock = false HeadingWidth = 1.100000 } groupThrottle = 0 groupPointsTable =
{ party3 =
{ } party1 =
{ } party4 =
{ } party2 =
{ } } textureHeight = 17.280000 HBD =
{ mapData =
{ } callbacks =
{ } ___DIIDO =
{ } transforms =
{ } eventFrame = Frame { } worldMapData =
{ } } HUD = CompassHUD { PixelSnapDisabled = true edgeBOTTOM = Texture { } heading = CompassHUD_heading { } edgeTOP = Texture { } compassCustom = CompassHUD_directions { } pin = Texture { } compassTexture = Texture { } }

BelegCufea commented 1 week ago

It is sooooo hard for me to debug :-) Sorry.

raptormama commented 1 week ago

No hurry! We will get there. I didn't have time to poke at it to see what the problem might be, but if I figure it out I'll let you know.

BelegCufea commented 1 week ago

Already posted a fix, should work now.

BelegCufea commented 1 week ago

Added player names.

At first, I thought it will be OK just to use it as plain text with outline, but it is a mess. Wil add borders and background. Already have strata levels coded in, so player name closer to you will overlap player name more distant.

image

BelegCufea commented 1 week ago

Got an idea. What about coloring the names according to their class?

BelegCufea commented 1 week ago

OK, done. The class colors I mean.

Next are borders and backgrounds. But it is too late here in EU, and I am tired. Tomorrow :-)

raptormama commented 1 week ago

I hope by the time you read this, you got some rest.

No Lua errors this time, and here's a few pictures! I did another Spawn of Beladar, and it does get hard to see all those names!

party-pointer-1

party-pointer-2

party-pointer-3

party-pointer-4

party-pointer-5

My heading background settings use the 1px border and the ElvUI Blank background (the latter is distributed with ElvUI). I'll likely use the 1px border, set to black, with the blank background set to a shade of grey as I have for the header. For the moment, I turned off the class colours and set raid names to yellow (I'll make it a bit more orangeish) and party to a shade of blue. But I love that the option is there and might turn it back on later on.

Images 2 and 3 show how a pointer name can be hard to read without a background on the header. Image 5 demonstrates the overlap of having a raid of 40 people for the rare.

Looking great so far! I think backgrounds for the names are the last real need for this feature.

BelegCufea commented 6 days ago

Just added those backgrounds and borders. OMG, all those raid groups for Theater Troupe, Lurker, Bees, Beledar etc. that are missing one active player :-)

image

Also added strata level finetuning for Heading. The logic is as follows:

  • HUD's strata level is set to Position in Strata as defined on the General tab.
  • Quest pointers have the same strata level
  • Group members' markers are set to +2 to the farthest member to +"group member number" the nearest. Moreover, if Group member is on the same map the strata level is raised by 50. That way the nearest group member name will overlap all the others and so on. So, if there are 40ppl raid the max strata is +91.
  • Heading can be now adjusted to be anywhere between. You can set it to 0 to be just behind all other of the quest pointers and group markers, 1 to be above HUD and quest pointers, but behind group markers or leave it to 100 to be above all of them.

image

OK, it seems to be all the options, we wanted to add (except the raidleader, that I scratched).

What do you think about option to shorten the names to x number of letters? Starwolf -> Sta (if 3 letters are set). I am quite split of this one as we already have the backgrounds.

raptormama commented 5 days ago

I think it looks pretty good now! I'm not sure how useful shortening names would be, either. It would best be an optional feature if implemented -- maybe as "maximum name tag length" or similar, with a cap long enough to accomodate whatever the maximum name length in WoW is. (I'm not sure what that number would be).

Here's how I've got it looking so far. Thanks to the Custom Font Loader addon, I'm now using the B612 font family, which originated from an Airbus project to develop a more legible typeface for use in cockpit instrumentation.

Most of the time, there's little difference from ElvUI's default PT Sans Narrow (used in my earlier shots), but the readability is markedly better for smaller displays like the name tags.

To make overlapping essentially a nonissue, I made the transparency/alpha very low on the name tag backgrounds. Fully opaque or 85-90% opacity should be default so that users who never adjust options will be able to read them. (I don't recall what your default settings were).

The compass itself uses the monospace variant of B612 while the name displays use the regular variant.

Additionally, I can see the difference between desaturated pointers and same-zone pointers, but it doesn't cause me any usability problems.

B612-pointers

BelegCufea commented 5 days ago

Well, then it is time to make some change notes and push it into release.

Can I use you last screenshot?

raptormama commented 5 days ago

Certainly! I think it does a good job of showing off what the feature does.

BelegCufea commented 5 days ago

Auto-closed this with the release of v1.3.0, but feel free to reopen at any time if needed.