login_server.exe and patch_server.exe stopped working

sawdawd

Member
I set up a server earlier using 127.0.0.1 as the IP for everything to test and see if the server worked correctly. After I successfully logged in and played that way, I went back and edited PsoBB.exe, tethealla.ini, and ship.ini to use my external IP address instead of 127.0.0.1 so that my friends could connect and play with me. Since then, patch_server.exe closes out almost immediately after I open it, and login_server.exe gets stuck at "Opening server login port 12000 for connections. Could not bind to port : No error". ship_server.exe still works fine except that it can't connect to the login server because the login server isn't working.

For what it's worth, I already forwarded my ports, and I don't have any traffic on ports 11000, 11001, 12000, or 12001. I'm also on Windows 10 Professional 64 bit with Windows Firewall disabled and I already added exceptions to the firewalls I do use. Any insight into what I did or might have done wrong would be greatly appreciated.
 

Soly

Member
You need to bind the servers to the internal IP assigned by the DHCP of the router, and forward the ports to said internal IP.
I recommend you to set your machine with static IP on the DHCP (so it won't randomly change breaking your stuff)

For tethealla.ini, you could set your override IP as your external one as it says there... but iirc I never had to do that.
 

sawdawd

Member
Thanks for clearing that up for me, I was really at my wit's end trying to figure out why it wasn't working. Was I supposed to change it to my internal IP in ship.ini too? It works as is, but I guess I'll find out if I was supposed to when I try to have other people connect to the server and it works or it doesn't :lol:

I'm also having some trouble building ship_server. Would it be better to ask for help about in this thread to minimize clutter or would it be better to make a separate post about that so that it'd be in the right place?
 

Soly

Member
Well... for me, you can ask here... but I don't moderate or anything. SO you could give it a shot until a mod looks at this xD
What kind of issue you have building the ship?
 

sawdawd

Member
I get LNK1120 1 unresolved externals - ship_server.exe and LNK2019 unresolved external symbol _fscanf referenced in function _mts_loadstate - mtwist.lib (mtwist.obj)

Another weird thing I encountered is that when I rebuilt login_server so that I could edit login_server.c to TethVer12513 instead of 12510, I got an error when I tried to login saying that my account info is wrong, but when I used the old login_server.exe with a client I hex edited to 12510 and used the same login info it worked fine.
 

Soly

Member
For the login, you have to make sure the "bbtable" is the same in the client and the login (you can generate a new one and replace it in both)
For the LNK error, did you build the mtwist library? ... do it in debug and release.
 

sawdawd

Member
I don't really understand your latest set of instructions, unfortunately. The only bbtable I have anywhere is in the login_server folder for the source and that's bbtable.h.

I also built the mtwist library successfully, but that didn't fix either of the two errors I had when I tried to build ship_server again.
 

Soly

Member
For the bbtable
In the server source package, you will see a solution named newtable, build it and run it. It will generate 2 files named bbtable.h and bbtable.bin
You have to replace the login's bbtable.h and patch the bbtable.bin inside the game executable, there is an utility here in the forum for that made by Sodaboy, or you can use lee's patcher if you have it.

For the ship LNK error, atm idk why you are getting it.
 

sawdawd

Member
I guess neither one is that important since I can work around both of them for the time being, and it sounds like soda and tofu are going to put out a new release soonish anyway, so I shouldn't sweat the small stuff too much at the moment.

My new problem is that when I try to get my friend to play on the server, he can't connect to the patch server. So far all I've noticed that if I leave the override IP as 0, I can play but my friend can't connect to the patch server. If I change the override IP to my public IP, the game and the patch server spazz out when either one of us starts up the game, but at least then things are equally broken for both of us and he's at least able to connect to some degree.

EDIT: Scratch that, I just had my port forwarding set up wrong. I guess I'm good now unless anyone can help me build ship_server.
 

Soly

Member
The ship should build right away without anything besides building mtwist and prs iirc. You could try to re-download it and see if it builds.
 
Top