GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.29k stars 818 forks source link

Soldier of Fortune 2: Double Helix server issue #3145

Closed jobhh closed 3 years ago

jobhh commented 3 years ago

User Story

This issue was created per instruction from @dgibbs64 responding to a post from last month: https://github.com/GameServerManagers/LinuxGSM/issues/2210#issuecomment-723167876. @tkrn indicated this issue can be assigned to him

As a friend of a Soldier of Fortune 2: Double Helix fan, I figured I'd let him kick my ass in these COVID-19 days. I noticed that I couldn't join a clean LinuxGSM sof2 server with a clean GOG sof2 installation. I got the error shown in the image below while the default server setting is "seta sv_allowDownload "1"".

sof2_server_issue

Basic info

Further Information

While trying to troubleshoot I also noticed there is no 1fx folder after the server installation. I read in the Server Request issue for Soldier of Fortune 2 that the server creator mentioned the server side "1fx. Mod", was this included in the LinuxGSM installation?

To Reproduce

Steps to reproduce the behaviour:

  1. Install LinuxGSM and sof2server per instructions
  2. Buy and install GOG SOF2 version
  3. Launch SOF2 and attempt to enter server
  4. See message

Edit: I think the type:bug label can be removed... It's not a bug in LinuxGSM itself.

tkrn commented 3 years ago

I cannot replicate the problem. Fresh install of sof2server with the default master branch. Also, fresh install of SOF2GOLD 1.03. Can you confirm your version by going into SOF2, ` over to console and issue a "\version". Please take a screenshot and attach it to this bug.

2021-01-14_21-09-11

2021-01-14_21-08-23

tkrn commented 3 years ago

@jobhh awaiting input

jobhh commented 3 years ago

My apologies for the delay.

I removed SOF2 and did a clean install from the GOG Galaxy client. This is the client info: image

I also cleared my SOF2 LinuxGSM installation and did a clean install: install log.txt This are the LinuxGSM server details: server details.txt I checked the console output when I tried to connect: console output.txt Sadly, I was disconnected. It still fails on trying to download update103.pk3.

I did figure out what the issue is though. It turns out the GOG installation and the LinuxGSM installation have different update103.pk3 files. The update102.pk and update101.pk do have the same file content.

LinuxGSM checksums:

5151704382CABA677F4642E2B0A88A2ED19CE929C1D75EACEC8BDDF89106E2CE  SHA256  update103.pk3
2C9F60D9FE1402E32EE6CBBA8938B95A59F2B7E05D56A4AE87433DB96A77BC9B  SHA256  update102.pk3
FE407539B13866C831F1009E19C919AB717D5E428F4F973DE2D111FACBD672A7  SHA256  update101.pk3

GOG checksums:

2797E7F1A50E7C7CE29C67C624BF02066EF0F679072E8B6897C67A584F99D0C2  SHA256  update103.pk3 (no match)
2C9F60D9FE1402E32EE6CBBA8938B95A59F2B7E05D56A4AE87433DB96A77BC9B  SHA256  update102.pk3 (match)
FE407539B13866C831F1009E19C919AB717D5E428F4F973DE2D111FACBD672A7  SHA256  update101.PK3 (match) (sidenote: PK3 is uppercase here)

Is the LinuxGSM or GOG version the original update103.pk3 file? Is there something we can do about this? Simply replacing my update103.pk3 with the version of LinuxGSM shows me this error message when attempting to join the server: Client/Server game mismatch: sof2mp-1.02/sof2mp-1.03. Even though the console "\version" command shows V1.03 in my client.

Unrelated question: I read in the Server Request issue for Soldier of Fortune 2 that you mentioned the server side "1fx. Mod", but I didn't see a 1fxmod directory. Was this included in the LinuxGSM installation?

tkrn commented 3 years ago

This is interesting and great detail. Thank you. After review, the server bundle came from the orignal sof2goldfull.exe (SHA256 F8C05D0F805D83CCA1512333BC558ADCC57DE97F1F953FF023E724C819F2EA95) patch released 11/27/2002 - https://www.gamefront.com/games/soldier-of-fortune-2/file/soldier-of-fortune-2-double-helix-gold-full-patch

These are the file hashs from a fresh patch from sof2goldfull.exe: FE407539B13866C831F1009E19C919AB717D5E428F4F973DE2D111FACBD672A7 SHA256 update101.PK3 (match) 2C9F60D9FE1402E32EE6CBBA8938B95A59F2B7E05D56A4AE87433DB96A77BC9B SHA256 update102.pk3 (match) 5151704382CABA677F4642E2B0A88A2ED19CE929C1D75EACEC8BDDF89106E2CE SHA256 update103.pk3 (no match)

It appears there is a difference in update103.pk3 in the Offical patch vs what is included in the GOG edition. Can you do me a favor to test since I don't have the GOG edition, rename your update103.pk3 to update103.bak and try the one from the official patch? I uploaded it here for you to grab quickly to test with, You have the hashes to match it to the download if needed.

jobhh commented 3 years ago

I already tried replacing the GOG update103.pk3 with the official version ;) It sadly din't allow me to join the server.

Simply replacing my update103.pk3 with the version of LinuxGSM shows me this error message when attempting to join the server: Client/Server game mismatch: sof2mp-1.02/sof2mp-1.03. Even though the console "\version" command shows V1.03 in my client.

I could get you the GOG version if it would help to evaluate the issue further?

tkrn commented 3 years ago

After a bit of digging, GOG modified the original pk3 you can see this in the attached image with the 2018 date code. The sv_pure is already set to 0 which should allow this to connect. Although, it's still throwing an error regardless of sv_pure.

sof2-gog-update103-pk3-modified

tkrn commented 3 years ago

I made some traction. The latest binary that Raven ever released for the dedicated server was only ever 1.02a. When you browse the server information on a server, you'll see the server version being that. When you play with the original Raven patch of 1.03 SOF2 Gold connecting to the 1.02a dedicated Linux server was never an issue.

The GOG version made some modifications to the game for whatever reason (technical/legal/etc). What I see that there are three dlls that never existed in the original game these are located under the base/mp folder. The base/mp folder only ever held the cdkey, a config file (maybe) and the PunkBuster Client GUID which was derived off the cdkey. With all that said, GOG introduces these sof2mp_* dll which are modified versions of the original. The originals (cgamex86.dll, gamex86.dll and menusx86.dll) can be found in the root directory.

After some trial and error, it appears these do not need to be present for the multiplayer to work. These files are much smaller than the original renamed equals. I renamed the dlls that were in base/mp to .bak so that the hooks wouldn't load those libraries. After that, the game functioned and connected to the server successfully.

I don't perceive these are necessary for it to function. If they are needed after more testing of this, then I would say let's grab the original libraries from the official Raven 1.03 patch and name them accordingly (sof2mp_cgamex86.dll, sof2mp_gamex86.dll and sof2mp_uix86.dll)

Solution for GOG SOF2: Rename/delete the dll files from base/mp folder.

sof2_dll_rename

jobhh commented 3 years ago

Thank you for investigating this! I've tested the solution you mentioned and it seems, in addition to removing those dll files, we still require the Raven version of the update103.pk3 file before the GOG version of the game can join a LinuxGSM server.

  1. Clean GOG install and renamed the sof2mp_***.dll files from the base\mp folder, with update103.pk3 untouched. Result: Could not download "base/update103.pk3" because autodownloading is disabled on the server. etc...

  2. Clean GOG install and replaced update103.pk3 with the LinuxGSM version, with the dll files untouched. Result: Client/Server game mismatch: sof2mp-1.02/sof2mp-1.03

  3. Clean GOG install, renamed the dll files and replaced update103.pk3 with Raven version. Result: Succesfully joined the server.

So, we have a working solution :) I don't think there is much we can do about this from a LinuxGSM perspective, right? Apart from maybe contacting GOG and asking why they made this change.

One final question: I noticed there is no 1fx folder after the server installation. I read in the Server Request issue for Soldier of Fortune 2 that you mentioned the server side "1fx. Mod". Was this included in the LinuxGSM installation?

dgibbs64 commented 3 years ago

Interesting stuff. I think the next step is to contact GoG and get some info from them about why there are changes. I recommend pointing them in the direction of this issue for all the details.

jobhh commented 3 years ago

Small update: I've contacted GOG and received an update103.pk3 and update104.pk3 file to test with. The 103 is the original pk3 (same as LinuxGSM), and the 104 does not seem to interfere with joining the server.

This seems to fix this error: Could not download "base/update103.pk3" because autodownloading is disabled on the server. etc...

I've replied that the pk3 files seem to work and asked them if there is also something they can do about the (seemingly useless) 3 dll files, to fix this error: Client/Server game mismatch: sof2mp-1.02/sof2mp-1.03

To be continued.

dgibbs64 commented 3 years ago

A brilliant update. Thanks for that @jobhh I look forward to further updates

jobhh commented 3 years ago

It seems like GOG fixed the issues :) I noticed an update in GOG Galaxy, so I did a clean install and I can now join a LinuxGSM server without altering any files. The update103.pk3 file is the original one, GOG added update104.pk3, and the dll files are no longer included.

image

Which means we can close this issue :) Thank you for the support @tkrn! If you would indulge me one last time, could you answer this question? I read in the Server Request issue for Soldier of Fortune 2 that you mentioned the server side "1fx. Mod". Was this included in the LinuxGSM installation?

dgibbs64 commented 3 years ago

That's brilliant news!

tkrn commented 3 years ago

Great news and thanks for reaching out to GOG it's great to hear they were responsive to the request. That's promising for future game servers under their distribution.

1fx mod was included in my first package of this but I goofed. It should have been a mod add on not apart of the base package.

It's my intention to add 1fx back on but as a mod using the LGSM mod add/remove feature. I'm currently a new father so it'll be coming but can't promise when. @jobhh thanks again for all your help and support!

tkrn commented 3 years ago

@jobhh For record sake can you drop the hashes of the latest files so we know what files are known good? After that I'll close up this issue ticket. Thanks!

jobhh commented 3 years ago

Congratulations on becoming a father! Go and spend plenty of time with your family, enjoy :)

These are the functional GOG checksums:

FE407539B13866C831F1009E19C919AB717D5E428F4F973DE2D111FACBD672A7  SHA256  update101.PK3 (match with LinuxGSM)
2C9F60D9FE1402E32EE6CBBA8938B95A59F2B7E05D56A4AE87433DB96A77BC9B  SHA256  update102.pk3 (match with LinuxGSM)
5151704382CABA677F4642E2B0A88A2ED19CE929C1D75EACEC8BDDF89106E2CE  SHA256  update103.pk3 (match with LinuxGSM)
934C2AF7DF966339B9DD0FF705934A0F8E01E21B8645A9C559AC2F0B3024AFFE  SHA256  update104.pk3 (new file)

Perhaps also interesting, this is the update104.pk3 content: image

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.