Skip to content

woxar is an application that extract and create .CC archive files from Might and Magic® IV & V: World of Xeen.

License

Notifications You must be signed in to change notification settings

FrostyHitoshura/woxar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

woxar

woxar is an application that extract and create .CC archive files from Might and Magic® IV & V: World of Xeen. This repository doesn't store the original data files, they must be obtained separately. It is command line driven and can be easily integrated into existing scripts.

Building

This software requires a recent Rust compiler (tested with 1.44.0) as well as Cargo, the native build engine for Rust. These are likely already packaged for your Linux distribution of choice. The binary generated by the build process will have no dependency outside of the standard C library.

The software can be built using this command:

cargo build --release

Note: The previous command will download several Rust 3rd party libraries so network access is mandatory for the first invocation.

Example Usage

Extract xeen.cc into directory extracted:

target/release/woxar extract --archive xeen.cc --root extracted --dictionary data/xeen.fl

Modify the files in extracted and then repack your modifications as repacked.cc:

target/release/woxar create --archive repacked.cc --root extracted

Archive Format Limitations

This file format was designed to be deliberately obfuscated, likely to prevent users easily modify the game data. All the data is scrambled with an "rotate and add" cipher.

The second layer of obfuscation is the lack of file names in the archive, only a hashes are present. As a workaround, this software provides the real names of the files in the data/*.fl files. Note that this is not a cryptographic hash and only 16 bits and as a result, it's trivial to have hash collisions. woxar allows the extraction and creation of archives without file names. In this case, all the file names will be a unsigned 16 bits integer.

Other limitations not related to the obfuscation:

  • Each file is also limited to 64K bytes in size.
  • Each file offset is encoded as a 24 bit integer value. This puts a soft cap to a useful archive size to about 16.8M.

Related Links

To Do

  • Add support for Might and Magic III: Isles of Terra.
  • Add support for Might and Magic: Swords of Xeen.
  • Add support for save games generated by these games, they use a similar file format.
  • Improve unit test coverage.

About

woxar is an application that extract and create .CC archive files from Might and Magic® IV & V: World of Xeen.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published