SWBF1.2 Internet Multiplayer Patch Tutorial

Started by Phobos, April 30, 2013, 02:21:42 AM

Previous topic - Next topic
April 30, 2013, 02:21:42 AM Last Edit: May 29, 2014, 08:03:53 AM by Phobos
Update 5-27-14 - This guide is now outdated and doesn't work anymore (the port forwarding part is still useful). GameMaster has replaced OpenSpy and is easier to use. See these thread for more info:
Port Forwarding - http://www.swbfgamers.com/index.php?topic=6383.0
HOSTS Editing - http://www.swbfgamers.com/index.php?topic=7840.0
GameMaster Discussion - http://www.swbfgamers.com/index.php?topic=7827.msg84317
GameMaster Tutorial - http://www.swbfgamers.com/index.php?topic=7842.0
GameMaster Website - http://gameshare.co/gamemaster






SWBF1.2 Internet Multiplayer Patch Tutorial
Written by Phobos

=========================
Instructions
This tutorial explains how to patch your SWBF1 game so that you can play in multiplayer servers again using internet mode. There appears to be a bug with hosting non-dedicated PC servers currently, but the remote dedicated servers seem to work. Internet Multiplayer is more practical and convenient than having to rely on third party apps such as Tunngle or GameRanger to play SWBF1 online.

Step 1)
Download the SWBF1 Online Patch Kit:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=953


This patch kit download contains:
- A modified HOSTS file
- OpenSpyHelper program
- SleepKiller's batch fix
- A patched 1.2 no CD client executable
- A patched 1.2 dedicated server host executable
- Master server patcher for 1.2 client executable (beta version, might be updated later)
- TXT copy of this tutorial

Step 2)
You have 3 options to choose from to achieve the same result. Just pick one method to use, and if it doesn't seem to work then try another. They should all work in theory but some people have reported problems with method C.

A) Run OpenSpyHelper.exe
When the OpenSpyHelper box appears, type "swbfrontpc" (no quotes) into gamename box and click ok.

B) Run SleepKiller's OpenSpySetup Batch Fix
This is configured to make the same adjustments as openspyhelper.

C) Manually replace the included HOSTS file into this folder
C:\Windows\System32\drivers\etc\
The hosts file has no extension. Simply copy and paste the file, yes to overwrite.

There's a good chance it should work at this point
You should be able to play internet multiplayer now. There are a few caveats:
- When you click Internet the screen will stay on Busy 100% for about 20 seconds, however you can click cancel right away and it will display the server lobby.
- When you first try to join a server it won't let you, you must hit cancel (sometimes it works instantly, other times you have to wait 5-10 seconds), then click join server again and it should work.
- If your game freezes in the server lobby, make sure you close out of xfire completely. Also make sure not to move the cursor for a few seconds. There are occasional full screen game freezes in the server lobby for some reason, but I haven't ran into this problem in windowed mode yet.
- Servers show as 9999 ping, server stats and game (player KDR) stats don't seem to register properly with dedicated servers. We are looking into a fix.

If you still can't connect to servers or having problems
See Advanced Troubleshooting below for more solutions.

=========================
Advanced Troubleshooting
If updating the HOSTS file wasn't enough, try one or both of these methods.

PROBLEM: You can see the servers but when trying to connect it just counts busy over and over again.
SOLUTION: Port Forwarding

- Open Windows Firewall with Advanced Security.
- Go to: Inbound Rules -> New Rule ->
- Paste these numbers into the port box (no quotes): "3658, 3659, 5600, 28910, 29900"
- Click TCP and next
- Allow connection for everything (as checkboxed by default), then name the rule SWBF1TCP
- Make another New Rule, paste in the same numbers 3658, 3659, 5600, 28910, 29900 again, and set this to UDP, then name it SWBF1UDP.
- Repeat the above steps for Outbound Rules as well.

When finished you should have port forwarded the ports 3658, 3659, 5600, 28910, and 29900 for TCP and UDP, both inbound and outbound rules. See this image for reference: 


PROBLEM: When you click Internet, it stays on Busy 0% (instead of 100%).
SOLUTION: Hex Editing Battlefront.exe


For those who want to skip all the complex hex editing, just replace your battlefront.exe in GameData folder with the one included in the patch linked above.

If you would rather manually hex edit your EXE, then here is the actual hex edit process:
Search for "gamespy.com". Ignore the sdkdev leaderboard.asp link. Also ignore gamestats.gamespy.com Use hex editor to change "gamespy.com" to "openspy.net" for the following entries (which appear in this order for 1.2 client):

available.gamespy.com
master.gamespy.com
natnet2.gamespy.com
natneg1.gamespy.com
gamespy.com
gpcm.gamespy.com
gpsp.gamespy.com
http://motd.gamespy.com/motd

You should have made 8 hex edits total to your client exe. Repeat process for server exe.

