Thread Tools Display Modes
06/02/24, 07:05 PM   #1
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Hide NPC name from interaction prompt

Im looking for an addon that hides the NPC name from the interaction promt.
are any out there? or it would be difficult to make ?

Last edited by Nesvil : 06/07/24 at 12:44 PM.
  Reply With Quote
06/02/24, 07:18 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
Maybe this one offers a setting for it:
https://www.esoui.com/downloads/info...ions.html#info

If not, ask the author if he could add one.
  Reply With Quote
06/02/24, 07:44 PM   #3
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Originally Posted by Baertram View Post
Maybe this one offers a setting for it:
https://www.esoui.com/downloads/info...ions.html#info

If not, ask the author if he could add one.
That addon i think it focuses on the npc dialog when you already interect with them.

im look to remove the npc names from the prompt option , afer entering dialog options.

but maybe asking...

Last edited by Nesvil : 06/02/24 at 10:33 PM.
  Reply With Quote
06/04/24, 01:19 PM   #4
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
cant find any that does it... yet...
  Reply With Quote
06/04/24, 02:10 PM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
I've tried to make it work but it's hard to impossible as there is no API to detect if you have the mouse above any NPC.

I can hide all of the interaction texts and then you would not see ANY anymore (no loot possibility, no harvest possibility, no wayshrine, no doors, ...).

Or else it can only find out by checking if the unit below the cursor is a friend (and even that does not always work and does not match all NPCs) and if you can talk with him (would be any npc, companion, ...) and then hide the name at the cursor.

Here is my code tried, maybe someone else got an idea and make it work for you:

Lua Code:
  1. SecurePostHook(RETICLE, "UpdateInteractText", function(selfVAr, currentFrameTimeSeconds)
  2.  
  3.         if IsGameCameraActive() and not IsGameCameraUIModeActive() then
  4.             if IsPlayerGroundTargeting() then return end
  5.             local interactionType = GetInteractionType()
  6.             local interactionExists, interactionAvailableNow, questInteraction, questTargetBased, questJournalIndex, questToolIndex, questToolOnCooldown = GetGameCameraInteractableInfo()
  7.  
  8.             if interactionExists == true and interactionAvailableNow == true and DoesUnitExist("reticleover") then
  9.                 local reaction = GetUnitReaction("reticleover")
  10.                 local isAttackable = IsUnitAttackable("reticleover")
  11. --d(">reaction: " ..tostring(reaction) .. ", isAttackable: " .. tostring(isAttackable))
  12.                 if (reaction == UNIT_REACTION_NEUTRAL or reaction == UNIT_REACTION_NPC_ALLY or reaction == UNIT_REACTION_COMPANION) then
  13.                     RETICLE.interact:SetHidden(true)
  14.                 end
  15.             end
  16.         end
  17.     end)


It will hide companions and NPCs and maybe also other' name at the reticle!



You can copy the whole code block from SecurePostHook to end) to any existing addon's
callback function of EVENT_ADD_ON_LOADED.


Example:
If you see this at an addon (mostly it is at the bottom)

Code:
EVENT_MANAGER:RegisterForEvent("AnyNameHere", EVENT_ADD_ON_LOADED, AddonLoaded)

Then search for "function AddonLoaded"
and in that function before the closing end of that function drop that code block so it looks like this:

Lua Code:
  1. function AddonLoaded(eventId, addonName)
  2. --some other code here
  3.  
  4. --drop here
  5. SecurePostHook(RETICLE, "UpdateInteractText", function(selfVAr, currentFrameTimeSeconds)
  6.  
  7.         if IsGameCameraActive() and not IsGameCameraUIModeActive() then
  8.             if IsPlayerGroundTargeting() then return end
  9.             local interactionType = GetInteractionType()
  10.             local interactionExists, interactionAvailableNow, questInteraction, questTargetBased, questJournalIndex, questToolIndex, questToolOnCooldown = GetGameCameraInteractableInfo()
  11.  
  12.             if interactionExists == true and interactionAvailableNow == true and DoesUnitExist("reticleover") then
  13.                 local reaction = GetUnitReaction("reticleover")
  14.                 local isAttackable = IsUnitAttackable("reticleover")
  15. --d(">reaction: " ..tostring(reaction) .. ", isAttackable: " .. tostring(isAttackable))
  16.                 if (reaction == UNIT_REACTION_NEUTRAL or reaction == UNIT_REACTION_NPC_ALLY or reaction == UNIT_REACTION_COMPANION) then
  17.                     RETICLE.interact:SetHidden(true)
  18.                 end
  19.             end
  20.         end
  21.     end)
  22. end --closing end of the function AddonLoaded

