SP Native Advanced Custom Battle

Bloc

Duke
WB
Best answers
0

Alright folks, I would like to share something that I was working on for a week. You all probably saw the Custom Battle mod that is around everywhere. This is not so much different from that one. This version includes the following

Important: This mod is discontinued now. It won't work with latest Bannerlord version. Please try other mod options if you don't want to wait till the end of March.


Features
  • Map selection - You can now select maps and play around. I will explain the caveats of this below.
  • Custom changes in position and some random values - This is important. You will understand when you read steps for first item
  • Battle Morale - Now your soldiers can run away from the battlefield if they see that battle is lost already. I also made them drop their weapons so that they will run faster like a real deserter. This applies for enemy too, so you can always slaughter the cowards.
  • Battle Horns - Yep. You heard it right. When you give your orders, depending on your order, you will signal your troops with different horn sounds.
  • Battle Chanting - Well... Not quite chanting but when they are marching, they are periodically making grunting sound a couple of times to make it more like an army that is trying to scare their enemies.
  • Winning - Now when you win the battle, by either killing everyone or letting them run away, you will see good-old text at left corner saying that you can leave with holding tab, and how many people you actually have killed. If you are so bloodthirsty or just didn't notice that information text, you can always understand that you have won the battle by the cheers of your comrades. Yes. They are showing human-like animations now
  • Banners - Still experimental, but you have banner units
  • Torches - Still heavily experimental, but you can now have torched units blazing through the battlefield
  • Dynamic Units - Now you have more real-like army with different types of equipment, heights, weights, faces etc.
  • Experienced Generals - Now enemy general can take decisions based on the location that they are holding or based on what type of unit he is controlling. There is still around 25% chance to see the unexperienced enemy general.
  • Controlling the Bots - Either while you are alive or dead, you are now able to control your soldiers. Don't push too hard for this functionality tho, it's not tested properly.
  • Simple Stats - Now you can press TAB once to get more information related to the current state of the battle. Current information is limited with how many soldiers do you have, how many enemies are still standing and how many people you have killed.
  • Extra Characters - I added bunch of extra characters. Nothing fancy, they are not even the greatest warriors. You can edit them actually if you know-how.
  • Environment Sounds - I tried to add music but I failed gracefully. So I added some environmental effects such as wind blowing and so on.
  • Random Weather - So.. This is tricky. I actually added real random weather ( snow, rain, time changes etc ) but Bannerlord kept crashing randomly. So I added random weather fog - which is the safest for everyone. Depending on the luck, it might be too foggy.
  • Siege-like Behavior - This one is the funniest and probably most unstable of all features. In siege map, especially in siege map 4, your bots are actually using mangonels, trebuchets and siege crossbows. They are killing each other as well. So they are not professional. And since they are so retarded, they are stuck at machines waiting for the enemy to kill them sometimes.
  • God Functions - You can change the camera mode with C. You can wander around. If you want to take control of a bot, press F while near it. To go out, press C again. If you press C again while you are flying, you will return to your player character ( dont try that if you are dead ). If you feel like you spawned in a weird place, do the free fly trick. Find a good spot, press L and you will be teleported to that location.
  • Simple UI Elements - Previously we didn't have "hold the tab to exit" or escape menu. Now we have. But ALWAYS, use hold the TAB for stability. Don't go out with clicking escape.
  • Random Crashes - They are not so random actually but expect lots of crashes if you are doing something unusual. I don't work for TW so I don't have a QA master like Meriç, so I can't cover all the problems in this tiny decompiled version

Map Selection and Knowledge Sharing
Map coordinates are not always set properly. I set pre-values for some maps, but not all of them because I don't have much time. Therefore, it's possible that in most of the maps, you can start in weird locations. But don't worry. You can use god mode functions to set that up. Simply click C, become the soul (free camera mode) and wander around. Once you find a good stop that you think everybody should spawn, simply press I (I for information) and read the coordinates. Note that down, hold TAB, start another match but this time use noted down values. You can also use rotate X,Y function too, but it's normalizing the value so it's not always too predictable ( not like a 90 degree stuff ) But if you can try. Same applies for sun brightness as well. Some maps are too dark or just extremely bright. Use that for such cases.
Once you find a great way to fight that wasn't in the game, post here all the values, let us know! So we can also enjoy that.


