----------------------------------------------
Installation
----------------------------------------------
If you use a source distribution of the XIDX project you can simply extract the 7zip archive and proceed with make. For more information, see the
“Building from source” section below.
If you use a binary release of the XIDX project you can simply extract the 7zip archive which should give you the following versions of the XIDX program:
- bin/xidx:
This is an AMD64 ELF executable. It should run on Linux (AMD64).
- bin/xidx_i686.exe:
This is an i686 PE executable. It should run on 32bit and 64bit versions of Windows OSes (2k, XP, Vista, 7, Server R2 etc.) and Wine.
- bin/xidx_amd64.exe:
This is an AMD64 PE executable. It should run on 64bit versions of Windows OSes (XP, Vista, 7, Server R2 etc.)
The project does not provide any rule to install it as system administrator, so you may want to select your preferred executable and move it manually to a
suitable location. It makes sense to ensure that this location is on the search PATH used for looking up programs by name, since XIDX is purely a
commandline program. (Therefore being on the search PATH will make it easier to invoke the program from arbitrary directories.)
----------------------------------------------
Usage
----------------------------------------------
If you use a platform that is not supported by either of these binaries you can try to build from source instead.
program usage: [options] [files...]
command line options:
-a idx pack(s) are animation packs, by default they are assumed to be sound
-s idx pack(s) are skeleton packs
-m idx packs(s) are Medieval II packs, only applies when creating packs.
-c create an idx pack file
-x extract idx pack file(s)
-t list the contents of idx pack file(s)
-f name of idx pack when creating. (output filename must follow)
-v verbose output
-b adds '.bin' suffix to filenames when extracting, removes it when packing
--help print the help
--shell gives you a simple 'shell' for entering commands
You may only specify one of the three "xtc" options. When you create a idx pack the
filenames can be specified on the command line (after your options). If no files are
on the command line, it will read filenames from stdin (standard input) with one filename
per line.
As a note regarding repacking pack.idx: There are some filenames that have spaces at the end,
as well as duplicate files in the pack.idx. Unfortunatly we have to deal with this and a listing
of the data\animations folder will not suffice. I recommend that you save the file list of the
vanilla pack before you do any editing. ".\xidx -ta >filenames_in_pack_idx.txt" would do the trick.
When you go to repack the animations you would use this list as the input for filenames.
i.e. ".\xidx -caf pack.idx <filenames_in_pack_idx.txt".
Examples:
1) .\xidx -x music.idx
2) .\xidx -t music.idx >filenames_in_music_idx.txt
3) .\xidx -c -f my_music_idx.idx <filenames_in_music_idx.txt
The first example extracts all the files within music.idx (relative to the current working directory).
The second example lists all the files within music.idx and saves the output to filenames_in_music_idx.txt
The third example creates a new idx pack with the name my_music_idx. The files that are to
be archived are within filenames_in_music_idx.txt which is redirected to stdin.
In short, the above three commands extracts the music, lists the the files within the pack
and the repacks them. Logically you would overwrite the vanilla sound files with your own files
before you run step 3.
If you wanted to pack all the files in a folder you could do:
dir .\data\sounds\SFX\* /a:-D /s /b | .\xidx -cf my_sfk.idx
Where you would change ".\data\sounds\SFX\*" to the folder of your choice.