Changing your name causes your hand to disappear #348

Open
opened 2026-02-20 10:16:41 -05:00 by deekerman · 7 comments
Owner

Originally created by @AlanDeSmet on GitHub (Sep 16, 2021).

  1. Visit virtualtabletop.io and be assigned a new room.
  2. Add Poker
  3. Hit Poker's "Play" button.
  4. Drag a card from the deck into your hand at the bottom.
  5. Press the "players" button (looks like stylized busts of two people)
  6. Click your name
  7. Move to the end and add "X"
  8. Hit enter
  9. Press the "players" button to dismiss the screen.

Observed behavior: card in hand disappears

Expected behavior: card does not disappear

At this point, changing your name back to the original causes the card to re-appear.

I believe what is happening is:

  • The hand is set "childrenPerOwner":true
  • When I dragged the card into the hand, the card's "owner" was changed to my name.
  • When I changed my name, the card's owner was not updated, so no one could see the card.

I would expect that if I change my name, all "owner"s would searched and instances of my name before be swapped to my new name. (Or perhaps assign players arbitrary IDs that don't change.)

We ran into this while playing a game when a player realized they could change their name and did so. As their old name was in the form Guest123, we didn't know what name to change them back to to fix it.

Originally created by @AlanDeSmet on GitHub (Sep 16, 2021). 1. Visit virtualtabletop.io and be assigned a new room. 2. Add Poker 3. Hit Poker's "Play" button. 4. Drag a card from the deck into your hand at the bottom. 5. Press the "players" button (looks like stylized busts of two people) 6. Click your name 7. Move to the end and add "X" 8. Hit enter 9. Press the "players" button to dismiss the screen. Observed behavior: card in hand disappears Expected behavior: card does not disappear At this point, changing your name back to the original causes the card to re-appear. I believe what is happening is: - The hand is set `"childrenPerOwner":true` - When I dragged the card into the hand, the card's `"owner"` was changed to my name. - When I changed my name, the card's owner was not updated, so no one could see the card. I would expect that if I change my name, all `"owner"`s would searched and instances of my name before be swapped to my new name. (Or perhaps assign players arbitrary IDs that don't change.) We ran into this while playing a game when a player realized they could change their name and did so. As their old name was in the form `Guest123`, we didn't know what name to change them back to to fix it.
Author
Owner

@96LawDawg commented on GitHub (Sep 17, 2021):

You are correct as to what is happening. It happens in pretty much any room with a hand, not just poker. The owner of the card is set when dragged into the hand. Changing names with the player icon does not change the owner of the chad and it remains visible to whoever has the name. This is expected behavior and I have no idea what the fix might be. More importantly, in the past 6 weeks or so there has been a dramatic dropoff in participation by the community that has the capability to implement any type of change. For now, I recommend you advise players not to change their names mid-game.

@96LawDawg commented on GitHub (Sep 17, 2021): You are correct as to what is happening. It happens in pretty much any room with a hand, not just poker. The owner of the card is set when dragged into the hand. Changing names with the player icon does not change the owner of the chad and it remains visible to whoever has the name. This is expected behavior and I have no idea what the fix might be. More importantly, in the past 6 weeks or so there has been a dramatic dropoff in participation by the community that has the capability to implement any type of change. For now, I recommend you advise players not to change their names mid-game.
Author
Owner

@bjalder26 commented on GitHub (Sep 17, 2021):

I'm not sure how to 'fix' this yet either. However, a workaround would be to create a button that people use to set their name rather than them typing it into the player list. The button could then update the playerName at the same time as updating the ownership of widgets.

@bjalder26 commented on GitHub (Sep 17, 2021): I'm not sure how to 'fix' this yet either. However, a workaround would be to create a button that people use to set their name rather than them typing it into the player list. The button could then update the playerName at the same time as updating the ownership of widgets.
Author
Owner

@rogerl50 commented on GitHub (Sep 17, 2021):

Players need to be full-fledged members of the vtt rooms.

@rogerl50 commented on GitHub (Sep 17, 2021): `Players` need to be full-fledged members of the vtt rooms.
Author
Owner

@bjalder26 commented on GitHub (Sep 17, 2021):

Players need to be full-fledged members of the vtt rooms.

Are you saying to add another variable that contains all the names in the room like activePlayers is all the active players in the room?

@bjalder26 commented on GitHub (Sep 17, 2021): > `Players` need to be full-fledged members of the vtt rooms. Are you saying to add another variable that contains all the names in the room like activePlayers is all the active players in the room?
Author
Owner

@rogerl50 commented on GitHub (Sep 17, 2021):

I don't actually know. But right now it seems to me that the concept of playerName is not really manipulable completely the way other aspects of the room are. It's just kind of tacked on. Adding such a variable and making it writeable might help, but it likely has unanticipated consequences. Even adding it as a read-only variable might help; at least that would allow the game designer to prevent someone choosing a name that is already taken in the room.

@rogerl50 commented on GitHub (Sep 17, 2021): I don't actually know. But right now it seems to me that the concept of `playerName` is not really manipulable completely the way other aspects of the room are. It's just kind of tacked on. Adding such a variable and making it writeable might help, but it likely has unanticipated consequences. Even adding it as a read-only variable might help; at least that would allow the game designer to prevent someone choosing a name that is already taken in the room.
Author
Owner

@robartsd commented on GitHub (Sep 17, 2021):

Current behavior when renaming a player: all active session change to the new name, but owned items retain the old name.

It would be nice to have 2 options when renaming the current player:

  • change name (all owned items and active sessions change to the new name)
  • switch players (only the active session changes name)
@robartsd commented on GitHub (Sep 17, 2021): Current behavior when renaming a player: all active session change to the new name, but owned items retain the old name. It would be nice to have 2 options when renaming the current player: - change name (all owned items and active sessions change to the new name) - switch players (only the active session changes name)
Author
Owner

@rogerl50 commented on GitHub (Sep 18, 2021):

That would be helpful. It's not a complete solution, since if there is already a player with the new name bad things will still happen.

@rogerl50 commented on GitHub (Sep 18, 2021): That would be helpful. It's not a complete solution, since if there is already a player with the new name bad things will still happen.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/virtualtabletop#348
No description provided.