Tutorial: Adding deaths / losses (STUNNING!! I ALMOST DIED!!)

Users who are viewing this thread

Younes

Grandmaster Knight
Prelude: Doing this is kind of annoying as you can't load external libraries the same way SP does with mods, so you kind of have to modify the dlls directly. I don't know how long this will work before TW decides to make battleye check for changes in TW's own libraries.

Also this doesn't work for older or newer versions each time so you kind of have to update it each time you update your game because the library has a lot of other classes that will in 99% of cases be updated on a new update. (hence also why i included a how to do it yourself)


DOWNLOAD

Latest update 05/11/2021
(I will edit this file when i am not too lazy when an update comes out, if an update came out and it isn't the right date it means i didn't update)


Insert in: Mount & Blade II Bannerlord\bin\Win64_Shipping_Client
copy and replace, make a backup in case idk, they always say to do that

Also this only includes skirmish, tdm and siege deaths, as it was the only gamemodes with it pre removal. (i think)

HOW TO DO IT YOURSELF (in case TW says no to putting a download to one of their dlls which is understandable or you don't trust me ?)

Requirements:
- DNSPY https://github.com/dnSpy/dnSpy/releases/tag/v6.1.8 (or any other kind of assembly editor)
- A healthy brain that is confused on TW's decision to remove deaths

1. Open DNSPY and click this icon

88845068de597bda5417c9e3db14d1d7.png


2. Navigate to "Mount & Blade II Bannerlord\bin\Win64_Shipping_Client " and shift click the top file inside that folder followed by a shift click on the bottom file to select all of the .dll and .exe files

3. Use the search function (look at previous picture, far right) and type exactly "TDMScoreboardData" (Case sensitive so type it exactly like that) and click on it. It should open the following inside of the TaleWorlds.MountAndBlade.dll:

64f11589aa6b0899c0a4b389f9d13c2b.png


4. You need a bit of knowledge about basic programming but basically you have to increase your array by +1 to accommodate the deaths value that will then be displayed on the leaderboard. (Note you start from 0, so if an array has a size of 7, it means your max range is 0-6)

5. Change the Array size to 8 at the very top line. To edit the specific method right click and press edit method, the right click has to be inside that method.

MissionScoreBoardComponent.ScoreBoardHeader[] array = new MissionScoreboardComponent.ScoreboardHeader[7]

becomes

MissionScoreBoardComponent.ScoreBoardHeader[] array = new MissionScoreboardComponent.ScoreboardHeader[8]

6. Add the following line AFTER the "kills" directly, as you don't want the scoreboard to look weird.

array[5] = new MissionScoreboardComponent.ScoreboardHeader("death", (MissionPeer missionPeer) => missionPeer.DeathCount.ToString(), (BotData bot) => bot.DeathCount.ToString());

7. You'd notice there are now 2 arrays that are using the same space in the array, it will kind of look like this. (I used the template with 5 to make it clear) We don't want this.

c704b00524192e0975a4f319ed5eff13.png


8. Move up the numbers so they all take exactly one spot from 0 to 7. (this is 8 but we start from 0 don't forget) It will look like this now, i will highlight the things changes

9be348fe992858d1d5dbaed8bac7bdfe.png



9. Do the same to the following methods using the search function like i used in the start to find TDMscoreboard:
"SiegeScoreboardData",
"SkirmishScoreboardData",
"TDMScoreboardData", (the one showed above in case u didn't follow)

"CaptainScoreboardData", (Optional)
"DuelScoreboardData", (Optional)
"BattleScoreboardData", (The gamemode isn't implemented so not really any point but eh)
"FFAScoreboardData", (Isn't implemented like battle)

Optional meaning: Those gamemodes don't have deaths from what i remember pre death removal but if you want it, go ahead i guess.


10. Save your changes by clicking on the save button next to the folder you used in the start (or ctrl + shift + s) and launch ur game.

5e202287db91da5c2794b5bbb04ca24a.png


11. Pray TW doesn't sue me or something for fixing their mistakes, idk i am not a lawyer.

DOWNLOAD


Put native string inside of
Mount & Blade II Bannerlord\Modules\Native\ModuleData

Put the dll inside of
Mount & Blade II Bannerlord\bin\Win64_Shipping_Client

I also put total games because why not

d85f7bc4a36a31bcb709f699fbfced1c.png


I know the stats go over the border but i am not too familiar with their GUI and i am too lazy to find out how to add 2cm more of space.

That's it, if you liked my thread be sure to follow my next tutorial on how to add the whole leaderboard back when they inevitably decide to remove that ?
 
Last edited:
Lol nice one. Im curious to see how quick they will undo your efforts. Im also curious to compare that reaction time to some other things that need attention..
 
How can this work with battlEye xd, you shouldn't be able to launch the game with modified files lmao
From what i gather TW still works on a flagging system currently for hackers to manually review, so i think they know when someone uses altered files (i think though not sure). I did try doing things with loot but TW is competent enough to have several checks done on their end to prevent you from telling the server you have 8000 $LOOT.
 
I can't remember to be honest, it's been a while now and they never mentioned the change in the patch notes. I do know that atleast it was still present in version 1.4.3 I think? If that helps at all.
Couldn't be bothered to download and be wrong but i figured it out anyhow.

5b0e6b3a4be3f92c3134381a5faa82fb.png

ignore the same numbers kill etc, i was just experimenting with it
Will post how to do it tomorrow though bcs im tired
 
Can you also mod a battle mode in mutiplayer with class system gone? don't answer it's rhetorical question xD
 
I just wish they made an option to choose if I wanna see MY deaths and losses. That's my statistic, I could do it manually if I wanted to, I should be able to see it.
 
Back
Top Bottom