#Anti-copy display names

1 messages · Page 1 of 1 (latest)

worldly cradle
#

With ^MurderV3, we plan on adding custom nameplates soon, and we have 2 issues in the game now:

  • Rich text (We dont want to remove it)
  • Duplicate display names (Problem)

I have already solve for rich text, for example, my display name is <#f4e>Cryptic, but the game will automatically turn it into <#f4e>Cryptic</color>

What I am having problems with is when 2 players have identical names
If two players have identical names, the oldest player should be prioritized, so for example, if two players had the name PlayerName, the oldest would be PlayerName, and the second oldest would be PlayerName (Two), third oldest PlayerName (Three) and so on

But, there are a few issues I have to account for:

  • What do I do if the oldest player leaves? how do I fix your name? If you were PlayerName (Three) and PlayerName (Two) left, you should become PlayerName (Two)
  • What do I do if you join with the display name PlayerName (Two), and 2 people have the name PlayerName? would I keep it as PlayerName, PlayerName (Two), and PlayerName (Two), or should I make it PlayerName, PlayerName (Two) and PlayerName (Three) (or even PlayerName (Two) (Two)?)

How could I account for these issues? How am I supposed to tell how many people have the same name, and what number to give them?
In addition, I'd also like to account for I/l issues, so PlayerName and PIayerName would be "the same name", despite not being equal, as they look equal

I'm currently working on ideas but my brain is very slow right now

solar spindle
#

That second problem I dont have an Idea except for just not letting the player put the number identifiers in their name

worldly cradle
#

unfortunately variable changed events dont work in PDB's

#

I have an idea

#

Every time a players name is requested, we get the number players before that player that share the same name

#

We then add that value to the string

#

Perfect

#

The only concern I have left is with players leaving mid game

#

Like, for example, your clue says PlayerName is innocent, and PlayerName (Two) is the murderer, but then PlayerName leaves and PlayerName (Two) becomes PlayerName

#

Maybe a permanent name thing?

#

@radiant coyote, what are your thoughts on the name persisting throughout the game? So if you were PlayerName (Two) when the game starts, you will always be PlayerName (Two) until the game is over

glad stump
# worldly cradle <@272807190606381058>, what are your thoughts on the name persisting throughout ...

Honestly, I think the best way to do this, would be to check the name for the singular player when they join the game, and then for everyone after the game ends, for example, if there are two people with the name “PlayerName” and “PlayerName (Two)” if “PlayerName” leaves, “PlayerName (Two)” stays the same until next round, but if another player joins trying to be “PlayerName” they temporarily become “PlayerName (Three)” until the round is up, when the names are once again checked for everyone, this may take two different systems though.

#

If that even makes any sense at all

solid dune
#

As people join, add their account name to a list (you'll have to send an event to update the list on everyone's local device). Create a second list with a "" for their "name". When they choose their name, update the equivalent index for their account name. When you are "using" the list of players, just format the names accordingly. You'll always have who was the oldest, the (#) can be dynamically built.

#
Index Account Name      Chosen Name
0     SpoiledParrot336  SUS
1     RandomPlayer324   Coach
2     RandomPlayer063   Coach
3     RandomPlayer238   ""
4     RandomPlayer983   Dave```
#

If RandomPlayer324 leaves, you List Remove at Index 1. "Coach (Two)" becomes Coach.

solid dune
#

Apparently Room Index might work better.

lilac idol
#

Just make a list of names but lowercase and if the name is exactly (with lowercase) to anything on the lists ask for a new name

worldly cradle
#

When a player attempts to start the game, they will "collect" everyones rich text name, and that becomes their in-game name for that round

solid dune
#

It sounds incredibly awesome. 🙂 Me and that Player Definition Board had a battle yesterday. I was trying to teach it to my circuit class.