luaCall with new Executable?

Hello all. I don't know if this is the place to post this question, but i'll ask anyway.

Well, Recently I downloaded linker's Lua 5.1 for Tribes 2. I installed it and placed it everywhere I needed to in the gamedata folder, and I even tried to run the modified executable.

Aparently, I need the TN modded Executable to play the game, Which means that Linker's LUA code is useless because I can not figure out how to call functions.

I was thinking a third-party program made specifically for calling that function, but I don't know the code to the luaCall. Is there a different code or something that already came with T2? Or is there an injection program to inject the code into the TN modified executable?

I am trying to get my script to work, and I need LUA to do it. And I can't even use the console specifically for lua. Isn't there a program that I can download/create that would run the function luaCall? Doesn't T2 run the lua programming language as if it were a 3rd party program? Or execute it the same time it runs?

I've desperately tried everything, and I cannot figure this out. I am in need of some help, if y'all are willing to help.

The problem is, it doesn't actually patch the t2 executable... I don't think.. I think it just replaces the executable with another one that's already modified, I don't know the code that was placed in linkers executable. I even tried FILE COMPARISON to figure out what code was added, and add it to the executable without decompiling and then recompiling. I guess I will never know.

Thank you for your help. I'm trying to do many cool things with Lua 5.1, and was excited when I saw linkers post for Lua 5.1. Isn't there a TN modified executable with the LUA code in it already? Or is there a way to inject it?


  • This goes far beyond my level of technical expertise (like asking for tech support in a mcdonalds drive thru) but I'll try to help anyway.

    As far as I know, I remember elec saying at one point he used Ruby to make the TN implementation and whatever the hell that is there's a good chance it's connected to what you're asking.

    Actually now that I re-read your post I don't feel like I'm nowhere near being helpful, but I liked that mcdonalds joke, cheers!
  • EEolk Angry Old Man
    Are you trying to get Linker's gift to work?
  • TThyth AKA Electricutioner
    Isn't there a TN modified executable with the LUA code in it already?
    TribesNext only supports Ruby as a parallel language to the built in script system. The only reason it was added was to support the cryptographic primitives (e.g. RSA) necessary for digital signatures and authentication protocols.

    The APIs that I've added are primarily for use by the TribesNext dev team, and not developers at large. Caveat emptor: they may (and do) contain bugs and other particular implementation nuances, so you need to be pretty careful when you're using them.

    Since I only add things as I need them, I avoid including extraneous features like yet-another-language-interpreter. There is no version of TribesNext itself that supports Lua.
    Or is there a way to inject it?
    Long answer: yes, there's always a way to inject additional code. Keep in mind that the modifications to the executable itself are rather small (really only enough to load a custom DLL). The TribesNext DLL contains the vast majority of the custom native code for the project (including setting up the Ruby interpreter), but it's not something that we'll ever be open sourcing.

    You can use the same or similar approach to load another DLL before or after the TribesNext one. Linker's gift source code contains a list of useful function addresses that you can use as an API to connect the game to your custom code, and is a good starting point. You'll need to customize the code so that you don't block the loading of the TribesNext code if you actually plan on playing online though.

    If the above sounds too complex, then the short answer to your question is: no.
  • NaosythNaosyth AKA Avenger777
    It'd probably be easier to just rewrite the LUA part of his gift (auto aim lol) with Torque Script
  • Thyth, Thank you for your rather intelligent reply. And actually, no. It doesn't seem that complicated, however, it would not hurt to try. One of my main ideas were to simply inject the modified EXE Code that linkers python patcher does, into the TribesNext EXE.

    Naosyth: Well yes and No. I was trying to load one of my written programs that was made in LUA to load in tribes. And I guess it'd be great to get Linker's Gift to work again. I only want to use the player detection function. I don't care about the auto-aim. But I guess I'd better go and start researching if I want to build the luaCall again.
  • Eolk: Yes I am trying to get it to work, as well as many other stuff that I've written. (Experimentation ftw.)
  • I could do this.


    I added support for his DLL to my replacement IFC22 project.
Sign In or Register to comment.