## Fast .RFA-packing with a .bat-file

If you know something thats not in here please share it

### Fast .RFA-packing with a .bat-file

So I noticed that in these sites there isn't this necessary tutorial for fast .RFA packing. I used to pack my .RFA-files manually with winrfa for years.. Couple of months ago I got fed up with it and made a .bat file that packs automatically the folders you need.

My computer is kinda powerful so I don't know if this code works fast in low-end rigs but at least in my computer the code packs files in just couple of seconds. If it takes too long to pack all your archives you can always make a separate .bat file for every .rfa-file in the archives. Then you can easily pack single files and not all at once.

Things you need:
rfaPack.exe (can be found in the Battlefield Mod Development Toolkit)

Create a YOUR_MOD_NAME.bat file and place it in the same folder as rfaPack.exe
Then just add this in it:
Code: Select all
rfaPack.exe D:\$BF42_mods\MyMod\animations animations "C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\animations.rfa"rfaPack.exe D:\$BF42_mods\MyMod\bf1942 bf1942"C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\bf1942\game.rfa"rfaPack.exe D:\$BF42_mods\MyMod\Font Font "C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\Font.rfa"rfaPack.exe D:\$BF42_mods\MyMod\menu menu"C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\menu.rfa"rfaPack.exe D:\$BF42_mods\MyMod\objects objects"C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\objects.rfa"rfaPack.exe D:\$BF42_mods\MyMod\standardmesh  standardmesh "C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\standardmesh.rfa"rfaPack.exe D:\\$BF42_mods\MyMod\texture  texture "C:\Program Files (x86)\Origin Games\Battlefield 1942\Mods\MyMod\Archives\texture.rfa"@ECHO OFFPAUSE

So the first path is the folder which you want to pack. The next argument, the single word (ex. animations, objects or texture) is the name of the "base folder" for the .RFA file. Usually this is the same name as the folder you are going to pack. The last argument, which has quotation marks, is the target directory + filename.

When you double click the file, the program automatically packs your folders without you having to search for the right target patch and all.

This little code will save you a LOT of time. But I still have to warn that you should take copies of your .RFA files from time to time, because if you delete something important from one of your "dev folders" and update your archives, you may not get that important file back.
Ruuga

Posts: 34
Joined: Wed Jul 14, 2010 12:25 pm

### Re: Fast .RFA-packing with a .bat-file

Ruuga wrote:So I noticed that in these sites there isn't this necessary tutorial for fast .RFA packing. I used to pack my .RFA-files manually with winrfa for years.. Couple of months ago I got fed up with it and made a .bat file that packs automatically the folders you need.

There is. It's a sticky thread, even. In the tutorials section.

viewtopic.php?f=43&t=125

"Creating .rfa with the debugger"

IIRC rfapack also destroys some part of the .rfa on packing/unpacking. It's something else than WinRFA (which destroys envmaps), but still. debugger-created .rfas are flawless, to my knowledge.

Senshi

Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany