|
Compressing to CFZ archive files in Robot Arena II
This tutorial will show you how to compress a collection of files into a single CFZ archive. This allows you to distribute custom weapon packs easier by putting all your components .txt files into a single .CFZ. As usual, any questions of problems feel free to email me.
|
|
Downloading the tools you need
To Compress to CFZ you're going to need MAKECFL created by Jari Komppa (the guy who invented the CFL/CFZ file format). Luckily It's freeware, and I've uploaded a version for you that you can snag from Here. It also includes UNCFL, which you can use for decompressing CFZ files.

|
|
Downloading the tools you need
Unzip the tools above to C:CFL (if you wish to use another folder, submit C:CFL in future for your full path).
In my computer, navigate to C:CFL and create a New folder.

|
|
Preparing for Compression
Name this new folder Components. We're creating this folder because CFZ go in the Robot Arena 2 root.
By creating a Components folder, RA2 will be able to tell that the files contained in it should be treated as if they're in the real Components folder.

|
|
Copy the files to be archived
Copy all the files you wish to archive from the real Robot Arena 2 Components directory into the C:CFLComponents folder that you just created.

|
|
Entering Dos Prompt
MAKECFL is a Console application. It does not have an interface, and you must run the prompt to use it
Click the Start Button and then click Run. Type in cmd and hit enter. A black box will appear. This is the Command Prompt.

|
|
Entering the CFL directory
To use MAKECFL you must enter the CFL directory. Type cd c:cfl into the command prompt and hit enter. The prompt will change to 'C:CFL >' to show that the command was successful

|
|
Create an INI file
Before we can compress our files into an archive, MAKECFL needs to create an .INI file that specifies what files to compress and how to compress them. Type makecfl -i mycomponents.ini Components*.* into the command prompt and hit enter.
This will list all the files in Components matching *.* (any file) and enter them into mycomponents.ini.

|
|
Preparing the INI for compression
Go back to the CFL folder in My Computer. A new file mycomponents.ini will be there. Double click it to open it in notepad and scroll all the way to the bottom.
Notice that the files are not listed to be in the Components directory. This is because MAKECFL's ini creation doesn't support folders.

|
|
Edit the .ini file and add Components in front of the filenames you're compressing. See pictures on the left, and above-left for a before-after comparison.

|
|
Compressing the files to a CFL
Return to the Command Prompt again (if you closed it see previous instructions on how to load the prompt and move to the CFL directory).
Type in makecfl -c mycomponents.ini and hit enter to begin the CFZ compression.

|
|
MAKECFL will scroll a list of files that it is compressing to the command prompt, letting you see exactly what was archived.

|
|
CFL? What the Heck!
Return to the CFL folder once more. You'll notice another new file that has appeared called "mycomponents.cfl".
This is a CFZ file, and you can simply rename the file to mycomponents.cfz and move it to the Robot Arena 2 directory.

|
|
Other notes:
Once your CFZ file is in the Robot Arena 2 directory you can delete the .txt files you created from the actual Robot Arena 2Components folder as they are now loaded from the CFZ.
Gabriel Interactive recommend that you DO NOT try to archive GMF files as they cannot be streamed, though they believe that most other file types can be compressed.
If you have sub-folders (folders inside folders) to compress you will have to copy them to the CFL Components folder, keeping the structure complete. You then have to create multiple INI files, eg:
makecfl -i mycomponents.ini Components*.*
makecfl -i mycomponents_styles.ini ComponentsStyles*.*
makecfl -i mycomponents_anything.ini ComponentsAnything*.*
Edit these ini files seperately and correct the DATA= lines, adding the proper folder names. After this, copy-paste the DATA= lines from the ini files so that they're all located in one .ini (ie, copy-paste all the DATA= lines from mycomponents_styles.ini and mycomponents_anything.ini into mycomponents.ini).
The final ini's DATA= lines should look similar to this:
DATA=Componentsd1_bumper.txt,,0x0000FFFF
DATA=Componentsd1_bark.txt,,0x0000FFFF
DATA=Componentsd1_soundchip.txt,,0x0000FFFF
DATA=Componentsstylesd1_bumper2.txt,,0x0000FFFF
DATA=Componentsstylesd1_bumper3.txt,,0x0000FFFF
DATA=Componentsstylesd1_soundchip2.txt,,0x0000FFFF
DATA=Componentsstylesd1_soundchip3.txt,,0x0000FFFF
DATA=Componentsanythingtest.txt,,0x0000FFFF
DATA=Componentsanythingtest.txt,,0x0000FFFF
After this you can simply use makecfl -c mycomponents.ini and it will archive all the files into one CFL file.
|