ACF archive utility for Pokémon Ranger: Guardian Signs. Based on a fork of acfdump, an ACF extraction tool originally written by Barubary in Java and ported here to C.
ACF archives are used in Pokémon Ranger: Guardian Signs data. This tool allows you to extract the files contained in ACF archives, automatically handling decompression when needed, and to rebuild these archives, including the Huffman-compressed ones (ACZ). You can download the latest build or build the program from source.
For more information about the ACF format, see the documentation.
| Linux | macOS | Windows | |
|---|---|---|---|
| Latest | Download | Download | Download |
You can dump your own Pokémon Ranger: Guardian Signs ROM from:
- a console from the Nintendo DS or Nintendo 3DS family (Game Card release)
- a Wii U (Virtual Console release)
To get the ACF archives, Windows users can run TinkeDSi, but NDSFactory can also be run on macOS and Linux:
- Download the latest NDSFactory release, then extract the archive and run the executable
- Open the program, load your ROM, then scroll down until you see the
FAT Files Addressfield. Take note or copy its value - Press the
Extract Everythingbutton and choose where to save your files - Once the process is complete, go to the
Fat Toolstab, and fill in the first three fields with the requested files you just extracted (fat_data.bin,fnt.binandfat.bin) and the fourth with the value from the previousFAT Files Addressfield - Press the
Extract FAT Data!button and choose where to save your files - Go to your output directory. ACF archives are located in the
datadirectory, and the map archives in itsmap(Japanese release) ormapz(other releases) directory
Important
acftool is a command-line program and must be run in a terminal.
- To extract the files of an ACF archive, run
acftool <in.acf>, oracftool <in.acz>for a Huffman-compressed one - To extract the files of every ACF archive in a directory, run
acftool <indir> - To handle several archives or directories at once, list them, for instance
acftool a.acf b.acforacftool *.acf. Wildcards such as*and?also work on Windows
The files of an archive are extracted, along with a filelist.json file listing them, to a directory with the same name as the archive, without its extension.
To build an ACF archive, run acftool <indir>, where <indir> contains a filelist.json file listing the files and their state (null: set file entry as unused; false: do not compress; true: compress), for example:
{
"0000.RTCA": false,
"0001.NCLR": true,
"0002.NCGR": true,
"0003.NCER": true,
"0004.CANR": true
}The directory is built into an archive with the same name, followed by the .acf extension. A directory holding a filelist.json file is built by default. To extract the ACF archives it contains instead, run acftool -x <indir> or acftool --extract <indir>.
For map archives, filelist.json starts with a "signature" and a "huffman" key, which must be kept: a directory extracted from an .acz file is built back into one, unless "huffman" is set to false.
- To build a Huffman-compressed archive from any directory, run
acftool -z <indir>oracftool --huffman <indir> - To compress an existing archive, run
acftool -z <in.acf>
By default, the outputs are written next to their input. However, you can optionally specify the output directory or archive of a single input with -o or --output, or a directory to write the outputs in with --output-dir, for instance:
acftool in.acf -o outdirwill extract the files tooutdiracftool indir -o out.acfwill build the archiveout.acfacftool indir --output-dir=outdir,indirholding ACF archives, will extract them to directories inoutdir, created if missingacftool *.acf --output-dir=outdirwill extract each archive to a directory inoutdir, created if missing
If an output already exists, you will be asked whether to replace it. Run acftool -y <in> or acftool --yes <in> (with <in> being an input archive or directory) to replace existing outputs without asking.
Run acftool -h or acftool --help to list all the options.
clangorgccmake
- If you don't already have them, install the dependencies
- Clone this repository by running
git clone https://github.com/SombrAbsol/acftool, or download the ZIP archive and extract it - Go to the repository directory and build the program by running
make
Tip
Running make or make release will generate a release build. The downloadable releases are static builds generated using this recipe. If you want to generate a native or a debug build, run make native or make debug. Native builds are optimized for your specific CPU for better performance but may not be compatible with other systems, while debug builds include debugging symbols that help diagnose issues but run slower.
Unix-like operating systems (such as Linux and macOS) can run sudo make install to install acftool system-wide. It installs the program already built, preferably a release or native build, or generates a release build first if there is none. Use sudo make uninstall to remove it.
If you need to rebuild the program, run make clean or delete the build directory.
- The extraction process now supports ACF/ACZ map archives: what to do with the extracted files to ensure full support?
- acftool by SombrAbsol
- acfdump and ACF documentation by Barubary (the original acfdump is available on his website)
acftool is free software. You can redistribute it and/or modify it under the terms of the Expat License as published by the Massachusetts Institute of Technology.