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

.thn-files uncovered

The general place to discuss MOD''ing Freelancer!

Post Thu Mar 27, 2003 1:33 pm

.thn-files uncovered

This is for coders only!

You will find two files in the directory http://www.inf.tu-dresden.de/~rw8/flhacks/. One is named "thnfiles.txt" and covers the most important things about the .thn-script-files and the perl decompiler script "decompiler", which is the second file.

As I'm not into coding for Windows I hope someone else can do it with the help of these two files :-)

Good luck!

Post Thu Mar 27, 2003 1:43 pm

Ayee..damn you, was working on the exact same thing last night =)
I was planning to make a simple decompiler for them but got all caught up in changing stuff in the scripts.
Good work.

Post Thu Mar 27, 2003 7:32 pm

What do these .thn script files do?

PS - is that Perl *4* you're writing?! *smirk*

Post Thu Mar 27, 2003 8:05 pm

The thn-files are for the "active" scripting. I still dunno whats active about them, maybe it was just easier for the programmers to use an embedded scripting language like lua instead of creating something on their own ... *shrug*

Anyway, to show you what these scripts look alike, I put up one example (the script for the first cutscene). Just look into the examples directory I put up beside the two files. The files were created in the following order:
(1) s002.asm by deassembling s002xe...thn
(2) s002.lua by decompiling s002.asm and indenting the result from the decompiler
(3) s002.lua.thn by compiling s002.lua (with optimizations on)
(4) s002.lua.thn.asm by deassembling s002.lua.thn
The resulting s002.lua.thn is "bloated" because of the floating point precision problems
(something like 0.5 got "converted" to 0.4999999999)

btw I'm not a professional perl coder ... on the other hand thats probably good for the readability *g*

HCl

Post Thu Mar 27, 2003 8:54 pm

Great work on the decompiler, thanks

Post Thu Mar 27, 2003 10:43 pm

Ahhh... Cutscenes! I get it.

Return to Freelancer General Editing Forum