Thread Tools Display Modes
04-06-21, 06:27 PM   #1
reative_pl
A Murloc Raider
 
reative_pl's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 8
Question about addon to alter characters names

Everyone is playing and naming characters how they wants.
I don’t have any problem with that. But also I don’t like too much seeing names like “Chockemedaddy”, “Iwillfku”, “Youaredump” and many similar.
In WoW is playing many young people who think this is cool and funny. Probably it is, just not for me.

Playing in Warcraft from Warcraft 2 and I just like nice, normal names - just that, not a big deal.

So my question is… This question is for people who know LUA and how to create WoW addons.

Is it possible to do addons that is full of random names (normal close to Warcraft universe) that alter other players’ names? When I click on them I see in nameplates “fake” name, when they just in the world I see addon random names, when they join to party I see this “fake” names not “Pushmeharderdaddy”.

From 2y I’m playing with disabled chat - I just removed chat totally with LUA. I just treat other players like NPC. Have few friends on Discord and that’s enough for me, I just don’t want to risk contact with random people in WoW because it is mostly a very disappointing experience.

Thank you for any help. Have a great day and stay safe.
  Reply With Quote
04-06-21, 07:36 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Off the top of my head I can only think of tracking down which function is the last point of updating the name fields of any Unit Frame and hook into it so that you can replace the name with your alternative... but some that I found returned straight out so not sure if they would follow on with your custom code.

For example:
https://www.townlong-yak.com/framexm.../UnitFrame.lua

Includes this function:
Lua Code:
  1. function UnitFrame_Update (self, isParty)
  2.     if (self.name) then
  3.         local name;
  4.         if ( self.overrideName ) then
  5.             name = self.overrideName;
  6.         else
  7.             name = self.unit;
  8.         end
  9.         if (isParty) then
  10.             self.name:SetText(GetUnitName(name, true));
  11.         else
  12.             self.name:SetText(GetUnitName(name));
  13.         end
  14.     end
  15.     UnitFramePortrait_Update(self);
  16.     UnitFrameHealthBar_Update(self.healthbar, self.unit);
  17.     UnitFrameManaBar_Update(self.manabar, self.unit);
  18.     UnitFrame_UpdateThreatIndicator(self.threatIndicator, self.threatNumericIndicator);
  19.     UnitFrameHealPredictionBars_UpdateMax(self);
  20.     UnitFrameHealPredictionBars_Update(self);
  21.     UnitFrameManaCostPredictionBars_Update(self);
  22. end

It might be as simple as hooking into this function and just adding your random name and setting the text again. If not, it gives you a starting point to investigate.
__________________
  Reply With Quote
04-06-21, 10:42 PM   #3
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
It is not possible for players to customize their name this way. If those are their actual names, you need to report them. Otherwise, you have an RP addon of some kind receiving custom player data that is changing their names.
  Reply With Quote
04-07-21, 05:28 PM   #4
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Building on what Xrystal wrote...

Code:
/run hooksecurefunc("CompactUnitFrame_UpdateName", function(self) if self.name then self.name:SetText(UnitExists(self.unit) and UnitClass(self.unit) or "Unknown") end end)

/run hooksecurefunc("UnitFrame_Update", function(self) if self.name then self.name:SetText(UnitExists(self.unit) and UnitClass(self.unit) or "Unknown") end end)
Or as an addon...

Lua Code:
  1. hooksecurefunc("CompactUnitFrame_UpdateName", function(self)
  2.     if self.name then
  3.         self.name:SetText(UnitExists(self.unit) and UnitClass(self.unit) or "Unknown")
  4.     end
  5. end)
  6.  
  7. hooksecurefunc("UnitFrame_Update", function(self)
  8.     if self.name then
  9.         self.name:SetText(UnitExists(self.unit) and UnitClass(self.unit) or "Unknown")
  10.     end
  11. end)

Last edited by DahkCeles : 04-07-21 at 05:31 PM.
  Reply With Quote
04-07-21, 11:48 PM   #5
reative_pl
A Murloc Raider
 
reative_pl's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 8
Thank you all I will try.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Question about addon to alter characters names

Thread Tools
Display Modes

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