www.tombraiderforums.com  

Go Back   www.tombraiderforums.com > Tomb Raider Series > Tomb Raider II

Reply
 
Thread Tools
Old 17-05-20, 12:00   #1
Tonyx97
Hobbyist
 
Join Date: Dec 2017
Posts: 4
Lightbulb TRIIO (Tomb Raider II Multiplayer Mod)

Hey, I've never posted in this forum so I guess I will briefly present myself.

I'm Tony, I'm 23 and I'm software developer especialized in reverse engineering and game developing. In the last few years I've been messing with TR2 in my spare time because its my favourite game among the classic ones (don't judge pls) and I really enjoy reversing this kind of old games. When I was a kid I always wondered what would it be to play with your friends online in those classic games. I'm proud to finally achieve that goal, this is a personal satisfaction project but I want people to enjoy it as well because why not.

Since the one actually released in this forum wasn't continued, I decided to release my own with features fully implemented and more. I may continue the project if there is enough interest for the mod, I will use part of my spare time to add and fix features.

I know for sure that many TR fans are talented in many things like coding, drawing etc. and because of that I'm releasing the full source code of the mod in GitHub. Some parts of the code are left as debug or ghetto but in general the code is very clear. The project in GitHub is ready to be compiled so it shouldn't be any trouble compiling and executing it yourself with Visual Studio 17.

I will briefly explain how to use this mod.
  • 1. Download the latest version of the mod and extract it anywhere.
  • 2. If you own a hosted virtual server/dedicated server you should place TRIIO_SV.exe and settings.ini together in your server. If you don't own any of this, you could use Hamachi to open your server to other people, as long as both files are together you can place them wherever you please. Remember to open the ports through the Windows Firewall. I own a few servers for my work and one of them is dedicated to test the mod which I may release to the public if there is enough interest for the mod with a specific death match gamemode. The IP of the server can be found in main.cpp under client folder, all connections will be ignored if you try to connect now. If you are playing with friends locally you don't need to use Hamachi, just use your local network ip which is usually "192.168.x.x", you can look for it using the command "ipconfig" in the Windows command prompt.
  • 3. Open TRIIO_SV.exe to initialize the server, once it's initialized you can go ahead and open TRIIO.exe which is the client that will launch the game and connect to the server. You need to specify the location of the game when you first open the client.
  • 4. To connect to a server you have to use the command "connect" which can take none or one parameter, in the case you don't specify any parameter it will connect automatically to the last joined server, otherwise you have to specify the ip of the server, an example is "connect 127.0.0.1".
  • 5. The game will launch after executing that command and it will connect to the server and that's it.

If you don't know what Hamachi is, search "how to use Hamachi" in YouTube and go through any of the tutorials. If you have no idea how to use Hamachi I will probably post how to properly set it up.

The current features included:
  • Full synchronization of players except for "rifle" weapons animations (shotgun, m16, harpoon and grenader launcher).
  • Synchronization for PVP (Player vs Player).
  • Braid Synchronization.
  • Synchronization of flipped rooms to ensure proper player sync.
  • Synchronization of enemies and other entities like boats, skidoos, doors etc.
  • Full support for all levels. There is a bug in "Home sweet home" that displays the wrong waist of Lara, it will be fixed in future updates.
  • Complete chat to talk (type) with players and commands.
  • Many utility commands in game:
    • "boom": makes your lara explode.
    • "name <new_name>": change your name in the server.
    • "tp <player_name>": teleport to other player, you can also type the player's partial name and it will automatically find it.
    • "level <level_name>": change the current state of the game and move to the beginning of the specified level.
    • "ff <state>": toggle friendly fire, an example would be "ff true" to enable it or "ff 0" to disable it.
    • "give_item <item_name>": receive an item.
    • "kill": kill yourself with this command.
    • "godmode <state>": toggles godmode. This is a simple godmode, it won't save you from spikes, and traps in general. I plan to fully implement godmode.
    • "heal": heal yourself.
    • "infoxygen <state>": toggles infinite oxygen.
    • "infammo <state>": toggles infinite ammo.
    • "nextlevel": complete the level.
    • "boatmaxvel <velocity>": sets the boat max. velocity when you hold CTRL.
    • "skidoomaxvel <velocity>": sets the skidoo max. velocity when you hold CTRL.

Items list: https://github.com/Tonyx97/Tomb-Raid...cal_game.h#L36

Levels list: https://github.com/Tonyx97/Tomb-Raid...cal_game.h#L14

The server has a settings.ini file that is read when you open TRIIO_SV.exe and it applies the settings. The current available settings are the following:
  • sync_enemies (boolean): enables the enemies sync
  • sync_general_entities (boolean): enables the general entities sync (doors, traps etc)
  • sync_blocks (boolean): enables the moving blocks sync
  • sync_doors (boolean): enables the complete sync for doors, traps etc (generally this only includes re-triggering an interactive entitiy like doors which means if this is disabled it won't sync closing doors or traps)
  • sync_vehicles (boolean): enables the vehicle sync. This is a feature that doesn't work well for now and has to be fixed but you can try it.

Here is some media:










The mod supports up to 16 players although you can change this limit if you know how to compile the project. The game should be stable enough to handle at least 16 laras (thank god game runs capped at 30 FPS).

There is a problem when fully synchronizing doors, traps etc. It's not stable at all in some levels and can cause a game crash. Disable it if you have problem with it. I need to find a better solution for this problem. Another common issue is that if you kill enemies with another player and you load a savegame before they were dead they will come to life again to all players, I don't know if I should leave it like that, let me know what you think about it.

If you encounter a bug that I didn't mention please post it here, I'll take a look at it when I have time and fix it. I'm glad to listen to suggestions as well.

Credits to SlikeNet, MinHook and Arsunt whose project helped me reversing some game structures and functions.

Download the mod (current version 1.0.0): https://github.com/Tonyx97/Tomb-Raid....0.0/TRIIO.zip

Download the source code: https://github.com/Tonyx97/Tomb-Raid...ultiplayer-Mod

Some future plans for new features and fixes I have in my list:
  • Ability to drop items to players.
  • Show Player list (including health) when holding TAB key.
  • A death-match gamemode (maybe battle-royale?).
  • Fixing proper weapon firing sound sync.
  • Fixing vehicle sync.
  • Fixing full door, traps etc sync.

Well I think that's all for now, I hope you enjoy it.

NOTE: Windows Defender and other Anti-Viruses detect this mod as a threat due to the "patching" functions used etc. Whitelist the mod or disable the antivirus.

PS: Winston is synchronized as well and you can lock him in the fridge with friends
PS 2: This has been tested in "steam" version, I think it's called Multi patch version. If it crashes instantly or it just doesn't work for you, you should use the steam version, I think providing my Tomb2.exe is enough but I'm not sure, either way it can be easily fixed.

Last edited by Tonyx97; 17-05-20 at 19:11.
Tonyx97 is offline   Reply With Quote
Old 22-05-20, 09:03   #2
SLAYER
Archaeologist
 
SLAYER's Avatar
 
Join Date: Jun 2006
Location: Jordan
Posts: 2,168
Default

I like the console commands, makes me wish the original games had something similar.
__________________
Right now, I'm losing patience
SLAYER is offline   Reply With Quote
Old 22-05-20, 10:50   #3
Tonyx97
Hobbyist
 
Join Date: Dec 2017
Posts: 4
Default

Quote:
Originally Posted by SLAYER View Post
I like the console commands, makes me wish the original games had something similar.
Thanks :P, this is not the first time I release a software that just uses a simple console and I realized that most of people like console for simple things (like it's in this case).
Tonyx97 is offline   Reply With Quote
Old 28-05-20, 19:54   #4
Gizzy91
Hobbyist
 
Join Date: May 2020
Posts: 2
Default

Fantastic mod! I've tried this with a friend and it seems that using a controller doesn't work but kb/m does. I think we're planning on streaming this at some point!
Gizzy91 is offline   Reply With Quote
Old 28-05-20, 20:03   #5
Tonyx97
Hobbyist
 
Join Date: Dec 2017
Posts: 4
Default

Quote:
Originally Posted by Gizzy91 View Post
Fantastic mod! I've tried this with a friend and it seems that using a controller doesn't work but kb/m does. I think we're planning on streaming this at some point!
Thank you! that's great, does the controller work for you without the mod? Because if that's the case that's weird, I can take a look when I have some time. There are programs on the internet that emulate the controller input into keyboard ones so you can use the controller without no issue. I'll probably implement controller emulation in the mod so everyone can use their controllers without downloading any other software.

Last edited by Tonyx97; 28-05-20 at 20:06.
Tonyx97 is offline   Reply With Quote
Old 28-05-20, 20:20   #6
Gizzy91
Hobbyist
 
Join Date: May 2020
Posts: 2
Default

You're welcome! We tested with both our DS4 controllers (One wired, one connected via BT) and it works when launching the game via steam using steam controller configs, but there's no response from the controller when launching via TRIIO.exe

We've certainly noticed the vehicle syncing issue (Invisible boats are fun) and there's been a couple of animation issues - will try to get a video at some point.

Will be keeping an eye on this for further updates!
Gizzy91 is offline   Reply With Quote
Old 28-05-20, 21:45   #7
Tonyx97
Hobbyist
 
Join Date: Dec 2017
Posts: 4
Default

Oh right I forgot, when you launch the game from Steam, this one will inject GameOverlayRenderer.dll into the game and it will automatically handle the controller input. For some reason I can't get my ps4 controller working on the game but you can try and inject "GameOverlayRenderer.dll", which is in the steam folder, into the game with some public injector (while using TRIIO.exe) and let me know if it works, if it does work I can fix it tomorrow easily.
Tonyx97 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.