Death Probability?

Users who are viewing this thread

Does anyone know the chance of dying in battle? For the player, companions and Lords? I'm sure age is a factor I'd love to see the algorithim. I'll search the code when I get a chance, but if anyone knows that'd be great.
 
For the player the chance is 0%. I don't believe the player can die in battle currently.

For npc lords and companions the base chance is 10% any time they go down in battle. This chance decreases based on surgeon skill, character level, and perks. Most npcs will have between an 8% and 10% chance of dying in a real time battle. I'm not sure if they will die in autoresolve or not.
 
For the player the chance is 0%. I don't believe the player can die in battle currently.

For npc lords and companions the base chance is 10% any time they go down in battle. This chance decreases based on surgeon skill, character level, and perks. Most npcs will have between an 8% and 10% chance of dying in a real time battle. I'm not sure if they will die in autoresolve or not.
They are definitely dying in AI vs AI battles (idk if you meant player autoresolve). Lol my favorite vassal is already dead in this playthrough (1.5.0 beta), poor olek. Olek died on one of the first few days in a Sturgia vs Vlandia army battle, the clan was passed down to his son Urik.

EDIT: Im wrong, olek died of natural causes PIC
 
Last edited:
Wow 10%, the amount the sturgians fight (and lose) they'll only have the kids left after 100 days, assuming they don't get themselves wiped out before then anyway. I haven't had a new playthrough yet but feels like number of parties could drop off quite a bit at that rate.
 
Wow 10%, the amount the sturgians fight (and lose) they'll only have the kids left after 100 days, assuming they don't get themselves wiped out before then anyway. I haven't had a new playthrough yet but feels like number of parties could drop off quite a bit at that rate.
Yeah i think more clans are going to need teenagers close to being 18 so the population doesnt fall off to hard after a few years.
 
This is an awesome step towards immersion :smile:. Does the death option on character creation toggle this on/off completely for those who don’t want deaths? I imagine it’s not for everyone, but I’m really looking forward to seeing it balanced and fully functional within a campaign.
 
For the player the chance is 0%. I don't believe the player can die in battle currently.

For npc lords and companions the base chance is 10% any time they go down in battle. This chance decreases based on surgeon skill, character level, and perks. Most npcs will have between an 8% and 10% chance of dying in a real time battle. I'm not sure if they will die in autoresolve or not.
Thanks for the info!
 
They are definitely dying in AI vs AI battles
I'm just not seeing that. In the code it sets a lord's status to "wounded" during autobattles if their HP falls below 20, then removes them from the battle, but from there it doesn't seem to actually cause death in any cases.

If they start dying when they go down in autobattles, then I agree they will need to lower the chance or work out an alternative to prevent them from dropping like flies.

Edit: There is a separate death by wounds function that is called when the "Kill Action" of a character is set to Wounded In Battle, but it doesn't appear to be used just yet. Maybe the intention is to eventually have a separate chance of dying from wounds when an npc goes down during an autobattle.

Does the death option on character creation toggle this on/off completely for those who don’t want deaths?
Yep, it works correctly, though it only applies to battles. Characters (including the player) can still die of old age, execution, or during labor regardless of the checkbox.
 
Last edited:
I'm just not seeing that. In the code it sets a lord's status to "wounded" during autobattles if their HP falls below 20, then removes them from the battle, but from there it doesn't seem to actually cause death in any cases.

If they start dying when they go down in autobattles, then I agree they will need to lower the chance or work out an alternative to prevent them from dropping like flies.


Yep, it works correctly, though it only applies to battles. Characters (including the player) can still die of old age, execution, or during labor regardless of the checkbox.

I think @Blood Gryphon meant that they die in A.I vs A.I. battles where the player is not involved at all. The player can be on the other side of the map and this battle is taking place between the vassal and an enemy army. I have seen lots of lords die in the game even in 1.4.3. I'm not sure if they were dying in battle or of old age, but several of the clan leaders had been replaced due to death by the time I started my own kingdom.
 
I think @Blood Gryphon meant that they die in A.I vs A.I. battles where the player is not involved at all.
Right, I understand that, but it doesn't appear to happen in the case of AI vs AI battles. If you guys go into the Heroes tab of encylopedia and sort by "Dead," do you see any characters that specifically state, "He died in battle" for npcs that you know for sure were not involved in a real time battle with you?

Edit: Here is the code that is applicable for simulated battles/autoresolve/autobattles, including AI vs AI:
Apply-Simulation-Damage-To-Selected-Troop.png
 
Last edited:
I think it is too early to implement death of lords in battle. In my playthrough war never ends and if they die in %10 of the battles no one will be alive very soon.

  • Lords should be able to retreat for good when they understand the battle is lost. Units understand too late if the battle is lost or not.
  • There should be a way to escape from battles. In warband lords could escape even if I killed them with my own clicks. In bannerlord, I have never seen lords escaping. They shouldn't be able to escape if they had fallen in battle but they should be able to go outside of the battle zone if they see that the battle is lost (outside of red circle) and escape from the enemy.
  • Lords should be able to sacrifice some men to escape like we can do.
  • Lords should be able to escape in a settlement if someone is chasing. When I chase a lord, they never get in a castle or town like they did in warband.
  • There should be more improvements of lords avoiding the battle like never going to a corner or a dead end if being chased, releasing things that slow them down(maybe we can get these on the map like troops and loot and taking these can take some time to slow us down), etc.
  • Lords should fear of dying and try to escape from hopeless situations or if they get caught they should be more likely to surrender not to die. This would decrease amount of battles the player has to do (which is too much and makes battles boring after some time) and this will make the sentence "Surrender or die!" more meaningful as they never died in battles before and they never surrendered even if it is like 10v1. Honorable lords can be less likely to surrender and calculating lords can be more prone to it.
  • And AI of the enemy should be better and not attack a stacked force one by one, not leave their advantageous positions after losing some men etc.
 
@Bannerman Man you are right, i was mistaken

I just loaded it back up and Olek died of natural causes PIC.

Whats interesting is notes on a character seem to change or lose its history because when i was playing last night it noted on the right that he died summer 3 of 1084 and did not state it was due to natural causes in the main description. This happened to also be while he was in an army that was defeated on the same day which baited me to think it was occuring.

What are the chances of death by natural causes at age 48 and how unlucky did I get that he died so fast? If you happen to know
 
Last edited:
Yo, this probability might be too high -- or I'm getting into way too many fights -- because I'm up to nine years and there are a fair few clans that might just have no party-leaders in them if trends continue...
 
Yo, this probability might be too high -- or I'm getting into way too many fights -- because I'm up to nine years and there are a fair few clans that might just have no party-leaders in them if trends continue...

Now we need a way for new npc clans to be created otherwise we dont have any left after a few years.
 
https://www.nexusmods.com/mountandblade2bannerlord/mods/481?tab=description

this mod was enabling hero deaths in AI vs AI battles, sadly its not updated anymore..


Right, I understand that, but it doesn't appear to happen in the case of AI vs AI battles. If you guys go into the Heroes tab of encylopedia and sort by "Dead," do you see any characters that specifically state, "He died in battle" for npcs that you know for sure were not involved in a real time battle with you?

Edit: Here is the code that is applicable for simulated battles/autoresolve/autobattles, including AI vs AI:
Apply-Simulation-Damage-To-Selected-Troop.png
 
Right, I understand that, but it doesn't appear to happen in the case of AI vs AI battles. If you guys go into the Heroes tab of encylopedia and sort by "Dead," do you see any characters that specifically state, "He died in battle" for npcs that you know for sure were not involved in a real time battle with you?

Edit: Here is the code that is applicable for simulated battles/autoresolve/autobattles, including AI vs AI:
Apply-Simulation-Damage-To-Selected-Troop.png

I didn't know you could see the cause of death there. That is interesting. I just noticed a lot of grayed out guys when looking at the clans, If it is old age, it may be that it is progressing a bit quickly.This could be something they put a slider in for depending on player preference and how quickly you want new lords to replace current leaders. Also want to add this code block does not expicitly rule out a hero death in battle as it could be an issue in one of the validations or methods that are utilized. Also, where did this come from? Haha, I was afraid the game would be coded in some obscure language, but this looks just like the C based languages I am familiar with.
 
What are the chances of death by natural causes at age 48 and how unlucky did I get that he died so fast? If you happen to know
At that age it looks like it would be an approx. 1 in 8400 chance per day that he would die, lol.

If it is old age, it may be that it is progressing a bit quickly.This could be something they put a slider in for depending on player preference and how quickly you want new lords to replace current leaders.
Good point. You can see how the old age death probablility is calculated in the CalculateHeroDeathProbabilityInternal method. I made a graph of the chances here. Those are daily chances.

Also want to add this code block does not expicitly rule out a hero death in battle as it could be an issue in one of the validations or methods that are utilized.
True, but I'm also basing my conclusion on the fact that I've "simulated" a 1.5.0 game out to about 400 days by just letting it run, and not a single npc hero has died from battle. I've also sprinkled some breakpoints around in the code that deals with death in battle and none of them trigger unless it's in a real time battle with the player. I'm pretty confident it doesn't happen. Whether that's due to a bug or is intentional is another subject.

Also, where did this come from?
Decompiling the .dlls with dnSpy. It's coded in C#. The method that kills heroes is ApplyInternal in the KillCharacterAction class. That's a different block of code than the one in the screenshot above (which deals with autobattle casualties), and the two are not connected by function calls in any way that I can tell.

Edit: Here is the method that calculates survival chances. It actually is called by the above method, but only in the part of the code that deals with regular troop casualties (not for heroes). This same method is also used for real time battle casualty survival odds as well.
Get-Survival-Chance.png
 
Last edited:
At that age it looks like it would be an approx. 1 in 8400 chance per day that he would die, lol.
Holy **** I should play the lotto. This must be sturgia's revenge on me making Olek be the first to betray them all my last playthrough. Sure it was "natural causes" Raganvad..... ? Thanks for actually doing the calculation!
 
Back
Top Bottom