[1.0.4] Prisoner conformity bar bugged (?)

Users who are viewing this thread

Some of my prisoners are not recruitable because they do not gain conformity over time. So far I have noticed it with Karakhuzait Elder and Khuzait Heavy Horse Archer. Both of these are max tier troops, so maybe this issue is related to that. And maybe this is intended behavior and max tier troops are supposed to be recruitable.

EDIT: Because I've had trouble finding any threads on this forum bringing attention to the issue that the mod Recruitable addresses, I'll open another thread for it. I'll also change the title of this thread from "Some prisoners do not gain conformity" to "[1.0.4] Prisoner conformity bar bugged (?)" to reflect the discussion below.
 
Last edited:
Some of my prisoners are not recruitable because they do not gain conformity over time. So far I have noticed it with Karakhuzait Elder and Khuzait Heavy Horse Archer. Both of these are max tier troops, so maybe this issue is related to that. And maybe this is intended behavior and max tier troops are supposed to be recruitable.
I also have the same problem, I wasn't sure if you were limited to who you could recruit based on their tier.



So my raider has now been recruited (I have no idea how long I've had him but it's been a while). It looks as though they just take a great deal of time to recruit or there is some sort of bug.
 
I have the exact same issue with Bushwackers and Forest Bandits. I recruited one Bushwacker normally, but others from the stack do not gain conformity. Other troops like looters seem to be recruitable just fine.
 
So my raider has now been recruited (I have no idea how long I've had him but it's been a while). It looks as though they just take a great deal of time to recruit or there is some sort of bug.
When the raider was recruitable, did the conformity bar look filled up? Or was it still empty?

I have the exact same issue with Bushwackers and Forest Bandits. I recruited one Bushwacker normally, but others from the stack do not gain conformity. Other troops like looters seem to be recruitable just fine.
I've had 6 imperial cataphracs for like 100+ IGN days, yet I have not been able to recruit them.
I'll see if I can recruit these prisoners in my game.
 
I've noticed anything tier 5+ cannot be recruited. Tier 4 and below eventually can. The conformity bar does not visibly fill up with any prisoners
 
I've noticed anything tier 5+ cannot be recruited. Tier 4 and below eventually can. The conformity bar does not visibly fill up with any prisoners
Okay same for me too. Just tried it out with a bunch of prisoners. It took a couple weeks in game for the Sea Raider Chief to be recruitable.
rkk6Uv3.jpg
 
Okay same for me too. Just tried it out with a bunch of prisoners. It took a couple weeks in game for the Sea Raider Chief to be recruitable.
All prisoners by default are recruitable.

This is the formula used to determine the Conformity needed to recruit a prisoner:

(24 * (0.25 + (0.5 * {character tier})))

Where {character tier} essentially scales up with the level of the prisoner divided by 5 and rounded up, capped at 7.

Now, you gain 1 conformity per hour by default. So let's assume that we have a tier 5 Khuzait Khan's Guard, which is level 31. Using the formula below to obtain the character.Tier, we end up with (31-5)/5, which equals 6, after rounding up.

C#:
Math.Min(Math.Max(MathF.Ceiling((character.Level - 5f) / 5f), 0), 7)

So, after plugging 6 into the first formula above, you get 78. So, you would think it takes 78 days to recruit a tier 5 unit, right? Well, not quite. There seems to be a massive random element involved. The "dailyRecruitedPrisoners" seems to have a big impact on recruitability as well. Here's the important snippet:


Code:
if ((tier < dailyRecruitedPrisoners.Length) && ((dailyRecruitedPrisoners[tier] > 0f) && (MBRandom.RandomFloat < dailyRecruitedPrisoners[tier])))

So in other words, there doesn't seem to be a bug by my investigation, but it will take a MINIMUM of 78 days to recruit a tier 5 unit, if you're lucky.
 
Last edited:
I updated my post since my first reply to you. I'm looking at the decompiled .dll files in Steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client
 
All prisoners by default are recruitable.

This is the formula used to determine the Conformity needed to recruit a prisoner:

(24 * (0.25 + (0.5 * {character tier})))

Where {character tier} essentially scales up with the level of the prisoner divided by 5 and rounded up, capped at 7.

Now, you gain 1 conformity per hour by default. So let's assume that we have a tier 5 Khuzait Khan's Guard, which is level 31. Using the formula below to obtain the character.Tier, we end up with (31-5)/5, which equals 6, after rounding up.

C#:
Math.Min(Math.Max(MathF.Ceiling((character.Level - 5f) / 5f), 0), 7)

