Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Little question about the .thn files.

The general place to discuss MOD''ing Freelancer!

Post Wed May 21, 2003 7:24 pm

Little question about the .thn files.

Hello,

Freelancer seems to consist primarily out of those compressed .ini files, and those .thn files. Using bini it's possible to decompress the .ini's, but there's no such tool for the .thn files.
These .thn files seem to contain scripts for the animations, missions and various other things. It appears they're the other integral part of Freelancer. It would be great if these were figured out.
I've been looking into this for a bit now, and I discovered Microsoft is using Lua 3.2 for those files. However, I myself have little experience in back-tracing compiled files. I've been reading the .thn files using a hex editor for a bit, and right now I'm trying to figure out how the opcodes are used.

Right now, the first 11 hexadecimal values of each .thn file are exactly the same, and the following 110 are almost identical. However, those vary slightly.
Then, at the end of those files appear to be a set of variable names and values. But since these .thn files are compiled, I have yet to figure out how they're used in the non-compiled script files.

I was wondering if any of you guys tried this or are doing right now, and if so, if you could care to share what you got?

You can get the sourcecode of lua at www.lua.org, and I'm sure you could find a hex editor if you tried.

I can never think of anything funny to put here.

Post Thu May 22, 2003 12:37 am

The content of .thn files is exactly the same as .wts files.
The only difference is the file extensions have been changed.

Post Thu May 22, 2003 10:35 am

Right, and where would I find there .wts files? I searched my HD but it turned up nothing. And has any progress been made on editing those .wts files then?

I can never think of anything funny to put here.

Edited by - Deepflame on 22-05-2003 11:36:43

Post Thu May 22, 2003 11:21 am

WTS is a class of network computing servers that run Windows applications in a multi-user, time-shared environment where applications and data are accessed by personal computers running a thin client agent or by specialized terminal devices. In WTS environments, the application logic is maintained on the server to simplify “management and administration.

Dont worry about the funny stuff that my way of doing things. At least someone thinks I'm funny some take it as a negative remark.
I'm just a bakedpotato

Post Thu May 22, 2003 11:27 am

Right, but that still doesn't solve the issue about how to edit/create them.

I can never think of anything funny to put here.

Post Thu May 22, 2003 1:23 pm

These files are used for playing multiplayer games online if you dont know what I'm talking about then you should not mess with these files you will just crash your game, and possibly your system. I am not trying to be negative or hurt your feelings in anyway but just trying to tell you to stick with just editing the ini files.

Post Thu May 22, 2003 2:44 pm

No offense, but you should really open them using a hex editor or something.
For example, the ones in the missions/m01a folder (Which is obviously for Singleplayer use only), contain information for the first single player mission, including the ingame movies. 'They aren't used in multiplayer, and aren't used in any system data. So it'd be illogical if they'd crash the system. :p

If you open these files, you'll notice the first 6 bytes are 27 L U A 32 0, which is the exact header of a Lua 32 compiled script. Then, they are followed by a short string that is the source, but that's optional. Then, there are the opcodes and commands that are made to the Lua stack, and that's closed by the variables and constants. If you take the time to look at the Lua sourcecode, you'll see what I mean.

I can never think of anything funny to put here.

Post Thu May 22, 2003 3:16 pm

I know what Lua sourcecode is and I also know many others. I graguated college many years ago and an still learning new code as they are developed. Im just saying that you could screw up your computer by messing around with files you dont have a handle on yet. Just some friendly advice. Please keep it frienlly thats the only way I can respond.

Riding the rainbows Your friend till the end Bakedpotato

Post Thu May 22, 2003 4:03 pm

Ok, that's cool, but I still stand with my point. If you look at the location of those files, and their contents, you'll find them in singleplayer related directories and with singleplayer related contents. So I'm still not planning on giving up figuring out what the original contents were.

Also, I don't really mind crashing my pc, I do that regularly when programming. :p

I can never think of anything funny to put here.

Post Thu May 22, 2003 4:28 pm

Ok looks like were on the same thoughts here just remember that the game has a licence ( Official or legal permission ) I have read the code in the files and yes they are linked so that the server doesn't choke.

Do you ever feel the pain BakedPotato

Post Thu May 22, 2003 4:58 pm

Hey, I'd be a pretty louzy modder if I'd give up this fast, wouldn't I?

I can never think of anything funny to put here.

Post Thu May 22, 2003 6:57 pm

There is an application to view/edit the .thn files. I couldn't find it in the downloads section, but it is called FLED, and is made by Dixi. I know that there is a link to an external download site somewhere in the forums. You could probably find it with a search on FLED.

Hope it helps.

I'd better be lookin' at a fat retirement with this deal...

Post Thu May 22, 2003 7:05 pm

Ah yes, that was exactly what I was trying to do Thanks.
That topic is Here

Oh well, guess I can always just go and write a documentation about these files. Perhaps someday someone'll make a cool single player mod then.

I can never think of anything funny to put here.

Edited by - Deepflame on 22-05-2003 20:07:48

Post Fri May 23, 2003 4:06 am

Deepflame
Its what I have been working on since the day I bought the game."Perhaps someday someone'll make a cool single player mod then". I dont know when it will be finished because you can add so much to the game its like an expansion pak.

Post Fri May 23, 2003 4:53 am

Someone has made a .thn decompiler. It was made by dixi.
click on this link to go to the topic

Dixi's .thn decompiler .
the decompiled files can be read in wordpad

Return to Freelancer General Editing Forum