Aller au contenu

NWN Gamespy Server Replacement Project


  • Veuillez vous connecter pour répondre
251 réponses à ce sujet

#51
tzaeru

tzaeru
  • Members
  • 10 messages

Melkior_King wrote...

tzaeru wrote...

Melkior_King wrote...

The simplest solution (from the player/server point of view) is for someone to make a server which does the same thing as GameSpy (except only for nwn) and give us the IP address. We can then enter that IP address along with the name of the GameSpy nwn server into our local "hosts" file to redirect the nwn GameSpy calls to the new site.

The adding of the IP address and server name to the local "hosts" file could easily be automated. Distributors such as gog.com could add the code to the installer for nwn Diamond Edition.


Is the GameSpy IP in a data file? If it's directly in the executable, then the closest to a legal way to achieve that is to intercept the connection attempt to GameSpy's server and modify the IP on the fly.. But even that might fall under reverse engineering and be promptly illict, except if you happen to live in a country where reverse engineering for the purpose of maintaining compatibility and functionality is legal.


The GameSpy server base address is saved as a hard-coded string (master.gamespy.com) inside the exe files (nwmain.exe and nwserver.exe).  Changing that string will change the site which the game tries to access.

The game adds the nwn prefix to the base address before doing the dns enquiry so it ends up as nwn.master.gamespy.com

You can either edit the string inside each exe file so that the DNS servers resove to a different site, or you can enter the IP address along with the above site address into your local hosts file in order to redirect the game to a different site.

In short, this makes it fairly easy to redirect the GameSpy requests to a different site.


Ah, yeah, changing the domain resolvement would be handy. I was mostly worried of how directly modifying the executables works with the EULA - however, I'd figure it falls under the interoperability clause in any case.

#52
Visavant

Visavant
  • Members
  • 46 messages
I'm leaving it up to the player to decide what they want to do about it, giving them the option of modifying the binary, or make a change to the hosts file instead.

#53
Guest_orizvi_*

Guest_orizvi_*
  • Guests
I just want to point out - if we stick with only the hosts file change to implement the fix and an actual gamespy server emulator. Our fix would also help out the other games affected (NWN2 primarily but even ones like SWAT4 or whatever else lost their Gamespy servers).

#54
Melkior_King

Melkior_King
  • Members
  • 135 messages
Visavant is currently doing this out of the goodness of his heart. If he opens up a real equivalent to gamespy for all older games, he deserves to be paid for it.

So I suggest that Visavant should put a "Donate" button on the nwncore site so people can express their gratitude in a more substantial form. I know I'd donate.

#55
ehye_khandee

ehye_khandee
  • Members
  • 855 messages
I advocate ONLY changing the hosts file. It is easer, and much safer.

Be well. Game on.
GM_ODA

#56
Baaleos

Baaleos
  • Members
  • 1 322 messages
I dont like the idea of changing the hosts file.
Granted - I know it can work cross platform - eg a version can be done for linux and macOS etc

But it does constitute a change to the users operating system, vs a change to the application.

Changing a single binary, is safer than changing the operating system or dependancies.

With so many Operating System and Network setups out there, the only thing we can be assured of, is that they are using 1.69 nwn, with or without modifications.
Even if they are using modifications, a binary patcher can be setup to find the correct memory location by using pattern recognition inside the binary - so patching wouldnt be a problem.

If we start releasing changes to the users operating system, can the community give a 100% guarantee that it wont break the hypothetical someones obscure computer/network setup?
The Rhetorical answer there is - No, simply because we cannot test everyones PC/Network setup.

Can we test and provide a level of assurance for a binary, or linux/macOS application?
Yes - Testing a single binary per OS, is easier than testing different Operating System setups.

Also - it should be noted that the hosts file is often the first thing to get deleted/restored from backup, in many networking debug scenarios.
eg- My internet doesnt work -
Then someone suggests a change/replacement to the hosts file.

