#ra2 #pal #archive #collection #ra2-pal

ra2-pal

Parser for Red Alert 2 palette files (*.pal)

3 releases

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

#2 in #pal

40 downloads per month
Used in ra2-shp

MPL-2.0 license

14KB
206 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

~1.6–2.3MB
~47K SLoC