Last edited by Baertram : 06/04/24 at 02:22 PM.
  Reply With Quote
06/04/24, 06:21 PM   #6
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Originally Posted by Baertram View Post
I've tried to make it work but it's hard to impossible as there is no API to detect if you have the mouse above any NPC.
thanks for the try Baertram.
im using combat reticle right now, hiding almost everything, but the problem is that in certain elements the prompt dont show it at all.
example:
i configure combat reticle that only shows a tiny dot, but when an interactive... lets say.. use a rod that neramo gave you to turn on , or off a dwemer generator, that action do not show at all.
  Reply With Quote
06/05/24, 02:45 AM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
Well I cannot say how my code example above works in combination with other addons, as I' not using those.

Or did you mean combat reticle alone is making it hard?
Then turn off Combat reticle and only try my code example.

This row in my example is asking if the reaction is a defined one:
Code:
if (reaction == UNIT_REACTION_NEUTRAL or reaction == UNIT_REACTION_NPC_ALLY or reaction == UNIT_REACTION_COMPANION) then
But as I said: The detection is quite preoblematic as not all interactions got an own reaction type.


You can try to change that and remove the part or reaction == UNIT_REACTION_COMPANION
to e.g. make your companions interaction text show up again.

Or you can add other or reaction == UNIT_REACTION_* entries into the line (befor the "then").
Here is a list of all available unit reaction types:
Code:
h5. UnitReactionType
* UNIT_REACTION_COMPANION
* UNIT_REACTION_DEFAULT
* UNIT_REACTION_FRIENDLY
* UNIT_REACTION_HOSTILE
* UNIT_REACTION_NEUTRAL
* UNIT_REACTION_NPC_ALLY
* UNIT_REACTION_PLAYER_ALLY
  Reply With Quote
06/05/24, 09:43 AM   #8
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Originally Posted by Baertram View Post
Well I cannot say how my code example above works in combination with other addons, as I' not using those.
I should have said at the start that i never created an addon before or how this works
  Reply With Quote
06/06/24, 05:02 AM   #9
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 26
There is a feature in Lazy Writ that modifies the style of the name displayed when the reticle is hovered, you might want to refer to that section for the functionality you need. It is located in ReticleChanges.lua
  Reply With Quote
06/06/24, 08:52 AM   #10
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
Thanky Lykeion, I know that code.
DLWC only searches for the crafting table's "text" there and replaces it then.
So this would no work unless we maintain a table with ALL NPC names in multi language

That's why I tried to find the interacaction via it's reason. It somehow works but might just hide too much NPCs/interactions in the end.
So this would need to be tested by the requester and fine-tuned according to his needs.

@Nesvil
Try this small example addon I hacked together:
FCO HideInteraction - v1



Please try it "alone", without any other addon, to properly test it.
And fine tune it via the decsribed way of changing/adding the interaction reason constants in that 1 row.
-> I've marked the rows to change with examples, in file FCOHideInteractionText/FCOHideInteractionText.lua, starting at the following text:
"--Change below this line if you want to e.g. not hide the companion text, then change to:"

Change them directly in your live/AddOns/FCOHideInteractionText folder!
After changing a line in the file do a /reloadui in chat or via the addon manager button.

Hope it's clear and you can manage to help yourself there.
  Reply With Quote
