Thorn (*.thn) Decompiler
-
As you may not be aware, thorn.dll actually has a routine to dump a thorn file as text. I first tried this quite a while ago, without luck. Knowing slightly more than I did then, this time I got it working. It’s a bit raw at the moment (command line, no help, must run it in EXE, appends .lua to original file name, crashes if you don’t give it a file name), but I hope it should be enough for you to tell me if it’s worth pursuing.
-
It is a worthwhile project, the thorn converter requires that the .thn file is in the same directory, which is a bit of a hassle, in your case you could easily make it read from any folder or make t into a GUI based program.
-
LancerSolurus wrote:
It is a worthwhile project, the thorn converter requires that the .thn file is in the same directory, which is a bit of a hassle, in your case you could easily make it read from any folder or make t into a GUI based program.Sorry Lancer, but i have to disagree on that the .thn requires to be in the same directory. The tool i know (picture below) has already a GUI that allows you to select a different path.
On what i have to agree that this tool would be worthwhile with a GUI and the ability to decode all .thn files correctly. AFAIK there were issues in the past while decoding some, but maybe my memory is bad on this topic, so plz bear with me.
Maybe it´s also nice to “mass-decode” .thn files ?
Or even better get a GUI-based editor that helps you creating .thn files without having to care about all this {} correctly closed or selecting the ships, stations, equip directly. A bit like a kind of FLE for .thn files ? Ok, Ok, whishful thinking here.cheers
CURSOR -
FLEd-Thorn has large issues with certain THNs that have too large paths defined, I believe. A native tool would be extremely worthwhile
-
dunno, i like this bracket thingy’s. its kinda structure. do you guys edit thn’s often? cuz i have downloaded an thn SDK somewhere and have been working with this quite well. though flscan had to correct some files if im right. however, dunno of you but i prefer making thn’s from scratch rather than edit the ones present in vanilla. this way you don’t make too much bytes and do not delete too much important stuff. just use the tuts on the starport archive.
-
@TheDvDMan: the tool were talking about decodes the .thn files with Freelancer that control the Animation-sequences you know aout of the SP-Campaign or the Intros in the Menu-Screen.
@Gisteron: well, youre right in saying that the {} structure the file, but the tut´s out there for doing .thn are crap like hell. sorry my 2 cents and that i´m far too busy and lazy todo a better one.
What i meant was that something with a kind of GUI and errorchecker, maybe syntaxchecker would be nice. Yer, i know in FLScan 1.3 there was a kind of “corrector”, it wasnt just that good. Or just imagine that you can setup a scene in 3D and select all the needed things from a drop down menu and place it on a kind of timescale, like a video edit programm instead of haveing all this :
…{ entity_name=“Path_Hwy_Orient_L_away”, type=MOTION_PATH, template_name=“”, lt_grp=0, srt_grp=0, usr_flg=0, spatialprops={ pos={ -17.205601, 72.286118, 190.966476 }, orient={ { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } } }, pathprops={ path_type=“CV_CROrientationSplinePath”, path_data="OPEN, {-5.000000,0.000000,0.000000}, {0.949276,0.033018,-0.244512,0.194935}, {5.000000,0.000000,0.000000}, {0.968905,0.077034,-0.234397,0.018636}, " } },…
than you dont had to care about rotating matrix while you setup a camera, or defining a spline path, attach enity´s……
guess you get what i mean. But like i said, maybe i´m only Daydreaming and cool looking easy to create .thn are just only whished by me. Yes i can do them also with the Editor, and yes i do them from scratch, it´s just more timeintense to do them this way.
cheers
CURSOR -
My limited experience with FLEd’s is that it would make some negative numbers positive - this particularly affected pcurve_period. My patched version fixes that problem. I believe FLScan would convert all pcurve_period to a single number, which is just as bad as the original problem. This version actually loads the thorn file first, then writes it as lua. One side-effect is that it appears to use an unstable sort to order all the events, so events at the same time are in a different order to the thn file. I don’t expect it’s a problem, since I expect the new order will be how it processes them, anyway. Although converting an already converted file might result in yet another ordering.