1
0
mirror of https://github.com/mon/ifstools.git synced 2024-11-24 01:50:10 +01:00
Extractor for Konmai IFS files
Go to file
Will Toohey ee1b65b6c1 v1.10
2019-02-20 08:22:05 +10:00
ifstools Fix non-silent silent mode 2019-02-20 08:21:03 +10:00
.gitignore v1.5 2018-05-06 19:05:25 +10:00
ifstools_bin.py v1.4, add exe build 2018-03-03 20:00:59 +01:00
LICENSE Create LICENSE 2018-01-09 17:21:30 +10:00
README.md GenericFile.load now uses kwargs, add --uv arg 2018-05-21 22:07:45 +10:00
requirements.txt Bugfixes and hassle free install 2018-05-31 15:22:49 +10:00
setup.cfg Much wider compatibility, PyPi release 2018-01-09 17:22:36 +10:00
setup.py v1.10 2019-02-20 08:22:05 +10:00

ifstools

Extractor for Konmai IFS files.

Features

  • Converts all textures to png without requiring a second program
  • Repacks without ingame display issues
  • Multithreaded recompression
  • Only changed textures are recompressed, the rest are cached
  • Works on eacloud music ifs files
  • Correctly names files under afp, bsi and geo folders
  • Converts internal binary xmls to plaintext, to facilitate further experimentation.
  • Dumps the ifs manifest so you can explore the format

Install

Just want an exe? Download the latest.

Have Python installed? Do this: pip install ifstools
Then run ifstools from anywhere in a command prompt.

Usage

usage: ifstools [-h] [-e] [-y] [-o OUT_DIR] [--tex-only] [-c]
                       [--bounds] [--uv] [--no-cache] [-m] [-s] [-r]
                       file_to_unpack.ifs|folder_to_repack_ifs
                       [file_to_unpack.ifs|folder_to_repack_ifs ...]

Unpack/pack IFS files and textures

positional arguments:
  file_to_unpack.ifs|folder_to_repack_ifs
                        files/folders to process. Files will be unpacked,
                        folders will be repacked

optional arguments:
  -h, --help            show this help message and exit
  -e, --extract-folders
                        do not repack folders, instead unpack any IFS files
                        inside them
  -y                    don't prompt for file/folder overwrite
  -o OUT_DIR            output directory
  --tex-only            only extract textures
  -c, --canvas          dump the image canvas as defined by the
                        texturelist.xml in _canvas.png
  --bounds              draw image bounds on the exported canvas in red
  --uv                  crop images to uvrect (usually 1px smaller than
                        imgrect). Forces --tex-only
  --no-cache            ignore texture cache, recompress all
  -m, --extract-manifest
                        extract the IFS manifest for inspection
  -s, --silent          don't display files as they are processed
  -r, --norecurse       if file contains another IFS, don't extract its
                        contents

Build an exe

pip install pyinstaller
pyinstaller ifstools_bin.py --onefile -n ifstools
Recommend doing this in a fresh venv so the module finder doesn't include more than required.

Notes:

  • dxt5 texture repacking is not fully supported - they will silently be converted to argb8888rev

Todo:

  • Recursive repacking for ifs inside ifs

I hope the rest is self explanatory. Confused? Create a new issue and tell me what docs to add.