I heard battle size of Bannerlord is capped at 2048, but why?

Users who are viewing this thread

I have posted a thread about battle size, and people told me that Bannerlord will crash when battle size reaches 2048, but I don't understand the reason behind that. Is this a pre-defined limit set manually by developers or is this a limit induced by the structure of program/computer? If it was the first case, I don't understand their intention for doing that. If it was the second case, well the number 2048 makes this case looks possible, but I still can't understand why this happened refer to what I have learnt.

Edited: Surely I understand increase battle size will increase computation complexity and therefore reduce performance. But I cant see the reason why developers want to manually set a limit for that(I mean in background code, not the slider within in-game setting panel.) That's why I doubt if this restriction is resulted from structure of program/computer or not, but I cant understand why if this is the case.

Edited: Oh just forget I'm supposed to ask why this is the case only after I know this is truly the case. So can anyone clarify the statement"battle size of Bannerlord is capped at 2048"?
 
Last edited:
I have posted a thread about battle size, and people told me that Bannerlord will crash when battle size reaches 2048, but I don't understand the reason behind that. Is this a pre-defined limit set manually by developers or is this a limit induced by the structure of program/computer? If it was the first case, I don't understand their intention for doing that. If it was the second case, well the number 2048 makes this case looks possible, but I still can't understand why this happened refer to what I have learnt.
Maybe engine related? It is really hard to calculate such an huge amount of individual units (each unit needs combat AI, stats calculation etc...). I am pretty sure the engine cannot handle more units then this. Most of the other indie engines would struggle with even smaller number of units (I am not saying M&B engine is indie engine...).
 
The simple answer is stability, the more units the less stability. The current number is probably on the safe side for the game. If they upped this, stability issues would occur and probably cause unintended issues elsewhere.
 
I mean its not like Total War where each troop is one AI maybe topping at 200 AI's in a really huge multiplayer battle. While in Bannerlord each unit has an AI and handling 2048 AI's is pretty impresive.

Edit: Not really answering you question, dont know what I'm doing here.
 
Maybe engine related? It is really hard to calculate such an huge amount of individual units (each unit needs combat AI, stats calculation etc...). I am pretty sure the engine cannot handle more units then this. Most of the other indie engines would struggle with even smaller number of units (I am not saying M&B engine is indie engine...).
The simple answer is stability, the more units the less stability. The current number is probably on the safe side for the game. If they upped this, stability issues would occur and probably cause unintended issues elsewhere.
Surely I understand what you say, but that's not a reason to add such restriction in background code, the in-game setting panel have already capped battle size at 1000, any attempt to exceed that limit requires some kind of modding, and as we all know, mod game at your own risk.

I mean its not like Total War where each troop is one AI maybe topping at 200 AI's in a really huge multiplayer battle. While in Bannerlord each unit has an AI and handling 2048 AI's is pretty impresive.
Yes, battle size of Bannerlord is impressive compare to Warband, and even though I play with the upper cap the game can go on fine, then it will crash when I pass some point. This is not a gradual process, but happens suddenly after some points.(i.e. normally when you try to change setting of quality to higher levels, the performance will drop gradually. When it finally break the game, you cannot actually 'play' the game at slightly lower level, but in Bannerlord this is not the case, at least as I can see.) That's why I wonder reason behind the upper limit.
Also I'm not sure how Bannerlord AI is implemented. If what you desribed is truly the case, I wonder why. Like you can let the AI, at least pathfinding AI, be computed at troop/squad level as Total War games, during most battle time, at least for field battle.
 
Honestly I am not sure why it is apparently hardcoded at 2048 but it appears from everything I have read on the subject that is the max the game will allow. Mod the game to 2048 and if you have the computer hardware to handle it, it is perfectly stable. 2049 and the game crashes so somewhere, somehow there is a hardcoded limitation.

The thing is, I have my game modded to allow 1500 and I am running everything at max settings with zero a hiccup and a high FPS so I know my gaming rig can do much more than that. I have a 3800x, 32 GB of Ram and a RTX 3080 and my CPU isn't fully utilized. Next year I plan on buying a 5900x which will give me about 20% more CPU processing power which I understand is more critical for having a large amount of troops than actual GPU power. Conceivably from a raw power standpoint if 1500 troops doesn't put a strain on my rig, I would expect I should be able to run probably 2500-3000 troops by that time.

Also I fully expect that Bannerlord, just like Warband, has a potential of at least a 10 year lifespan with mods so at some point I will likely have an enemy more powerful computer to run it.

I guess my point is, I can see why Taleworlds would want to limit the unmodded amount of troops to ensure stability across the entire spectrum of computers that players would be using this game on, even rather low spec machines, but considering how this game was designed from the ground up to be modded, hard limiting and even modded game to only 2048 troops seems odd considering how long this game could actually be actively played. My only guess is that the engine they are using just isn't capable of more and if it is capable of more, I do hope they eventually uncap it for modders.
 
I would like to join the request to enable bigger battle size for people with powerful computers, How did you guy get the over 1000 troops mod to work? it says on Nexus that it doesn't work with latest patches?
 
I would like to join the request to enable bigger battle size for people with powerful computers, How did you guy get the over 1000 troops mod to work? it says on Nexus that it doesn't work with latest patches?
You have to revert back to the patch it works on.

