MAKE YOUR OWN UNITS - FLICster Version 1.0.1 (build 18) now available!

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
Version 1.0.1 Now Available

Please note:Version 1.0.1 (build 18) is a minor bugfix release for v1.0.0. If you already have 1.0.0, hop to the end of this post to get the patch. If not, keep reading. New users will need to get the 1.0.0 full install, then apply the 1.0.1 patch. And now, back to your original post for v1.0.0:

Well, It's finally done. FLICster v1.0.0 (build 17). Its a major revamp. Hopefully you won't even recognize it. Here the short list of new stuff:

* New FLC Viewer. Allows viewing of Civ3UnitFlcs. Each direction can be viewed. Units can be viewed with default colors or with any civ-specific colors. Also allows viewing with 'simulated alpha blending', to show how shadow effects actually look.

* New Export formats: StoryBoard PCX, Filmstrip PCX, and Cel PCX. Storyboard creates a single PCX containing all frames of all directional animation laid out in a grid. Each direction is tiled left-to-right in its own row. Filmstrip is similar, except that each direction's row of frames is saved to a different PCX file. Cel creates a separate PCX for each frame in each direction of the animation. Exporting to these formats also creates a FXM (FLICster eXport Manifest) file, containing information required to create a new Civ3UnitFlic from the PCX File(s). Storyboard and Filmstrip formats can include an optional border (recommended!).

* New FXM Viewer. The FXM viewer allows the animations stored in a PCX Storyboard, or PCX Filmstrips/Cels, to be viewed just like a completed FLC. Viewer features are the same as the FLC viewer. Additionally, the FXM viewer has a 'Popup' mode, which hides the full application, and displays an always-on-top version of the viewer, for checking your progress while editing the PCX file(s).

* Change more stuff - when exporting to PCX, you can change the frame size, frame count, filename, color palette, and animation speed.

* Start from scratch - Just select File|New... to create a blank StoryBoard (or other PCX format).

* Support for single-direction Civ3UnitFlcs, such as CruiseMissileDeath.flc

* Additional PAL file created with 'Alpha' coloring. See 'HOW TO USE IT' for important details.

* FLICster 0.2.2 style 'split' and 'merge' functionality is still supported, although it is deprecated. To split a file into standard FLC files, open the Civ3UnitFlc and set the export type to 'Multiple Standard FLCs'. Still creates an INI file. To merge the standard FLCs into a Civ3UnitFlc, Choose File|Open... and select the INI file. You may need to set the file type to "*.*"

* Help|About... function.

* Rewrote the readme file.


As always, I will send copies to the mods, to post here if they wish. In the interim, I've posted the full install and a small install to my Yahoo! Briefcase - http://briefcase.yahoo.com/moeniir. Note that in order to use the small install, you will need the latest comdlg32.ocx, mscomctl.ocx, mscomct2.ocx, and msvbvm60.dll. If you aren't sure, just grab the full install.

v1.0.1 (build 18) patch note: The full install is still for v1.0.0; just get the patch and apply when done. The small install for v1.0.0 is no longer available, just get the v1.0.1 patch (the patch is the same as the small installer - an exe and a couple of readmes.)

The files are now uploaded to CFC's file server!

v1.0.1 (build 18) Patch/Small Install (120 KB): http://forums.civfanatics.com/attachment.php?s=&postid=164601_Small.zip

v1.0.0 (build 17) Full Setup (2.4 MB):
http://www.civfanatics.net/downloads/civ3/utility/FLICster1.0.0.17_FullSetup.zip
 

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
Remember, you need to already have the VB6 runtime (VB6RUN.DLL) and the latest MS Common Dialog (COMDLG32.OCX) to use the small distro. Otherwise, get the full installer.

UPDATE 30 Nov 2001 The latest version is 0.2.2 (build 5). You can get the small install here: http://forums.civfanatics.com/attachment.php?s=&postid=118590
 

Attachments

  • flicster_small.zip
    24.5 KB · Views: 1,902

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
PART 1 of 2
---------------------------------------------

README.TXT
for FLICster 0.1.1beta
by Moeniir - moeniir@home.com

WHAT IT IS
----------

FLICster is a FLC file utility for working with unit .FLCs for Civization III from Firaxis/Infogrames. This version is *extremely* beta quality. For the love of all that is holy, BACK UP YOUR civilization III\art\units folder and all subfolders before running this thing. You've been warned.

WHAT IT DOES
------------

FLICSter, or at least, this version of FLICster, does two things. Well, three things. The first feature - it can read a Civ III unit animation (.flc) file and split it into 8 standard .FLC files ( one for each direction, N,NE,E, etc ) which can be edited with a standard FLC editor like Animation Shop. The second feature - it can read in 8 standard FLC files and turn them into a CIV III compatible unit FLC (with a truckload of limitations and caveats - keep reading). The other feature is that it can spit out a bunch of information about FLC files to help in diagnosing problems.

WHY IT EXISTS
-------------

The FLC format is a file format for animation - a series of still frames, displayed in sequence. CIV III uses FLC files for many purposes, most complex among them for unit animations. Each unit in CIV III has several different animations - run (movement), attack, death, fidget, etc. Each animation is stored in a FLC file. Unfortunately for potential unit creators, CIV III uses a non standard FLC format. For this reason, existing FLC editing programs, such as Jasc's Animation Shop, cannot edit these files. Some programs just crash opening the CIV III files, others appear to work, but any files saved from them will crash CIV III. FLICster was created to address this problem. Keep reading for all of the gory details (at the end of this file).

INSTALLATION
------------
Run the installer. If you already have the VB6 runtime on your system, you may be able to get the SMALL distribution, which is just the exe and the readme. If so, you can figure out the rest :) In any event, check the civ III forums on http://www.civfanatics.com for the latest version.

HOW TO USE IT
-------------
Run FLICster.exe. Click the little ... button next to the filename box, to browse for files. It will start you in C:\Program files\infogrames interactive\art\units. If you installed to another location, sorry. I'll fix that next release (I think). Navigate into a unit folder, pick a FLC file, and click okay. Now, in the main interface, you can click 'View File Info' to see a bunch of info about whats in the file. I suggest you do this before splitting a file... it'll hoot if it can't make sense of the file. Now, click 'Split File' to create the direction files. FLICster will create a subdirectory, called FLICster (didn't see that coming, did you?), in the folder where the civIII file was opened. This subfolder will contain an INI file used for remerging, and 8 animation files.

Edit the individual animation files. Please don't change the size (height & width) of a file, unless you've read THE GORY DETAILS and are sure you know what you are doing. Also, DON't change the number of frames. Just resist the urge man.

Once you are ready to see your handi work in CIV III, run FLICster, and browse to the FLICster folder containing the files you've been editing. Point it at the INI file (be sure to thet the INI file in the FLICster subdirectory, NOT the INI file in the unit directory - that belongs to civ III). Click 'View file info' to test the files. If there is a potential problem merging, you'll be warned. Once this is done, if all is well, click MERGE. The new FLC will be put in the FLICster subdir where the INI file came from. Its up to you to move it up a level into the unit folder. AND YOU REMEMBERED THE BACK UP, RIGHT?

BTW, take a look in the INI file if you like. When testing the program, I split open the CavalryRun.flc. I then hand edited the INI file to change which animations went with each direction (it has simple lines like "NE=CavalryRun_NE.FLC". Then I merged and tested it. I got a cavalry unit that gallopes backward everywhere it goes. :) WARNING: Don't get crazy and try using paths (like, "NE=C:\MYWORK\UnitRun_NE.FLC"). All your files have to stay in one directory. Sorry.

LICENCING
---------

There isn't really any. Use it, abuse it, share it with you friends. Just dont:
- distribute part of it. If you share it share the whole thing (including this README!)
- Blame me if it breaks. I told you it was extra-beta with a side of "oops!"
- forget to backup your art\units folder. Really.
- Decompile. I'll probably release source code once I clean it up (but no promises). If you just can wait, e-mail me.

THE FUTURE
---------

