Stronghold 2

Stronghold 2

View Stats:
wobbli Apr 28, 2020 @ 7:10am
AI in multiplayer - if you're still looking for "Stronghold 2 Manager"...
[Edit 12/18/2020 - process summarised page 3]
[Edit 12/23/2020 - apparently the original developer is to review for Steam 1.5 Version - see 'Open Issues' notes on GitHub link below - last update was 4 days ago]
[Edit 07/27/2022 - this approach appears to work using updated signature]

For those of you that want AI back in the multiplayer so you can do co-op and can't find a solution, read on. The AI in multiplayer was removed from the non-steam version some time ago via a patch I believe.

There was a solution using so-called "Stronghold2 Manager" some time back but that always showed up having viral content and was hard to find (and you had to trust...). I found this source code (https://github.com/Jpnock/Stronghold2-MP-AI) - I am not the author.

Being source, you can review it's content and actions. Once compiled (VSCommunityEd), it works like a charm.

Note that I have the retail version of stronghold and play on GameRanger.

You run SH2, CTRL-ESC, run task manager, find the Process ID of SH, run your compiled executable as admin, enter the PID and voila - no messing around like the "Manager" product.

I have no idea what the Steam version might do with it, but i'm guessing it'll be same as retail.
Last edited by wobbli; Jul 27, 2022 @ 7:35pm
< >
Showing 1-15 of 45 comments
SpaceDink Apr 29, 2020 @ 9:17pm 
the link isnt working
Caligula May 2, 2020 @ 11:20am 
How do you compile the files into an executable please?
Caligula May 2, 2020 @ 11:21am 
Originally posted by Caligula:
How do you compile the files into an executable please?
(I googled and youtubed to no avail)
wobbli May 2, 2020 @ 8:14pm 
Steam filtered the link I posted. I have corrected it but Cr4nK's is the same and works.

I used 'Visual Studio - Community Edition' from MS - it's free (c++ extensions) Other cpp compilers will work just as well

Download the files (extract the zip if you did it that way)
Using VS, open the solution file ('Stronghold 2 MP AI.sln') from your download folder
Click Build from the menu
Click 'Build Stronghold 2 MP AI'

By default VS is in debug mode, so go to the download folder and look in a sub-folder called 'debug' - the exe will be in there


Last edited by wobbli; May 2, 2020 @ 8:17pm
exiom123 May 3, 2020 @ 8:08am 
i would like to ask how it is with the retails version you are really not descriptive in terms on how to get into mp at first place
i have bought game on disc with 1.4.1 version on it
and all it says that mp has been temporarily disabled
wobbli May 3, 2020 @ 6:11pm 
For MP in the retail version, use https://www.gameranger.com/about/.

Start GameRanger, choose Stronghold2, start the game...

I assume Steam version has reintroduced MP via Steam functionality.
Last edited by wobbli; May 3, 2020 @ 6:15pm
So does this work on Steam or nah?

Is there any way to downgrade to 1.4.1 if not?
So it's possible to downgrade the Steam version to 1.4.1. For the record, here's a guide: https://knockout.chat/thread/10205/1
And afterwards: https://steamcommunity.com/sharedfiles/filedetails/?id=1985923465

Since you cannot check which manifest correlates to which version I'll jot it down for anyone interested. For Stronghold 1.4.1 it'll be the following parameters:
dotnet DepotDownloader.dll -app 40960 -depot 40961 -manifest 6900393407777132601 -username [YOURSTEAMUSERNAME] -password [YOURSTEAMPASSWORD] -validate

I do not know yet if Gameranger will work with the Steam Edition, however. That's the part I'll need to test tomorrow.
Just tried it. Doesn't work. GameRanger doesn't recognize the Steam version it seems.

Sucks how Steam players are just out of luck and are forced to download the game from somewhere or something.
wobbli May 17, 2020 @ 10:24am 
I don't have the Steam version, so cannot test, but the Steam version of the game must still have a PID for the game once started. Does the Steam version still have Kingmaker option where you can add AI? If so, does the normal MP screen show the same AI buttons? It's the functionality of these buttons that the process adjusts.

I have not seen that anyone with a Steam version has specifically confirmed the approach above. Can someone with the CURRENT version try the approach and just see if it works? This process temporarily modifies some in-memory code once the game is running.
BadDings May 18, 2020 @ 12:00pm 
Tested it with the current 1.5 Steam version. No luck.

"Searching for AI MP Pattern!
Failed to find pattern!"
Originally posted by wobbli:
I don't have the Steam version, so cannot test, but the Steam version of the game must still have a PID for the game once started. Does the Steam version still have Kingmaker option where you can add AI? If so, does the normal MP screen show the same AI buttons? It's the functionality of these buttons that the process adjusts.

I have not seen that anyone with a Steam version has specifically confirmed the approach above. Can someone with the CURRENT version try the approach and just see if it works? This process temporarily modifies some in-memory code once the game is running.


  1. The 1.5 patch doesn't work with the bot mod, as also stated by the user above.

  2. The Steam 1.4.1 version behaves weirdly. There's a big window in the way when clicking on MP stating something like "Can't connect to GameSpy right now", but it's still possible to "host" a lobby, and I can add bots.

    However, the issue is that GameRanger does not work with the Steam version from what I can tell.

  3. It works perfectly fine with the 1.4.1 Deluxe Edition, as it is picked up by GameRanger.
wobbli May 18, 2020 @ 9:39pm 
Originally posted by Dispenser Down, Push!:
The Steam 1.4.1 version behaves weirdly. There's a big window in the way when clicking on MP stating something like "Can't connect to GameSpy right now", but it's still possible to "host" a lobby, and I can add bots.

However, the issue is that GameRanger does not work with the Steam version from what I can tell.
Retail Deluxe 1.4.1 behaves the same way


found this on http://stronghold.heavengames.com/cgi-bin/forum/display.cgi?action=ct&f=18,3940,,10 for 1.4.1. At the bottom of discussion attributed to "Piehole13", suggestion is to change compatibility of the Stronghold2 executable to "Windows XP (Service Pack 3)" and then the Steam version apparently will run with GameRanger...

If this proves to be true, it would be interesting to see if that changes the result for version 1.5 also..
Last edited by wobbli; May 18, 2020 @ 9:56pm
Originally posted by wobbli:
Originally posted by Dispenser Down, Push!:
The Steam 1.4.1 version behaves weirdly. There's a big window in the way when clicking on MP stating something like "Can't connect to GameSpy right now", but it's still possible to "host" a lobby, and I can add bots.

However, the issue is that GameRanger does not work with the Steam version from what I can tell.
Retail Deluxe 1.4.1 behaves the same way

For us it doesn't, maybe the German version has slightly different programming.

Originally posted by wobbli:
found this on http://stronghold.heavengames.com/cgi-bin/forum/display.cgi?action=ct&f=18,3940,,10 for 1.4.1. At the bottom of discussion attributed to "Piehole13", suggestion is to change compatibility of the Stronghold2 executable to "Windows XP (Service Pack 3)" and then the Steam version apparently will run with GameRanger...

If this proves to be true, it would be interesting to see if that changes the result for version 1.5 also..

Well oof. I will try that tomorrow.
Last edited by Schorsch Wadschinken; May 21, 2020 @ 4:49pm
< >
Showing 1-15 of 45 comments
Per page: 1530 50