ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   request: fake role tracker for new group finder (https://www.esoui.com/forums/showthread.php?t=10722)

Ashjunkie 10/31/23 11:51 AM

request: fake role tracker for new group finder
 
Can we get an addon that somehow notifies us when someone joins with one role and then changes it (they're already tricking the group finder so we won't be getting tanks). It would help for trials if we knew which dps faked it so we can kick that person for a real tank instead of having to guess or just not have a tank.

<3 Thanks

NeuroticPixels 10/31/23 12:48 PM

If something like this is created, my vote is to have the addon "disable" itself for custom made groups and Normal difficulty queues. We don't need more toxicity or gatekeeping in entry-level content.

Baertram 10/31/23 12:56 PM

Addons cannot track such afaik, unless the ones doing it got the same addon enabled too. And guess what they would do:D

Ashjunkie 10/31/23 01:42 PM

Quote:

Originally Posted by Baertram (Post 48679)
Addons cannot track such afaik, unless the ones doing it got the same addon enabled too. And guess what they would do:D

I was thinking just like how addons can tell you in text chat that you've met a guildie, friend, or ignored person in the wild, then perhaps they could make one that just puts in your text chat that Xgroup member changed their role to X. The ones mentioned do not have the addon I have. Roles are visible to all, so I don't *think* they'd need to have the addon? Obviously I don't make addons, so I'm unsure on that point.

Ashjunkie 10/31/23 01:51 PM

Quote:

Originally Posted by NeuroticPixels (Post 48678)
If something like this is created, my vote is to have the addon "disable" itself for custom made groups and Normal difficulty queues. We don't need more toxicity or gatekeeping in entry-level content.

Agreed about not wanting gatekeeping. What I'm hoping for is more of a way to avoid toxicity. Already getting people going tank to get in the group for a trial via the finder and then changing. Per my experience today, it counts that a tank already joined, so you don't need another... which means you won't get a tank for your trial. Many things will be unwinnable that way. The trickster that cheated the system to get in just screws the group. They are unlikely to admit it or leave graciously so others can complete the content (again... per my experience today). It's rather unfair for that person to stay and either everyone have to break group and try again or waste everyone's time trying without a tank for content that can't be done tankless. If it happens, and this addon is able to be made, at least you can see who it is so you can vote to kick them or something to get what will hopefully be a tank.

sirinsidiator 10/31/23 02:13 PM

Quote:

Originally Posted by NeuroticPixels (Post 48678)
If something like this is created, my vote is to have the addon "disable" itself for custom made groups and Normal difficulty queues. We don't need more toxicity or gatekeeping in entry-level content.

I imagine someone could make a separate log window for the group leader (and only for them) which does not automatically show up, but they can use it to look up who changed their role if need be.

Cheshire 11/01/23 05:29 AM

Could just be a chat notification, if the group is listening for a group finder, a "@username, role joined the group" notification in chat..

Ashjunkie 11/01/23 06:47 AM

Quote:

Originally Posted by Cheshire (Post 48685)
Could just be a chat notification, if the group is listening for a group finder, a "@username, role joined the group" notification in chat..

Yep, something as simple (if it's simple :P) as that would be just perfect. It would be in your chat window as like a record if you suddenly don't have the roles anymore, hopefully system msgs or something so you can move it to a separate tab if wanted via pchat. That's how most of the addon msgs I get come through anyway.

Antisenil 11/01/23 06:32 PM

I did some testing and yes you can get the roles of players joining and when they change it.
BUT and this is a big but, the event for role changes fires everytime someone starts a teleport(enters loading screen), finishes teleport(end loading screen) or when going offline/online.
Also it seems like the role is not always directly given when a player joins for the first time.

You might be able to get around this if you save the last "real" role they had and check against it before you print a new role change message to chat, but I don't know enough about coding to figure out how to do this.

Baertram 11/02/23 03:02 AM

I did not try this but for anyone wanting to give it a try here is some example code how it could work (similar like Antisenil explained I yesterday just pseudo coded this with saving the role as someone enters a group and checking on that saved role as someone changes the role).
It's saved by charactername but maybe displayname works too if the OnGroupMemberLeft event's param characterName is actually the displayName (haven't tested this as I said)

And: If you change the zone or have a loading screen/reloadui the saved roles are gone, so one needs to add them to SavedVariables if they need to persists a reloadui!!!

Function OnGroupMemberJoined needs some love about finding the characterName of the groupMember who joined.
The part with the 0 to GetGroupSize() and find the unitTag by the index, could need a change.
Code:

local groupMemberRoles = {}
local function OnGroupMemberJoined(eventId, memberCharacterName, memberDisplayName, isLocalPlayer)
        --GetUnitDisplayName()
       
        for i=0, GetGroupSize(), 1 do
            local groupMemberTag = GetGroupUnitTagByIndex(memberJoinedIndex)
            if groupMemberTag  ~= nil and ZO_Group_IsGroupUnitTag(groupMemberTag) and memberCharacterName == GetUnitName(groupMemberTag) then
              local currentRole = GetGroupMemberRoles(groupMemberTag)
              groupMemberRoles[memberCharacterName] = currentRole
              return
            end
        end
end
EVENT_MANAGER:RegisterForEvent(addonName .. "_EVENT_GROUP_MEMBER_JOINED", EVENT_GROUP_MEMBER_JOINED, OnGroupMemberJoined)

local function OnGroupMemberLeft(eventCode, characterName, reason, wasLocalPlayer, amLeader)
        if characterName ~= nil then groupMemberRoles[characterName] = nil end
end
EVENT_MANAGER:RegisterForEvent(addonName .. "_EVENT_GROUP_MEMBER_LEFT", EVENT_GROUP_MEMBER_LEFT, OnGroupMemberLeft)


local function OnGroupMemberRoleChanged(eventCode, groupMemberTag)
        if ZO_Group_IsGroupUnitTag(groupMemberTag) then
                --local memberDisplayName = GetUnitDisplayName(groupMemberTag)
                local memberCharacterName = GetUnitName(groupMemberTag)
                local lastRole = groupMemberRoles[memberDisplayName]
                if lastRole ~= nil then
                        local currentRole = GetGroupMemberRoles(groupMemberTag)
                        if lastRole ~= currentRole then
                                d("[ROLE CHANGE ALERT]Account \'".. tostring(memberDisplayName) .. "\' changed role to: " .. currentRole .. " - (last role: ".. tostring(lastRole) ..")")
                        end
                end
        end
end
EVENT_MANAGER:RegisterForEvent(addonName .. "_EVENT_GROUP_MEMBER_ROLE_CHANGED", EVENT_GROUP_MEMBER_ROLE_CHANGED, OnGroupMemberRoleChanged)


Antisenil 11/03/23 05:41 PM

this is what i did so far. it's a combination of "GroupNotifications" by CaptainBlagbird and Baertrams code here.
the only thing to be done might be some clean up of bad code ( i realy dont know what i'm doing :D )


GoogleDrive
updated the addon, changelog is included

Baertram 11/06/23 10:16 AM

Thanks for throwing this together!

I've reviewed the code and changed it (removed some globally leaking variables / fixed translation strings to be properl created, using LFG_ROLE_TANK etc. constants for the group roles instead of the numbers, using the proper SavedVariables table and not the defaults, and others).

Will test this and link the updated code here then afterwards

Edit:
GroupRoleSnitch fixed and improved

Tested it as good as possible and should work now. Roles are only alerted if they really change "since joining the group", and the alerts will be repeated if they still are wrong as you zone/reload the UI


All times are GMT -6. The time now is 09:27 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI