Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Just to be clear: You can now launch the AI enabler, then you launch Stronghold 2. No more interaction is needed.
If you use MSYS2, then there is also a makefile now, so you can simply compile with "make windows"
If you use Visual Studio then the makefile is probably useless. But I do hope it will compile without warnings and errors. If you get any warnings or errors with Visual Studio, please let me know, ideally by opening an issue on the gitlab repo.
Should things work as expected for those who want to test, please let me know here. Once I'm confident there are no issues, then I'll provide updated precompiled Windows executables on the page I set up.
Just compiled it myself using VS' developer command prompt with the "cl" function. Compiled without issues. Followed the application instructions. AI loaded into multiplayer without any manual PID input. Seems to work just fine.
Thanks for the testing, in particular the compilation testing on VS. That helps a lot!
Yes I have thought of this, but modifying the text segment of process memory requires admin/root rights. I think I prefer having the program being able to run with just your regular user and no elevated privileges.
Anyway, this is a great tool, although I haven't tested it yet. I agree with others who noted that it might be better to make the tool so that it doesn't collide with any of the Steam rules. I don't know much about that, I have to admit.
Also, I have yet to test the tool, and I will let everybody else know how it works. What I'm interested to know the most is how it works compared to the old Stronghold 2 AI Manager. For start, the old AI Manager was getting detected by antivirus as a troyan. It was a false positive, but still, it was an inconvenience. From what I heard here, this one doesn't have that issue, so that's a promising start for me! :)
Hello, glad you found your way here.
I'm not that familiar with how different antivirus software work, but when it comes to unknown software I suspect they analyze the binary file for typical opcodes. I most certainly hope no software will detect my tool as malware, but considering that it specifically modifies the memory of another process, I suppose there is always the chance.
If the Stronghold Manager was detected as malware, that might be related to the fact that it modifies the 'text' segment of process memory. The 'text' segment is protected memory as it contains opcodes, which is essentially cpu instructions. Modifying these will require the software to be run as admin (root on Linux). I would not be surprised if this was more likely to trigger a false positive in antivirus software.
The utility developed by @jpnock that NOPs the opcode to stop the disablement of the AI in MP does not cause any such concern and appears to run without elevation. Obviously @Daerandin's works just as well by toggling the 'enable/disable' byte in memory on an ongoing basis whilst the game is running and has the benefit of not having to find the process ID yourself.
Two ways to achieve the same result - seems we are now spoiled for choice...
Your post made me perform a little test, and you are correct! Seems I was mistaken about needing elevated privileges. I just assumed since that region of memory is marked as read-only. My code needs slight modification for Linux, since Linux does not permit writing to that region without first attaching to the process as a debugger but it can still be done as a regular user. As for Windows, no changes were needed.
I can update my program to do it in this way instead. The difference is this:
Now my program needs to constantly run. If you stop my program, and then host a multiplayer game, then you can't add AI.
With the changes, my program would perform the operation once, then shut down on its own since there is no need for it to keep running. The changes will remain in effect as long as the game itself is running. If you restart the game, then my changes will no longer be present and you would need to run my tool again to apply the changes.
As an added bonus, the new version also lets you add randomized AI opponents in multiplayer, just like Kingmaker.
The older versions are also available on the download page, just in case someone would prefer how that worked.
Nice little tweak. I was wondering why the random option wasn't enabled in prior patches! Thanks for the update :)
I wouldn't use that old one - you don't know what else it might be doing unless you can review source.
The one here by Daerandin is safe to use