Organizing the Servervault and Sticky Player Names
Balanor
Member Posts: 176
I'm looking to get opinions on the benefits vs drawbacks of organizing the multiplayer servervault with folders for each player named by their CD Key (the default 1.74 method now) instead of by player name (the original 1.69 method). It's nice that Beamdog has given us the option so that if you change the nwnplayer.ini setting of Server Vault By Player Name=1, it will organize by the old way.
But I am assuming there must have been a reason that they chose to change the default method of server vault organization to go by CD Key, rather than player name. Any ideas? Or does anyone care to share their preference and why? I'm also assuming once you choose one or the other, your server is "locked in for life" and cannot change since players would lose their characters (or at least not be able to connect to the correct folder in the server vault) if you change the servervault organization from one to the other. Correct?
Finally, I'm looking for confirmation on what Sticky Player Names=1 (or 0) does in the nwnplayer.ini. From what I understand it allows players on the server to tie their CD Key to their player name so no one else can login to the server with their player name. But it seems this is being accomplished by the creation of a knownservernames.2da that gets created in the override folder on the server, and has nothing to do with any verification checks to the Master Server at all. Is that correct?
But I am assuming there must have been a reason that they chose to change the default method of server vault organization to go by CD Key, rather than player name. Any ideas? Or does anyone care to share their preference and why? I'm also assuming once you choose one or the other, your server is "locked in for life" and cannot change since players would lose their characters (or at least not be able to connect to the correct folder in the server vault) if you change the servervault organization from one to the other. Correct?
Finally, I'm looking for confirmation on what Sticky Player Names=1 (or 0) does in the nwnplayer.ini. From what I understand it allows players on the server to tie their CD Key to their player name so no one else can login to the server with their player name. But it seems this is being accomplished by the creation of a knownservernames.2da that gets created in the override folder on the server, and has nothing to do with any verification checks to the Master Server at all. Is that correct?
1
Comments
Edit: Changed a few letters in each the CD Key examples so they are not correct.
If someone reinstalls and forgets their name, they are out of luck ?
It also seems that unless you have enabled "Sticky Player Names" to tie player names to CD Keys on your server, the "Server Vault By Player Name=1" isn't going to work as intended. That's because, since we don't have Gamespy anymore, anyone can login to Multiplayer with "Phantomizer" as their login name. So if you are organizing the server vault by player name, you need to have Sticky Player Names enabled for your server so when you log in to your server as Phantomizer, knownservernames.2da is used to tie your CD Key to your login name so no one else can use that login on your server. They could, however, login on a different server and use it as their login name there, if it hasn't been claimed there yet.
Otherwise, the default 1.74 way of storing by CD Key basically says "I don't care what your login name is", and you could login to your server as Mickey Mouse or Phantomizer and still see the same characters.
But to FinalStand's point; it would appear that one benefit of using the default 1.74 method of organizing the server vault by CD Key, is that if someone does forget their login name, they'll still be able to access their characters on your server. Although if you have legacy NWN systems which use the PlayerName+PCName method to uniquely identify a PC, your systems could break since it would allow a player to login as Mickey Mouse one time, and then Phantomizer, or Balanor, or whoever, the next time.
I myself am still really on the fence about what method is better for EE. So if anyone else has messed around with either of these settings or has more insight about them, I'd love to hear about it.
It turns out that using the CDKey vault conflicts with some of the scripts on my server in that if they log in as a different username and use the same character it's inventory will be wiped. I really want to protect players from the bug, but I don't want to inconvenience anyone by wiping the server after the first day.
The only option I can see to change this would be to manually or programmatically (via a .bat file or something) rename every folder in your servervault from the CD Key to the actual player name the player would normally use. But you'd need to have both the CD Key and the player name for each determined somewhere else before you could do this. One way to start would be to enable Sticky Names ASAP to start creation of the knownservernames.2da. That way you can use that to at least help map player names to CD Keys for your regular and new players that login to the server, and that could be used as a guide as you go through and rename the folders in the servervault.
A quick way to format it so it can actually be used in Windows is to copy and paste the contents into a comment or new discussion topic here (kind of weird, but it works), and then copy and paste it from here into a text file. Or you can use a program like todos to convert the file to a Windows formatted txt file.
I was hoping you might be able to help me fix an issue I'm having on my server that's directly related to this (I kinda already told you about it and you may have already given me the answer, lol).
We employ a semi-permanent death for characters on the server which is enforced via the campaign variable and a custom death token. The issue is that with player vaults (even w/ sticky players) using a new player name, but the same character, resets these variables and allows them to play a previously dead character (it also resets all of their items but that's a small price to pay). If I understand your information correctly, I need to convert the knownservernames.2da files that I've been generating over the past week using sticky players to a readable format that I can get use to sort character files into a newly created legacy-style CDKey vault? Thus allowing me to switch my login method without completely wiping all of the my players characters?
Looking for all of the help I can get here.
Here's the code that we use to prevent duplicate PCs in our module. While you're going to need to modify it to suit whatever DB system you're using (we use NBDE for this), it should give you an idea of how to solve the problem in a way that works best for you.
string sCDKey = GetPCPublicCDKey(oPC); string sPCName = GetName(oPC); int iTotalPCsCreatedByPlayer = NBDE_GetCampaignInt("MasterPCDatabase", sCDKey+"TotalCharacters"); if (iTotalPCsCreatedByPlayer) { //Ensure this PC has not been named after another due to persistency settings int i = 1; while (i <= iTotalPCsCreatedByPlayer) { if (NBDE_GetCampaignString("MasterPCDatabase", sCDKey+"Character"+IntToString(iTotalPCsCreatedByPlayer)) == sPCName) { sDisallowedMessage = "Due to persistency settings, you may not recreate a character whose name is the same as one of your previous characters."; WriteTimestampedLogEntry("DUPLICATE PC ALERT: "+sPlayername+" logged in with a character who had the same name as one they previously created."); break; } i=i+1; } } if (sDisallowedMessage == "") { //If this a new, valid character, record its name and player info to the master database int iNewPCDatabaseNumber = iTotalPCsCreatedByPlayer+1; NBDE_SetCampaignString("MasterPCDatabase", sCDKey+"Character"+IntToString(iNewPCDatabaseNumber), sPCName); NBDE_SetCampaignInt("MasterPCDatabase", sCDKey+"TotalCharacters", iNewPCDatabaseNumber); DelayCommand(1.0, NBDE_FlushCampaignDatabase("MasterPCDatabase")); }
Thanks for kicking off this discussion; I've been following without much to add since the thread was posted. Lately, as our migration gets closer, I've been starting to think about this more. I think with our legacy servervault we're a bit tied to the Sticky vault setup. I'm a bit concerned some players could "race" to claim someone else's chars. We're small enough this won't be an issue; if it comes up, we can deal with it case by case.
However, one additional wrinkle we may want to consider: a single player may have more than 1 CDKey, through legitimate means, from a single purchase of the game. Since those who bought through Beamdog now also have a separate/different Steam key, we may need to associate multiple keys with one player when using Keys as player identifiers.
Background info: https://forums.beamdog.com/discussion/69206/regenerated-cdkey
Even without that, I can imagine players investing in multiple keys for whatever reason, and I'm wary of things like GoG potentially introducing even more Keys for individuals.
I think for my server and community, I can go StickyAll and forget about it, handling issues case by case if necessary. I wouldn't want to do this for a large server with a large community of players.
-Dave