So, after plugging 6 into the formula above, you get 78. So, you would think it takes 78 days to recruit a tier 5 unit, right? Well, not quite. There seems to be a massive random element involved. The "dailyRecruitedPrisoners" seems to have a big impact on recruitability as well. Here's the important snippet:


Code:
if ((tier < dailyRecruitedPrisoners.Length) && ((dailyRecruitedPrisoners[tier] > 0f) && (MBRandom.RandomFloat < dailyRecruitedPrisoners[tier])))

So in other words, there doesn't seem to be a bug by my investigation, but it will take a MINIMUM of 78 days to recruit a tier 5 unit, if you're lucky.
Impressive, did you calculate how long tier 6 unit might take to recruit at maximum?

EDIT: Just noticed there is a mod on nexusmods for the recruitment of tier 5,6 units due to a bug on 1.0.4 version supposedly. Im just gonna download that
 
Last edited:
Impressive, did you calculate how long tier 6 unit might take to recruit at maximum?
That's where it gets a little bit more complicated, because there's more randomness than what I just posted involved. Here's the other random factor:
int num = MBRandom.RandomInt(prisonRoster.Count);

What that code does is generate a random integer between 0 and the number of prisoners you have. That number is then used to pick one of the prisoners at random. After a prisoner is chosen, a random double (decimal number) between 0 and 1 is generated. Now, the only way you recruit a unit is if this random number is less than the value assigned to that tier. These are the default values:
  • Tier 1 (lowest level crap units): 1
  • Tier 2: 0.5
  • Tier 3: 0.3
  • Tier 4: 0.2
  • Tier 5: 0.1
So let's stick with the same example as before, and assume we're working with the Tier 5 Khuzait Khan's Guard. That means that after the number between 0 and 1 is generated, we can't recruit the Khuzait Khan's Guard unless the random number is less than 0.1. And don't forget that this STILL depends on that Khuzait Khan Guard being chosen at random from the rest of your prisoners. The only good thing is that this random number generation happens once per day for each prisoner you have, rather than just once per day regardless.
 
EDIT: Just noticed there is a mod on nexusmods for the recruitment of tier 5,6 units due to a bug on 1.0.4 version supposedly. Im just gonna download that
After looking at this some more I believe that's a fix. I don't know what this part of the code looked like prior to 1.0.4, so idk if they introduced a bug, or if they never intended for you to be able to recruit units with too high of a level. Probably a bug. What I said about randomness and everything else still holds true FYI, in case anyone comes across this in the future.
 
Last edited:
All prisoners by default are recruitable.
Thanks for investigating this and the explanation. I definitely can't read the code haha. I'm still a little confused on a few points:
  1. In game it says a tier 5 needs 66 conformity rather than 78. Is the formula (24 * (0.25 + (0.5 * {character tier}))) the minimum number of days to get enough conformity then?
  2. A tier 5 prisoner takes at least 78 days to recruit. If this prisoner generates 1 conformity per hour and requires 66 conformity, why does it not take 66 hours rather than 78 days? I can see why it would take longer because of randomness, but it seems like the in-game tooltips are suggesting that the minimum would be 66 hours.
  3. The random number generation happens once per day per prisoner. Is this the random integer between 0 and the number of prisoners? Or the random double? I'm hoping the former because (correct me if I'm wrong) that seems to increase the odds of recruiting.
  4. Does this random number generator only take effect to determine recruitability, i.e. when one of my prisoners has enough conformity? If so, would this basically mean that recruiting a prisoner requires a certain amount of conformity and for them to be randomly selected afterward? I guess I don't understand the takeaway from this part of the code.
Sorry for the wall of text!

EDIT: One last question. If the prisoners are supposed to be generating conformity (if very slowly) shouldn't their conformity bars be filling up over time? Could this element of prisoner recruitment be bugged?
 
Thanks for investigating this and the explanation. I definitely can't read the code haha. I'm still a little confused on a few points:
  1. In game it says a tier 5 needs 66 conformity rather than 78. Is the formula (24 * (0.25 + (0.5 * {character tier}))) the minimum number of days to get enough conformity then?
  2. A tier 5 prisoner takes at least 78 days to recruit. If this prisoner generates 1 conformity per hour and requires 66 conformity, why does it not take 66 hours rather than 78 days? I can see why it would take longer because of randomness, but it seems like the in-game tooltips are suggesting that the minimum would be 66 hours.
  3. The random number generation happens once per day per prisoner. Is this the random integer between 0 and the number of prisoners? Or the random double? I'm hoping the former because (correct me if I'm wrong) that seems to increase the odds of recruiting.
  4. Does this random number generator only take effect to determine recruitability, i.e. when one of my prisoners has enough conformity? If so, would this basically mean that recruiting a prisoner requires a certain amount of conformity and for them to be randomly selected afterward? I guess I don't understand the takeaway from this part of the code.