Download


Latest Version: 0.2.5

I will keep last two version links separately in case of any unwanted effects of the new version.

Installation
It's pretty easy actually. Follow the steps
  1. Download the archive file
  2. Use Winrar, 7zip or some fancy expensive unarchiver, but unarchive the package.
  3. You will now see bin and Modules folder. Select them both. Copy or cut then go to your Bannerlord's main directory. You should be able to see same folder names in that directory as well. Your main path should be something like this C:\Program Files(x86)\Steam\steamapps\common\Mount & Blade II Bannerlord - Beta
  4. Paste in the same directory. You are ready. If you don't have BattleTest.dll, it shouldn't ask any overwrite, so don't worry.
  5. Now go to bin. Then Win64_Shipping_Client, find BattleTest.bat. If you hate to go in this folder all the time, right click, Send To -> Desktop Shortcut.
  6. Click to .bat or your Shortcut. Enjoy!


Adding Your Own Character
All credit goes to @koiote
To get started, go to
steamapps\common\Mount & Blade II Bannerlord - Beta\Modules\BattleTest\ModuleData
there are two files:
mpcharacters - data on units, their equipment and skills
allitems- item data: armor, weapons, horses, etc.
-----------------------------------------------------------------------------
open the mpcharacters file in a text editor
descriptions of each unit begins with the key <NPCCharacter and ends with a key </NPCCharacter>
Between them is a unique id, unit name, skill indicators, as well as a set of weapons, armor, etc.
copy for example the first unit "Ulfrich" and paste at the beginning of the file, immediately after <MPCharacters>
replace id = "mp_character" with a unique name that is convenient for you. Also replace name = "{= eFWJjaBC} Ulfrich"> with a name convenient for you (it will be displayed in the game

Now take care of equipment
open the table editor (in the example I use Excel 2013) and drop the file there: allitems
it should look something like this:
id column - item id, we need them to add our equipment set to our unit
type column - type of items needed to find a type compatible item
at the very right edge of the table, there are id6 and crafting_template columns. they are similar to the previous ones, but apply to weapons
Now I will copy the weapon with the name (id6 column) dolabra and paste it into our mpcharacters text file, for my character, in this example instead of <equipment slot = "Item0" id = "Item.mp_sturgia_heavy_axe" />
I got <equipment slot = "Item0" id = "Item.dolabra" />
by anology, I pick up a helmet, shoulders, armor and a horse (I remind you that the id and type columns are in the left part of the table to help you)

as a result, my character block began to look like this:

XML:
<NPCCharacter id = "Apolon" level = "36" name = "Apolon">

    <face>

      <! - face_key value = "34.12; 0.4; 0.4568; C07C0000001; 11111211161111; 7010000100000; 11101100010100; 7600407111110; 0; 0; 180000" max_value = "68.79; 0.7253; 0.6852; 11FC0FC03C384F; FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ; 0; 309101 "/ ->

      <BodyProperties version = "3" age = "20.96" weight = "0.5" build = "0.6" key = "00000C07000000010011111211161111000701000010000000111011000101000000000207111110000000000000000000000000000000000000000000100000" />

      <BodyPropertiesMax version = "3" age = "20.96" weight = "0.5" build = "0.6" key = "0011FC0FC03C384FFFFFFFFEFFFBEFFFFFFFFFFFA97EF7FEFFFFEFFFFFFFFFFFFFFF000000FD20AFFFFFF000000000000000000000000000000000000000000289101" />

    </face>

    <skills>

      <skill id = "Riding" value = "200" />

      <skill id = "OneHanded" value = "300" />

      <skill id = "TwoHanded" value = "300" />

      <skill id = "Polearm" value = "200" />

      <skill id = "Crossbow" value = "100" />

      <skill id = "Bow" value = "999" />

      <skill id = "Throwing" value = "100" />

    </skills>

    <equipmentSet>

      <equipment slot = "Item0" id = "Item.dolabra" />

      <equipment slot = "Head" id = "Item.merchants_hat" />

      <equipment slot = "Cape" id = "Item.battania_cloak_furr" />

      <equipment slot = "Body" id = "Item.monk_robe" />

      <equipment slot = "Gloves" id = "Item.mp_lamellar_plate_gauntlets" />

      <equipment slot = "Leg" id = "Item.mp_lamellar_plate_boots" />

      <equipment slot = "Horse" id = "Item.pack_camel" />

    </equipmentSet>

  </NPCCharacter>


Video


Screenshots

FAQ
As far as I know, yes. You can't do anything at all without Beta anyway. So you can't even play this without Beta. And Beta is free.. So.. Yeah
I lurked around in the decompiled game a lot.
Most likely no.
Although Bannerlord might suck in the future, currently you have no right to say that Especially by looking at a crappy custom battle mod.
Since I didn't do this for money or something, you don't owe me anything at all. But hey, If you would like to gift me a copy of Bannerlord for Early Access, I wouldn't say no to this nice gesture
Yes and no. Yes you can do that if I change the dll. Perhaps I will. If that happens, yes, you can do that. In this current state. No.
Probably. Depends... Uhm.. No.
Feel free to say anything you want. Good or bad, I would like to hear that.
 
Last edited:

Bloc

Duke
WB
Best answers
0
Have fun guys. Feel free to post/share screenshots, videos so we can all see nice battles :smile:
 

Piconi

Count
WBM&BWF&SVCNW
Best answers
0
Nevermind all the other work you have done here, because that butter for the loading screen is worth milion points alone !
I , my friend, salute you :party:
 

JuanNieve

Knight at Arms
WBWF&SNWVC
Best answers
0
The option to control the bots could help improve the commander mode. For example, we could take control of a lord with troops assigned to cavalry and control him to make charges on the flanks or take control of a sergeant with horse archers and make hit and run tactis; and maybe attract the enemy cavalry toward to our heavy cavalry.
 

JustinTime49

Veteran
Best answers
0
The option to control the bots could help improve the commander mode. For example, we could take control of a lord with troops assigned to cavalry and control him to make charges on the flanks or take control of a sergeant with horse archers and make hit and run tactis; and maybe attract the enemy cavalry toward to our heavy cavalry.
Hmm, but that would foil making it feel like you're only one man in an army of hundreds. Ik the AI will never compete with a human brain, but having to trust the AI to perform tactics themselves based on their personalities gives life to the game. I don't want a fully RTS feel of having to micro between different commanders like you would units in TW. You are one of the hundreds of characters in M&B, not a god looking down upon your subordinates.
 

MrBNP

Regular
Best answers
0
Wow this has made me scared the performance drop i've just had , I was obviously expecting a drop in FPS compared to the original battle tester, i was getting 60-70 FPS with 1000 man battle previous now i'm getting 25 FPS with 400 men with this

I'm just praying for optimisation now.

On a more positive note Good job Cheers
 

Terco_Viejo

Spanish Gifquisition
Knight at Arms
Best answers
0
@Bloc Great contribution mate. Just yesterday I downloaded the mod and today I find your contribution. That' s great, you just avoided bothering @Younes123 for hacker magic.
 

Jerald of Rivacheg

Sergeant at Arms
M&BWBNWVCWF&S
Best answers
0
Wow this has made me scared the performance drop i've just had , I was obviously expecting a drop in FPS compared to the original battle tester, i was getting 60-70 FPS with 1000 man battle previous now i'm getting 25 FPS with 400 men with this

I'm just praying for optimisation now.

On a more positive note Good job Cheers
Same here, I am not sure if this is the mod addon perhaps causing some error? I've seen that sometimes units do an odd shuffle that they never did before almost as if the AI is being given the same order over and over and trying to idle between steps. I was able to do 1400 man battles on battle tester at 80 fps now I can only do 150vs150 with this huge fps dips seemingly at random with this addon. I am not overly concerned about battle size, but this addon seems to affect performance drastically despite how much of a blessing it is.

Regardless, thank you very much OP.
 
Last edited:

NA1F

Regular
WBVC
Best answers
0
the game crash. and i received a message:
the application faced a problem. we need to collect necassary files to fix the problem. would you like to ubload these files
help plz
i do exactly what you do but every time i click on BattleTest.bat. the game crash on the start
EDIT
now it's work
Erase the contents of your "BattleTest.bat" file and replace it with this:
nativestarter.exe _MODULES_*Native*BattleTest*_MODULES_
thanks to johbowfor and thank you Bloc for the mod
 
Last edited: