Skip to content

Repository files navigation

Ra3 Tools 100px

Ra3.Tools

English | 简体中文

Windows-only RA3 SDK for local installation management, launch helpers, SkuDef editing, 4GB patching, display advice, and file utilities.

Features

  • RA3 installation validation and known path discovery
  • Registry read, repair, and language switching
  • Launch helpers for normal, browser, and windowed modes, with optional SkuDef config
  • SkuDef load/save with raw line preservation
  • 4GB patch enable/disable for ra3_1.12.game
  • Display mode enumeration and RA3 resolution recommendation
  • Map package (zip) installation with Zip Slip protection
  • Steam AppID generation (steam_appid.txt)
  • RA3 online profile parsing (GameSpyLogin.ini accounts with password decryption, ProfileData.ini player ID)
  • Shared file access and CRC32C checksum helpers
  • RA3 version parsing and matching (1.12, 1.13, channel letters like 4.02N)

Package

dotnet add package Ra3.Tools

Examples

Read install path

using Ra3.Tools.Installation;

var registry = new Ra3Registry();
var installPath = registry.GetInstallPath();
var installation = new Ra3Installation(installPath);

if (Ra3InstallationValidator.HasRequiredGameFiles(installation.RootPath))
{
    Console.WriteLine(installation.GameDataExecutablePath);
}

Rebuild registry

using Ra3.Tools.Installation;

var registry = new Ra3Registry();
registry.Rebuild(@"D:\Games\Red Alert 3", "YOUR-CD-KEY");
registry.TrySetLanguage(@"D:\Games\Red Alert 3", "english");

Edit SkuDef

using Ra3.Tools.Configuration;

var document = SkudefSerializer.Load(@"D:\Games\Red Alert 3\example.skudef");
var updated = document with
{
    Entries = document.Entries
        .Concat(new SkudefEntry[]
        {
            new AddBigEntry(@"D:\Mods\example.big")
        })
        .ToArray()
};

SkudefSerializer.Save(@"D:\Games\Red Alert 3\example.skudef", updated);

Toggle 4GB patch

using Ra3.Tools.Patching;

var patchService = new Ra3LargeAddressPatchService();
var gamePath = @"D:\Games\Red Alert 3\Data\ra3_1.12.game";

if (!patchService.IsEnabled(gamePath))
{
    patchService.Enable(gamePath);
}

Get recommended display mode

using Ra3.Tools.Graphics;

var displayService = new WindowsDisplayService();
var supported = displayService.GetSupportedDisplayModes();
var current = displayService.GetCurrentDisplayMode();
var recommended = Ra3DisplayAdvisor.GetRecommendedDisplayMode(supported, current);

Install map package

using Ra3.Tools.IO;
using Ra3.Tools.Installation;

var installed = ZipMapInstaller.InstallMapPackage(@"D:\Downloads\map_pack.zip", Ra3KnownPaths.MapsDirectoryPath);

Generate Steam AppID

using Ra3.Tools.Installation;

if (Ra3InstallationValidator.NeedsSteamAppId(@"D:\Games\Red Alert 3"))
{
    Ra3InstallationValidator.GenerateSteamAppId(@"D:\Games\Red Alert 3");
}

Parse online profile data

using Ra3.Tools.Profiles;

var login = GameSpyLoginDocument.Load(@"%appdata%\Red Alert 3\Profiles\PlayerOne\GameSpyLogin.ini");
foreach (var account in login.Accounts)
{
    Console.WriteLine($"{account.Email} / {account.Nickname} / {account.DecryptPassword()}");
}

var identity = Ra3ProfileData.Load(@"%appdata%\Red Alert 3\Profiles\PlayerOne\ProfileData.ini");
Console.WriteLine(identity.PublicKey); // player ID (PPK)

Namespaces

  • Ra3.Tools.Installation
  • Ra3.Tools.Configuration
  • Ra3.Tools.Graphics
  • Ra3.Tools.IO
  • Ra3.Tools.Patching
  • Ra3.Tools.Profiles
  • Ra3.Tools.Versioning

Notes

  • Target framework: net10.0-windows7.0
  • This package only contains local RA3 tooling. It does not include updater, downloader, platform networking, or product-specific mod logic.

About

A useful library for Red Alert 3.

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages