A collection of utilities for working with Red Alert 2 game files, particularly MIX archives.
- MIX File Support: Read, write, and modify RA2 MIX archives
- Encryption/Decryption: Handle RA2's custom encryption for MIX files
- File Management: Extract and patch files from/to MIX archives
- CRC Calculation: Calculate file IDs using RA2's CRC algorithm
- Ensure you have Rust installed (version 1.70.0 or higher)
- Clone this repository
- Build the project:
cargo build --release
# Extract files from a MIX archive
ra2-mix extract input.mix output_directory
# Patch files into a MIX archive
ra2-mix patch input_directory output.mixuse ra2_mix::XccPackage;
// Load a MIX file
let mut package = XccPackage::load(Path::new("input.mix")) ?;
// Add a file to the package
package.add_file(Path::new("new_file.txt")) ?;
// Save the modified package
package.save(Path::new("output.mix")) ?;