Server Hex Edits (10 total):
http://motd.gamespy.com/motd (change this 3 times total)
available.gamespy.com
master.gamespy.com
natnet2.gamespy.com
natneg1.gamespy.com
gamespy.com
gpcm.gamespy.com
gpsp.gamespy.com

   
If you don't want to replace your game executable, or manually hex edit yours, you can instead use the SWBF 1.2 patcher exe included which was developed by Wolf. It is designed to automatically make these hex edits to your battlefront.exe

=========================
Server Hosting

Follow the above steps for Port Forwarding, updating HOSTS file, and then replacing the dedicated server executable with the one included in the patch linked above, or manually hex editing the changes. You must apply all of the above processes to the dedicated server in order for it to host properly.

It still shows 9999 ping for now, and server stats don't appear on the bottom of server lobby screen, so if anyone finds a fix to these bugs I will update this tutorial.

Credits:
Wolf - Developing fixes and exe patcher
Rage - Implementing fixes and patching server, writing tutorial
StoneCold - Discovering port forward fixes
SleepKiller - Scripting hosts fix batch

April 30, 2013, 02:21:56 AM #1 Last Edit: May 09, 2013, 04:59:57 PM by Phobos
This post not part of tutorial
Led and SK, take some time to test this out and make sure everything is working, if not let me know what to change. It would be nice if we could find a fix for the 9999 ping and server stats bug, but I'm not sure if that is possible. When I hex edited gamestats.gamespy.com -> gamestats.openspy.net, in the client EXE it does nothing, but for server EXE it breaks the whole thing and it won't even host + generates a random gstats.dat file in the folder.

The most important concerns for me are
Compatiblity: Will it work for EVERYONE? If not, will it at least work more than Tunngle/GR?
Longevity: How long can OpenSpy be a reliable master server host replacement?
I don't have the answers to these questions, but we will find out sooner or later.

Quote from: Wolf
here is a patcher that has been revamped with a transdosian, feel free to redistribute
http://speedy.sh/VEKyw/swbfmasterserverpatch.zip

it seems to work with all versions of swbf (dedicated and client)

next patch will likely contain one or more fixes for the following

1. hang at loading screen when you click join

2. having to cancel and rejoin a server to get in(i might be able to automate it so players don't have to do the trick no promises though)

3.a few other small tweaks

if anyone is still having trouble pm me so that i can either add it to bug list to fix or help you get going.

I'm having issues here, I downloaded (twice just to make sure the first one was screwed up) the thing, I hit run, now it gives me a rectangle with a lizard with a bayonet. It seems cut off, and wont let me do anything. Im assuming that you want me to put the code into the bar that says "file". Any way to fix this? Im also still confused on where to put the downloaded file, you say battlefront exe, but that is what you push to start the game. Sorry these are dumb questions, but I know NOTHING about computers.




Ask your friendly WgT member about joining today!


I use AVG and it freaks out when I try to extract it. AVG says something about trojan horse and asks if I want to remove it. I think I read somewhere that this is normal and I can just ignore the threat?

"I don't know half of you half as well as I should like; and I like less than half of you half as well as you deserve." -Bilbo Baggins


Quote from: Buckler on May 03, 2013, 05:41:43 PM
Josh, do you have xfire ?
no sir-e-bob no. Why, to communicate better? I could do it of FB...




Ask your friendly WgT member about joining today!

Quote from: Josh on May 03, 2013, 12:51:31 PM
I'm having issues here, I downloaded (twice just to make sure the first one was screwed up) the thing, I hit run, now it gives me a rectangle with a lizard with a bayonet. It seems cut off, and wont let me do anything. Im assuming that you want me to put the code into the bar that says "file". Any way to fix this? Im also still confused on where to put the downloaded file, you say battlefront exe, but that is what you push to start the game. Sorry these are dumb questions, but I know NOTHING about computers.
Have you tried going online yet? It's possible you've run something by accident. :)
I play less now but I'll always be around, lets keep this site and battlefront going. :)

gdh I have gone online to try many times, no servers show up.




Ask your friendly WgT member about joining today!

Josh its not the launch button there is a core folder inside it.

whats not the launch button?




Ask your friendly WgT member about joining today!

i am having an issue. when i try to join the fc battlegrounds sever, it says i dont have the map being played....while its a normal stock map. i know fc mods many of their servers, could this be an incompatibility issue?


Quote from: Gen.anime{snp} on May 05, 2013, 11:06:13 AM
i am having an issue. when i try to join the fc battlegrounds sever, it says i dont have the map being played....while its a normal stock map. i know fc mods many of their servers, could this be an incompatibility issue?
No. I recently added Jabba to the [FC]Battlegrounds server. And it will give you that error if you don't have every map listed in the batch maplist, no matter what map it is currently on.

Make sure you have the tat3 folder in your AddOn folder. If it's there already, make sure you don't have more than about 15-20 maps in the addon folder or it causes problems like that.

ah ha, i defiantly have more mos than 20, thanks

It works for me. I just came off the FC server (because it said that there were two people there but the server was empty). I had a good connection. No lag; 102 ping. I had to use the hex edit patch. I'm not sure which of the three options worked for me because I used all of them then I applied the hex patch.

It feels good to be online again. Now I just need a little table to aim on.