Skip to content

So, umm, where's my CD Key?

arQonarQon Member Posts: 21
edited January 2020 in Technical Support
I just tried to go online with EE for the first time since installing it, and it pops up a CD KEY dialog box.

As far as I know, I don't HAVE a CD Key for EE and never have. Where am I supposed to find it?
(I got the impression that EE was supposed to just create one automatically, but it apparently hasn't. DDG can't seem to find any reference to CD Keys either).

In case it matters: this time around, I DL'd it from Steam, since I didn't feel like installing the BD client. (I've done an OS reinstall recently, but I already had Steam set up again).

Note that I'm NOT asking how to get a Steam key: I already have that. What I'm missing is whatever it is that NWN wants to be able to play online.

Other info: this is on a new W10 1909 install, about 3-4 weeks old. It's got the original NWN on it too, and Steam, and that's pretty much it. I've barely used it at all, and haven't configured it other than to disable Superfetch and a few other useless services.

Any ideas? Thanks.
Post edited by arQon on

Comments

  • arQonarQon Member Posts: 21
    edited January 2020
    I found this on the GOG website:

    juliusborisov

    If you launched the game and the file doesn't exist, then it's either an Antivirus program or UAC preventing changes to Documents - Neverwinter Nights.

    and that's a definite "no": the game was just installed, all the permissions are correct, and there's no AV running.

    ooh - and if you press ESC on that dialog, you get a "We just crashed". That's not a good sign... :P
    (I've upped the dump file)
  • arQonarQon Member Posts: 21
    Since this is obviously not working the way it's supposed to, maybe some documentation would help. Right now there seems to be absolutely none, apart from that one comment - which is on a different website, and not correct in this case.

    A command-line switch to just spit out a text file would be one low-effort way to work around the problem. Logging something when the game fails to create the file probably won't actually be TOO helpful ("couldn't open xyz for writing") but at the very least you need to provide SOME sort of feedback, because otherwise users are going to be completely in the dark like I am, trying to figure out not just what the heck's going on but also not having any information on what SHOULD be going on.
  • The CDKey file for multiplayer should be created automatically the first time you launch multiplayer. The file is called "cdkey.ini" and should be in \Documents\Neverwinter Nights. You need to be connected to the internet, as it retrieves your key from online - so check your firewall settings.

    When I migrated to my new PC, I copied over my \Neverwinter Nights folder from the old one, but the game kept having issues with recognizing the multiplayer CDkey. I fixed it by deleting the \Neverwinter Nights folder from \Documents and relaunching the game, allowing it to rebuild the folder. I then launched multiplayer and it retrieved the key for me.
  • arQonarQon Member Posts: 21
    edited January 2020
    Thanks, Pstemarie.

    So yeah, that file is (still) missing.

    The firewall (the stock Windows one) has entries for EE (and the toolset? seriously?) in it to allow incoming - though, note to BD, if you're the one adding those rather than Windows doing it, you should probably also create outgoing rules in case someone's reconfigured the firewall properly, but I haven't done that on this machine.

    I didn't have a Neverwinter folder in Documents - this was a clean install not an upgrade, and I didn't copy the one from the old machine as the EE there is about a year old. (On the plus side, I DID back it up, and the backup DOES have the missing ini file in it).

    I like the firewall idea though, and now I do have a guess as to what might have caused this problem (though it's not a very GOOD guess).
    Since I installed EE via Steam, which sucks horribly, the first thing I did was copy the EE tree to an SSD instead, and run it from there. Before I ever ran it. So that copy would have silently had incoming connections blocked. And that's fine, since I'm perfectly capable of adding the Allow rules to the firewall for it, and did when I later tried to go online: but it might be that the game needed to be able to get online the very first time it ran, and is failing to recover properly.

    I did of course try the Steam version when the copy failed, but that did exactly the same thing, i.e. just popped up the CDKEY dialog.

    I DID have the original NWN copied over, and have run that since the OS install, which I left out of the original post. I gather EE tries to migrate old keys from that for continuity reasons (thanks Dave), and that may well be the problem. I saved and restored the registry trees for NWN, but I THINK I didn't bother with the Gamespy tree since that's been dead for years. NWN itself still works fine, but if EE is using the NWN registry entries to decide what to do about the online key, and then trying to use the Gamespy key as the seed, and doesn't have a working fallback path, then yeah, that would do it.
    The GUID is in the BW hive (HKLM/SOFTWARE/BioWare) so nope, that's not it. Or at least, it still could be, but it's much less likely. I DID indeed skip the Gamespy hive though, so that may have confused EE.

    My guess is that's it. Either way, it looks like there's an edge case being hit where everything doesn't go exactly as expected and EE is missing the code needed to deal with that. I can experiment at some point but would rather not for a while, so my advice for anyone else who runs into this would be to save the NWN registry entries, delete them, and then try EE again before restoring them: that way, EE won't try to migrate the old key.

    With the ini file copied from the backup of my old install, the popup is gone. Victory! \o/
    Now I just need to figure out why I can't connect to our EE test server... :P
    Post edited by arQon on
  • arQonarQon Member Posts: 21
    edited January 2020
    Okay - with the CDKEY file I recovered from my original EE install 18 months ago, I can connect to Nordock (though I didn't actually go through with it). What I CAN'T do is connect to our test server, since my name is already in use there because we migrated the servervault etc from NWN, and apparently the old EE install didn't migrate my old key correctly. (Which is still more successful than the current build though).

    So that proves the firewall isn't an issue, though I already knew that; and we know the /users/.../Neverwinter dir isn't the problem either, since I can copy the old EE cdkey ini file into it. Hopefully someone from BD will have some ideas when they're back in the office tomorrow.

    add> What I haven't tried yet is nuking the Documents/... part and letting it rebuild it, as you suggested earlier @Pstemarie - sorry about that: I was very tired last night.
    and... nope: still doesn't create the CDKEY file, still pops up the dialog, and still crashes when you press ESC.

    I guess I could go hunting for the old NWN manuals and try that, though IIRC the unfortunate use of 0 / O and 8 / B in the key and the smudged ink typewriter they used for those keys meant I needed several tries to decode the correct key from it even 15 years ago, which will likely generate the wrong key until I manage to guess right. But, it's a start, and it'll be a different failure to the current one, which might be helpful. So I'll give it a try if I can find them.

    add> I found them, and that worked. (Except I have THREE keys, and apparently my original NWN one isn't the one on record, so I still have to try SOU and HOTU). But, it worked to create the cdkey ini file at least, so that's progress! :)
    That helps pin the bug on the migration code, which is potentially helpful to BD.

    The key in the old cdkey ini file is, rather puzzlingly, NONE of the three keys I have. So I'm going to treat that as confirmation that the old EE also failed to migrate it back then, and just generated a new one instead. It was a long time ago, but I'm fairly sure I didn't have to hunt down the old manuals back then.

    add> In the end, none of the four keys worked as far as reclaiming my account on the server goes. It's possible that I mixed up a D and an O or etc, but I'm done wasting time on this for now. Hopefully the admins there can just update the userlist with my new ID instead.

    @Beamdog: as far as the migration bug goes, I'm willing to test debug builds if you want to try to figure that out, and I'll file a bug for it at some point.
    Post edited by arQon on
  • arQonarQon Member Posts: 21
    edited January 2020
    oy vey...

    I finally had enough coffee to find a thread on our own forums about copying the cdkey from a BW NWN install. I haven't looked at the files in there for so long I didn't even realise the key was actually in a file in there.

    I still don't have any idea why EE can't manage to read that file successfully and create a new file with the migrated key in it, but at least it's progress! :)

    And I still can't log in to the EE server, because my name is in use, despite being able to see that the pubkey in the attempt matches the one in oldservervault.2da. That's PROBABLY a different issue, but it's related enough that I might as well make a note of it here.
  • arQonarQon Member Posts: 21
    I had to add my key and name to the knownservernames.2da to get past the "name already in use" error. So it's good to have the answer to that problem, but it doesn't actually help me, because now I'm at "Your CD Key is unauthorized".

    I... guess that makes sense, since that's my OC key, not an EE one. Unfortunately, I HAD to copy that key over in the first place, because EE failed to create one for me!

    The only "solution" I can find in the Steam forums for the "unauthorized" error is the classic "wipe everything and reinstall". So I ignored that, and went back to the ini file that I'd retrieved from my old EE install. (Getting really tired of this...)
    That of course immediately sent me back to the "name already in use" problem, but since I have root access to the only server I care about, this time I gave it a new (albeit rather colorful :P) name, and nwsync FINALLY sprang into life. (Which is the part I've been trying to test since yesterday). Yay...
  • arQonarQon Member Posts: 21
    I think that I'm at least somewhat at fault here, but the game's handling of this scenario - a reinstall years after first running the game - is abysmal.

    A single line of text in the CDKEY dialog box saying "Use the EE key from (wherever), NOT your NWN key" would have saved me hours of frustration. Or ANY sort of actual help available on the website would have sufficed too.

    I'm way too tired to expand on this right now, but man: BD, not only COULD you do much better on this front, but you really need to. Still love ya though - thanks for bringing the game back to life after all these years. :)
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,725
    Please check out this reply by @Symphony about CD Key generation on GOG:

    https://forums.beamdog.com/discussion/comment/1099069/#Comment_1099069
Sign In or Register to comment.