Mod Loading system and mods for Tribes 2 written in C++.
Find a file
2015-06-30 15:52:39 -07:00
CommonAPI Added a few things that I forgot 2015-06-30 15:52:39 -07:00
Mod Sources Added a few things that I forgot 2015-06-30 15:52:39 -07:00
ModLoader Updated the ModLoader 2015-06-29 13:06:40 -07:00
Patches Added a new TSTick call to TSExtension 2015-03-24 12:36:24 -07:00
.gitignore Cleaned up the repo and removed useless files 2014-08-05 18:06:55 -04:00
Everything.sln Restructured project structure to use a singular SLN; made the T2API common to all projects; adjusted watchdog timer to 8 seconds 2015-06-27 13:36:30 -04:00
Everything.suo Restructured project structure to use a singular SLN; made the T2API common to all projects; adjusted watchdog timer to 8 seconds 2015-06-27 13:36:30 -04:00
LICENSE Initial commit 2014-08-05 00:44:01 -04:00
README.md Updated README.md to reflect Bullet addition 2015-06-27 14:03:39 -04:00

T2CPP

Mod Loading system and mods for Tribes 2 written in C++.

Credit Attribution

Name Reasons
Robert MacGregor Main Coding
Calvin Balke Found Projectile::explode
Linker Original T2DLL Code
LouCypher Reverse engineered a IFC22.dll replacement he made to build some template code
Jason R. Blevins [Mersenne Twister Implementation](Mod Sources/RandomMod/RandomMod/source/mt.cc)

What is it?

Tribes 2 C++ (T2CPP) provides a C++ API on top of the existing API left by Linker. This is all provided from a custom built replacement IFC22.dll replacement for the game which was reverse engineered from the IFC22.dll implementation of TribesNext by LouCypher.

The template coding for my IFC22.dll can be found here and the project page for T2CPP itself is here.

In this Repository

The T2CPP project also contains sources for five different mods, which are listed below.

Mod Name
Template Mod
TSExtension
Random Mod
Watchdog
Bullet

Usage

Essentially, you just need to compile a Release version of the ModLoader DLL and replace Tribes 2's IFC22.dll with the new DLL you built. To use the DLL, you must make sure you have Force Feedback enabled (it works for dedicated servers too) otherwise the IFC22.dll replacement code is never executed. You can test if you did it correctly by checking for the existence of the Torque Script function "loadMod". Refer to the [Base Mod](Mod Sources/BaseMod) for C++ mod template and refer to both the [Linker and DX API's](Mod Sources/TSExtension/TSExtension/source) for how to manipulate Tribes 2.

Once everything is running, you must create a "mods" folder in the GameData folder of your Tribes 2 installation, this is where the compiled DLL mods you wish to run will go. If you install a mod called "RandomMod.dll" to the mods folder, you must stick a line of Torque Script somewhere (probably autoexec) that's always executed that reads:

loadMod("RandomMod"); // Note the absense of the mods/ directory and the .dll on the end, the code handles that

loadMod(): Failed to load DLL '%s'. Does it exist in GameData\mods? (%u)

This simply means that loadMod() was unable to locate the desired DLL in the mods folder. Make sure it exists there.

loadMod(): Failed to locate entry point 'ModInitialize' in mod DLL '%s'. Is it a good mod DLL? (%u)

This error means that the DLL you specified probably isn't a proper mod DLL for this system. Either that or the DLL wasn't built correctly. The "void ModInitialize(void)" function must be built as extern C and should be defined with "__declspec(dllexport)" to work.

loadMod() is not found and I have the IFC22.dll replacement installed.

You probably don't have Force Feedback enabled. It can be enabled in Tribes 2's Settings under the "Game" tab or with the following preference: $Pref::useImmersion = "1";