dominx99 Thanks for the response. The code you provided clears out the name to undefined, so that's good that I am able to change the name, but still its not picking up the users nickname.
I do see now where this is being set in the engine.
I was able to do something like this in the onCharacterSelected and get the nickname from the mongoose collection.
mongoose.connect('mongodb://myinstance.com');
const mongoId = '6590c6ff541f21bcc3d81fef'; //using player.mongoId in the real code
PlayerModel.findById(mongoId)
.then(document => {
console.log('Fetched document:', document);
})
.catch(err => {
console.error('Error fetching document:', err);
});
Then, once I got the document, I overwrote the player.name to have the document.nickname
Thanks for pointing me in the right direction @dominx99 !!