Sorry for the wall of text!

EDIT: One last question. If the prisoners are supposed to be generating conformity (if very slowly) shouldn't their conformity bars be filling up over time? Could this element of prisoner recruitment be bugged?
Good questions!

1. If we plug in the number 5 into the formula, we actually get 66, so there isn't a discrepancy between the code and what you see in game there. The thing is, the way the game calculates "tier" is based on the level of your troops that you see when you click on them in the party view. The way we naturally think of tiers is by just counting how many rows there are (so the bottom row is "tier 5" to us. To simplify it, in the game files, the "GetCharacterTier" function does this calculation: (CharacterLevel - 5)/5, and then round up to the nearest whole number. It's funny that I used the Khajit troop as an example, because it's level 31, whereas some other Top Tier troops look like they are around level 26 or so. That leaves the Khajit Troop actually being Rank 6, not Rank 5, so that was my mistake.

2. That was a typo on my part. It's a dailyTick, so you gain one conformity per day, not hour.

3.
Is this the random integer between 0 and the number of prisoners?
Yes. So another way to put it is this in pseudo-code:
C#:
    pick one of these prisoners at random
    generate a decimal number between 0 and 1 (you could also think of it has 0-100)
    if the random number chosen is less than the value assigned to that prisoner:
t        recruit the prisoner
The number of times that that code is run is equal to the number of prisoners you have.

So understand that that does not mean you will definitely try to recruit each prisoner each day. If you're unlucky, you might only try to recruit 5 out of the 20 prisoners you have, because those 5 prisoners were chosen at random 20 different times on a single day.

4. The important part of the last snippet says that if you rolled the dice luckily with the random number between 0 and 1, the prisoner can then be recruited. Checking conformity is handled elsewhere, but it's straightforward enough to check that so I won't go into detail.

And to your edit: I've only played like 7 hours of the actual game lol, so I'm not sure, but I'll look into that next, maybe make a mod until it gets fixed if so. Also, use the mod recommended earlier, it fixes a bug with recruitment that I missed earlier. That should fix the problem of not being able to recruit high level prisoners.

 
Good questions!

1. If we plug in the number 5 into the formula, we actually get 66, so there isn't a discrepancy between the code and what you see in game there. The thing is, the way the game calculates "tier" is based on the level of your troops that you see when you click on them in the party view. The way we naturally think of tiers is by just counting how many rows there are (so the bottom row is "tier 5" to us. To simplify it, in the game files, the "GetCharacterTier" function does this calculation: (CharacterLevel - 5)/5, and then round up to the nearest whole number. It's funny that I used the Khajit troop as an example, because it's level 31, whereas some other Top Tier troops look like they are around level 26 or so. That leaves the Khajit Troop actually being Rank 6, not Rank 5, so that was my mistake.

2. That was a typo on my part. It's a dailyTick, so you gain one conformity per day, not hour.

3. Yes. So another way to put it is this in pseudo-code:
C#:
    pick one of these prisoners at random
    generate a decimal number between 0 and 1 (you could also think of it has 0-100)
    if the random number chosen is less than the value assigned to that prisoner:
t        recruit the prisoner
The number of times that that code is run is equal to the number of prisoners you have.

So understand that that does not mean you will definitely try to recruit each prisoner each day. If you're unlucky, you might only try to recruit 5 out of the 20 prisoners you have, because those 5 prisoners were chosen at random 20 different times on a single day.

4. The important part of the last snippet says that if you rolled the dice luckily with the random number between 0 and 1, the prisoner can then be recruited. Checking conformity is handled elsewhere, but it's straightforward enough to check that so I won't go into detail.

And to your edit: I've only played like 7 hours of the actual game lol, so I'm not sure, but I'll look into that next, maybe make a mod until it gets fixed if so. Also, use the mod recommended earlier, it fixes a bug with recruitment that I missed earlier. That should fix the problem of not being able to recruit high level prisoners.

Thanks for the detailed explanations. No more questions! Also, that slip with "khajit" instead of "khuzait" was awesome haha.
 
Back
Top Bottom