#ra2 #archive #collection #ra2-types #alert2

ra2-types

Shared types definitions for Red Alert 2

4 releases

Uses new Rust 2024

new 0.0.3 Apr 27, 2025
0.0.2 Apr 27, 2025
0.0.1 Apr 27, 2025
0.0.0 Apr 26, 2025

#88 in #collection

42 downloads per month
Used in 3 crates

MPL-2.0 license

8KB
133 lines

RA2 Remixer - Red Alert 2 Tool Collection

A collection of utilities for working with Red Alert 2 game files, particularly MIX archives.

Features

  • 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

Installation

  1. Ensure you have Rust installed (version 1.70.0 or higher)
  2. Clone this repository
  3. Build the project:
    cargo build --release
    

Usage

Basic Commands

# 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.mix

Library Usage

use 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")) ?;

Reference Projects

Dependencies

~0–0.8MB
~16K SLoC