So - there are some scenarios there, where any changes we make to hosts file, would need to re-done.

Once a binary is patched, its patched, and never needs touched.

#57
Borrie BoBaka

Borrie BoBaka
  • Members
  • 40 messages
I have already suggested to Visavant to automatically create a backup copy of any files the patcher alters so that the changes could be easily reverted if the need should ever arise.

#58
Baaleos

Baaleos
  • Members
  • 1 322 messages

Borrie BoBaka wrote...

I have already suggested to Visavant to automatically create a backup copy of any files the patcher alters so that the changes could be easily reverted if the need should ever arise.


Backup and Restore isnt so much a problem.
Merging with other peoples existing configurations is a little more complicated.

However, with signature scanning/pattern recognition - its easier to merge/patch the binary, than it is to effect changes to peoples hosts files, while preserving whatever customizations may already be there.

Its basic Software testing methodology here.
We cannot exhaustively test everyones different configurations -
so the thing we should probably focus on, is what we can effect changes on, and test.

If the community releases a hosts file change - gives it to person A, and then person A says = Hey... it aint working on my Computer.

How does the community help that person?

We can patch, test, and debug a binary, we cannot do the same for peoples operating systems.

#59
Zarathustra217

Zarathustra217
  • Members
  • 221 messages
I generally tend to agree - at least it's not a very ideal design approach. Not to mention the very notion of going into your OS and editing files is bound to make some people sceptical.

#60
Visavant

Visavant
  • Members
  • 46 messages

Borrie BoBaka wrote...

I have already suggested to Visavant to automatically create a backup copy of any files the patcher alters so that the changes could be easily reverted if the need should ever arise.


Decided against creating backups, the executibles can be regained from the critical rebuild if it's that corrupted, though seeing how many writes I've made in my tests, it's pretty hardy. The patcher acts as a toggle, reverting changes if it detects the changes on the next attempt to patch the binary.

Baaleos wrote...

However, with signature scanning/pattern recognition - its easier to merge/patch the binary, than it is to effect changes to peoples hosts files, while preserving whatever customizations may already be there.

Not really, I've written fewer lines to support hosts file edits than I have trying to handle the binary modifications. This includes support for modifying protected hosts files from applications like spybot.

Baaleos wrote...
Its basic Software testing methodology here.
We cannot exhaustively test everyones different configurations -

Thankfully Windows has the .net solution, and OSX / *nix are fairly static across the board to support. I'll patch in an option to send me the exception errors if someone runs into it so I can update later versions. 

Zarathustra217 wrote...

I generally tend to agree - at least it's not a very ideal design approach. Not to mention the very notion of going into your OS and editing files is bound to make some people sceptical.

That's why there's options! :ph34r:

Melkior_King wrote...

Visavant is currently doing this out of the goodness of his heart. If he opens up a real equivalent to gamespy for all older games, he deserves to be paid for it. So I suggest that Visavant should put a "Donate" button on the nwncore site so people can express their gratitude in a more substantial form. I know I'd donate.


As awesome as that sounds, I'd rather keep under the litigation radar of GS / Glu. NWN/NWN2 will get their matchmaking services from services from Skywing, myself, and anyone else offering alternatives, but if I decide to take a stab at the other gamespy2 based games of the era, I'll probably kickstarter it to have it pay for 10+ years of infrastructure bills and cluster the thing up hardcore.

Modifié par Visavant, 11 décembre 2012 - 03:10 .


#61
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
Thanks Visavant and everyone else!  I have a question though- is this going to cause any problems with Virusman's NWNCX "Client Extender" or that kind of thing?

Also, no backups on the client machines of the modified executables?  Did I understand that correctly?  That's not wise.  Users can get themselves into turrible trouble in situations like that.

Nobody wants to download 300 megs for a critical rebuild to get another copy of the exe.  Not trying to sound harsh, just being blunt because I'm making dinner at the same time. P.S. In my haste, if I'm misunderstanding something, apologies!

