Jump to content

FlicTool 1.1 (FLH compiler/decompiler)


Merigrim
 Share

Recommended Posts

FlicTool

 

Latest version: 1.1 (Updated 2014-09-27)

FlicTool is an application used to compile and decompile Rock Raiders Flic Animation files (commonly known as FLH files), allowing you to edit existing animations or create new ones. This can be used to create your own animated menus, edit animated cursors, etc.

 

Usage

 

FlicTool is a command line program, which means you have to open a command prompt and run it from there.

The application accepts two arguments, input and output.

 

Example:

FlicTool input_file.flh output_directory

This would decompile the FLH file input_file.flh and place the individual frames in output_directory. The application will automatically detect that input_file.flh is a Flic Animation file, and will then try to decompile it.

Inversely, it is also possible to write

FlicTool input_directory output_file.flh

which would take all the frames found in input_directory and combine them to create output_file.flh. (Frames are recognized by looking for BMP files with names matching frame####.bmp where #### is the zero-padded frame number, starting with 0001)

If you leave out the output file/directory name, it will be assumed to be output.flh when compiling, and output when decompiling.

 

Notes

It should be noted that FlicTool is still in a very early stage of development. There may be lots of bugs yet to be discovered, and many features are still missing. This also means that I have yet to test FlicTool extensively. Remember to make backups of your FLH files before you start tinkering with it. :)

 

Plans

The current compression algorithm creates slightly smaller or slightly larger files when recompiling existing Rock Raiders FLH files, depending on the color data. This doesn't affect the loading of the files in Rock Raiders, but it is still something I wish to address properly when I find the time.

 

Download

Windows: 

Github - https://github.com/Merigrim/FlicTool/release 

RRU - https://www.rockraidersunited.com/files/dl-r11/

 

Linux, OS X: I might provide binaries later, but for now it's easier to build the tool directly from source.

Source:

GitHub - https://github.com/Merigrim/FlicTool (current source)

RRU - https://www.rockraidersunited.com/files/dl-r13/ (v1.1 source)

 

FLH format notes: Still need to write this, but I recon it could be of interest as well so I'll start working on it once the source is uploaded.

 

 

Changelog

Spoiler
Spoiler

1.1 - 2014-09-27

- Added support for 24- and 32-bit bitmaps. The application might break for more exotic BMP headers, if that happens, please tell me so I can fix it. :)

1.0a - 2014-09-23

- This update makes the tool more or less cross platform. Have fun! (Note: Due to not containing any feature additions or bug fixes, the windows binary will not be updated for now.)

1.0dev - 2014-09-18

- Initial release.

--------------------

Hey everyone, first time posting here! I joined a while back, but was never an active member of the forum. Hopefully some of you will find this tool useful. :)

 

Also, this post was written very late (almost 2am here) so I apologize if any parts are hard to understand. I will be back to edit this when I get home tomorrow. :P

Edited by Slimy Slug
added additional source link
Link to comment
Share on other sites

Since the tool is not easily decompilable (I'm guessing it's C/C++?), could I request the source code be made available, in the interest of user safety?

Link to comment
Share on other sites

Since the tool is not easily decompilable (I'm guessing it's C/C++?), could I request the source code be made available, in the interest of user safety?

Hi!

It is indeed C++. :)

I was planning on making the tool open source anyway, but because of the current state of the code (extremely messy and almost no comments, developed over the course of a few days), I need some time before it's ready to be released to the public. Hopefully I should have a git repo up and running by tomorrow unless something else gets in the way. In the meantime, feel free to give it a scan before you try it, or run it in a virtual machine. Also, if addictgamer is still active here I'm sure he could vouch for me since I used to work on GNOMAL with him. :)

Link to comment
Share on other sites

A program for modding as your first post? Awesome!

Hopefully some RR modders will make good use of this. :)

Thanks!

I actually started working on this over a year ago, but unfortunately I don't have access to my desktop PC anymore after moving abroad and I forgot to upload my WIP somewhere, so the code was lost. However, I was reminded of this community a week or two ago and decided that I needed to finish what I started so I rewrote it all from scratch. :P

It might not be terribly useful for smaller mods, but I could see it coming in handy for people working on big overhauls and the like. :)

 

