As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Multiplayer after GameSpy - Lobby and NatNeg

(This is supposed to be a successor for this thread as we shifted from NatNeg/PB only to Lobby & NatNeg.)

Since the shutdown of GameSpy, the official Multiplayer of Civilization 4 is to use the Steam Version and Steam Multiplayer. This thread describes and discusses how to use Pitboss smoothly and restore the original lobby using alternative servers. There are two ways to convince Civ4 to use the alternative server.

Option A: hosts-file:
Run a text editor as administrator, and open the file C:\Windows\System32\drivers\etc\hosts.

Add the following lines:

Code:
# Redirecting the multiplayer of Civilization 4 to a community hosted server.
# Universal entries
148.251.130.188    motd.gamespy.com
148.251.130.188    gmtest.master.gamespy.com
148.251.130.188    peerchat.gamespy.com
148.251.130.188    gpcm.gamespy.com
148.251.130.188    gpsp.gamespy.com
148.251.130.188    gamestats.gamespy.com
148.251.130.188    master.gamespy.com
148.251.130.188    natneg1.gamespy.com
148.251.130.188    natneg2.gamespy.com
148.251.130.188    natneg3.gamespy.com
# Vanilla specific entries
148.251.130.188    civ4.available.gamespy.com
148.251.130.188    civ4.ms18.gamespy.com
148.251.130.188    civ4.master.gamespy.com
148.251.130.188    civ4.natneg1.gamespy.com
148.251.130.188    civ4.natneg2.gamespy.com
148.251.130.188    civ4.natneg3.gamespy.com
# BTS specific entries
148.251.130.188    civ4bts.available.gamespy.com
148.251.130.188    civ4bts.ms7.gamespy.com
148.251.130.188    civ4bts.master.gamespy.com
148.251.130.188    civ4bts.natneg1.gamespy.com
148.251.130.188    civ4bts.natneg2.gamespy.com
148.251.130.188    civ4bts.natneg3.gamespy.com
# additional entries for japan
148.251.130.188    civ4btsjp.available.gamespy.com
148.251.130.188    civ4btsjp.ms5.gamespy.com
148.251.130.188    civ4btsjp.master.gamespy.com
148.251.130.188    civ4btsjp.natneg1.gamespy.com
148.251.130.188    civ4btsjp.natneg2.gamespy.com
148.251.130.188    civ4btsjp.natneg3.gamespy.com
#civ4 col
148.251.130.188 civ4colpc.available.gamespy.com
148.251.130.188 civ4colpc.ms11.gamespy.com
148.251.130.188 civ4colpc.master.gamespy.com
148.251.130.188 civ4colpc.natneg1.gamespy.com
148.251.130.188 civ4colpc.natneg2.gamespy.com
148.251.130.188 civ4colpc.natneg3.gamespy.com
#civ4 col japan version
148.251.130.188 civ4coljp.available.gamespy.com
148.251.130.188 civ4colpc.ms11.gamespy.com
148.251.130.188 civ4coljp.master.gamespy.com
148.251.130.188 civ4coljp.natneg1.gamespy.com
148.251.130.188 civ4coljp.natneg2.gamespy.com
148.251.130.188 civ4coljp.natneg3.gamespy.com
#End of file

Here is a prepared hosts-file.


Note: After editing the file you may have to restart your computer for the changes to have effect. If the server ever changes, you will have to update the hosts file to a new IP address. Some Antivirus solutions may interfere with the manipulation of the hosts file. If the IP address of the server changes in the future, you will have to update the hosts file.

Option B: Alternative exe:
Download this alternative exe file into your Civ4 installation folder and replace the original Civ4BeyondSword.exe. You can also keep the '2015' name and update your link (vanilla version). The alternative exe file is obviously not signed and therefore a security warning may show when you try to run it. This version will work even if the IP address of the server changes.

Restoring Direct IP and lobby in the Steam version of Civ4:
Follow the instruction by 2k

Port Forwarding:
It is very important to note, that the GameSpy NAT negotiation was never perfect, neither is our replacement. There are some routers/ISPs that just don't seem to be able to connect to each other. It was and is strongly recommended to setup port forwarding for UDP 2056-2107.

Multiplayer Menu:
To access the lobby, use "Multiplayer" -> "Internet Games" -> "Create New Account" and then "Login". Even if it still says Gamespy, if you prepared your hosts file or use the alternative exe as described above, it will use the replacement server.

Server Software:
To just play, there is no need to download or run any of the NATNEG/RPMaster exe files (except for the patched Civ4...exe files). The server software is running on my server. If my server it shut down at some point, you can use them and take over.

Contact:
For discussion, bug reports, issues please post in this thread, or send me a private message. I will also build up an overview page at http://civ.zulan.net

Known limitations:
The buddy/friends system of the lobby does not work in the alternative lobby.

Software Development:
All software development is done in an open source fashion on GitHub.
https://github.com/civ4-mp