Modifié par OldTimeRadio, 11 décembre 2012 - 03:20 .


#62
Visavant

Visavant
  • Members
  • 46 messages

OldTimeRadio wrote...

Thanks Visavant and everyone else!  I have a question though- is this going to cause any problems with Virusman's NWNCX "Client Extender" or that kind of thing?


Nope.

OldTimeRadio wrote...
Also, no backups on the client machines of the modified executables?  Did I understand that correctly?  That's not wise.  Users can get themselves into turrible trouble in situations like that.
Nobody wants to download 300 megs for a critical rebuild to get another copy of the exe.  Not trying to sound harsh, just being blunt because I'm making dinner at the same time. P.S. In my haste, if I'm misunderstanding something, apologies!


They won't pull the full 300MB, only the exe itself. I'll write in an update so players can check / uncheck by default for a "original copy".

#63
Borrie BoBaka

Borrie BoBaka
  • Members
  • 40 messages
The ability to revert the change should put concerns of altering things to ease, players should feel comfortable about using this replacement, it should feel pretty seamless.

I'm also glad to know that multiple fixes can be supported by NWNCore so we continue to have a unified playerbase, despite other methods being used in tandem.

Modifié par Borrie BoBaka, 11 décembre 2012 - 06:26 .


#64
Baaleos

Baaleos
  • Members
  • 1 322 messages
The patcher could in theory be built to have a patch / unpatch feature.
If we know the original signature/byte information of the address we are editing, we should be able to restore it.

#65
Melkior_King

Melkior_King
  • Members
  • 135 messages
The patcher I've written in Liberty Basic allows you to patch and revert both files (nwmain and nwserver) individually, very quickly and very easily. Run patcher. Click two buttons. Exit. Patch done. Repeat and the patch is reverted.

The patcher refuses to touch the files unless it can confirm that the location in the file which it's going to change contains the correct data to be changed. That's the equivalent of checking the version number. In fact, it's probably better.

#66
Baaleos

Baaleos
  • Members
  • 1 322 messages
I've just finished messing around with some Memory / Signature finding classes I have in C#

Im going to bundle the functionality into my PW Resource Downloader (which gets automatically updated on client machines)

my players at least will have the option of automatically patching.
I didnt realise how easy it was to change the master server URL.

Btw - If we need somewhere with hosting capabilities - I have 2 Dedicated servers hosted inside
https://www.linx.net/

These are located inside the London Internet Exchange - with direct access to the web without having to pass through ISP. Unlimited Bandwidth, and very high speed Web Accces.

In case thats of use?

Also - I was wondering, how hard is it to make an extra button on the nwn server browser?
If we were making a C# or WIndows Form application that can browse servers - one of the really useful things to add, would be the ability to jump to that PW's server, or to automatically download content for that server.

This is easy when talking about a Windows Form application,
Not so easy when talking about NWN - Im just wondering if anyone has ever attempted to modify the in-game server browser?
eg - add an extra button to the server info display - that can launch a browser?

It just occurs to me that if we are going to recreate the master server, maybe we could add in improvements too.
Plus - if players want to use this master server, they are going to have to download a patch/implement a patch already - optional extras wouldnt be much of a stretch?

Modifié par Baaleos, 11 décembre 2012 - 11:45 .


#67
leo_x

leo_x
  • Members
  • 223 messages

Baaleos wrote...
Also - I was wondering, how hard is it to make an extra button on the nwn server browser?
If we were making a C# or WIndows Form application that can browse servers - one of the really useful things to add, would be the ability to jump to that PW's server, or to automatically download content for that server.

This is easy when talking about a Windows Form application,
Not so easy when talking about NWN - Im just wondering if anyone has ever attempted to modify the in-game server browser?
eg - add an extra button to the server info display - that can launch a browser?

