explaingit

loganw234/mercenaries2

Analysis updated 2026-05-18

1CAudience · developerComplexity · 5/5Setup · hard

TLDR

A revival project for Mercenaries 2 (2008) that restores shut-down EA multiplayer servers and exposes the game's built-in Lua scripting engine for modding via a TCP REPL bridge.

Mindmap

mindmap
  root((Merc2Reborn))
    What it does
      Restores multiplayer
      Exposes Lua engine
      Game modding tools
    Phase 1 multiplayer
      DNS hooks
      Cert bypass
      FESL emulator
    Phase 2 Lua bridge
      ASI plugin
      TCP REPL port 27050
      Dev cheat menu
    Tech
      C and C plus plus
      Python
      Lua 5.1
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Restore online multiplayer for Mercenaries 2 by installing the client-side fix that routes matchmaking to the community server at refesl.live.

USE CASE 2

Use the Lua REPL bridge to run arbitrary Lua commands against the live game engine, including opening the developer cheat menu.

USE CASE 3

Contribute to mapping the game's Lua engine API by running probe scripts and documenting verified function signatures.

USE CASE 4

Host your own private FESL matchmaking server for Mercenaries 2 using the Python server emulator on a legacy Ubuntu VM.

What is it built with?

CC++PythonLua 5.1Visual Studio

How does it compare?

loganw234/mercenaries2adroxz1122/injected-host-enumerationiamdaven/miraos
Stars111
LanguageCCC
Setup difficultyhardmoderatehard
Complexity5/53/55/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires Visual Studio 2022, a retail copy of Mercenaries 2, and dxwrapper, self-hosting the FESL server additionally needs a legacy Ubuntu 14.04 VM with old OpenSSL.

In plain English

Merc2Reborn is a revival project for Mercenaries 2: World in Flames, a 2008 action game by Pandemic Studios whose official online servers were permanently shut down by EA. The project has two main goals: restoring the multiplayer matchmaking service so the game's online mode works again, and exposing the game's internal Lua scripting engine so modders can run code against the live game. The multiplayer restoration works by intercepting the game's network traffic at the Windows API level. DNS calls that would normally go to EA and GameSpy servers are redirected to a replacement server emulator. Certificate trust checks are bypassed so the replacement server's self-signed certificate gets accepted. The system clock is also spoofed to a 2012 date to fall within the original certificates' validity window. A public community server at refesl.live already handles matchmaking for anyone who installs the client-side fix, so most users do not need to run their own server. Running your own FESL server is described as non-trivial because the original game's handshake requires SSLv3 with the RC4 cipher, both removed from modern operating systems due to known security weaknesses. The Lua bridge works by loading an ASI plugin into the game process through a tool called dxwrapper. The plugin hooks into the game's Lua interpreter and starts a local TCP server on port 27050. You can connect a Python REPL tool to this server and send Lua commands directly to the running game, including calling internal functions the developers left in the binary, such as a developer cheat menu. The codebase is described honestly as iterative reverse-engineering rather than polished software, with leftover experiments and workarounds that have not been cleaned up. Active mod development has moved to separate repositories linked in the README. Phase 3, mapping the full engine API and building mod tooling, is still in progress. Building requires Visual Studio 2022, a retail copy of the game, and dxwrapper.

Copy-paste prompts

Prompt 1
I want to get Mercenaries 2 online multiplayer working with Merc2Reborn. Walk me through installing Merc2Fix.asi via dxwrapper and connecting to the refesl.live community server.
Prompt 2
How does the Lua REPL bridge in Merc2Reborn work? Explain how the ASI plugin hooks into the game's Lua interpreter and how I use lua_repl.py to send commands over port 27050.
Prompt 3
I want to probe a new Lua namespace in Mercenaries 2 using Merc2Reborn's tools. How do I write a probe script and where do I document the verified function signatures?

Frequently asked questions

What is mercenaries2?

A revival project for Mercenaries 2 (2008) that restores shut-down EA multiplayer servers and exposes the game's built-in Lua scripting engine for modding via a TCP REPL bridge.

What language is mercenaries2 written in?

Mainly C. The stack also includes C, C++, Python.

How hard is mercenaries2 to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is mercenaries2 for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub loganw234 on gitmyhub

Verify against the repo before relying on details.