Giter VIP home page Giter VIP logo

woxar's Introduction

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.

woxar's People

Contributors

frostyhitoshura avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.