The fututre of FLICster depends on a few things. First of all is Firaxis. If they release a whiz-bang FLC editor for CIV III, that will probably make reduntant all of this. Another dependancy is you - and everyone else. If people like it, I'll probably keep working on it. If people hate it, well, screw 'em, I may still keep working one. Lastly, is my time. I have a wonderful job as a programmer which feeds and clothes me and mine. But it takes up my time. As do my home, my wife, and my kids. In between times, I like to play CIV III (duh). FLICster is somewhere further down the list.


APPOLOGIES & CREDITS
--------------------
I've never done anything with graphics programing or graphics file formats before. So If I screwed up, sorry. Also, I'm no artist or mod maker, so I haven't really put this thing thru its paces. Sorry there too.

Big thanks to SWB of Civfanatics' "CIV3 Creation and Customization" forum (http://forums.civfanatics.com) for getting the ball rolling on this. Thanks also to Dan Megha of firaxis for reading the threads and getting Mike Breitkreutz, a Firaxis developer, involved. Big Thanks to Mike Breitkreutz for sending SWB a rundown of the custom parts of the format. ANother round of thanks to SWB for posting that info, and a link to an excellent FLC format reference at http://www.compuphase.com/flic.htm. These are the resources I used to build this thing.


(This post is too long. Part 2 of 2 contains THE GORY DETAILS.)
 

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
(This is part 2 of 2. Part one is also on this thread)
----------------------------------------------------------------

THE GORY DETAILS
----------------

1. Frames
Each unit in CIV III can face, and move in, 8 directions - the 4 cardinal directions (N, E, W, S) and the 4 'betweens' (NE, NW, SE, SW). In order to animate, say a horseman moving, you need 8 animations - one for each direction. Instead of having 8 FLC files for each animation, Firaxis decided to combine the 8 animations into a single file. They also added a custom header inside a 'reserved' 40-byte range in the standard FLC header.

A FLC file doesn't normally just store a bunch of still images. To save space, the first frame is stored, and then DELTAs are stored. A delta is a description of the difference between two frames. Taking the RUN animation of the CIV III Horseman unit as an example, it turns out that the Horseman RUN animation is 10 frames long (for a single direction). So, instead of something like this:

IMG1, IMG2, IMG3, IMG4, IMG5, IMG6, IMG7, IMG8, IMG9, IMG10

The FLC Format would store this:

IMG1, DELTA1->2, DLT2->3, DLT3->4, DLT4->5, DLT5->6, DLT6->7, DLT7->8, DLT8->9, DLT9->10

Only, there's another surprise. After displaying only the changes, or deltas, up to frame 10, the program looping an animation would have to display all of frame one, which is slower. SO, FLC files include an extra DELTA frame, called the RING FRAME, which is the delta from the last frame back to the first. In our case, this means we add DLT10->1 to the frame list above.

SO, we seem to have 11 frames for a 10 frame animation. The header of the FLC file has a field indicating the number of frames, it should say 10, and programs reading the file should know about ring frames.

Now, in the case of a civIII file, say, the horseman FLC we were discussing, the file contains 88 frames (8 directions x 11 frames per direction). The Frames field of the header, however, says 80. So if a standard program reads a CIV III file, the best you can hope for is 11 frames of SW, 11 frames of south, etc, ending with 3 frames of West - 80 of 88 frames, including 7 ring frames. When splitting a CIV III FLC, say, HorsemanRun.FLC, FLICster will emit 8 standard flics, with names like HorsemanRun_SW.FLC, HorsemanRun_S.FLC, etc. It also spits out an INI file, which specifies all the the standard files created, as well as a few other pieces of info from the reserved field of the original header - information need to remerge the files.

2. Colors
In addition to the framecount issues, there is another issue that arises when splitting. In a FLC file, each frame is stored in a 'Chunk'. Each frame can (and indeed, must) contain sub-chunks. The first kind of subchunk you are likely to find is a BYTE_RUN chunk. This is just a RLE-encoded image. The first frame of an animation will always contain a BYTE_RUN (well, always for purposes of this discussion). The next type of chunk you'll see in a frame is DELTA_FLI. This is delta info. So, our Horseman's 10 frame run might be 1 frame containing a single subchunk of type BYTE_RUN, followed by 10 frames, each containing a single DELTA_FLI.

BUT (and there's always a but, isn't there), the images in the BYTE_RUNs are 64 color or 256 color palleted bitmaps. So, we need to stick a pallete in there, at least for the first byte_run. And you know, if we could change palletes as we load deltas, we could get some cool effects, and extend our color range for the whole animation. So, it turns out, any FRAME chunk can contain a COLOR_256 chunk (or color_64, but CIV doesn't go play that way) in addition to a BYTE_RUN or DELTA_FLI.
In practice, I found that for many CIV III files, only the first BYTERUN has pallete, but for others, several frames have palettes. IN EVERY CASE I LOOKED AT, however, only the frames in the first 'direction' ever had palettes. In our horseman example, that means the the first 11 frames (10 + ring), you may see COLOR_256 data, but never in the other 77 frames.

FINALLY getting to the point, that means I can't just split the FLCs willy-nilly. If I did, only the SW facing files (SW is direction 0, for the trivia-minded) would have palettes. So my solution is to steal the palette(s) from direction 1 for each other direction. SO, if in direction 1, frames 1, 3, and 7 have a COLOR_256 chunk, all the split files will get the same chunks for frames 1, 3, and 7, so you editing program shows the right colors. On merging, the the palettes from the first direction are used, the others are tossed. I should add some code to resolve the palettes, but not this time. The moral of the story is, don't go mucking about in the palettes unless you're willing to do it in all the component FLCs you will merge into a unit.

3. Clipping
We're not done yet. Seems that firaxis decided to make all animations 240x240, but most don't need all that room. So, to save space in the files, they clip the frames. Imagine printing all 80 frames (not including ring frames) for our horseman onto cellophane, and then stacking them up. The smallest rectangle you could draw around the pictures in the stack is the clipping region. In the case of our running horseman, the clipping region is 71x80 pixels, offset (83,57) from the top left corner of at 240x240 square. So, the civ III FLC stores 71x80 size frames, and makes a note in the custom header (insider the reserved space in the standard header) that the original size was 240x240, and the offset is 83x57.

What this all means is that for now, YOU ARE STRONGLY URGED to create new units by starting with a standard unit. Split it, open each directional animation with something like Animation Shop, edit the animations, and remerge. But DON'T change the size of the frames! If you do, you'll need to tamper with the INI file that FLICster creates, so don't. I'll probably look for a way to address this later.
 

Armor

Chieftain
Joined
Nov 5, 2001
Messages
31
Thanks so much for undertaking this project, it's going to open up the game in a new way. Now let's see who can make the coolest, fully animated (with their own art) new unit!

Armor
 

Plutarck

LWC Master
Joined
Nov 2, 2001
Messages
137
Location
Earth
You are the Pumkin King! (movie reference)

Woohoo, great work if I do say so myself! Course the frickin' files are so big that finding a place to store the suckers is a rediculous pain in the arse. Oh how I long for the days of simply photoshopp'ed .pcx's...


Anyway, you done good! :D :D :goodjob:
 

[GaNoN]

Chieftain
Joined
Nov 26, 2001
Messages
1
Moeniir excellent work on ur program.. tis great..

Just wondering what flic editors everybody is using at the moment?? also after looking round the jasc site I find no info about a SDK or anything of the sort for developing plugins for Animation Shop. If this were possible then I wouldnt find it very hard to write a plugin to import and export the civ flic files natively. This would make life much easier than having to convert between the formats with an external program. I know adobe premier supports flic format.. however I believe that the SDK for premier plugins is commerical, out of my reach :p I was thinking maybe a plugin for GIMP(GNU Image Manipulation Program).. however I doubt alot of people would use *nix and it is difficult to setup on a win32 system...

my 2c

[GaNoN]
 

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
interesting idea, Ganon... you know if GIMP's been ported to win32? I know some of the more popular gnu/linux stuff has. I'll keep an eye open for plug-in ready gfx apps.
 

Armor

Chieftain
Joined
Nov 5, 2001
Messages
31
Well, I gave it a shot, but so far no luck. I converted one of the flics from the battleship into my own unit, keeping the frame numbers, ini file settings, etc. Then I merged it, and hooked it up to play under a particular unit (ensuring that the new flick file was the only difference, so no other factors played in). Then, going into the game, just selecting the unit with the new flic from the build que caused a complete crash -- note that this didn't happen with regular (non-Fraxis) flicks (the game only crashed when the unit was produced, and the full animation had to be played).

Looking back at the merged flick file, I noticed that it was rather messed up -- after the first 'directional' set of frames, subsequent sets showed heavy artifacts from the previous sets, as though they weren't erasing left over pixels from the previous frames. I presume this is connected to the flick method of storing frame data documented above.

Any advice would be appreciated.
 

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
Armor - If it's not too much trouble, would you zip up your individual directional flics and the ini file? I'd like to take a look. Unfortunately, I was only able to test by re-aranging the directions - I didnt make any animations of my own.

Send it to moeniir@home.com


Thanks
 
Joined
Jan 12, 2001
Messages
309
Location
Hunt Valley MD
One thing I'd like to point out is that (assuming Moeniir's tool works properly, and it probably does) just because FLIC is an animation format, you don't need to create big, complex animations.

One thing I've been wanting to do (whenever I get some free time) is to take a set of Civ II units and convert them into single-frame FLC's for use in Civ III.

By creating eight "directions" that consist of the same single image, you can make a really small FLC which will work in the game. And since there's already a wealth of Civ II scenarios with really cool units available, there should be ample source material to get started with.

Thanks again to Moeniir for developing this program! We may be able to get our in-house FLC tool cleaned up and released sometime in the future but thankfully no one has to wait for that now... :)

Dan
 

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
Thanks for the link, Plutarck.

I took a quick look at the GIMP stuff. Seems there's a semi-stable release form last december available for windows. I'll pull that down tonite at home and take a look.

Someone has also done a plugin for GIMP to work with FLC files. Being GNU licenced, it's got source code. I took a brief look, and I think I MAY be able to do something with that... but I don't know. I'll post more here when I've actually run GIMP. In the meantime, if anyone has success creating a new unit, please post it! If anyone has failures, e-mail me your files (the 8 edited directional FLCs and the INI file) and I'll try to take a look. I've done a little playing with Animation shop today (What's that, boss?), and I think there may be palette issues with some units, that may require me to export a .PAL file when splitting, for use by animation shop (to keep the 8 palettes synchronized).

Another thought I had was instead of creating 8 animation files, I could create one animation file (kinda like the existing CIV III format but without the extra ring frames), and you would just edit the animations all as one strip. This should kep the palettes under control, especially if 'local palettes' are disallowed. The down side of this approach is, to convert an edited file back to CIV III format, I'll need to learn how to create ring frames (DELTA_FLIs). I think there's some info in the Compuphase page, and the GIMP plugin code works with deltas as well, so perhaps that's do-able. would make things a little easier to have 1 file instead of 8.

Keep those cards and letters coming!
 

SWB

Chieftain
Joined
Nov 13, 2001
Messages
8
Location
Louisville, KY
Something I have noticed with Animation Shop is that it completely messes up the palettes. If there are multiple indexes defined as being the same color, for example, Animation Shop will merge these together, thus creating a palette with fewer than 256 entries and no redundant entries. I woudn't be surprised if it also rearranges some of the colors in the palette. Since in Civ3 (and I imagine in most other games that use 8-bit paletted graphics), the color indices are important (in fact, often more important than the colors themselves), the fact that Animation Shop fiddles with the palette behind your back makes it useless as a Civ3 FLC editing tool. Any rearranging of the colors in the palette could potentially cause the FLC to look strange in Civ3, and Civ3 FLCs with less than a 256-color palette are likely to crash the game.
 

Moeniir

Mr FLICster
Joined
Nov 7, 2001
Messages
107
Location
Delaware, USA
That is my concern as well. However, when saving a FLC with Animation shop (2.0, ships with PSP6.0) there is an options dialog that gives a number of choices for dealing with the palettes. One of the choices is to load a PAL file, which defines the palette to use (and should avoid palette optimizations like color-combination). I'm going to try experimenting with AS2 some to see if this step is necesarry. If so, perhaps I can extract a PAL file from the orginal FLC's COLOR_256 chunk.
 
Top Bottom