06/06/24, 12:38 PM   #11
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Originally Posted by Baertram View Post
@Nesvil
Try this small example addon I hacked together:
Well, i tested it, and yes it seems to work, but still , it hides all the interaction prompt, im looking to only hide the part of the NPC name, but as you mention, or i can see in the code ESO use the general tag for certain objets.

One little thing is that when you dont look "directly" to the NPC, sometimes in a SMALL area around you can trigger the promp.


But aside from that it seem to work around for i want, removing npcs names but mantaining the promps with actions in the world:



Now keep testing , and see the compatibility with other addons.

Last edited by Nesvil : 06/07/24 at 12:44 PM.
  Reply With Quote
06/06/24, 12:59 PM   #12
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
I currently hide the complete RETICLE.interact but it seems to be seperated into 3 sections:

info
keybind and keybind text
So maybe I can only hide the info (which I assume contains the NPC name then) and thus still show the keybind + text.

Edit, yes it works:


Re-Download the addon here in version 2:
FCO HideInteraction v2 (only context hidden) - With slash command

You can use /fcohit or /hideinteracttext to toggle the visiblity of the text (does not remember the state after logout/reloadui/zone change! Default value is "on".


Last edited by Baertram : 06/06/24 at 01:26 PM.
  Reply With Quote
06/07/24, 02:01 AM   #13
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
i downloaded the v2, activated (only that, no others addons) , i put the command in chat /hideinteracttext
but still i see the name.

what im doing wrong?

  Reply With Quote
06/07/24, 02:23 AM   #14
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
well, i activated all my addons, and then i proceded to edit the lua and add the other unit reactions, and now it works

  Reply With Quote
06/07/24, 05:55 AM   #15
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
If you load the addon the text is hidden already, so no need to use the slash command.
If you use the slash command you'll disable it, next time enable again (toggle)
  Reply With Quote
06/07/24, 12:54 PM   #16
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Originally Posted by Baertram View Post
If you load the addon the text is hidden already, so no need to use the slash command.
If you use the slash command you'll disable it, next time enable again (toggle)

ups, i remove attachments and images disapear, but at least is working know, will all the other mods on.
and now that you mention the Keybind+text
its more easy to only leave the keybind? remove everything else, and just leave the prompt keybind?
i think this is better for the experience i want to achieve. not knowing if you are traspasing, stealing, or the name of the doors, items , etc. my real problem was when i have to interact with objets that interact with "air" like rings, staffs, quest items and such.

Last edited by Nesvil : 06/08/24 at 02:19 AM.
  Reply With Quote
06/08/24, 04:33 AM   #17
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
If you want to only show the keybind button:

Change the FCOHideInteractionText.lua at line 44:

From:
RETICLE.interactContext:SetHidden(false)

To:
RETICLE.interactContext:SetHidden(false)
RETICLE.additionalInfo:SetHidden(false)


And at line 94
change this
--RETICLE.additionalInfo:SetHidden(false)

to
RETICLE.additionalInfo:SetHidden(true)

Hope this makes it work the way you want to have it.
  Reply With Quote
06/11/24, 09:04 AM   #18
Nesvil
 
Nesvil's Avatar
Join Date: Oct 2017
Posts: 14
Originally Posted by Baertram View Post
If you want to only show the keybind button:

Change the FCOHideInteractionText.lua at line 44:

From:
RETICLE.interactContext:SetHidden(false)

To:
RETICLE.interactContext:SetHidden(false)
RETICLE.additionalInfo:SetHidden(false)


And at line 94
change this
--RETICLE.additionalInfo:SetHidden(false)

to
RETICLE.additionalInfo:SetHidden(true)

Hope this makes it work the way you want to have it.
you should do a clean version of this, and upload into the main Roleplay category
  Reply With Quote
06/11/24, 02:58 PM   #19
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,067
As I said: Not going to happen as I do not want to create another addon (already got too many) I have to officially maintain.
Please use what is there, change it according to your needs and if you want to release it feel free to do so (just provide proper credit in the description).
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Hide NPC name from interaction prompt


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off