Welcome back, Commander 🫡.
Red Alert 3 is one of my favorite game but it's in a sorry state since EA shut down their servers for the game.
This project is an open source re-implementation of the original game launcher RA3.exe
aimed at addressing and mitigating some of the issues that have emerged since EA servers were shut down.
-
Game Startup is (very) slow
The game takes awfully long to start because the official launcher tries to get the latest "Comrade News" from files.ea.com whether or not the gui interface was requested (-ui). And wait until the connection times out, before starting the game.
-
LAN play: "CD key is already in use" (%CDKEY%)
LAN play requires each player to have a different CD Key. Steam no longer populates the
%CDKEY%
variable in the registry (is it due to EA's servers shutdown ?).This is a problem because each time the game is run by Steam; Steam will write "%CDKEY%" as the user's CD key. Every (Steam) players will therefore end up with the same CD Key: "%CDKEY%" and are unable to LAN play with each others.
The registry value is read on game launch. It is uneffective to change it after the game is ran by Steam.
-
Online play: emulation and DLL injection
You can no longer play online nor co-op without using 3rd party service that emulate gamespy such as revora/CnC:Online
Requiring an additional launcher to be able to use their service.
While "Launchers inception" (Launcher which starts another Launcher) is despised by many it remains a matter of personal preference. But for me the core issue was that their launcher didn't work with the Steam version nor with Linux/Proton when I tried it.
-
Start Red Alert 3 process almost instantly (Issue 1)
-
Fix the CD Key registry value if needed for LAN play before starting the game (Issue 2)
-
Addons: revora/CnC:Online without their launcher (Issue 3)
See xan105/CnC-Online for more details.
-
Compatible with 🐧 Linux/Proton
-
Splash screen customisation: none, random, ...
Copy the files in the game directory and replace RA3.exe
Note
In order to fix the issue with %CDKEY%
(Issue 2) RA3.exe
will need elevated privileges.
Because the CD Key value is in the registry under HKLM
which is write access protected.
If you run the game via Steam, you may want to consider always running RA3.exe
with elevated privileges
by right clicking RA3.exe > properties > Compatibility > check "Run this program as an administrator"
Wait... why does it need admin right and Steam does not ?!
Steam has its own windows service running in the background with system privileges (`steamservice.exe`) to do these kind of operations silently without the end user noticing.
RA3.exe --help
to display all arguments.
Most of the orignal RA3.exe
cmdline arguments were kept:
flag | type | description |
---|---|---|
xres | number | Sets resolution width |
yres | number | Sets resolution height |
xpos | number | Sets horizontal offset of the window |
ypos | number | Sets vertical offset of the window |
win | boolean | Runs the game in windowed mode |
fullscreen | boolean | Runs the game in fullscreen mode. Combine with -win for borderless windowed mode |
noaudio | boolean | Disables game audio |
noAudioMusic | boolean | Disables game music |
silentLogin | boolean | Forces the game to immediately log in to a multiplayer account |
modConfig | string | Runs the game with selected mod (has to point to its .skudef file) |
replayGame | string | Plays replay file |
Tip
-modConfig path
If "path" is not an absolute path then it will look for any .skudef
file corresponding in %Documents%/Red Alert 3/Mods
eg: %Documents%/Red Alert 3/Mods/Upheaval/Upheaval_1.16.skudef
> -modConfig Upheaval
📄 RA3.json
(required):
-
lang?: string (auto)
Which language to start Red Alert 3 with.
Default (auto) will query the registry value
HKCU/Software/Electronic Arts/Electronic Arts/Red Alert 3/language
.
If no value is set then it defaults to "english". -
borderless?: boolean (false)
Runs Red Alert 3 in borderless fullscreen.
This superseeds the cmdline arguments-win
and-fullscreen
-
upheaval?: boolean (false)
Starts Red Alert 3 with the infamous mod "upheaval" if it's present in the
%GAMEDIR%
or in%Documents%/Red Alert 3/Mods/Upheaval
-
keygen?: boolean (true)
Check the CD Key value in the registry.
If it's empty or equals to "%CDKEY% generates a random CD Key and write it to the registry.
Caution
Unfortunately requires elevated privileges because the key is located under HKLM
which is write access protected.
-
splash?: boolean (true)
Display a splash screen while the game is loading similar to the original
RA3.exe
-
timeout?: number (10)
Failsafe timeout in seconds. This is mostly for the splash screen.
eg: There was no event dispatched from the game (Linux/Proton) or if an injected DLL crashed the game on startup. -
splash_image?: []string (["Launcher/splash.bmp"])
Splash screen filepath. When more than one, a splash screen is selected at random.
Either absolute or relative path.
NB: relative toRA3.exe
and not the current working dir
Note
Image should be a 640x480 BMP file.
-
addons?: []{ path: string, required?: boolean }
List of addons to inject to the game process.
Whenrequired
is set totrue
and if the injection failed, alert the user and kill the game process.Either absolute or relative path.
NB: relative toRA3.exe
and not the current working dir
Tip
Example: You can use this option to load xan105/CnC-Online.
Restoring the online features of Red Alert 3 without relying on the revora/CnC:Online launcher.
{
"addons": [
{ "path": "Launcher/opencnconline.dll", "required": true }
]
}
Connected to C&C:Online under 🐧 Linux/Proton 9.0-2 (Fedora)
- Golang v1.23
- go-winres installed in
%PATH%
env var for win32 manifest & cie
Run build.cmd
Output files are located in ./build