So here's yet another memory editing modification in progress.
I have raised the current hardcoded religion limit from 10 to 32. tested it with 21 religions in-game. haven't been able to test it with all 32 (UI might not handle it -YET-) but game is running smooth with 50 turns of play time. I haven't tested it much because I got other plans and other limits to break, so no time to waste. Users can test it and provide feedback after the release.
WIP
Religion UI fix
Region/Settlement limit
Hidden Resources limit
If you want to help me, just send me mods that are above the limit like how can i find a 199 region map it is quite exhausting for me to do it by myself.
FIRST RELEASE! (Thanks to youneouy)
https://drive.google.com/file/d/1GMv...4Mb-W7pdT/view
Using ReligionsAndSoldiersLimitsBreaker, you can set your own limits for the number of religions, block the ability to change the size of units in the game settings, and set the boundaries for the number of soldiers in units.
This program can be useful when creating your own modifications for the game MTW2.
Works with game versions 1.5 (disk version) and 1.52 (steam version).
All program settings are set in the limits.youneuoycfg file and are applied when the game starts. Those. First you need to run the program and only then the game, I recommend just writing its launch in the .bat mod file. And also, do not forget to put the config and executable in your mod directory for this to work.
Here's the bat file i'm using to launch my mod, thanks to Gigantus for that (it is an slightly edited universal start.bat that comes with bare_geomod)
Religion Limit:Code:@echooff cd ..\.. IFEXIST kingdoms.exe (start kingdoms.exe @%0\..\Configuration.cfg & start ReligionsAndSoldiersLimitsBreaker.exe) ELSE ( IFEXIST medieval2.exe ( start medieval2.exe @%0\..\Configuration.cfg & start ReligionsAndSoldiersLimitsBreaker.exe) ELSE ( echo ERROR: Cannot find the M2TW or Kingdoms executable. echo You probably installed Bare Geomod into the wrong folder. pause ) )
It is set in the Religion_Limit line, by default the game has a value of 10, theoretically the maximum value is 255 (if such a number works correctly and someone needs to exceed it, then it will be possible to increase it further). It is recommended to put the number necessary for you.
Number of soldiers in a Unit:
Allows you to specify the maximum and minimum boundaries for the size of the unit in the file export_descr_unit.txt, by default, these values are 4 and 100.
If you set the minimum number of units in the game, then in this file you can clearly set the number of units you need, without the use of number modifiers. Those. You can simultaneously create units with 1 and 300 soldiers.
It is regulated by four parameters:
Lock_Size_Of_Unit, allows you to block the ability to resize unit in the game, is activated if you enter a non-zero value (for example, unit). It is necessary to avoid crashes (if you set the number of squad 300 in the EDU and start the game with the maximum squad size, then there will be a crash when it starts).
Size_Of_Unit, size of the unit. The range of values is from 0 to 3. It is recommended to use it together with Lock_Size_Of_Unit and set the value to 0. 0 - minimum size, 3 maximum.
Min_Soldiers_In_Edu - The minimum size limit in the EDU, from zero and above.
Max_Soldiers_In_Edu - the upper limit of the number in the EDU, it is recommended to set the value to less than 300, with large games may be unstable or crash.
Acknowledgements:
The program used the achievements of Aura and Jojo00182 comrades with twcenter.
Be sure to rep @Jojo00182 and @youneuoy too for their contributions to the project!
IMPORTANT NOTE, Please Read: Some antivirus might detect the .exe file provided as a false negative, this is because we used WriteProcessMemory in order to edit the game's memory (a brute force method) if you have any questions and second thoughts about that I can share you the source code and even if there is a lot of complaints about it, we can make the project open source.