It just occurs to me that if we are going to recreate the master server, maybe we could add in improvements too.
Plus - if players want to use this master server, they are going to have to download a patch/implement a patch already - optional extras wouldnt be much of a stretch?


At least a few people, myself included, expressed an interest in doing something like this.  I was messing around with a few ideas and I wondered if server descriptions could be polled by one of these gamespy/master server projects.  Maybe it's even already included in the gamespy protocol with all the other info?

Hosts that wanted to could opt in by putting some agreed upon XML format in their server descriptions which could then be propigated through the web interfaces that are being made (or into some external clients), which in turn could expose the features like you described above... At least a link to a homepage/forum.  It wouldn't need any extra curation that way.

In any case, just an idea to add to the pile.

Modifié par pope_leo, 11 décembre 2012 - 12:24 .


#68
ehye_khandee

ehye_khandee
  • Members
  • 855 messages
Pope_leo,
just a FYI, each server has a .txt file on it (well ok the file is optional) but it is intended to be polled by gamespy to populate the servers' details page - that text could be tapped (if exists) to populate your proposed interface.

Be well. Game on!
GM_ODA
http://playnwn.com
Server IP 66.232.100.90
ArgentumRegio

#69
leo_x

leo_x
  • Members
  • 223 messages

ehye_khandee wrote...

Pope_leo,
just a FYI, each server has a .txt file on it (well ok the file is optional) but it is intended to be polled by gamespy to populate the servers' details page - that text could be tapped (if exists) to populate your proposed interface.

Be well. Game on!
GM_ODA
http://playnwn.com
Server IP 66.232.100.90
ArgentumRegio


It looks like ServerDesc.txt works for NWN2 also.  I think it would be quite advantageous to have that information at the masterserver/gamespy replacement  web interface level, if it's feasible.

Modifié par pope_leo, 11 décembre 2012 - 01:31 .


#70
Melkior_King

Melkior_King
  • Members
  • 135 messages
For anyone thinking of writing an updater, here are the decimal offsets to the strings in each file which point to the gamespy server usually.
nwmain.exe=5380111
nwnserver.exe=2484135
Normally these locations should contain the string: master.gamespy.com
The string for the server being built by Visavant is: master.nwncore.net

Please wait until Visavant says the server is ready before permanently changing your exe files.

#71
Baaleos

Baaleos
  • Members
  • 1 322 messages
Im not sure - but I think the ServerDesc.txt info is truncated to something like 200-255 characters.

I've had difficulty getting entire descriptions to fit in it.

I can sort of understand why - bandwidth an all.
Similar to why tlk references are used to send communication from server to client.
Perhaps it would be possible to either.

1. Increase the string length visible/transmitted
2. Have it display from another location?
eg - We put a url into the ServerDesc.txt and then the client will actually load the text from that location, instead of the server or master server.

This shifts the bandwidth to the client, opposed to the server or master server having to strain under the increased data transmission.

#72
leo_x

leo_x
  • Members
  • 223 messages
Ah, I forgot that it truncates. But, I think you're right, 255 chars would be enough to work with. Probably for the best so that no one got any crazy ideas.

#73
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
@Visavant - Thank you for the reply!

@Baaleos - Actually, that truncation was happening on the GameSpy server side, not on the NWN side.  I'm 99.99% sure about that.  There was actually a big stink about it years and years ago.  GameSpy used to pass on the full information but then began truncating it.  I'm not sure if that makes any difference to what's being talked about, tho.

#74
AlthorDeMalavir

AlthorDeMalavir
  • Members
  • 22 messages
I can make a web page in PHP, builders can put her server IPs and the page will show a server list with player number, ping, server name, description, etc and downoad a txt file with servers IPs for general porpouses.

If you want i can make this web page.

#75
Baaleos

Baaleos
  • Members
  • 1 322 messages
If it was the master server that was truncating it - then perhaps this works in our favor.
Who says it has to be truncated now?