(Oh wow, almost 4am now. Time to go to bed, I'll be back tomorrow to answer any questions and if everything goes as planned with the source code too :))

 

Edit: Source code is a bit delayed due to me having a test tomorrow. Sorry about that!

Link to comment
Share on other sites

Quick update, the source is now available at https://github.com/Merigrim/FlicTool! It's still somewhat messy, I will clean it up more later.

The current version of the code is the same that was used to compile the 1.0dev binary, except with added comments.

When I get the time I will write down everything about the RR FLH format, but at the moment I'm going to focus on improving this tool.

Also, I hope bumping is allowed for updates like this, I read the rules and got that impression. If not, sorry!  :(

Link to comment
Share on other sites

The best kind of first post is always one that provide a new modding tool. :D

Thanks! :D

Another small update, I've added support for 24- and 32-bit bitmaps which means it's no longer necessary to mess around with bit depth when editing frames! :) However, make sure you use colors that can be downsampled correctly or your in-game animation will end up looking ever so slightly different from your actual frames.

  • Like 2
Link to comment
Share on other sites

On 9/18/2014 at 3:49 AM, Merigrim said:

Also, if addictgamer is still active here I'm sure he could vouch for me since I used to work on GNOMAL with him. :)

Darn right I'm still active :D

Great to see you around.

As others have said, this is one of the best kinds of first post somebody can make.

 

Oh hey, I found the FLH tool's old source code.

Link to comment
Share on other sites

Great stuff, looks like the last unknown file of LRR has been finished off! :D

Glad I could help! :)

 

Darn right I'm still active :D

Great to see you around.

As others have said, this is one of the best kinds of first post somebody can make.

Hey man, long time no see! How are you doing? :D

 

Oh hey, I found the FLH tool's old source code.

Oh, yeah, you had it too! Hmm, you wouldn't happen to also have the source code to the RR rendering engine I wrote that could import LWS models? I don't remember if I sent it to you or not. I found it in one of my Git repos but sadly it was an older version without the model loading. :(

Link to comment
Share on other sites

Great stuff, looks like the last unknown file of LRR has been finished off! :D

Just wanted to add...

 

.AE - Object Activities Definitions File (Defines what animations happen when a certain activity is performed, and defines Camera View Stuff)

EXE - (NOTE: Illegal To Modify)

FLC - FLIC Movie File, in a similar format to .FLH, but uses a different header

FLH - FLIC Movie File, Uses Old System Which Is No Longer Supported By Any Movie Player

PTL - *AI Behaviour FIle. Is a level Specific File which is used to define how Rock Raiders and/or other AI behave when a specific event occurs

.OSF is one of the save file types. Maybe put .OSF, .SAV and .DAT together

.SAV contains info about which levels have been completed and how well. Not moddable YET :lol:

.OSF contains info about RRs - hich are upgraded, how much, and what they're trained as.

.DAT is simply a BMP screenshot which you see on the load saved game screen.

Note, I may have mixed .SAV and .OSF up. THe bigger file is definitely the one with the level info.

Not sure if these lists are still accurate though as they were before my time.

Link to comment
Share on other sites

Holy sweet mother of jesus.

 

You mean to tell me, I spent about 3+ years complaining about this, and then finally it gets done and nobody told me?!

 

All I can say is...

 

YES.

Link to comment
Share on other sites

Darn right I'm still active :D

Great to see you around.

As others have said, this is one of the best kinds of first post somebody can make.

Hey man, long time no see! How are you doing? :D

Way too busy to program more than an hour a week :D

I'm really feeling the full-time load this semester. Math, physics, computer science...you name it!

 

Oh hey, I found the FLH tool's old source code.

Oh, yeah, you had it too! Hmm, you wouldn't happen to also have the source code to the RR rendering engine I wrote that could import LWS models? I don't remember if I sent it to you or not. I found it in one of my Git repos but sadly it was an older version without the model loading. :(

You did send it to me, but I may or may not have gotten rid of it. I remember deleting some code somebody sent me on their request. I can't remember if that was you or somebody else.

I'll check when I have a chance -- probably tomorrow evening after I get back from my classes.

Link to comment
Share on other sites

Way too busy to program more than an hour a week :D

I'm really feeling the full-time load this semester. Math, physics, computer science...you name it!

Nice, I'm jealous, haha. :) Been away from "real" studies for over a year now to study Japanese. I'll be returning to my uni next year though, looking forward to it. :P

You did send it to me, but I may or may not have gotten rid of it. I remember deleting some code somebody sent me on their request. I can't remember if that was you or somebody else.

I'll check when I have a chance -- probably tomorrow evening after I get back from my classes.

That doesn't sound like something I would've requested to be deleted, but it's been a while so I can't say for sure. If I did ask for that I guess my old self was a bit stupid haha. Thanks for taking the time to check. :)

Link to comment
Share on other sites

 

Way too busy to program more than an hour a week :D

I'm really feeling the full-time load this semester. Math, physics, computer science...you name it!

Nice, I'm jealous, haha. :) Been away from "real" studies for over a year now to study Japanese. I'll be returning to my uni next year though, looking forward to it. :P

 

Oh, I wouldn't be jealous, if I were you. Like I said, I only have time to program maybe an hour a week this semester x_x

 

 

You did send it to me, but I may or may not have gotten rid of it. I remember deleting some code somebody sent me on their request. I can't remember if that was you or somebody else.

I'll check when I have a chance -- probably tomorrow evening after I get back from my classes.

That doesn't sound like something I would've requested to be deleted, but it's been a while so I can't say for sure. If I did ask for that I guess my old self was a bit stupid haha. Thanks for taking the time to check. :)

 

That's odd. I found a folder named "rockraiders-linux" and it seems to be your project, but...I see no source code! I looked around in my source code folder, but I didn't see any of your code besides the old FLH tool.

Perhaps I missed it, though. My source code folder is massive with many hierarchies of various subdirectories, after all. I'll check again tomorrow (or later this week) if I get a chance.

 

Oh look, I also found the old Flic code.

Link to comment
Share on other sites

Oh, I wouldn't be jealous, if I were you. Like I said, I only have time to program maybe an hour a week this semester x_x

Haha, I guess not. Hang in there! :P

That's odd. I found a folder named "rockraiders-linux" and it seems to be your project, but...I see no source code! I looked around in my source code folder, but I didn't see any of your code besides the old FLH tool.

Perhaps I missed it, though. My source code folder is massive with many hierarchies of various subdirectories, after all. I'll check again tomorrow (or later this week) if I get a chance.

Hmm, that's odd indeed. Just like the FLH tool I ended up rewriting it from scratch for fun (FlicTool was born out of my FLH loading code for the new engine), but I ended up getting some weird bugs in my LWS loading/rendering code so I figured it would be nice to look at what I'm doing different this time around. If you don't end up finding it I'm sure I can figure it out down the line though. :P (I'm only working on it for fun now and then so it's progressing slowly, haha)

Oh look, I also found the old Flic code.

Oh, you mean the code you sent me as a reference?

Link to comment
Share on other sites

That's odd. I found a folder named "rockraiders-linux" and it seems to be your project, but...I see no source code! I looked around in my source code folder, but I didn't see any of your code besides the old FLH tool.

Perhaps I missed it, though. My source code folder is massive with many hierarchies of various subdirectories, after all. I'll check again tomorrow (or later this week) if I get a chance.

Hmm, that's odd indeed. Just like the FLH tool I ended up rewriting it from scratch for fun (FlicTool was born out of my FLH loading code for the new engine), but I ended up getting some weird bugs in my LWS loading/rendering code so I figured it would be nice to look at what I'm doing different this time around. If you don't end up finding it I'm sure I can figure it out down the line though. :P (I'm only working on it for fun now and then so it's progressing slowly, haha)

It seems I don't have the sourcecode anywhere...That's just strange. I'm pretty sure I remember browsing the source in the past.

 

Oh look, I also found the old Flic code.

Oh, you mean the code you sent me as a reference?

Yes.

Link to comment
Share on other sites

  • 4 years later...
20 minutes ago, rockboy said:
I know this thread is ancient, but can anyone re upload this?

Seems I was still subscribed to this thread and got a notification email, been a while since I visited here haha. I made a release at https://github.com/Merigrim/FlicTool/releases with the same binary file as the old Dropbox link (I'd build the latest source code and make a release of that, but I'm a bit busy at the moment. It shouldn't contain any new features anyway if I remember correctly, been a few years).

 

Hope that helps!

  • Like 3
Link to comment
Share on other sites

On 12/19/2018 at 1:36 AM, Merigrim said:
29 minutes ago, Merigrim said:

Seems I was still subscribed to this thread and got a notification email, been a while since I visited here haha. I made a release at https://github.com/Merigrim/FlicTool/releases with the same binary file as the old Dropbox link (I'd build the latest source code and make a release of that, but I'm a bit busy at the moment. It shouldn't contain any new features anyway if I remember correctly, been a few years).

 

Hope that helps!

That was extremely quick, I didn't expect that! Thanks for the binaries, I was having a headache trying to use Cmake and boost, I appreciate the the time you took to build it for me.

Link to comment
Share on other sites

  • 11 months later...

Sorry to also necro this thread, but when decompiling the menu stuff it only outputs 3 or 4 frames. Anyway to fix this?

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.