Credits:
AncientMan2002. Initial GameSpy replacement server for project reality.
Caledorn. hosting the original NatNeg Server.
dingus a.k.a. evillurksinternet. Development of lobby.
Luigi Auriemma. Reverse engineering and documenting the GameSpy protocol and encryption.
novice-rb. Port of NatNeg to Civ4.
Ramkhamhaeng. Development and alternative exe file.
SexIsBad2TheBone. Testing and evangelism
VoW - Voices of War, German Multigaming Clan. Supporting funding of the server until 01/2020.
Several members of https://www.civforum.de/. Supporting funding of the server.
Zulan. Hosting and development.

History:
April 2014: 2k announces that the current multiplayer modes of Civ4 are replaced by the Steam multiplayer.
May 2014: GameSpy shuts down their Servers. The Internet/Lobby non-steam version of Civ4 stops working. Direct IP / Pitboss stops working smoothly due to the lack of Nat Negotiation (NatNeg).
August 2014: novice implemented the alternative NatNeg to avoid bouncing in Pitboss. The server was originally hosted by Caledorn. Zulan hosted an alternative NatNeg as redundancy. See the old thread.
September 2014: To simplify his hosting environment, Caledorn shut down the NatNeg server.
October 2014: dingus started implementing an alternative lobby. Zulan hosted it in addition to the NatNeg. The lobby was originally based on the C# code by AncientMan2002, but due to stability issues, different components were ported to python.
December 2014: 2k provides a way to restore Direct IP / Pitboss for the steam version of Civ4
April 2015: All components except the NatNeg were ported to python, hopefully resolving the stability issues. Improving of the server code is still ongoing.
May 2015: This thread goes online.
May 2015: Updated exe (2015 instead of 2014), now works correctly for the lobby.
July 2016: Updated hosts, IRC and Server browser for Civ4Colonization.
July 2020: Added github organization
Reply

Zulan, is there currently a problem with the NatNeg server? We've had a few reports today with people being unable to peer with other players they've recently been able to peer with (including me when trying to log into our PB18 here today).

Also, is this thread where you would prefer to be notified of possible NatNeg issues?

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

(May 6th, 2015, 15:07)spacetyrantxenu Wrote: Zulan, is there currently a problem with the NatNeg server? We've had a few reports today with people being unable to peer with other players they've recently been able to peer with (including me when trying to log into our PB18 here today).

I don't see anything wrong in particular. The server is running and has lots of traffic right now.
Dingus and I did some testing recently, because other also have peering problems in the lobby. Unfortunately without much success so far. NatNeg is actually the most difficult part to debug. I basically use the code by Novice.

(May 6th, 2015, 15:07)spacetyrantxenu Wrote: Also, is this thread where you would prefer to be notified of possible NatNeg issues?

Yes.
Reply

spacetyrantxenu, reshifting(clearing XML cache) the game sometimes helps if u cant connect now but u could before. I mean both players that cant connect should reshift their game. Also if reshifting doesn't work, restarting router may sometimes help.
Well that's probably only 2 things that i saw people performing that really helped with connecting. Reshift doesnt help that often though.
My guess why this kind of bad connection happens is there is some bug on the game's side related to sockets. But maybe bug can be helped from natneg-server side. Like if natneg can make ur game try to connect with ur counterpart from/to a different port, when it received a report from u that u had a fail connecting.
Reply

We have discovered an issue with the '2014.exe' that games in the lobby did not show up. We updated the exe to '2015.exe'. Also added a vanilla version:

BTS:
https://github.com/Zulan/PRMasterServer/...rd2015.exe
Vanilla:
https://github.com/Zulan/PRMasterServer/...4_2015.exe
Reply

Zulan, are there any current issues with the NatNeg service?

(August 6th, 2015, 06:18)ZuluKing Wrote: Hi All,

I and 2 other players have been successfully using the 148.251.130.188 clone GameSpy server for Direct IP games for many months without issue but have struggled to get it to work consistently in the last 3 weeks.
We can start or continue a 3 player game in around 1 in 10 attempts so it is very frustrating.
We have all each tried to host games.

Since we are only using Direct IP games are these hosts file entries still valid?
148.251.130.188 civ4bts.natneg1.gamespy.com
148.251.130.188 civ4bts.natneg2.gamespy.com
148.251.130.188 civ4bts.natneg3.gamespy.com
148.251.130.188 civ4bts.available.gamespy.com

Alternative is there another clone gamespy server that we can try?

Does anyone have any other suggestions to try to sort out the connection issues?

Thanks,

ZuluKing

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

Hi ZuluKing,

I am not aware of any current issues with the natneg. It is running and has active traffic. Have you tried the atlernative exe instead of the hosts file? Maybe this helps. Sometimes antivirus/security software can interfer with the hosts file manipulation.

You can try to use 148.251.126.92, which I am currently also running for test purposes but it is basically the same natneg. Note that all participating players in a game should use the same natneg.
Reply

Hi Zulan,

Thanks for the reply.
I will try out your suggestions.

The strange thing is that connections have been rock solid for months and only recently we have had the issues.
Perhaps something has changed on one of the player's PCs and I will look harder into this as well.

Thanks,

ZuluKing.
Reply

Hi Zulan and Spacetyrantxenu,

Just to let you know that the problem was a faulty router so nothing to do with the he NatNeg service.

Thanks for your help.

ZuluKing.
Reply

you're welcome, I'm glad you solved it.

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply



Forum Jump: