Change player name not working with Bnet games

Status
Not open for further replies.
Level 4
Joined
Feb 22, 2006
Messages
31
I've realised the "Change Player Name" no longer works in Bnet multiplayer games.

The name is only changed if it is used as a variable "name of player", which also includes the annoying battletag by default, but no change is made to the chat username as it used to be prior to the introduction of battletags.

Works fine when testing as worldedit but no longer works on bnet games.

How do I fix it?
 
Sorry to bump here but I'm making a map which would be much better with custom names.

There seems to be a bug using the simple "Set Player Name" GUI command which fails to sets the name (it's still my battle.net name when playing online when looking above my units).

If there's a way to do it differently using a custom command (or another way), I'd be glad to learn it.

If anyone has a clue, feel welcome to share it :)

Thanks in advance and gl hf in your projects!

EDIT: And if anyone has info about Blizzard's stance on this (is it even a bug or just "as design"?).
 
Sorry to bump here but I'm making a map which would be much better with custom names.

There seems to be a bug using the simple "Set Player Name" GUI command which fails to sets the name (it's still my battle.net name when playing online when looking above my units).

If there's a way to do it differently using a custom command (or another way), I'd be glad to learn it.

If anyone has a clue, feel welcome to share it :)

Thanks in advance and gl hf in your projects!

EDIT: And if anyone has info about Blizzard's stance on this (is it even a bug or just "as design"?).
Its just another of their dumb mistakes and accidental breakage of everything that did work fine in 1.30.4.
 
This is the Action I run using "Elapsed game time" Event to get rid of that pesky hashtag number at the end everyone's username nowadays.

  • For each (Integer A) from 1 to 24, do (Actions)
    • Loop - Actions
      • Set VariableSet blnContainsHashtag = False
      • For each (Integer B) from 1 to (Length of (Name of (Player((Integer A))))), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Name of (Player((Integer A)))), (Integer B), (Integer B))) Equal to #
            • Then - Actions
              • Set VariableSet blnContainsHashtag = True
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • blnContainsHashtag Equal to True
        • Then - Actions
          • Player - Set name of (Player((Integer A))) to (Substring((Name of (Player((Integer A)))), 1, ((Length of (Name of (Player((Integer A))))) - 5)))
        • Else - Actions
 
This is the Action I run using "Elapsed game time" Event to get rid of that pesky hashtag number at the end everyone's username nowadays.

  • For each (Integer A) from 1 to 24, do (Actions)
    • Loop - Actions
      • Set VariableSet blnContainsHashtag = False
      • For each (Integer B) from 1 to (Length of (Name of (Player((Integer A))))), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Name of (Player((Integer A)))), (Integer B), (Integer B))) Equal to #
            • Then - Actions
              • Set VariableSet blnContainsHashtag = True
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • blnContainsHashtag Equal to True
        • Then - Actions
          • Player - Set name of (Player((Integer A))) to (Substring((Name of (Player((Integer A)))), 1, ((Length of (Name of (Player((Integer A))))) - 5)))
        • Else - Actions
This is actualy bad becouse the Tag numbers are not always 4.

Edit: after reading this again this sounds more negativ then it should...
So here a little tip ;) save the position of the # and then use this position to remove the Tag.
 
Last edited:
This is the Action I run using "Elapsed game time" Event to get rid of that pesky hashtag number at the end everyone's username nowadays.

  • For each (Integer A) from 1 to 24, do (Actions)
    • Loop - Actions
      • Set VariableSet blnContainsHashtag = False
      • For each (Integer B) from 1 to (Length of (Name of (Player((Integer A))))), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Name of (Player((Integer A)))), (Integer B), (Integer B))) Equal to #
            • Then - Actions
              • Set VariableSet blnContainsHashtag = True
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • blnContainsHashtag Equal to True
        • Then - Actions
          • Player - Set name of (Player((Integer A))) to (Substring((Name of (Player((Integer A)))), 1, ((Length of (Name of (Player((Integer A))))) - 5)))
        • Else - Actions
As Lartin said, that can fail depending on the player's Tag. Here's something I was using:
  • Name Fix
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • -------- Name_Old = Name with #12345 --------
      • -------- Name_New = Name without #12345 --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set VariableSet Name_Player = (Picked player)
          • Set VariableSet Name_PN = (Player number of Name_Player)
          • Set VariableSet Name_Old[Name_PN] = (Name of Name_Player)
          • For each (Integer Name_Loop) from 1 to (Length of Name_Old[Name_PN]), do (Actions)
            • Loop - Actions
              • Set VariableSet Name_String[1] = (Substring(Name_Old[Name_PN], Name_Loop, Name_Loop))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Name_String[1] Equal to #
                • Then - Actions
                  • Set VariableSet Name_New[Name_PN] = (Substring(Name_Old[Name_PN], 1, (Name_Loop - 1)))
                  • Player - Set name of Name_Player to Name_New[Name_PN]
                • Else - Actions
With this you'll have two variables, Name_Old, and Name_New.
Old contains the original name with the Tag, and New has the Tag removed.
Insert the Player Number into the Index and you'll get that Player's Old/New name.

This is also a convenient way to apply colors to a player's name.
 
wont this issue be fixed in 1.33? thats what i heard but the question is when its relased

Guhun above was correct when he said it has been fixed in the current PTR.

upload_2020-9-27_8-50-0.png
 
Status
Not open for further replies.
Back
Top