Stronghold 2 Multiplayer AI Enabler

Main Quest for Gaming site

Stronghold 2 Multiplayer AI Enabler is an unofficial tool for Stronghold 2 Steam Edition that lets you add AI opponents to multiplayer matches. This feature was originally in the game, but at some point the developers decided to remove it. Many people enjoy playing cooperatively against the AI, so this tool makes it possible again.

You can download this as either 64-bit or 32-bit windows executable. This tool also works on Linux, but it needs to be compiled from source for Linux. Windows users can also compile from source if so desired. More information on compiling is found further down on this page.

New Version 0.3:

This version features automatic PID detection and opcode overwrites, meaning it does not need to keep running and will automatically close.

Each file has the associated sha256 hash that you can use to verify that your file download was correct.

Download 64-bit windows executablesh2_mp_ai_enabler_x86_64-0.3.exe
sha256sum: ace5b002d00f6410e3d6400f0112e07e57dbb590e08a29b9072680e09a5b28d8

Download 32-bit windows executable: sh2_mp_ai_enabler_x86-0.3.exe
sha256sum: 6dfd8b2304cef262bb7c1ca3729ce8f5bcece6af270ca06684782bcad0c5ea5a

Version 0.3 source code:

Arch Linux users can use this AUR package: sh2_mp_ai_enabler


Older version of this tool (not recommended):

Version 0.2:

Download 64-bit windows executable: sh2_mp_ai_enabler_x86_64-0.2.exe
sha256sum: ed41b48a11ecb92d5fc30250bfcf2168dbcb2d9f5da84b1ee22d382f29cd6750

Download 32-bit windows executable: sh2_mp_ai_enabler_x86-0.2.exe
sha256sum: 21878a20281e68dd3ab9eea0afb5c8562e4126dc0d81bcff5c4f645b84c5d888

Version 0.2 source code:

Version 0.1:

64-bit windows executable: sh2_mp_ai_enabler_x86_64-0.1.exe
sha256sum: 1bd1ec6cfaed1b44048d40380a4eeb207427746c32efa90f4b1f909559cc1780

32-bit windows executable: sh2_mp_ai_enabler_x86-0.1.exe
sha256sum: 78c86740f24d13f2bbebf1f2fe93b78f14d6b24ae377c0538d21c5f579582b0b

Version 0.1 source code:

How to use this tool

Only the game host should use this tool. Other players joining the game should not be running this tool.

This tool is very simple to use, requiring no interaction.

  1. Run the AI enabler tool that you downloaded from here
  2. Run Stronghold 2 Steam Edition
  3. Host a multiplayer game, you can now add AI opponents.

This should be working without issues, but in case there are problems you can report it on the Stronghold 2 steam forums:

Compilation instructions

Before you can compile anything, you need to download the source code. Ideally you will want the source code for the newest release.


On Linux, ensure you have basic build tools installed (gcc, binutils, make), then simply enter the 'src' directory and type:

make CFLAGS="-s"

This will create an executable named "sh2_mp_ai_enabler". You can omit the last part with CFLAGS="-s" but I recommend it as it will create a smaller executable without unneeded symbols.


I am not particularly familiar with Windows or developing on Windows. With the help of others, I've gotten the code to a state where it will compile cleanly in Visual Studio, however, I have no experience with compiling this way.

My personally recommended way for compiling C code on Windows would be MSYS2 as it includes all the tools required for preparing and compiling source code the Unix way. It will create a native Windows executable. It also has full support for typical C makefiles.

MSYS2 can be downloaded and installed from here:

For detailed compilation instructions: Compiling Stronghold 2 AI fix from source

Make sure to read and follow the installation instructions to the letter. Once it is properly set up, you need to 'cd' into the 'src' directory for this tool, and then build it with a single command:

make windows CFLAGS="-s"

This will create the executable for the program which you can then move anywhere you like. The CFLAGS="-s" part is not required, but I still recommend it for creating a smaller executable without uneeded symbols.