You'll find more and more that mods wont update to each patch
 
Also I'm not sure how Bannerlord AI is implemented. If what you desribed is truly the case, I wonder why. Like you can let the AI, at least pathfinding AI, be computed at troop/squad level as Total War games, during most battle time, at least for field battle.

Yes, each troop in Bannerlord has it's own independent AI. Total War Games may look impressive, but there's a reason they don't let you actually fight, and that's because it's all visual simulation to make it look like a massive battle when infact there's not a whole lot actually happening behind the scenes. It looks great for sure, but you wouldn't actually be able to interact with those soldiers if you was down there with them.

AI in Bannerlord need to be able to fight dynamically, having freedom of movement, selecting the closest target, accessing that targets blocking direction, choosing it's own, predicting it's movement to correctly throw javelins or fire projectiles at. None of this would work with the Total War Style of AI implementation and all of these calculations can add up to be very intensive with a large amount of troops.

The reason they limit the troops is so the product they release is stable, if they increased the cap to 10,000, and advertised it as such, there would be a lot of backlash when people realise their machine can't handle it. There may also be some engine limitation in there, so they decided to cap it at what they thought was the highest acceptable value.

TIP FOR PEOPLE MODDING THEIR MAX BATTLE SIZE: Also note, that Horses/Mounts count towards the Battle Size Limit, so if you try to spawn 2000 Cavalry, you're actually spawning 4000 AI in total, which will most likely crash your game!
 
I have posted a thread about battle size, and people told me that Bannerlord will crash when battle size reaches 2048, but I don't understand the reason behind that. Is this a pre-defined limit set manually by developers or is this a limit induced by the structure of program/computer? If it was the first case, I don't understand their intention for doing that. If it was the second case, well the number 2048 makes this case looks possible, but I still can't understand why this happened refer to what I have learnt.

Edited: Surely I understand increase battle size will increase computation complexity and therefore reduce performance. But I cant see the reason why developers want to manually set a limit for that(I mean in background code, not the slider within in-game setting panel.) That's why I doubt if this restriction is resulted from structure of program/computer or not, but I cant understand why if this is the case.

Edited: Oh just forget I'm supposed to ask why this is the case only after I know this is truly the case. So can anyone clarify the statement"battle size of Bannerlord is capped at 2048"?
Because 2048 is the year Mount & Blade III is coming out.
 
It's just more efficient to hardcode a number than to do various calculations related to your settings, size of the modules, available resources, etc every time the game runs.
 
It's just more efficient to hardcode a number than to do various calculations related to your settings, size of the modules, available resources, etc every time the game runs.
Yes, true, but if I want to take in on myself and want to experience many units battle knowing that the game can crush and in worse case I will just restart the game with less units, they should enable it at least as a supported "Hack" in a mod or something like this.
 
Maybe because every trooper might be described in the code with a number which will be translated as a binary symbol combination of I and 0 which seems to be 10 bits big so: 0000000001 is Trooper #1 for the engine and 1111111111 is trooper #2048. For another one you would need to make the engine understand that there are numbers greater than "10 binary digits". Might be engine-related. But it is indeed a power of 2 which might make one guess this could be an allocation thing or something hard-coded. I mean, you must explain to the program what to do with the input it gets and if it is like "there are 2048 troopers possible" because it only accepts a 10-digit number as denominator we cannot simply make it 4096 by adding another digit because then the program will be confused. Maybe something like that. Maybe they thought when making the game years ago "well, we cannot imagine that PCs will be able to handle a larger number than roughly 2000, so we use the 10-digit solution as denominator. I do not know. Maybe I just had a bad coffee and am seeing things.
 
Last edited:
My guess is that doubling the hardcoded maximum from 2048 to 4096 (i.e. adding a bit, the smallest possible increase) would cause a significant performance drop that would make *all* battles run worse on *all* systems, raising the minimum and recommended requirements on the CPU side.

They probably already took a hit from going for 2048 instead of 1024, but did it because they didn't want to lock themselves out of offering sizes over 1000 in the future without a refactor.
 
There are 2 engines in the game. One is written in C# (.NET) and this is what mods can use and override/extend. There is another that handles the rendering and low level stuffs in the battle scenes (maybe written in C++ ?, but I have never really studied that, so this is just a guess).

Anyway, with a mod you can increase the battle size to whatever you want (in the .NET code) but the underlaying (low level/rendering) module crashes above 2k when it gets this number, suggesting that there is a hardcoded buffer/list with that maximum size, and if you give a bigger number, it overrides and corrupts memory - and crashes the whole game.
 
There are 2 engines in the game. One is written in C# (.NET) and this is what mods can use and override/extend. There is another that handles the rendering and low level stuffs in the battle scenes (maybe written in C++ ?, but I have never really studied that, so this is just a guess).

Anyway, with a mod you can increase the battle size to whatever you want (in the .NET code) but the underlaying (low level/rendering) module crashes above 2k when it gets this number, suggesting that there is a hardcoded buffer/list with that maximum size, and if you give a bigger number, it overrides and corrupts memory - and crashes the whole game.
it would be nice if they could some how (idk if they can) allow modders to raise the cap but say you do so at your own risk and it will likley break stuff but have fun (base game would stay at 2048 so that people dont complain when there PC tanks for trying to use 10.000 men)
 
Back
Top Bottom