Quantcast
Download
(105 Kb)
Download
Updated: 11/17/19 10:52 AM
Pictures
File Info
Compatibility:
Dragonhold (5.2.5)
Updated:11/17/19 10:52 AM
Created:01/14/18 12:05 PM
Monthly downloads:1,212
Total downloads:6,134
Favorites:25
MD5:
Categories:Graphic UI Mods, Group, Guild & Friends, Info, Plug-in Bars, ToolTip
5.2.5
ToxicPlayers  Updated this week!  Popular! (More than 5000 hits)
Version: 1.5
by: Mouton [More]
EN - FR - DE

ToxicPlayer is a tiny social addon that enables you to spot ignored players more easily in the game by changing the reticle style.
You'll then be able to focus your foes on the battle fields, not help the players ignored in your faction and even spot your friends or guild mates if they're not grouped with you.
You can as well easily add target players to your ignore list (ideal for PvP T-baggers) and report players using exploits or bots for example.


Ignored players and blacklisted players from your guilds will be marked in red color, muted players (if you're using MuteList addon) will be displayed in orange, friends players will be marked as green and guild mates will be shown in blue.

Now, you'll always remember your ennemies, and possibly, your friends...

--------------------------------------------------------------------------------------------------
Features
  • Display a marker near the crosshair when targeting ignored players, friends, muted players or guild mates
  • One key to display information about the latest encountered player (friend, guild mates, black listed from your guilds, muted or ignored)
  • One key only to add the targeted player to your ignore list
  • One key to open the "report player" form about the targeted player

-------------------------------------------------------------------------------------------------

This addon uses the following libraries (embedded):...and many thanks to Baertram, Onixyon and Eysile for their help and translations.
Change Log:

1.5 - Adding support for account wide settings
1.4.3 - Dragonhold update
1.4.2 - Adding missing German translations
1.4.1 - Scalebreaker update
1.4 - Adding options to display character names and latest unknown player encountered, changing guild links
1.3.1 - Updating translations
1.3 - Adding an option to select the positions of the text/icon
1.2 - Adding blacklisted players from your guilds
1.1 - Elsweyr update, activate guild display by default for new installs
1.0.2 - Wrathstone update
1.0.1 - Murkmire update
1.0 - Adding real links on player names in chatbox, going to stable version
0.11 - Adding guild name when ToxicPlayers text is on, adding guild name in key for latest player/guildmate encountered
0.10 - Adding display for guild mates, icons changed to match UI icons
0.9 - Wolfhunter update, LibAddonMenu-2.0 update, adding settings to disable reticle over friends, muted or ignored
0.8 - Summerset update, LibAddonMenu-2.0 update
0.7 - Displaying information about the latest encountered player (friend, muted, ignored) when using display note key
0.6.1 - Updating German translations
0.6 - Adding a key to display the ignore note for an ignored player
0.5 - Adding an extra key binding to ignore the target player and edit the player ignore note
0.4 - Adding key bindings to ignore/remove from ignore a target player and open the report player form
0.3 - Adding EN, FR, and DE translations
0.2 - First released version
Optional Files (0)


Post A Reply Comment Options
Unread 01/15/18, 06:50 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2503
File comments: 2810
Uploads: 57
Thank you, very appreciated.
Any chance to add multi language support?

Check the addon "Dustman" for a good and easy multilanguage support.
1. Add a folder "lang" and in there create files for the supported languages, with the 2 character lenght that ESO uses for the language, like "en", "de", "fr" .lua
Add 1 file that is named strings.lua and will be the "base" for the language strings (English texts e.g.).
2. Add the /lang/strings.lua and the dynamic langauge of your client file too /lang/$(language).lua

Check this thread for a good explanation:
http://www.esoui.com/forums/showthread.php?t=2136

3. Then specify the language constants like "TOXIC_PLAYER_IGNORED", "TOXIC_PLAYER_MUTED" etc. to the strings.lua file and to the other files like "de.lua" too -> Check the format from Dustman files.

4. In your addon where the static strings like "Ignored" are used replace them with GetString(TOXIC_PLAYER_IGNORED) etc. then.

If you got questions, just ask.
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 06:53 AM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
Definitely planned (and i'm gonna fix my English spelling mistakes)
I was searching this week-end about some good resources for multilanguages support as i'm very new to addons and lua.

Many thanks for the tips, will definitely help !
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 07:41 AM  
Letho
AddOn Author - Click to view AddOns

Forum posts: 229
File comments: 110
Uploads: 1
The addon myght lead people to abuse the ignore function for filtering enemies that have killed them, if they want revenge.
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 08:11 AM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
I was thinking of having a different list than ignored, bit this was much more work, and i wanted to keep this addons simple. That's why I made it compatible with MuteList (this solution is not optimal, indeed, as you cannot talk to your ennemies anymore).
I initially created this addon to spot raging people i already ignored or T-baggers that i don't need to talk to anyway.

If you know another social list manager, i would be happy to see how to integrate with it, or embed the feature if the addon creator agrees.
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 09:52 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2503
File comments: 2810
Uploads: 57
Originally Posted by Letho
The addon myght lead people to abuse the ignore function for filtering enemies that have killed them, if they want revenge.
If someone has the time to add all the enemies that killed him/her on the ignore list, what's the problem?
If they tend to kill ONLY these enemies on their list then, it's up to them.
As long as they do not build groups to gank single players, which should be brought to ZOs attention then.
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 01:26 PM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
Originally Posted by Baertram
Thank you, very appreciated.
Any chance to add multi language support?
...
If you got questions, just ask.
Many thanks Baertram ! It's done for the multi language support (even if german may be approximate) !

If for any reason you have a loot at the code, i'm interested in having good advises, as you seem to have a great experience in writing addons !
Last edited by Mouton : 01/15/18 at 03:48 PM.
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 03:54 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2503
File comments: 2810
Uploads: 57
Sure, thanks for implementing it.

You shouldn't use "ZO_CreateStringId" within the other language files too as this might get you in trouble with them only using the first ones loaded (so from the en.lua file).
Better use "SafeAddString(constant, "Text", 1)" instead in each later dynamically loaded language file de.lua, fr.lua etc.
Inside the en.lua you can use ZO_CreateStringId to build the constant values like TOXICPLAYERS_IGNORED and later on in the other files you just redefine them for other languages with new content by the help of SafeAddString.

Here is an example containing some better German translations:
Code:
SafeAddString("TOXICPLAYERS_IGNORED", "Ignoriert", 1)
SafeAddString("TOXICPLAYERS_MUTED",   "Stumm", 1)
SafeAddString("TOXICPLAYERS_FRIEND",  "Freund", 1)

SafeAddString("TOXICPLAYERS_OPTION_DESCRITPION",                "ToxicPlayers zeigt bei deinem Fadenkreuz visuell Spieler von deiner Freundesliste, oder auch ignorierte Spieler, an.", 1)
SafeAddString("TOXICPLAYERS_OPTION_RETICLE_TEXT_DESCRIPTION",   "Zeige Status Text am Fadenkreuz", 1)
SafeAddString("TOXICPLAYERS_OPTION_RETICLE_TEXT_TOOLTIP",       "Ist diese Option aktivier, dann wird ToxicPlayers wird dir den Status des anvisierten Spielers an deinem Fadenkreuz anzeigen (Verstummt, ignoriert or Freund)", 1)
SafeAddString("TOXICPLAYERS_OPTION_RETICLE_ICON_DESCRIPTION",   "Zeige Symbol am Fadenkreuz", 1)
SafeAddString("TOXICPLAYERS_OPTION_RETICLE_ICON_TOOLTIP",       "Ist diese Option aktivier, dann wird ToxicPlayers ein Symbol zum anvisierten Spieler an deinem Fadenkreuz anzeigen (verstummt, ignoriert or Freund)", 1)
Manifest txt file
I'd rather use the / then the \ char for the libraries as well. Sometimes they make trouble. But it should work fine this way too.

SavedVars
Please do not use ZO_SavedVars:New anymore but :NewCharacterId instead. :New will use the name of the char to save the data in the local lua savedvars files. If you change the name of a char the settings are lost.

So better do it like this as you build new addons:
Lua Code:
  1. --OLD: Do not use anymore if not really wanted to only save by char/toon name!
  2.     TP.settings = ZO_SavedVars:New(TP.name .. "Variables", TP.defaultSettings.variableVersion, nil, TP.defaultSettings)
  3.  
  4. --New: Using the unique character ID instead of the name -> Name change proof settings
  5.     TP.settings = ZO_SavedVars:NewCharacterIdSettings(TP.name .. "Variables", TP.defaultSettings.variableVersion, nil, TP.defaultSettings)


Speeding up some values used during reticle over functions
Data inside arrays/tables need some time to get fetched. If you have a function like a reticle change which can fire every second about 10 times if you are in areas with many players you should try to speed up the data selection. Like defining a local variable which "points" to the array stuff you need more than once.
And maybe move data from other addons, which you only need if the addon is active, in a else where it is only called then (including needed variables and function calls).
This will bring a bit of performance, maybe not measurable, but if someone uses a lot of addons with reticle stuff it could be the "tick" needed


Example:
Your function
Lua Code:
  1. function TP.OnTargetHasChanged(eventcode,invname)
  2.  
  3.     if IsUnitPlayer('reticleover') then
  4.         local target = GetUnitDisplayName('reticleover')
  5.  
  6.         -- Check player ignore list
  7.         if IsUnitIgnored('reticleover') then
  8.             TP.setReticleStyle(TP.STYLES.IGNORED, GetString(TOXICPLAYERS_IGNORED), false)
  9.         -- If MuteList addon is installed, check muted
  10.         elseif MuteList and MuteList.settings and MuteList.settings.IsMuted(target) then
  11.             TP.setReticleStyle(TP.STYLES.MUTED, GetString(TOXICPLAYERS_MUTED), false)
  12.         -- Display not grouped friends as well
  13.         elseif IsUnitFriend('reticleover') and not IsUnitGrouped('reticleover') then
  14.             TP.setReticleStyle(TP.STYLES.FRIENDS, GetString(TOXICPLAYERS_FRIEND), false)
  15.         -- No list.
  16.         else
  17.             TP.setReticleStyle(TP.STYLES.DEFAULT, "", true)
  18.         end
  19.     -- No target
  20.     else
  21.         TP.setReticleStyle(TP.STYLES.DEFAULT, "", true)
  22.     end
  23.    
  24. end

My idea (untested!)
Please check if it works as intended and maybe put some debug messages in like this
--function starts
local start = GetGameTimeMilliseconds()
d("Start: " .. start ):

--In between

local end = GetGameTimeMilliseconds()
d("End: " .. end):

to check if the general speed of crosshair changes /reticleovers is better than before.

Lua Code:
  1. function TP.OnTargetHasChanged(eventcode,invname)
  2.     local noList = true
  3.     if IsUnitPlayer('reticleover') then
  4.         --local "pointer" to speed up styles selection
  5.         local styles = TP.STYLES
  6.         -- Check player ignore list
  7.         if IsUnitIgnored('reticleover') then
  8.             noList = false
  9.             TP.setReticleStyle(styles.IGNORED, GetString(TOXICPLAYERS_IGNORED), false)
  10.         else
  11.             -- If MuteList addon is installed, check muted
  12.             if MuteList then
  13.                 local target = GetUnitDisplayName('reticleover')
  14.                 if MuteList.settings and MuteList.settings.IsMuted(target) then
  15.                     noList = false
  16.                     TP.setReticleStyle(styles.MUTED, GetString(TOXICPLAYERS_MUTED), false)
  17.                 end
  18.             end
  19.             -- Display not grouped friends as well, but only if they were not on the MuteList before
  20.             if noList and IsUnitFriend('reticleover') and not IsUnitGrouped('reticleover') then
  21.                 noList = false
  22.                 TP.setReticleStyle(styles.FRIENDS, GetString(TOXICPLAYERS_FRIEND), false)
  23.             end
  24.         end
  25.     end
  26.     -- No target
  27.     if noList then
  28.         -- No list.
  29.         TP.setReticleStyle(styles.DEFAULT, "", true)
  30.     end
  31. end

The same applies to multiple used "TP.settings.x", "TP.settings.y" -> local settings = TP.settings
settings.x, settings.y
This is faster as the array/table TP must not be searched for settings first each time.

And as arrays/tables that you reference (point to) are pointers, so your changes to local settings will change the reference table contents too!
--TP.settings.x == true
local settings = TP.settings
--settings.x == true
settings.x = false
--settings.x == false
--TP.settings.x == false

Originally Posted by Mouton
Originally Posted by Baertram
Thank you, very appreciated.
Any chance to add multi language support?
...
If you got questions, just ask.
Many thanks Baertram ! It's done for the multi language support (even if german may be approximate) !

If for any reason you have a loot at the code, i'm interested in having good advises, as you seem to have a great experience in writing addons !
Last edited by Baertram : 01/15/18 at 04:26 PM.
Report comment to moderator  
Reply With Quote
Unread 01/15/18, 04:54 PM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
Many thank for all this information again.

- I could not make the SafeAddString function work properly, only EN is loaded (that was still using ZO_CreateStringId as i understood), i'll check some addons how they're doing.
- I added your better German translation
- / are fixed, was from a copy paste somewhere.
- The addon variables are now loaded with ZO_SavedVars:NewCharacterIdSettings
- Did not had time to benchmark the execution time yet to check what's better, postponing this.
- Added some key binding features
Last edited by Mouton : 01/17/18 at 12:03 PM.
Report comment to moderator  
Reply With Quote
Unread 01/18/18, 02:08 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2503
File comments: 2810
Uploads: 57
Ah I think it's becasue your main file is called en.lua which is a language file which will be loaded twice if you use the english client! First because you have specified it in the manifest txt to load, and then load it again via the $(language).lua directive.
Change the name to strings.lua and make an empty en.lua file so the strings.lua contain the english translations and get loaded each time fixed.
This is how Dustman e.g. does it and should fix the SaveAddString(constant, "text", 1) problem for other
languages.
Dustman is a good example how to do it and how it works!

Originally Posted by Mouton
Many thank for all this information again.

- I could not make the SafeAddString function work properly, only EN is loaded (that was still using ZO_CreateStringId as i understood), i'll check some addons how they're doing.
- I added your better German translation
- / are fixed, was from a copy paste somewhere.
- The addon variables are now loaded with ZO_SavedVars:NewCharacterIdSettings
- Did not had time to benchmark the execution time yet to check what's better, postponing this.
- Added some key binding features
Report comment to moderator  
Reply With Quote
Unread 01/21/18, 01:35 PM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
Ok, i see better with these examples. It's now fixed then
Report comment to moderator  
Reply With Quote
Unread 02/06/18, 04:14 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2503
File comments: 2810
Uploads: 57
btw: There is a changelog panel if you update your addon and this is shown in another tab then. Raises visibility of your changes and you do not need to add it to the addon description text.
Report comment to moderator  
Reply With Quote
Unread 02/06/18, 04:47 AM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
Originally Posted by Baertram
btw: There is a changelog panel if you update your addon and this is shown in another tab then. Raises visibility of your changes and you do not need to add it to the addon description text.
Ok, found it. Did not see at first the panel on "manage addon" page. Thanks !
Report comment to moderator  
Reply With Quote
Unread 08/10/18, 09:44 PM  
Lakashi
 
Lakashi's Avatar

Forum posts: 4
File comments: 74
Uploads: 0
Addition

Could you possibly add another color option to show people in your guild(s)? That would be awesome! Maybe Blue?
Last edited by Lakashi : 08/10/18 at 09:52 PM.
Report comment to moderator  
Reply With Quote
Unread 08/11/18, 01:03 AM  
ovinnik

Forum posts: 21
File comments: 80
Uploads: 0
This looks useful! Have you considered adding an on/off option for the function pertaining to friends? I'd prefer to only identify ignored players in this manner.
Report comment to moderator  
Reply With Quote
Unread 08/15/18, 07:15 AM  
Mouton
 
Mouton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 14
Uploads: 1
Re: Addition

Originally Posted by Lakashi
Could you possibly add another color option to show people in your guild(s)? That would be awesome! Maybe Blue?
Indeed, i thought about it, but as far as I investigated, using all guilds player list would be far to slow when targeting player, and I cannot find a way to get the tabard information for a player. Still investigating.
(Maybe with some next version of ESO it would be possible.)
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: