TribesNext Patch for Loki Port on Linux

I have created an prototype patch that allows running Tribes 2 with TribesNext on 64-bit Ubuntu. I created this patch so that people with Linux could use one of my favorite FPS games aka Tribes 2. This patch will likely not be compatible with any TribesNext updates, but I can update the code manually if needed. The patch file has no original Tribes 2 code in it, but it contains the TribesNext patch. Please note that this is not the official patch. It will likely not officially be supported by the TribesNext developers. The code inside falls under the original applicable Licenses of TribesNext and Tribes 2. It uses bsdiff and bspatch to patch the Tribes 2 files so that my code doesn't violate the Tribes 2/TribesNext Licenses.

If anyone wants me to change the way the code is patched/remove files that shouldn't be in the patch, please let me know as soon as possible so that I can fix it. Most of the patch is in X86 Assembly Language and ruby. If you choose to use this patch you agree to not hold me/TribesNext/Thyth/The Community responsible if anything goes wrong with anything. Examples include data loss, lost homework, random reboots, overheating GPU, etc. None of those should happen with this patch, but I can't test it on every possible computer.

The patch requires ia32-libs on ubuntu, a recent graphics driver for your video card, and bsdiff/bspatch. Please read the READFIRST/READMEFIRST file inside the extracted folder before doing anything. It is a little complicated to install, so if you know anyone who is good with a Linux shell, you might want to ask them for help. After you install the patch, don't ever run any of the Loki updaters, they will break the install.

If you agree to the above, you can download the patch from here: https://dl.dropbox.com/s/g02o5oa2d1gecnk/t2patch.tar

Hopefully this patch will work for you and will show more people with Linux how Tribes 2 is a great FPS game.

Moderators/Admins: Feel free to remove this post if it contains anything that is not correct/against the rules. If you want, you can edit it too.

Comments

  • I am running a LUbuntu 13.10 AMD64 install. I performed the patch, it can't login to an account that is not already stored on the local machine it appears as I was not able to login to an existing account. However, I was able to run through the account creation process and create a new one and login with it. Attempting to join a server gives me the "Server sent back an invalid response" error message. If I try to join again, the game instantly crashes, apparently right when it's trying to do $accountkey.decrypt().
    BUG! (Segmentation Fault) Going down hard...
    Tribes 2 for Linux #25034
    Built with glibc-2.1 on x86
    Stack dump:
    {
    0xf7736400
    0x81fc610
    0x8106872
    0x81fe691
    0x823b9d0
    0x81cb885
    0x81cbbb8
    0x81d157b
    0x823cf93
    0x81d7457
    0xf7389905
    }
    Please send a full bug report,
    along with the contents of autosave to: support@lokigames.com

    As a side note, I've done something similar here but with a different approach. Mine was incredibly hacky and didn't correctly decrypt client keys so you had to store your key, already decrypted on the local machine. However, it did work properly when attempting to join a TribesNext server.

    In the end, though, the game works just fine underneath of WINE with the proper hackery as outlined in this thread. In my case, running it in WINE actually works better because the actual Linux client isn't working with sound.
  • I have a few questions to help troubleshoot. Which user are you running tribes2 as? I have only tested it as root. It might need root to use the syscalls properly. If the start script isn't working, it might need an extra step. Type "chmod +x tribes2next" before running it. if you are running the tribes2next executable manually, make sure to add a "-online" after it. I am going to upload a modified version of the patch which should hopefully fix this problem. It might be a timing bug too. Wait a few seconds between logging in and connecting to the server. For sound you should try using OSS emulation. I think that alsa has a feature that does that if you run the aoss command.


    If none of the above steps work, try uncommenting the debug console line in base/t2csri/glue.cs and post the console log before the stack dump.

    Thanks for testing this. Hopefully these steps will help.
  • I'm running it as myself. As far as running it as root, I don't like to do that. It's not a permission issue, although I did have that issue originally and had to chmod +x as you said to even get it running. I am running it via the provided script, as well. As far as sound, I could look into all of this but I'm going to wait for your next patch.

    Edit:

    Using the "aoss ./runtribesnext.sh" command works, but it does not appear music playback works nor could you really adjust the volume ingame.
  • I just tested the patch in a limited user with a new install on Kali Linux 64-bit. It had no problems at all. I would try installing the loki compat libraries and add "LD_LIBRARY_PATH=/the/path/to/loki/compat" before the ./tribesnext -online in the run script. I am running kali linux which if I remember correctly is based on ubuntu 12.04 64-bit. The libc version might be causing the problem. In the meantime, I am going to install your current linux distro onto an extra hard drive and try to reproduce the problem on it. The new patch should be available later today or tomorrow if I can figure out what is causing the problem. I would also suggest creating a new user and making sure that the .loki directory does not exist in the home folder. The .loki directory stores most of the configuration so don't delete it if you need anything out of it.
  • The Linux client has operated fine for me before and there has been no changes since then so there shouldn't be an issue with any libraries and such. It's also worked fine with my patch, so there's definitely something your patch isn't doing right.
  • Have you tried removing the DSOs and moving the ~/.loki directory? This could be caused by DSOs in the .loki directory conflicting between the two installs of tribes2. I have had that problem before when testing two different versions of the tribesnext patch while I was developing it. Also, can you try uncommenting the debug console line in base/t2csri/glue.cs and post the log?
  • Deleting ~/.loki appears to have fixed it.
  • 3 Tips to add:

    AUDIO - If audio doesn't work

    It usually mentions that it can't find /dev/dsp in the terminal, which is for the outdated OSS. You need to use ALSA's emulation of oss ("ALSA-OSS").

    *Make sure these packages are installed:

    alsa-utils
    alsa-oss

    *As ROOT run:

    modprobe snd-pcm-oss
    ln -s /dev/dsp1 /dev/dsp

    Really the second line is a symbolic link because the game is looking for /dev/dsp , but it may show up as dsp1, dsp2, dsp3, and so on. If that works in getting the sound back, since that setup is erased every system boot, make it permanent by putting it (as ROOT) in:

    /etc/rc.d/rc.local

    FULLSCREEN STRETCHED

    KILL tribenext process while running to get fullscreen stretched view, in case you get bored of the square view with black borders on the sides. Accidents are wonderful aren't they! (Specifically, I typed in the wrong login password, and I had to kill it via terminal (CTRL+ALT+F4 ; ALT+F7 to get back).



    SERVER PATCH CHECKS

    Some servers (really 1 I found) run a ridiculous patch check or something, meaning if you don't have the same TribesNext patch, you can't play on the server (you CAN spectate). That or it's an actual file check and then you really can't do anything about it. I don't think it's worth updating anything to fix this, if it's even possible. The bots are advanced enough anyway.
  • Is the server patch you refer to at scp server? They activated the anticheat and so you have to have a certain additional file.
  • Ah, Snap Crackle Pub (SCP), yes that was it. Is it tournament only?

    I guess the RC2 patch is ok considering the dates of everything.

    ***That means I'm missing tournamentNetClient.vl2 found here:

    http://www.t2forums.com/index.php?topic=166.0

    And I also stumbled upon the anti-cheat script: http://thyth.com/tn/checkver.cs

    Thanks for the info! Found everything from there.
Sign In or Register to comment.